added the featured images to the index page

This commit is contained in:
manetta 2019-03-06 14:21:54 +01:00
parent 6d38192ffc
commit d629b9f78b
2 changed files with 24 additions and 4 deletions

View File

@ -0,0 +1,13 @@
body{
/*background-color:yellow;*/
}
#content .post{
position: relative;
display: inline-block;
width: 250px;
vertical-align: top;
}
#content .post img{
width: 250px;
}

View File

@ -7,8 +7,12 @@
<ol id="post-list">
{% for article in articles_page.object_list %}
<li><article class="hentry">
<header> <h2 class="entry-title"><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2> </header>
<li class="post">
<article class="hentry">
<header>
<img class="entry-img" src="{{ article.featured_image }}">
<h2 class="entry-title"><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2>
</header>
<footer class="post-info">
<time class="published" datetime="{{ article.date.isoformat() }}"> {{ article.locale_date }} </time>
<address class="vcard author">By
@ -17,8 +21,11 @@
{% endfor %}
</address>
</footer><!-- /.post-info -->
<div class="entry-content"> {{ article.summary }} </div><!-- /.entry-content -->
</article></li>
<div class="entry-content">
{{ article.summary }}
</div><!-- /.entry-content -->
</article>
</li>
{% endfor %}
</ol><!-- /#posts-list -->
{% if articles_page.has_other_pages() %}