rra 7 years ago
parent
commit
bd336aa17e
  1. 147
      theme/wttf/templates/index.html
  2. 5
      theme/wttf/templates/tag.html

147
theme/wttf/templates/index.html

@ -1,75 +1,92 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block content %} {% block content %}
{% if articles %} {% if articles %}
{% for article in articles_page.object_list %} {% for article in articles_page.object_list %}
{# First item #} {# First item #}
{% if loop.index <= 3 %} {% if loop.index <= 3 %}
<aside id="featured" class="body"> <div id="featured" class="body">
<article> <article>
<h1 class="entry-title p-name"> <h1 class="entry-title p-name">
<a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a> <a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a>
</h1> </h1>
<div class="entry-subtitle"> <div class="entry-subtitle">
A A
<span class="entry-category">{{ article.category }}</span> <span class="entry-category">
about <em>{{ article.category }}</em>
<span class="entry-tags"> </span>
{% for tag in article.tags %} about
<span itemprop="keywords"> <span class="entry-tags">
<a href="/{{ tag.url }}" rel="tag">{{ tag }}</a> {% for tag in article.tags %}
</span> <span itemprop="keywords">
{% endfor %} <a href="/{{ tag.url }}" rel="tag">{{ tag }}</a>
</span> </span>
published on {% endfor %}
<span class="entry-date dt-published">{{ article.date }}</span> </span>
</div> published on
<div class="entry-content e-content">{{ article.content }}</div> <span class="entry-date dt-published">{{ article.date }}</span>
</article> </div>
</aside><!-- /#featured --> <div class="entry-content e-content">{{ article.content }}</div>
{% if loop.index == 3 %} </article>
<section id="content" class="body"> </div><!-- /#featured -->
<h1>Other articles</h1> {% if loop.index == 3 %}
<hr /> <section id="content" class="body">
<ol id="posts-list" class="hfeed"> <h1>Other articles</h1>
{% endif %} <hr />
{# other items #} <ol id="posts-list" class="hfeed">
{% else %} {% endif %}
{% if loop.first %} {# other items #}
<section id="content" class="body"> {% else %}
<ol id="posts-list" class="hfeed" start="{{ articles_paginator.per_page -1 }}"> {% if loop.first %}
{% endif %} <section id="content" class="body">
<li> <ol id="posts-list" class="hfeed" start="{{ articles_paginator.per_page -1 }}">
<article class="hentry"> {% endif %}
<header> <li>
<h1 class="p-name"> <article class="hentry">
<a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a> <header>
</h1> <h1 class="p-name">
<div class="entry-date dt-published">{{ article.date }}</div> <a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a>
</header> </h1>
<div class="entry-subtitle">
A
<span class="entry-category">
<em>{{ article.category }}</em>
</span>
about
<span class="entry-tags">
{% for tag in article.tags %}
<span itemprop="keywords">
<a href="/{{ tag.url }}" rel="tag">{{ tag }}</a>
</span>
{% endfor %}
</span>
published on
<span class="entry-date dt-published">{{ article.date }}</span>
</div>
</header>
<div class="entry-content"> <div class="entry-content">
<p class="p-summary">{{ article.summary }}</p> <p class="p-summary">{{ article.summary }}</p>
<a class="readmore" href="{{ SITEURL }}/{{ article.url }}"> ... read more</a> <span class="entry-readmore"><a class="readmore" href="{{ SITEURL }}/{{ article.url }}"> read more</a></span>
</div><!-- /.entry-content --> </div><!-- /.entry-content -->
</article> </article>
</li> </li>
{% endif %} {% endif %}
{% if loop.last %} {% if loop.last %}
{% if loop.length > 1 or articles_page.has_other_pages() %} {% if loop.length > 1 or articles_page.has_other_pages() %}
</ol><!-- /#posts-list --> </ol><!-- /#posts-list -->
{% if articles_page.has_other_pages() %} {% if articles_page.has_other_pages() %}
{% include 'pagination.html' %} {% include 'pagination.html' %}
{% endif %} {% endif %}
</section><!-- /#content --> </section><!-- /#content -->
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% else %} {% else %}
<section id="content" class="body"> <section id="content" class="body">
<h2>Pages</h2> <h2>Pages</h2>
{% for page in pages %} {% for page in pages %}
<li><a href="{{ SITEURL }}/{{ page.url }}">{{ page.title }}</a></li> <li><a href="{{ SITEURL }}/{{ page.url }}">{{ page.title }}</a></li>
{% endfor %} {% endfor %}
</section> </section>
{% endif %} {% endif %}
{% endblock content %} {% endblock content %}

5
theme/wttf/templates/tag.html

@ -0,0 +1,5 @@
{% extends "index.html" %}
{% block content_title %}
<h2>Articles in the {{ tag }} tag</h2>
{% endblock %}
Loading…
Cancel
Save