Source

ryshcate / ryshcate / templates / layout.html

Full commit
{# layout.html -- Master page layout for Ryshcate
   (C) 2010 Matthew "LeafStorm" Frazier
   Part of Ryshcate, see LICENSE for details
#}<!doctype html>
{% set nav_links = [
    (_('New'), url_for('pastebin.new_paste')),
    (_('All'), url_for('pastebin.all_pastes')),
    (_('Languages'), url_for('pastebin.list_languages')),
    (_('Tags'), url_for('pastebin.list_tags')),
    (_('Settings'), url_for('system.settings')),
    (_('API'), url_for('system.api_info'))
] %}
<html>
<head>
    <title>{{ site_config('title', 'Ryshcate') }}: {{ title }}</title>
    <meta charset="utf-8" />
    <!--[if lt IE 9]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link rel="stylesheet" href="{{ url_for('.static', filename='style.css') }}" />
    <style type="text/css">
{{ get_styles() }}
    </style>
    {% block head %}{% endblock head %}
</head>
<body>
<div class="container">
    <header>
        <h1>{{ site_config('title', 'Ryshcate') }}</h1>
    </header>
    
    <nav>
        {% if page_nav_links is not defined %}{% set page_nav_links = [] %}{% endif -%}
        {% for (title, url) in chain(nav_links, page_nav_links, site_config('extra_links', [])) -%}
        <a href="{{ url }}">{{ title }}</a>{% if not loop.last %} | {% endif %}
        {% endfor %}
    </nav>
    
    {% with flashes = get_flashed_messages(with_categories=True) -%}
    {% if flashes -%}
    <section id="flashes">
    {%- for category, message in flashes %}
        <p class="flash {{category}}flash">
            {{ message }}
        </p>
    {%- endfor %}
    </section>
    {%- endif %}
    {%- endwith %}
    
    <div class="content">
        {% block body %}{% endblock body %}
    </div>
    
    <footer>
        <p>{{ site_config('copyright') }}
        {%- if site_config('powered_by') %} | {{ _("Powered by Ryshcate") }}{% endif %}</p>
    </footer>
</div>
</body>