incorporate skeleton layout in the galleries
[mediagoblin.git] / mediagoblin / templates / mediagoblin / base.html
1 {#
2 # GNU MediaGoblin -- federated, autonomous media hosting
3 # Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS.
4 #
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU Affero General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU Affero General Public License for more details.
14 #
15 # You should have received a copy of the GNU Affero General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 -#}
18 <!doctype html>
19 <html
20 {% block mediagoblin_html_tag %}
21 {% endblock mediagoblin_html_tag %}
22 >
23 <head>
24 <meta charset="utf-8">
25 <meta name="viewport" content="width=device-width, initial-scale=1.0">
26 <meta http-equiv="X-UA-Compatible" content="IE=Edge">
27 <title>{% block title %}{{ app_config['html_title'] }}{% endblock %}</title>
28 <link rel="stylesheet" type="text/css"
29 href="{{ request.staticdirect('/css/extlib/reset.css') }}"/>
30 <link rel="stylesheet" type="text/css"
31 href="{{ request.staticdirect('/css/extlib/skeleton.css') }}"/>
32 <link rel="stylesheet" type="text/css"
33 href="{{ request.staticdirect('/css/base.css') }}"/>
34 <link rel="shortcut icon"
35 href="{{ request.staticdirect('/images/goblin.ico') }}" />
36
37 {# For clarification, the difference between the extra_head.html template
38 # and the head template hook is that the former should be used by
39 # themes and the latter should be used by plugins.
40 # The reason is that only one thing can override extra_head.html...
41 # but multiple plugins can hook into the template hook.
42 #}
43 {% include "mediagoblin/extra_head.html" %}
44 {% template_hook("head") %}
45
46 {% block mediagoblin_head %}
47 {% endblock mediagoblin_head %}
48 </head>
49 <body>
50 {% include 'mediagoblin/bits/body_start.html' %}
51 {% block mediagoblin_body %}
52 {% block mediagoblin_header %}
53 <header>
54 {%- include "mediagoblin/bits/logo.html" -%}
55 {% block mediagoblin_header_title %}{% endblock %}
56 <div class="header_right">
57 {%- if request.user %}
58 {% if request.user and
59 request.user.has_privilege('active') and
60 not request.user.is_banned() %}
61
62 {% set notification_count = get_notification_count(request.user.id) %}
63 {% if notification_count %}
64 <a href="javascript:;" class="notification-gem button_action" title="Notifications">
65 {{ notification_count }}</a>
66 {% endif %}
67 <a href="javascript:;" class="button_action header_dropdown_down">&#9660;</a>
68 <a href="javascript:;" class="button_action header_dropdown_up">&#9650;</a>
69 {% elif request.user and not request.user.has_privilege('active') %}
70 {# the following link should only appear when verification is needed #}
71 <a href="{{ request.urlgen('mediagoblin.user_pages.user_home',
72 user=request.user.username) }}"
73 class="button_action_highlight">
74 {% trans %}Verify your email!{% endtrans %}</a>
75 or <a id="logout" href=
76 {% if persona is not defined %}
77 "{{ request.urlgen('mediagoblin.auth.logout') }}"
78 {% else %}
79 "javascript:;"
80 {% endif %}
81 >{% trans %}log out{% endtrans %}</a>
82 {% elif request.user and request.user.is_banned() %}
83 <a id="logout" href=
84 {% if persona is not defined %}
85 "{{ request.urlgen('mediagoblin.auth.logout') }}"
86 {% else %}
87 "javascript:;"
88 {% endif %}
89 >{% trans %}log out{% endtrans %}</a>
90 {% endif %}
91 {%- elif auth %}
92 <a href=
93 {% if persona_auth is defined %}
94 "javascript:;" id="persona_login"
95 {% else %}
96 "{{ request.urlgen('mediagoblin.auth.login') }}"
97 {% endif %}
98 >
99 {%- trans %}Log in{% endtrans -%}
100 </a>
101 {%- endif %}
102 </div>
103 <div class="clear"></div>
104 {% if request.user and request.user.has_privilege('active') %}
105 <div class="header_dropdown">
106 <p>
107 <span class="dropdown_title">
108 {% trans user_url=request.urlgen('mediagoblin.user_pages.user_home',
109 user=request.user.username),
110 user_name=request.user.username -%}
111 <a href="{{ user_url }}">{{ user_name }}</a>'s account
112 {%- endtrans %}
113 </span>
114 &middot;
115 <a href="{{ request.urlgen('mediagoblin.edit.account') }}">{%- trans %}Change account settings{% endtrans -%}</a>
116 &middot;
117 <a href="{{ request.urlgen('mediagoblin.user_pages.processing_panel',
118 user=request.user.username) }}">
119 {%- trans %}Media processing panel{% endtrans -%}
120 </a>
121 &middot;
122 {% template_hook("blog_dashboard_home") %}
123 <a id="logout" href=
124 {% if persona is not defined %}
125 "{{ request.urlgen('mediagoblin.auth.logout') }}"
126 {% else %}
127 "javascript:;"
128 {% endif %}
129 >{% trans %}Log out{% endtrans %}</a>
130 </p>
131 <a class="button_action" href="{{ request.urlgen('mediagoblin.submit.start') }}">
132 {%- trans %}Add media{% endtrans -%}
133 </a>
134 <a class="button_action" href="{{ request.urlgen('mediagoblin.submit.collection') }}">
135 {%- trans %}Create new collection{% endtrans -%}
136 </a>
137 {% if request.user.has_privilege('admin','moderator') %}
138 <p>
139 <span class="dropdown_title">Moderation powers:</span>
140 <a href="{{ request.urlgen('mediagoblin.moderation.media_panel') }}">
141 {%- trans %}Media processing panel{% endtrans -%}
142 </a>
143 &middot;
144 <a href="{{ request.urlgen('mediagoblin.moderation.users') }}">
145 {%- trans %}User management panel{% endtrans -%}
146 </a>
147 &middot;
148 <a href="{{ request.urlgen('mediagoblin.moderation.reports') }}">
149 {%- trans %}Report management panel{% endtrans -%}
150 </a>
151 </p>
152 {% endif %}
153 {% include 'mediagoblin/fragments/header_notifications.html' %}
154 </div>
155 {% endif %}
156 </header>
157 {% endblock %}
158 <div class="container">
159 {% include 'mediagoblin/bits/above_content.html' %}
160 <div class="mediagoblin_content">
161 {% include "mediagoblin/utils/messages.html" %}
162 {% block mediagoblin_content %}
163 {% endblock mediagoblin_content %}
164 {% if csrf_token is defined %}
165 {% template_hook("persona_form") %}
166 {% endif %}
167 </div>
168 {%- include "mediagoblin/bits/base_footer.html" %}
169 </div>
170 {%- endblock mediagoblin_body %}
171 {% include 'mediagoblin/bits/body_end.html' %}
172 </body>
173 <script type="text/javascript"
174 src="{{ request.staticdirect('/js/extlib/jquery.js') }}"></script>
175 <script type="text/javascript"
176 src="{{ request.staticdirect('/js/header_dropdown.js') }}"></script>
177 <script type="text/javascript"
178 src="{{ request.staticdirect('/js/notifications.js') }}"></script>
179 <script>
180 var mark_all_comments_seen_url = "{{ request.urlgen('mediagoblin.notifications.mark_all_comment_notifications_seen') }}"
181 </script>
182 </html>