~irimi1/manu.computer

5230cca8e950db1422539ecf88d4484e59c63c8b — Manuel Groß 19 days ago 9ea6868
Paginate weblog
3 files changed, 21 insertions(+), 1 deletions(-)

M content/weblog/_index.md
M static/mgr.css
M templates/weblog.html
M content/weblog/_index.md => content/weblog/_index.md +1 -0
@@ 6,6 6,7 @@ sort_by = "date"
weight = 0
template = "weblog.html"
page_template = ""
paginate_by = 10
paginate_path = "page"
+++


M static/mgr.css => static/mgr.css +10 -0
@@ 128,3 128,13 @@ hr {
	display: flex;
	justify-content: space-around;
}

.weblog-left {
	align: left;
	text-align: left;
}

.weblog-right {
	float: right;
	text-align: right;
}

M templates/weblog.html => templates/weblog.html +10 -1
@@ 5,7 5,7 @@
{% block content %}
  <h1>Weblog</h1>
  {{ section.content | safe }}
    {% for page in section.pages %}
    {% for page in paginator.pages %}
      {% if page.extra.microtype %}
        {% if page.extra.microtype == "note" %}
          <img src="{{ config.base_url }}/fontawesome/sticky-note-regular.svg" class="icon" />&nbsp;<strong>{{ page.title }}</strong>


@@ 30,4 30,13 @@
      {% endif %}
    <hr />
    {% endfor %}
    <p>
    {% if paginator.previous %}
      <a class="weblog-left" href="{{ paginator.previous }}">« Newer entries</a>
    {% endif %}
    {% if paginator.next %}
      <a class="weblog-right" href="{{  paginator.next }}">Older entries »</a>
    {% endif %}
    </p>
    <div style="clear: both;"></div>
{% endblock content %}