aboutsummaryrefslogtreecommitdiff
path: root/templates/weblog.html
blob: 8b2eec60a54ffd6ae61aaba37f40e36b2608d06a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{% extends "base.html" %}
{% block title %}
  {% if section.permalink is containing("weblog") %}
  A weblog by Yaroslav de la Peña Smirnov
  {% elif section.permalink is containing("food") %}
  A collection of recipes by Yaroslav de la Peña Smirnov
  {% else %}
  A website by Yaroslav de la Peña Smirnov
  {% endif %}
{% endblock %}
{% block header %}
  {% if section.permalink is containing("weblog") %}
  <h1>Yaroslav's weblog</h1>
  {% elif section.permalink is containing("food") %}
  <h1>Yaroslav's recipe book</h1>
  {% else %}
  <h1>Yaroslav's website</h1>
  {% endif %}
{% endblock %}
{% block sbdesc %}
  {% if section.permalink is containing("weblog") %}
  <p>Hello, my name is Yaroslav de la Peña Smirnov, welcome to my weblog.
  Sometimes I write software, sometimes I might write my mind here. </p>
  {% elif section.permalink is containing("food") %}
  <p>Here I keep some of the recipes for food that I cook. Nothing really
  special in here, just food that I find delicious, and generally not very
  expensive nor time consuming to cook.</p>
  {% endif %}
{% endblock %}
{% block content %}
<div class="posts-list">
  {% for post in paginator.pages %}
    <div class="post-container">
      <h2>
        <a href="{{ post.permalink }}">{{ post.title }}</a>
        <span class="publish-date">{{ post.date | date }}</span>
      </h2>
      {% if post.summary %}
        {{ post.summary | safe }}
      {% endif %}
    </div>
  {% endfor %}
</div>
{% if paginator %}
  {% if paginator.number_pagers > 1 %}
  <div class="paginator">
    {% if paginator.previous %}
    <a href="{{ paginator.first }}"><span class="icon"></span> First</a>
      <a href="{{ paginator.previous }}"><span class="icon"></span> Page {{ paginator.current_index - 1 }}</a>
    {% endif %}
    {% if paginator.next %}
      <a href="{{ paginator.next }}">Page {{ paginator.current_index + 1 }} <span class="icon"></span></a>
      <a href="{{ paginator.last }}">Last <span class="icon"></span></a>
    {% endif %}
  </div>
  {% endif %}
{% endif %}
{% endblock %}