Show More
@@ -1,53 +1,57 b'' | |||
|
1 | 1 | html { |
|
2 | 2 | background: #333; |
|
3 | 3 | color: #ffffff; |
|
4 | 4 | } |
|
5 | 5 | |
|
6 | 6 | #admin_panel { |
|
7 | 7 | background: #FF0000; |
|
8 | 8 | color: #00FF00 |
|
9 | 9 | } |
|
10 | 10 | |
|
11 | 11 | .title { |
|
12 | 12 | font-weight: bold; |
|
13 | 13 | color: #ffcc00; |
|
14 | 14 | } |
|
15 | 15 | |
|
16 | 16 | .post-form { |
|
17 | 17 | text-align: left; |
|
18 | 18 | color: #ffffff; |
|
19 | 19 | display: table; |
|
20 | 20 | } |
|
21 | 21 | |
|
22 | 22 | .form-row { |
|
23 | 23 | display: table-row; |
|
24 | 24 | } |
|
25 | 25 | |
|
26 | 26 | .form-input { |
|
27 | 27 | display: table-cell; |
|
28 | 28 | } |
|
29 | 29 | |
|
30 | 30 | .link { |
|
31 |
color: # |
|
|
31 | color: #829dba; | |
|
32 | 32 | } |
|
33 | 33 | |
|
34 | 34 | .link:hover { |
|
35 |
color: # |
|
|
35 | color: #ba9f82; | |
|
36 | 36 | } |
|
37 | 37 | |
|
38 | 38 | .post_id { |
|
39 | 39 | color: #ffffff; |
|
40 | 40 | } |
|
41 | 41 | |
|
42 | 42 | .block { |
|
43 | 43 | display: inline-block; |
|
44 | 44 | vertical-align: top; |
|
45 | 45 | } |
|
46 | 46 | |
|
47 | 47 | .tag { |
|
48 |
color: #b |
|
|
48 | color: #b4cfec; | |
|
49 | 49 | } |
|
50 | 50 | |
|
51 | 51 | .tag:hover { |
|
52 |
color: #d |
|
|
52 | color: #d0edb4; | |
|
53 | } | |
|
54 | ||
|
55 | .post_id { | |
|
56 | color: #fff380; | |
|
53 | 57 | } No newline at end of file |
@@ -1,61 +1,63 b'' | |||
|
1 | 1 | {% extends "base.html" %} |
|
2 | 2 | |
|
3 | 3 | {% load i18n %} |
|
4 | 4 | |
|
5 | 5 | {% block content %} |
|
6 | 6 | |
|
7 | 7 | {% if threads %} |
|
8 | 8 | {% for thread in threads %} |
|
9 | 9 | {% if thread.image %} |
|
10 | 10 | <div class="block"> |
|
11 | 11 | <a href="{{ thread.image.url }}"><img |
|
12 | 12 | src="{{ thread.image.url_200x150 }}" /> |
|
13 | 13 | </a> |
|
14 | 14 | </div> |
|
15 | 15 | {% endif %} |
|
16 | 16 | <div class="block"> |
|
17 | 17 | <span class="title">{{ thread.title }}</span> |
|
18 | <span class="post_id">(#{{ thread.id }})</span> | |
|
19 | [{{ thread.pub_time }}] | |
|
18 | 20 | <a class="link" href="/thread/{{ thread.id }}/"> |
|
19 | 21 | [{% trans "View" %}]</a><br /> |
|
20 | 22 | {{ thread.text }}<br /> |
|
21 | 23 | {% if thread.tags %} |
|
22 | 24 | <span class="tags">{% trans 'Tags' %}: |
|
23 | 25 | {% for tag in thread.tags.all %} |
|
24 | 26 | <a class="tag" href="/tag/{{ tag.name }}"> |
|
25 | 27 | {{ tag.name }}</a> |
|
26 | 28 | {% endfor %} |
|
27 | 29 | </span> |
|
28 | 30 | {% endif %} |
|
29 | 31 | </div> |
|
30 | 32 | <hr /> |
|
31 | 33 | {% endfor %} |
|
32 | 34 | {% else %} |
|
33 | 35 | No threads found. |
|
34 | 36 | <hr /> |
|
35 | 37 | {% endif %} |
|
36 | 38 | |
|
37 | 39 | <div class="post-form"> |
|
38 | 40 | <div class="post-form"> |
|
39 | 41 | <form enctype="multipart/form-data" method="post">{% csrf_token %} |
|
40 | 42 | <div class="form-row"> |
|
41 | 43 | <div class="form-input">{% trans 'Title' %}</div> |
|
42 | 44 | <div class="form-input">{{ form.title }}</div> |
|
43 | 45 | </div> |
|
44 | 46 | <div class="form-row"> |
|
45 | 47 | <div class="form-input">{% trans 'Text' %}</div> |
|
46 | 48 | <div class="form-input">{{ form.text }}</div> |
|
47 | 49 | </div> |
|
48 | 50 | <div class="form-row"> |
|
49 | 51 | <div class="form-input">{% trans 'Image' %}</div> |
|
50 | 52 | <div class="form-input">{{ form.image }}</div> |
|
51 | 53 | </div> |
|
52 | 54 | <div class="form-row"> |
|
53 | 55 | <div class="form-input">{% trans 'Tags' %}</div> |
|
54 | 56 | <div class="form-input">{{ form.tags }}</div> |
|
55 | 57 | </div> |
|
56 | 58 | <input type="submit" value="{% trans 'Post' %}" /> |
|
57 | 59 | </form> |
|
58 | 60 | </div> |
|
59 | 61 | </div> |
|
60 | 62 | |
|
61 | 63 | {% endblock %} No newline at end of file |
@@ -1,54 +1,55 b'' | |||
|
1 | 1 | {% extends "base.html" %} |
|
2 | 2 | |
|
3 | 3 | {% load i18n %} |
|
4 | 4 | |
|
5 | 5 | {% block content %} |
|
6 | 6 | |
|
7 | 7 | {% if posts %} |
|
8 | 8 | {% for post in posts %} |
|
9 | 9 | {% if post.image %} |
|
10 | 10 | <div class="block"> |
|
11 | 11 | <a href="{{ post.image.url }}"><img |
|
12 | 12 | src="{{ post.image.url_200x150 }}" /> |
|
13 | 13 | </a> |
|
14 | 14 | </div> |
|
15 | 15 | {% endif %} |
|
16 | 16 | <div class="block"> |
|
17 | 17 | <span class="title">{{ post.title }}</span> |
|
18 |
<span class="post_id">(#{{ post.id }})</span> |
|
|
18 | <span class="post_id">(#{{ post.id }})</span> | |
|
19 | [{{ post.pub_time }}]<br /> | |
|
19 | 20 | {{ post.text }}<br /> |
|
20 | {% if post.tags %} | |
|
21 | {% ifnotequal post.tags.all|length 0 %} | |
|
21 | 22 | <span class="tags">{% trans 'Tags' %}: |
|
22 | 23 | {% for tag in post.tags.all %} |
|
23 | 24 | <a class="tag" href="/tag/{{ tag.name }}"> |
|
24 | 25 | {{ tag.name }}</a> |
|
25 | 26 | {% endfor %} |
|
26 | 27 | </span> |
|
27 | {% endif %} | |
|
28 | {% endifnotequal %} | |
|
28 | 29 | </div> |
|
29 | 30 | <hr /> |
|
30 | 31 | {% endfor %} |
|
31 | 32 | {% else %} |
|
32 | 33 | No threads found. |
|
33 | 34 | <hr /> |
|
34 | 35 | {% endif %} |
|
35 | 36 | |
|
36 | 37 | <div class="post-form"> |
|
37 | 38 | <form enctype="multipart/form-data" method="post">{% csrf_token %} |
|
38 | 39 | <div class="form-row"> |
|
39 | 40 | <div class="form-input">{% trans 'Title' %}</div> |
|
40 | 41 | <div class="form-input">{{ form.title }}</div> |
|
41 | 42 | </div> |
|
42 | 43 | <div class="form-row"> |
|
43 | 44 | <div class="form-input">{% trans 'Text' %}</div> |
|
44 | 45 | <div class="form-input">{{ form.text }}</div> |
|
45 | 46 | </div> |
|
46 | 47 | <div class="form-row"> |
|
47 | 48 | <div class="form-input">{% trans 'Image' %}</div> |
|
48 | 49 | <div class="form-input">{{ form.image }}</div> |
|
49 | 50 | </div> |
|
50 | 51 | <input type="submit" value="{% trans 'Post' %}" /> |
|
51 | 52 | </form> |
|
52 | 53 | </div> |
|
53 | 54 | |
|
54 | 55 | {% endblock %} No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now