pad-read.html 5.33 KB
Newer Older
1
{% extends "base.html" %}
alexandre's avatar
alexandre committed
2
{% load wikify relearn_tags %}
3

svilayphiou's avatar
svilayphiou committed
4
{% block extra_styles %}
5
6
    {% ifequal mode "p" %}
        <link rel="stylesheet/less" href="{{ STATIC_URL }}less/print.less" type="text/css" media="all">
svilayphiou's avatar
svilayphiou committed
7
        <link rel="stylesheet/less" href="/offset-print/" type="text/css" media="all">
8
    {% else %}
eric's avatar
eric committed
9
        <link rel="stylesheet/less" href="{% url 'css' %}" type="text/css" media="screen">
svilayphiou's avatar
merge    
svilayphiou committed
10
        <link rel="stylesheet/less" href="/css-print/" type="text/css" media="print">
11
    {% endifequal %}
svilayphiou's avatar
svilayphiou committed
12
13
14
{% endblock %}


svilayphiou's avatar
tidy    
svilayphiou committed
15
{% block head_meta %}
svilayphiou's avatar
merge    
svilayphiou committed
16
    <meta property="og:type" content="article"/>
svilayphiou's avatar
tidy    
svilayphiou committed
17
18
19
20
21
22
23
24
25
{% if meta %}

    {% if meta.authors %}
        {% for author in meta.authors %}
            <meta property="dc:creator" content="{{ author }}" />
        {% endfor %}
    {% endif %}
    {% if meta.language %}{% for language in meta.language %}<meta property="dc:language" content="{{ language|lower }}" />{% endfor %}{% endif %}

svilayphiou's avatar
svilayphiou committed
26
    <meta property="dc:identifier" content="{{ meta.id.0 }}" />
svilayphiou's avatar
svilayphiou committed
27
    {% if meta.type %}<meta property="dc:type" content="{{ meta.type.0 }}" />{% endif %}
svilayphiou's avatar
tidy    
svilayphiou committed
28
29
30
31
{% endif %}
{% endblock %}


32
33
{% block data_article %}{{ meta.authors|natural_join:'&'|markdown_filter|no_p }}, {{ meta.title.0 }}{% endblock %}

svilayphiou's avatar
svilayphiou committed
34
{% block bodyclasses%}{% if meta.host %}{{ meta.host.0|lower }}{% endif %} {% if meta.type %}{{ meta.type.0|lower }}{% endif %}{% endblock %}
svilayphiou's avatar
svilayphiou committed
35
{% block contentclasses%}{% if meta.host %}{{ meta.host.0|lower }}{% endif %} {% if meta.type %}{{ meta.type.0|lower }}{% endif %}{% endblock %}
36

37
{% block title_left %}
38
39
40
41
42
    {% if prev_page %}<div id="previous">
        <a href="{{ prev_page.href }}" title="{{ prev_page.authors|natural_join:'&' }}, {{ prev_page.title }}">&larr;<br/>
        <span>{{ prev_page.authors|natural_join:'&' }}<br/>
        {{ prev_page.title|safe }}</span></a>
    </div>{% endif %}
43
44
45
{% endblock %}


svilayphiou's avatar
svilayphiou committed
46
{% block title %}
47
48
49
50
51
52
53
54
55
56
    {% ifequal mode "r" %}
        <header class="{% if meta.type %}{{ meta.type.0|lower }}{% endif %}">
        {% if meta.authors %}
            <p class="authors">{{ meta.authors|natural_join:'&' }}</p>
        {% endif %}
        <h2 property="dc:title" content="{{ meta.title.0|default:pad.display_slug|markdown_filter|no_p }}">
            {{ meta.title.0|default:pad.display_slug|markdown_filter|no_p }}
        </h2>
        </header>
    {% endifequal %}
svilayphiou's avatar
svilayphiou committed
57
{% endblock %}
alexandre's avatar
alexandre committed
58

59

60
{% block title_right %}
61
62
63
64
65
    {% if next_page %}<div id="next">
        <a href="{{ next_page.href }}" title="{{ next_page.authors|natural_join:'&' }}, {{ next_page.title }}">&rarr;<br/>
        <span>{{ next_page.authors|natural_join:'&' }}<br/>
        {{ next_page.title|safe }}</span></a>
    </div>{% endif %}
66
67
68
{% endblock %}


svilayphiou's avatar
svilayphiou committed
69
{% block content %}
svilayphiou's avatar
svilayphiou committed
70
        {% include "partials/metadata.html" %}
71

72
73
74
75
76
77
78
79
80
81
82
    {% ifequal mode "p" %}
        <header class="{% if meta.type %}{{ meta.type.0|lower }}{% endif %}">
        {% if meta.authors %}
            <p class="authors">{{ meta.authors|natural_join:'&' }}</p>
        {% endif %}
        <h2 property="dc:title">
            {{ meta.title.0|default:pad.display_slug|markdown_filter|no_p }}
        </h2>
        </header>
    {% endifequal %}

svilayphiou's avatar
svilayphiou committed
83

svilayphiou's avatar
svilayphiou committed
84
    {{ text|safe }}
85
    
86
    
87
88
89
90
91
    {% ifequal mode "r" %}
        <div id="go-up">
            <a class="screen-only" href="#">&uarr;</a>
        </div>
    {% endifequal %}
svilayphiou's avatar
svilayphiou committed
92
93
{% endblock %}

94

svilayphiou's avatar
svilayphiou committed
95
{% block rightside %}
96
97
    {% ifequal mode "r" %}
        {% if author and meta %}
svilayphiou's avatar
svilayphiou committed
98
            <dl class="meta private">
svilayphiou's avatar
re    
svilayphiou committed
99
            {% for key, values in meta_list reversed %}
svilayphiou's avatar
svilayphiou committed
100
                <dt>{{ key|title }}</dt>
101
                {% for value in values %}<dd>{{ value|markdown_filter }}</dd>{% endfor %}
svilayphiou's avatar
svilayphiou committed
102
            {% endfor %}
svilayphiou's avatar
svilayphiou committed
103
104
                <dt>Editors</dt>
                <dd>
105
                    <p>{{ authors|natural_join:'et' }}</p>
svilayphiou's avatar
svilayphiou committed
106
                </dd>
svilayphiou's avatar
svilayphiou committed
107
108
            </dl>
        {% endif %}
109
    {% endifequal %}
110
{% endblock %}
111

112
{% block extraui %}
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
    {% if not user.is_authenticated %}
        <div class="popup-wrapper hidden">
            <div class="popup">
              <form method="post" action="{% url 'django.contrib.auth.views.login' %}">
                {% csrf_token %}
                <label for="id_username">Username</label>
                <input id="id_username" maxlength="254" name="username" type="text" />
                <label for="id_password">Password</label>
                <input id="id_password" name="password" type="password" />
            
                <input class="submit" type="submit" value="Login" />
                <input type="hidden" name="next" value="{% if next %}{{ next }}{% else %}{% url 'home' %}{% endif %}" />
              </form>
            </div>
        </div>
128
129
130
131
    {% else %}
        {% ifequal mode "p" %}
            <div id="print-interface">
                <button id="debug">Debug</button>
svilayphiou's avatar
spreads    
svilayphiou committed
132
                <button id="spread">Spread</button>
133
134
135
136
137
138
139
                <button id="hi-res">Hi-res</button>
                <div id="toc">
                    <button id="goto">Go to</button>
                    <ul id="toc-pages"> </ul>
                </div>
            </div>
        {% endifequal %}
140
    {% endif %}
141
{% endblock %}
142
143
144
145
146
147
148

{% block scripts %}
    {% ifequal mode "p" %}
        <script src="{{ STATIC_URL }}js/print.js" type="text/javascript" charset="utf-8"> </script>
        <script src="{{ STATIC_URL }}js/css-regions-polyfill-master/cssregions.min.js" type="text/javascript" charset="utf-8"> </script>
    {% endifequal %}
{% endblock %}