##// END OF EJS Templates
Fixed RSS in thread list pages. Changes to markdown parser. This refs #11
neko259 -
r91:c0e948d4 default
parent child Browse files
Show More
@@ -1,271 +1,270 b''
1 html {
1 html {
2 background: #555;
2 background: #555;
3 color: #ffffff;
3 color: #ffffff;
4 }
4 }
5
5
6 #admin_panel {
6 #admin_panel {
7 background: #FF0000;
7 background: #FF0000;
8 color: #00FF00
8 color: #00FF00
9 }
9 }
10
10
11 .input_field {
11 .input_field {
12
12
13 }
13 }
14
14
15 .input_field_name {
15 .input_field_name {
16
16
17 }
17 }
18
18
19 .input_field_error {
19 .input_field_error {
20 color: #FF0000;
20 color: #FF0000;
21 }
21 }
22
22
23
23
24 .title {
24 .title {
25 font-weight: bold;
25 font-weight: bold;
26 color: #ffcc00;
26 color: #ffcc00;
27 }
27 }
28
28
29 .link, a {
29 .link, a {
30 color: #afdcec;
30 color: #afdcec;
31 }
31 }
32
32
33 .block {
33 .block {
34 display: inline-block;
34 display: inline-block;
35 vertical-align: top;
35 vertical-align: top;
36 }
36 }
37
37
38 .tag {
38 .tag {
39 color: #b4cfec;
39 color: #b4cfec;
40 }
40 }
41
41
42 .post_id {
42 .post_id {
43 color: #fff380;
43 color: #fff380;
44 }
44 }
45
45
46 .post, .dead_post {
46 .post, .dead_post {
47 background: #333;
47 background: #333;
48 margin: 5px;
48 margin: 5px;
49 padding: 10px;
49 padding: 10px;
50 border-radius: 5px;
50 border-radius: 5px;
51 clear: left;
51 clear: left;
52 word-wrap: break-word;
52 word-wrap: break-word;
53 }
53 }
54
54
55 .metadata {
55 .metadata {
56 padding: 5px;
56 padding: 5px;
57 margin-top: 10px;
57 margin-top: 10px;
58 border: solid 1px #666;
58 border: solid 1px #666;
59 font-size: 0.9em;
59 font-size: 0.9em;
60 color: #ddd;
60 color: #ddd;
61 display: table;
61 display: table;
62 }
62 }
63
63
64 .navigation_panel, .tag_info {
64 .navigation_panel, .tag_info {
65 background: #444;
65 background: #444;
66 margin: 5px;
66 margin: 5px;
67 padding: 10px;
67 padding: 10px;
68 border-radius: 5px;
68 border-radius: 5px;
69 color: #eee;
69 color: #eee;
70 }
70 }
71
71
72 .navigation_panel .link {
72 .navigation_panel .link {
73 border-right: 1px solid #fff;
73 border-right: 1px solid #fff;
74 font-weight: bold;
74 font-weight: bold;
75 margin-right: 1ex;
75 margin-right: 1ex;
76 padding-right: 1ex;
76 padding-right: 1ex;
77 }
77 }
78 .navigation_panel .link:last-child {
78 .navigation_panel .link:last-child {
79 border-left: 1px solid #fff;
79 border-left: 1px solid #fff;
80 border-right: none;
80 border-right: none;
81 float: right;
81 float: right;
82 margin-left: 1ex;
82 margin-left: 1ex;
83 margin-right: 0;
83 margin-right: 0;
84 padding-left: 1ex;
84 padding-left: 1ex;
85 padding-right: 0;
85 padding-right: 0;
86 }
86 }
87
87
88 .navigation_panel::after, .post::after {
88 .navigation_panel::after, .post::after {
89 clear: both;
89 clear: both;
90 content: ".";
90 content: ".";
91 display: block;
91 display: block;
92 height: 0;
92 height: 0;
93 line-height: 0;
93 line-height: 0;
94 visibility: hidden;
94 visibility: hidden;
95 }
95 }
96
96
97 p {
97 p {
98 margin-top: .5em;
98 margin-top: .5em;
99 margin-bottom: .5em;
99 margin-bottom: .5em;
100 }
100 }
101
101
102 .post-form-w {
102 .post-form-w {
103 display: table;
103 display: table;
104 background: #333344;
104 background: #333344;
105 border-radius: 5px;
105 border-radius: 5px;
106 color: #fff;
106 color: #fff;
107 padding: 10px;
107 padding: 10px;
108 margin: 5px
108 margin: 5px
109 }
109 }
110
110
111 .form-row {
111 .form-row {
112 display: table-row;
112 display: table-row;
113 }
113 }
114
114
115 .form-label, .form-input, .form-errors {
115 .form-label, .form-input, .form-errors {
116 display: table-cell;
116 display: table-cell;
117 }
117 }
118
118
119 .form-label {
119 .form-label {
120 padding: .25em 1ex .25em 0;
120 padding: .25em 1ex .25em 0;
121 vertical-align: top;
121 vertical-align: top;
122 }
122 }
123
123
124 .form-input {
124 .form-input {
125 padding: .25em 0;
125 padding: .25em 0;
126 }
126 }
127
127
128 .form-errors {
128 .form-errors {
129 padding-left: 1ex;
129 padding-left: 1ex;
130 font-weight: bold;
130 font-weight: bold;
131 vertical-align: top;
131 vertical-align: top;
132 }
132 }
133
133
134 .post-form input, .post-form textarea {
134 .post-form input, .post-form textarea {
135 background: #333;
135 background: #333;
136 color: #fff;
136 color: #fff;
137 border: solid 1px;
137 border: solid 1px;
138 padding: 0;
138 padding: 0;
139 width: 100%;
139 width: 100%;
140 }
140 }
141
141
142 .form-submit {
142 .form-submit {
143 border-bottom: 2px solid #ddd;
143 border-bottom: 2px solid #ddd;
144 margin-bottom: .5em;
144 margin-bottom: .5em;
145 padding-bottom: .5em;
145 padding-bottom: .5em;
146 }
146 }
147
147
148 .form-title {
148 .form-title {
149 font-weight: bold;
149 font-weight: bold;
150 }
150 }
151
151
152 input[type="submit"] {
152 input[type="submit"] {
153 background: #222;
153 background: #222;
154 border: solid 1px #fff;
154 border: solid 1px #fff;
155 color: #fff;
155 color: #fff;
156 }
156 }
157
157
158 blockquote {
158 blockquote {
159 border-left: solid 2px;
159 border-left: solid 2px;
160 padding-left: 5px;
160 padding-left: 5px;
161 color: #B1FB17;
161 color: #B1FB17;
162 margin: 0;
162 margin: 0;
163 }
163 }
164
164
165 .post > .image {
165 .post > .image {
166 float: left;
166 float: left;
167 margin: 0 1ex .5ex 0;
167 margin: 0 1ex .5ex 0;
168 min-width: 1px;
168 min-width: 1px;
169 height: 150px;
169 height: 150px;
170 text-align: center;
170 text-align: center;
171 display: table-row;
171 display: table-row;
172 }
172 }
173
173
174 .post > .metadata {
174 .post > .metadata {
175 clear: left;
175 clear: left;
176 }
176 }
177
177
178 .get {
178 .get {
179 font-weight: bold;
179 font-weight: bold;
180 color: #d55;
180 color: #d55;
181 }
181 }
182
182
183 * {
183 * {
184 text-decoration: none;
184 text-decoration: none;
185 }
185 }
186
186
187 .dead_post {
187 .dead_post {
188 background-color: #442222;
188 background-color: #442222;
189 }
189 }
190
190
191 .quote {
191 .quote {
192 color: #92cf38;
192 color: #92cf38;
193 padding-left: 5px;
194 }
193 }
195
194
196 .spoiler {
195 .spoiler {
197 background: white;
196 background: white;
198 color: white;
197 color: white;
199 }
198 }
200
199
201 .spoiler:hover {
200 .spoiler:hover {
202 background: black;
201 background: black;
203 }
202 }
204
203
205 .comment {
204 .comment {
206 color: #5dbcb7;
205 color: #5dbcb7;
207 }
206 }
208
207
209 a:hover {
208 a:hover {
210 text-decoration: underline;
209 text-decoration: underline;
211 }
210 }
212
211
213 .last-replies {
212 .last-replies {
214 margin-left: 3ex;
213 margin-left: 3ex;
215 }
214 }
216
215
217 .thread {
216 .thread {
218 margin-bottom: 3ex;
217 margin-bottom: 3ex;
219 }
218 }
220
219
221 .post:target {
220 .post:target {
222 border: solid 2px white;
221 border: solid 2px white;
223 }
222 }
224
223
225 pre{
224 pre{
226 white-space:pre-wrap
225 white-space:pre-wrap
227 }
226 }
228
227
229 li {
228 li {
230 list-style-position: inside;
229 list-style-position: inside;
231 }
230 }
232
231
233 .fancybox-skin {
232 .fancybox-skin {
234 position: relative;
233 position: relative;
235 background-color: #fff;
234 background-color: #fff;
236 color: #ddd;
235 color: #ddd;
237 text-shadow: none;
236 text-shadow: none;
238 }
237 }
239
238
240 .fancybox-image {
239 .fancybox-image {
241 border: 1px solid black;
240 border: 1px solid black;
242 }
241 }
243
242
244 .image-mode-tab {
243 .image-mode-tab {
245 background: #444;
244 background: #444;
246 color: #eee;
245 color: #eee;
247 display: table;
246 display: table;
248 margin: 5px;
247 margin: 5px;
249 padding: 5px;
248 padding: 5px;
250 border-radius: 5px;
249 border-radius: 5px;
251 }
250 }
252
251
253 .image-mode-tab > label {
252 .image-mode-tab > label {
254 margin: 0 1ex;
253 margin: 0 1ex;
255 }
254 }
256
255
257 .image-mode-tab > label > input {
256 .image-mode-tab > label > input {
258 margin-right: .5ex;
257 margin-right: .5ex;
259 }
258 }
260
259
261 #posts-table {
260 #posts-table {
262 margin: 5px;
261 margin: 5px;
263 }
262 }
264
263
265 .tag_info {
264 .tag_info {
266 display: table;
265 display: table;
267 }
266 }
268
267
269 .tag_info > h2 {
268 .tag_info > h2 {
270 margin: 0;
269 margin: 0;
271 } No newline at end of file
270 }
@@ -1,112 +1,113 b''
1 {% extends "boards/base.html" %}
1 {% extends "boards/base.html" %}
2
2
3 {% load i18n %}
3 {% load i18n %}
4 {% load markup %}
4 {% load markup %}
5
5
6 {% block head %}
6 {% block head %}
7 <title>Neboard - {{ posts.0.title }}</title>
7 <title>Neboard - {{ posts.0.title }}</title>
8 {% endblock %}
8 {% endblock %}
9
9
10 {% block content %}
10 {% block content %}
11 <script src="{{ STATIC_URL }}js/thread.js"></script>
11 <script src="{{ STATIC_URL }}js/thread.js"></script>
12
12
13 {% if posts %}
13 {% if posts %}
14 <div id="posts">
14 <div id="posts">
15 {% for post in posts %}
15 {% for post in posts %}
16 {% if posts.0.can_bump %}
16 {% if posts.0.can_bump %}
17 <div class="post" id="{{ post.id }}">
17 <div class="post" id="{{ post.id }}">
18 {% else %}
18 {% else %}
19 <div class="post dead_post" id="{{ post.id }}">
19 <div class="post dead_post" id="{{ post.id }}">
20 {% endif %}
20 {% endif %}
21 {% if post.image %}
21 {% if post.image %}
22 <div class="image">
22 <div class="image">
23 <a
23 <a
24 class="fancy"
24 class="fancy"
25 href="{{ post.image.url }}"><img
25 href="{{ post.image.url }}"><img
26 src="{{ post.image.url_200x150 }}"
26 src="{{ post.image.url_200x150 }}"
27 alt="{% trans 'Post image' %}" />
27 alt="{% trans 'Post image' %}" />
28 </a>
28 </a>
29 </div>
29 </div>
30 {% endif %}
30 {% endif %}
31 <div class="message">
31 <div class="message">
32 <div class="post-info">
32 <div class="post-info">
33 <span class="title">{{ post.title }}</span>
33 <span class="title">{{ post.title }}</span>
34 <a class="post_id" href="#{{ post.id }}">
34 <a class="post_id" href="#{{ post.id }}">
35 (#{{ post.id }})</a>
35 (#{{ post.id }})</a>
36 [{{ post.pub_time }}]
36 [{{ post.pub_time }}]
37 {% if post.is_get %}
37 {% if post.is_get %}
38 <span class="get">
38 <span class="get">
39 {% trans "Get!" %}
39 {% trans "Get!" %}
40 </span>
40 </span>
41 {% endif %}
41 {% endif %}
42 </div>
42 </div>
43 {% autoescape off %}
43 {% autoescape off %}
44 {{ post.text.rendered }}
44 {{ post.text.rendered }}
45 {% endautoescape %}
45 {% endautoescape %}
46 </div>
46 </div>
47 {% if post.tags.all %}
47 {% if post.tags.all %}
48 <div class="metadata">
48 <div class="metadata">
49 <span class="tags">{% trans 'Tags' %}:
49 <span class="tags">{% trans 'Tags' %}:
50 {% for tag in post.tags.all %}
50 {% for tag in post.tags.all %}
51 <a class="tag" href="{% url 'tag' tag.name %}">
51 <a class="tag" href="{% url 'tag' tag.name %}">
52 {{ tag.name }}</a>
52 {{ tag.name }}</a>
53 {% endfor %}
53 {% endfor %}
54 </span>
54 </span>
55 </div>
55 </div>
56 {% endif %}
56 {% endif %}
57 </div>
57 </div>
58 {% endfor %}
58 {% endfor %}
59 </div>
59 </div>
60 {% else %}
60 {% else %}
61 No thread found.
61 No thread found.
62 <hr />
62 <hr />
63 {% endif %}
63 {% endif %}
64
64
65 <form id="form" enctype="multipart/form-data" method="post"
65 <form id="form" enctype="multipart/form-data" method="post"
66 >{% csrf_token %}
66 >{% csrf_token %}
67 <div class="post-form-w">
67 <div class="post-form-w">
68 <div class="form-title">{% trans "Reply to thread" %}</div>
68 <div class="form-title">{% trans "Reply to thread" %}</div>
69 <div class="post-form">
69 <div class="post-form">
70 <div class="form-row">
70 <div class="form-row">
71 <div class="form-label">{% trans 'Title' %}</div>
71 <div class="form-label">{% trans 'Title' %}</div>
72 <div class="form-input">{{ form.title }}</div>
72 <div class="form-input">{{ form.title }}</div>
73 <div class="form-errors">{{ form.title.errors }}</div>
73 <div class="form-errors">{{ form.title.errors }}</div>
74 </div>
74 </div>
75 <div class="form-row">
75 <div class="form-row">
76 <div class="form-label">{% trans 'Text' %}</div>
76 <div class="form-label">{% trans 'Text' %}</div>
77 <div class="form-input">{{ form.text }}</div>
77 <div class="form-input">{{ form.text }}</div>
78 <div class="form-errors">{{ form.text.errors }}</div>
78 <div class="form-errors">{{ form.text.errors }}</div>
79 </div>
79 </div>
80 <div class="form-row">
80 <div class="form-row">
81 <div class="form-label">{% trans 'Image' %}</div>
81 <div class="form-label">{% trans 'Image' %}</div>
82 <div class="form-input">{{ form.image }}</div>
82 <div class="form-input">{{ form.image }}</div>
83 <div class="form-errors">{{ form.image.errors }}</div>
83 <div class="form-errors">{{ form.image.errors }}</div>
84 </div>
84 </div>
85 <div class="form-row">
85 <div class="form-row">
86 {{ form.captcha }}
86 {{ form.captcha }}
87 </div>
87 </div>
88 </div>
88 </div>
89
89
90 <div class="form-submit"><input type="submit"
90 <div class="form-submit"><input type="submit"
91 value="{% trans "Post" %}"/></div>
91 value="{% trans "Post" %}"/></div>
92 <div><a href="http://daringfireball.net/projects/markdown/basics">
92 <div><a href="http://daringfireball.net/projects/markdown/basics">
93 {% trans 'Basic markdown syntax.' %}</a></div>
93 {% trans 'Basic markdown syntax.' %}</a></div>
94 <div>{% trans 'Example: ' %}*<i>{% trans 'italic' %}</i>*,
94 <div>{% trans 'Example: ' %}*<i>{% trans 'italic' %}</i>*,
95 **<b>{% trans 'bold' %}</b>**</div>
95 **<b>{% trans 'bold' %}</b>**</div>
96 <div>{% trans 'Quotes can be inserted with' %} "&gt;"</div>
96 <div>{% trans 'Quotes can be inserted with' %} "&gt;"</div>
97 <div>{% trans 'Links to answers can be inserted with' %} "&gt;&gt;
97 <div>{% trans 'Links to answers can be inserted with' %}
98 123"</div>
98 "&gt;&gt;123"
99 </div>
99 </div>
100 </div>
100 </form>
101 </form>
101
102
102 {% endblock %}
103 {% endblock %}
103
104
104 {% block metapanel %}
105 {% block metapanel %}
105
106
106 <span class="metapanel">
107 <span class="metapanel">
107 {{ posts.0.get_reply_count }} {% trans 'replies' %},
108 {{ posts.0.get_reply_count }} {% trans 'replies' %},
108 {{ posts.0.get_images_count }} {% trans 'images' %}.
109 {{ posts.0.get_images_count }} {% trans 'images' %}.
109 {% trans 'Last update: ' %}{{ posts.0.last_edit_time }}
110 {% trans 'Last update: ' %}{{ posts.0.last_edit_time }}
110 </span>
111 </span>
111
112
112 {% endblock %} No newline at end of file
113 {% endblock %}
@@ -1,32 +1,34 b''
1 from django.conf.urls import patterns, url, include
1 from django.conf.urls import patterns, url, include
2 from boards import views
2 from boards import views
3 from boards.rss import AllThreadsFeed, TagThreadsFeed, ThreadPostsFeed
3 from boards.rss import AllThreadsFeed, TagThreadsFeed, ThreadPostsFeed
4
4
5 urlpatterns = patterns('',
5 urlpatterns = patterns('',
6
6
7 # /boards/
7 # /boards/
8 url(r'^$', views.index, name='index'),
8 url(r'^$', views.index, name='index'),
9 # /boards/page/
9 # /boards/page/
10 url(r'^page/(?P<page>\w+)/$', views.index, name='index'),
10 url(r'^page/(?P<page>\w+)/$', views.index, name='index'),
11
11
12 # login page
12 # login page
13 url(r'^login$', views.login, name='login'),
13 url(r'^login$', views.login, name='login'),
14 # logout page
14 # logout page
15 url(r'^logout$', views.logout, name='logout'),
15 url(r'^logout$', views.logout, name='logout'),
16
16
17 # /boards/tag/tag_name/
17 # /boards/tag/tag_name/
18 url(r'^tag/(?P<tag_name>\w+)/$', views.tag, name='tag'),
18 url(r'^tag/(?P<tag_name>\w+)/$', views.tag, name='tag'),
19 # /boards/tag/tag_id/page/
19 # /boards/tag/tag_id/page/
20 url(r'^tag/(?P<tag_name>\w+)/page/(?P<page>\w+)/$', views.tag, name='tag'),
20 url(r'^tag/(?P<tag_name>\w+)/page/(?P<page>\w+)/$', views.tag, name='tag'),
21 # /boards/thread/
21 # /boards/thread/
22 url(r'^thread/(?P<post_id>\w+)/$', views.thread, name='thread'),
22 url(r'^thread/(?P<post_id>\w+)/$', views.thread, name='thread'),
23 # /boards/theme/theme_name/
23 # /boards/theme/theme_name/
24 url(r'^settings$', views.settings, name='settings'),
24 url(r'^settings$', views.settings, name='settings'),
25 url(r'^tags$', views.all_tags, name='tags'),
25 url(r'^tags$', views.all_tags, name='tags'),
26 url(r'^captcha/', include('captcha.urls')),
26 url(r'^captcha/', include('captcha.urls')),
27
27
28 # RSS feeds
28 # RSS feeds
29 url(r'^rss/$', AllThreadsFeed()),
29 url(r'^rss/$', AllThreadsFeed()),
30 url(r'^page/(?P<page>\w+)/rss/$', AllThreadsFeed()),
30 url(r'^tag/(?P<tag_name>\w+)/rss/$', TagThreadsFeed()),
31 url(r'^tag/(?P<tag_name>\w+)/rss/$', TagThreadsFeed()),
32 url(r'^tag/(?P<tag_name>\w+)/page/(?P<page>\w+)/rss/$', TagThreadsFeed()),
31 url(r'^thread/(?P<post_id>\w+)/rss/$', ThreadPostsFeed()),
33 url(r'^thread/(?P<post_id>\w+)/rss/$', ThreadPostsFeed()),
32 ) No newline at end of file
34 )
General Comments 0
You need to be logged in to leave comments. Login now