aboutsummaryrefslogtreecommitdiffstats
path: root/nikola/data/themes/base-jinja/templates/index_helper.tmpl
blob: 2f9e8ea26f51841959cc61a7eedff49135c47801 (plain) (blame)
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
{#  -*- coding: utf-8 -*- #}
{% macro html_pager() %}
    {% if prevlink or nextlink %}
        <nav class="postindexpager">
        <ul class="pager">
        {% if prevlink %}
            <li class="previous">
                <a href="{{ prevlink }}" rel="prev">{{ messages("Newer posts") }}</a>
            </li>
        {% endif %}
        {% if nextlink %}
            <li class="next">
                <a href="{{ nextlink }}" rel="next">{{ messages("Older posts") }}</a>
            </li>
        {% endif %}
        </ul>
        </nav>
    {% endif %}
{% endmacro %}

{% macro mathjax_script(posts) %}
    {% if posts|selectattr("is_mathjax")|list %}
        <script type="text/x-mathjax-config">
        MathJax.Hub.Config({tex2jax: {inlineMath: [['$latex ','$'], ['\\(','\\)']]}});</script>
        <script src="/assets/js/mathjax.js"></script>
    {% endif %}
{% endmacro %}