##// END OF EJS Templates
Moved some other JS code to the end of page
neko259 -
r446:7ef61490 default
parent child Browse files
Show More
@@ -1,61 +1,62 b''
1 1 {% load staticfiles %}
2 2 {% load i18n %}
3 3 {% load l10n %}
4 4 {% load static from staticfiles %}
5 5
6 6 <!DOCTYPE html>
7 7 <html>
8 8 <head>
9 9 <link rel="stylesheet" type="text/css"
10 10 href="{% static 'css/base.css' %}" media="all"/>
11 11 <link rel="stylesheet" type="text/css"
12 12 href="{% static theme_css %}" media="all"/>
13 13 <link rel="alternate" type="application/rss+xml" href="rss/" title=
14 14 "{% trans 'Feed' %}"/>
15 15
16 16 <link rel="icon" type="image/png"
17 17 href="{% static 'favicon.png' %}">
18 18
19 19 <meta name="viewport" content="width=device-width, initial-scale=1"/>
20 20 <meta charset="utf-8"/>
21 21
22 22 {% block head %}{% endblock %}
23 23 </head>
24 24 <body>
25 25 <script src="{% static 'js/jquery-2.0.1.min.js' %}"></script>
26 26 <script src="{% static 'js/jquery-ui-1.10.3.custom.min.js' %}"></script>
27 27 <script src="{% static 'js/jquery.mousewheel.js' %}"></script>
28 28 <script src="{% url 'js_info_dict' %}"></script>
29 <script src="{% static 'js/popup.js' %}"></script>
30 <script src="{% static 'js/image.js' %}"></script>
31 <script src="{% static 'js/refpopup.js' %}"></script>
32 <script src="{% static 'js/main.js' %}"></script>
33 29
34 30 <div class="navigation_panel">
35 31 <a class="link" href="{% url 'index' %}">{% trans "All threads" %}</a>
36 32 {% for tag in tags %}
37 33 <a class="tag" href="{% url 'tag' tag_name=tag.name %}"
38 34 >#{{ tag.name }}</a>,
39 35 {% endfor %}
40 36 <a class="tag" href="{% url 'tags' %}" title="{% trans 'Tag management' %}"
41 37 >[...]</a>
42 38 <a class="link" href="{% url 'settings' %}">{% trans 'Settings' %}</a>
43 39 </div>
44 40
45 41 {% block content %}{% endblock %}
46 42
43 <script src="{% static 'js/popup.js' %}"></script>
44 <script src="{% static 'js/image.js' %}"></script>
45 <script src="{% static 'js/refpopup.js' %}"></script>
46 <script src="{% static 'js/main.js' %}"></script>
47
47 48 <div class="navigation_panel">
48 49 {% block metapanel %}{% endblock %}
49 50 [<a href="{% url "login" %}">{% trans 'Login' %}</a>]
50 51 {% with ppd=posts_per_day|floatformat:2 %}
51 52 {% blocktrans %}Speed: {{ ppd }} posts per day{% endblocktrans %}
52 53 {% endwith %}
53 54 <a class="link" href="#top">{% trans 'Up' %}</a>
54 55 </div>
55 56
56 57 <div class="footer">
57 58 <!-- Put your banners here -->
58 59 </div>
59 60
60 61 </body>
61 62 </html>
@@ -1,243 +1,244 b''
1 1 {% extends "boards/base.html" %}
2 2
3 3 {% load i18n %}
4 4 {% load cache %}
5 5 {% load board %}
6 {% load static %}
6 7
7 8 {% block head %}
8 9 {% if tag %}
9 10 <title>Neboard - {{ tag.name }}</title>
10 11 {% else %}
11 12 <title>Neboard</title>
12 13 {% endif %}
13 14
14 15 {% if prev_page %}
15 16 <link rel="next" href="
16 17 {% if tag %}
17 18 {% url "tag" tag_name=tag page=prev_page %}
18 19 {% else %}
19 20 {% url "index" page=prev_page %}
20 21 {% endif %}
21 22 " />
22 23 {% endif %}
23 24 {% if next_page %}
24 25 <link rel="next" href="
25 26 {% if tag %}
26 27 {% url "tag" tag_name=tag page=next_page %}
27 28 {% else %}
28 29 {% url "index" page=next_page %}
29 30 {% endif %}
30 31 " />
31 32 {% endif %}
32 33
33 34 {% endblock %}
34 35
35 36 {% block content %}
36 37
37 38 {% get_current_language as LANGUAGE_CODE %}
38 39
39 40 {% if tag %}
40 41 <div class="tag_info">
41 42 <h2>
42 43 {% if tag in user.fav_tags.all %}
43 44 <a href="{% url 'tag_unsubscribe' tag.name %}?next={{ request.path }}"
44 45 class="fav">β˜…</a>
45 46 {% else %}
46 47 <a href="{% url 'tag_subscribe' tag.name %}?next={{ request.path }}"
47 48 class="not_fav">β˜…</a>
48 49 {% endif %}
49 50 #{{ tag.name }}
50 51 </h2>
51 52 </div>
52 53 {% endif %}
53 54
54 55 {% if threads %}
55 56 {% if prev_page %}
56 57 <div class="page_link">
57 58 <a href="
58 59 {% if tag %}
59 60 {% url "tag" tag_name=tag page=prev_page %}
60 61 {% else %}
61 62 {% url "index" page=prev_page %}
62 63 {% endif %}
63 64 ">{% trans "Previous page" %}</a>
64 65 </div>
65 66 {% endif %}
66 67
67 68 {% for thread in threads %}
68 69 {% cache 600 thread_short thread.id thread.thread.last_edit_time moderator LANGUAGE_CODE %}
69 70 <div class="thread">
70 71 {% if thread.bumpable %}
71 72 <div class="post" id="{{ thread.op.id }}">
72 73 {% else %}
73 74 <div class="post dead_post" id="{{ thread.op.id }}">
74 75 {% endif %}
75 76 {% if thread.op.image %}
76 77 <div class="image">
77 78 <a class="thumb"
78 79 href="{{ thread.op.image.url }}"><img
79 80 src="{{ thread.op.image.url_200x150 }}"
80 81 alt="{{ thread.op.id }}"
81 82 data-width="{{ thread.op.image_width }}"
82 83 data-height="{{ thread.op.image_height }}"/>
83 84 </a>
84 85 </div>
85 86 {% endif %}
86 87 <div class="message">
87 88 <div class="post-info">
88 89 <span class="title">{{ thread.op.title }}</span>
89 90 <a class="post_id" href="{% url 'thread' thread.op.id %}"
90 91 >({{ thread.op.id }})</a>
91 92 [{{ thread.op.pub_time }}]
92 93 [<a class="link" href="
93 94 {% url 'thread' thread.op.id %}#form"
94 95 >{% trans "Reply" %}</a>]
95 96
96 97 {% if moderator %}
97 98 <span class="moderator_info">
98 99 [<a href="
99 100 {% url 'delete' post_id=thread.op.id %}?next={{ request.path }}"
100 101 >{% trans 'Delete' %}</a>]
101 102 ({{ thread.thread.poster_ip }})
102 103 [<a href="
103 104 {% url 'ban' post_id=thread.op.id %}?next={{ request.path }}"
104 105 >{% trans 'Ban IP' %}</a>]
105 106 </span>
106 107 {% endif %}
107 108 </div>
108 109 {% autoescape off %}
109 110 {{ thread.op.text.rendered|truncatewords_html:50 }}
110 111 {% endautoescape %}
111 112 {% if thread.op.is_referenced %}
112 113 <div class="refmap">
113 114 {% trans "Replies" %}:
114 115 {% for ref_post in thread.op.get_sorted_referenced_posts %}
115 116 <a href="{% post_url ref_post.id %}">&gt;&gt;{{ ref_post.id }}</a
116 117 >{% if not forloop.last %},{% endif %}
117 118 {% endfor %}
118 119 </div>
119 120 {% endif %}
120 121 </div>
121 122 <div class="metadata">
122 123 {{ thread.thread.get_images_count }} {% trans 'images' %}.
123 124 {% if thread.thread.tags %}
124 125 <span class="tags">
125 126 {% for tag in thread.thread.get_tags %}
126 127 <a class="tag" href="
127 128 {% url 'tag' tag_name=tag.name %}">
128 129 #{{ tag.name }}</a
129 130 >{% if not forloop.last %},{% endif %}
130 131 {% endfor %}
131 132 </span>
132 133 {% endif %}
133 134 </div>
134 135 </div>
135 136 {% if thread.last_replies.exists %}
136 137 {% if thread.skipped_replies %}
137 138 <div class="skipped_replies">
138 139 <a href="{% url 'thread' thread.op.id %}">
139 140 {% blocktrans with count=thread.skipped_replies %}Skipped {{ count }} replies. Open thread to see all replies.{% endblocktrans %}
140 141 </a>
141 142 </div>
142 143 {% endif %}
143 144 <div class="last-replies">
144 145 {% for post in thread.last_replies %}
145 146 {% if thread.bumpable %}
146 147 <div class="post" id="{{ post.id }}">
147 148 {% else %}
148 149 <div class="post dead_post" id="{{ post.id }}">
149 150 {% endif %}
150 151 {% if post.image %}
151 152 <div class="image">
152 153 <a class="thumb"
153 154 href="{{ post.image.url }}"><img
154 155 src=" {{ post.image.url_200x150 }}"
155 156 alt="{{ post.id }}"
156 157 data-width="{{ post.image_width }}"
157 158 data-height="{{ post.image_height }}"/>
158 159 </a>
159 160 </div>
160 161 {% endif %}
161 162 <div class="message">
162 163 <div class="post-info">
163 164 <span class="title">{{ post.title }}</span>
164 165 <a class="post_id" href="
165 166 {% url 'thread' thread.op.id %}#{{ post.id }}">
166 167 ({{ post.id }})</a>
167 168 [{{ post.pub_time }}]
168 169 </div>
169 170 {% autoescape off %}
170 171 {{ post.text.rendered|truncatewords_html:50 }}
171 172 {% endautoescape %}
172 173 </div>
173 174 {% if post.is_referenced %}
174 175 <div class="refmap">
175 176 {% trans "Replies" %}:
176 177 {% for ref_post in post.get_sorted_referenced_posts %}
177 178 <a href="{% post_url ref_post.id %}">&gt;&gt;{{ ref_post.id }}</a
178 179 >{% if not forloop.last %},{% endif %}
179 180 {% endfor %}
180 181 </div>
181 182 {% endif %}
182 183 </div>
183 184 {% endfor %}
184 185 </div>
185 186 {% endif %}
186 187 </div>
187 188 {% endcache %}
188 189 {% endfor %}
189 190
190 191 {% if next_page %}
191 192 <div class="page_link">
192 193 <a href="
193 194 {% if tag %}
194 195 {% url "tag" tag_name=tag page=next_page %}
195 196 {% else %}
196 197 {% url "index" page=next_page %}
197 198 {% endif %}
198 199 ">{% trans "Next page" %}</a>
199 200 </div>
200 201 {% endif %}
201 202 {% else %}
202 203 <div class="post">
203 204 {% trans 'No threads exist. Create the first one!' %}</div>
204 205 {% endif %}
205 206
206 207 <div class="post-form-w">
207 208 <script src="{% static 'js/panel.js' %}"></script>
208 209 <div class="post-form">
209 210 <div class="form-title">{% trans "Create new thread" %}</div>
210 211 <form enctype="multipart/form-data" method="post">{% csrf_token %}
211 212 {{ form.as_div }}
212 213 <div class="form-submit">
213 214 <input type="submit" value="{% trans "Post" %}"/>
214 215 </div>
215 216 </form>
216 217 <div>
217 218 {% trans 'Tags must be delimited by spaces. Text or image is required.' %}
218 219 </div>
219 220 <div><a href="{% url "staticpage" name="help" %}">
220 221 {% trans 'Text syntax' %}</a></div>
221 222 </div>
222 223 </div>
223 224
224 225 {% endblock %}
225 226
226 227 {% block metapanel %}
227 228
228 229 <span class="metapanel">
229 230 <b><a href="{% url "authors" %}">Neboard</a> 1.4</b>
230 231 {% trans "Pages:" %}
231 232 {% for page in pages %}
232 233 [<a href="
233 234 {% if tag %}
234 235 {% url "tag" tag_name=tag page=page %}
235 236 {% else %}
236 237 {% url "index" page=page %}
237 238 {% endif %}
238 239 ">{{ page }}</a>]
239 240 {% endfor %}
240 241 [<a href="rss/">RSS</a>]
241 242 </span>
242 243
243 244 {% endblock %}
General Comments 0
You need to be logged in to leave comments. Login now