Fix formatting of both card images and regular media

This commit is contained in:
Jason McBrayer 2018-12-03 07:42:27 -05:00
parent afef082319
commit ecfdf00d6a
2 changed files with 8 additions and 2 deletions

View File

@ -31,13 +31,11 @@ img.fav-avatar {
.is-max-128 { .is-max-128 {
max-height: 128px; max-height: 128px;
max-width: 128px; max-width: 128px;
padding-top: 75%;
} }
.is-max-256 { .is-max-256 {
max-height: 256px; max-height: 256px;
max-width: 256px; max-width: 256px;
padding-top: 25%;
} }
@ -199,3 +197,9 @@ body.has-navbar-fixed-top, html.has-navbar-fixed-top {
{ {
padding: 1em; padding: 1em;
} }
.card-image figure
{
padding-top: 25%;
}

View File

@ -59,6 +59,7 @@
<a href="{{ toot.card.url }}"> {{ toot.card.title }} </a> <a href="{{ toot.card.url }}"> {{ toot.card.title }} </a>
</div> </div>
</div> </div>
{% if toot.card.image %}
<div class="card-image"> <div class="card-image">
<figure class="image is-max-256"> <figure class="image is-max-256">
<a href="{{ toot.card.url }}"> <a href="{{ toot.card.url }}">
@ -66,6 +67,7 @@
</a> </a>
</figure> </figure>
</div> </div>
{% endif %}
<div class="card-content"> <div class="card-content">
<p>{{ toot.card.description }}</p> <p>{{ toot.card.description }}</p>
</div> </div>