view MoinMoin/templates/snippets.html @ 2851:5a49eeb1f307

add spaces to jinja2 expressions, add tests for missing spaces to coding_std.py
author RogerHaase <haaserd@gmail.com>
date Wed, 19 Nov 2014 11:51:19 -0700
parents 22796e5b5361
children 77d9fd0d6504
line wrap: on
line source
{#
Wiki Administrators may use this template (or a copy of it) to customize a wiki.
See https://moin-20.readthedocs.org/en/latest/admin/configure.html#using-a-custom-snippets-html-template
#}

{# Logo in the header #}
{% macro logo() -%}
    <img src="{{ url_for('static', filename='logos/moinmoin.png') }}" id="moin-img-logo" alt="Logo">
{%- endmacro %}

{# Additional HTML tags inside <head> #}
{% macro head() -%}
    {# <meta name="description" content="Free Web tutorials"> #}
{%- endmacro %}

{# Additional HTML before #moin-header #}
{% macro before_header() -%}
    {# <p style="background-color:yellow">This is before moin-header.</p> #}
{%- endmacro %}

{# Additional HTML after #moin-header #}
{% macro after_header() -%}
{%- endmacro %}

{# Additional HTML before #moin-footer #}
{% macro before_footer() -%}
{%- endmacro %}

{# Additional HTML after #moin-footer #}
{% macro after_footer() -%}
{%- endmacro %}

{# License information in the footer #}
{% macro license_info() -%}
    {# <p id="moin-wiki-license">Copyright by...</p> #}
{%- endmacro %}

{# Helper macro to create image links #}
{% macro creditlogo(link, logo, alt, title) %}
    <a href="{{ link }}" title="{{ title }}"><img src="{{ logo }}" alt="{{ alt }}" /></a>
{% endmacro %}

{# Image links in the footer #}
{% macro creditlogos(start='<span id="moin-creditlogos">'|safe, end='</span>'|safe) %}
    {{ start }}
    {{ creditlogo('http://moinmo.in/', url_for('static', filename='logos/moinmoin_powered.png'),
       'MoinMoin powered', 'This site uses the MoinMoin Wiki software.') }}
    {{ creditlogo('http://moinmo.in/Python', url_for('static', filename='logos/python_powered.png'),
       'Python powered', 'MoinMoin is written in Python.') }}
    {{ end }}
{% endmacro %}

{# Helper macro to generate text links #}
{% macro credit(link, text, title) -%}
    <a href="{{ link }}" title="{{ title }}">{{ text }}</a>
{%- endmacro %}

{# Text links in the footer #}
{% macro credits(start='<p id="moin-credits">'|safe, end='</p>'|safe, sep='<span>&bull;</span>'|safe) %}
    {{ start }}
    {{ credit('http://moinmo.in/', 'MoinMoin Powered', 'This site uses the MoinMoin Wiki software.') }}
    {{ sep }}
    {{ credit('http://moinmo.in/Python', 'Python Powered', 'MoinMoin is written in Python.') }}
    {{ sep }}
    {{ credit('http://moinmo.in/GPL', 'GPL licensed', 'MoinMoin is GPL licensed.') }}
    {{ sep }}
    {{ credit('http://validator.w3.org/check?uri=referer', 'Valid HTML 5', 'Click here to validate this page.') }}
    {{ end }}
{% endmacro %}

{% macro footer_meta() %}
    {% if rev %}
        <p id="moin-pageinfo" lang="{{ theme_supp.ui_lang }}" dir="{{ theme_supp.ui_dir }}">
            {% if cfg.show_interwiki %}
                {{ cfg.interwikiname }}:
            {% endif %}
            {{ item_name }} (rev {{ rev.revid | shorten_id }}),
            {{ _("modified") }} {{ rev.meta['mtime']|datetimeformat }}
            {{ _("by") }} {{ utils.editor_info(rev.meta) }}
            {% if item.meta['tags'] %}
                , {{ _("tags:") }}
                {% for tag in item.meta['tags'] -%}
                    <a href="{{ url_for('frontend.tagged_items', tag=tag) }}">{{ tag }}</a>{% if not loop.last %}, {% endif %}
                {%- endfor -%}
            {%- endif -%}.
        </p>
    {% endif %}
{% endmacro %}

{# Additional Stylesheets (after theme css, before user css #}
{% macro stylesheets() -%}
{%- endmacro %}

{# Additional Javascript #}
{% macro scripts() -%}
{%- endmacro %}