Browse Source

added the featured images to the index page

brandnew
manetta 5 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">
{% 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() %}

Loading…
Cancel
Save