Browse Source

added the featured images to the index page

brandnew
manetta 6 years ago
parent
commit
d629b9f78b
  1. 13
      themes/varia/static/css/stylesheet.css
  2. 15
      themes/varia/templates/index.html

13
themes/varia/static/css/stylesheet.css

@ -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;
}

15
themes/varia/templates/index.html

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

Loading…
Cancel
Save