Really fix card image formatting.

This commit is contained in:
Jason McBrayer 2018-12-03 08:29:59 -05:00
parent 7364ff6baf
commit d1873e3bd8
3 changed files with 13 additions and 5 deletions

View File

@ -208,15 +208,18 @@ input#id_poll_frequency
.card
{
margin-top: 1em;
margin: 0, auto;
}
.card-image
{
padding: 1em;
margin 0, auto;
}
.card-image figure
{
padding-top: 25%;
padding: 0;
max-height: 256px;
max-width: 256px;
}

View File

@ -191,6 +191,7 @@ body.has-navbar-fixed-top, html.has-navbar-fixed-top {
.card
{
margin-top: 1em;
margin: 0, auto;
}
.card-image
@ -200,6 +201,8 @@ body.has-navbar-fixed-top, html.has-navbar-fixed-top {
.card-image figure
{
padding-top: 25%;
padding: 0;
max-height: 256px;
max-width: 256px;
}

View File

@ -61,16 +61,18 @@
</div>
{% if toot.card.image %}
<div class="card-image">
<figure class="image is-max-256">
<figure>
<a href="{{ toot.card.url }}">
<img alt="{{ toot.card.title }}" src="{{ toot.card.image }}">
<img class="image is-max-256" alt="{{ toot.card.title }}" src="{{ toot.card.image }}">
</a>
</figure>
</div>
{% endif %}
{% if toot.card.description %}
<div class="card-content">
<p>{{ toot.card.description }}</p>
</div>
{% endif %}
</div>
{% endif %}