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