Fixed news layout

This commit is contained in:
Alexander Borsuk 2022-06-29 09:30:39 +02:00
parent 8fd880e67c
commit 1c861d8316
2 changed files with 15 additions and 1 deletions

View file

@ -84,6 +84,10 @@ footer {
#badges a {
margin: 20px auto;
}
.news_content_image {
flex-wrap: wrap;
}
}
@media (prefers-color-scheme: dark) {
@ -207,11 +211,17 @@ footer {
img {
max-width: 90%;
}
.news_content_image {
display: flex;
align-items: flex-start;
justify-content: space-between;
}
.news_image {
max-height: 520px;
margin-left: 0.5rem;
display: inline-block;
vertical-align: top;
width: auto;
}
.news_content {
display: inline-block;

View file

@ -15,10 +15,14 @@
{% set s = get_section(path=section) %}
{% for post in s.pages %}
<div class="news_date">&nbsp;<a href="{{ post.path }}">{{ post.date | date(format='%B %e, %Y') }}</a>&nbsp;</div>
<div class="news_content">{{ post.content | safe }}</div>
<div class="news_content_image">
{% if post.content %}
<div class="news_content">{{ post.content | safe }}</div>
{% endif %}
{% for photo in post.assets %}
<img class="news_image" src="{{ post.path }}/{{ photo | split(pat='/') | last }}" />
{% endfor %}
</div>
{% endfor %}
{% endfor %}