Show More
@@ -1,115 +1,127 b'' | |||||
1 | .ui-button { |
|
1 | .ui-button { | |
2 | display: none; |
|
2 | display: none; | |
3 | } |
|
3 | } | |
4 |
|
4 | |||
5 | .ui-dialog-content { |
|
5 | .ui-dialog-content { | |
6 | padding: 0; |
|
6 | padding: 0; | |
7 | min-height: 0; |
|
7 | min-height: 0; | |
8 | } |
|
8 | } | |
9 |
|
9 | |||
10 | .mark_btn { |
|
10 | .mark_btn { | |
11 | cursor: pointer; |
|
11 | cursor: pointer; | |
12 | } |
|
12 | } | |
13 |
|
13 | |||
14 | .img-full { |
|
14 | .img-full { | |
15 | position: fixed; |
|
15 | position: fixed; | |
16 | background-color: #CCC; |
|
16 | background-color: #CCC; | |
17 | border: 1px solid #000; |
|
17 | border: 1px solid #000; | |
18 | cursor: pointer; |
|
18 | cursor: pointer; | |
19 | } |
|
19 | } | |
20 |
|
20 | |||
21 | .strikethrough { |
|
21 | .strikethrough { | |
22 | text-decoration: line-through; |
|
22 | text-decoration: line-through; | |
23 | } |
|
23 | } | |
24 |
|
24 | |||
25 | .post_preview { |
|
25 | .post_preview { | |
26 | z-index: 300; |
|
26 | z-index: 300; | |
27 | position:absolute; |
|
27 | position:absolute; | |
28 | } |
|
28 | } | |
29 |
|
29 | |||
30 | .gallery_image { |
|
30 | .gallery_image { | |
31 | display: inline-block; |
|
31 | display: inline-block; | |
32 | } |
|
32 | } | |
33 |
|
33 | |||
34 | @media print { |
|
34 | @media print { | |
35 | .post-form-w { |
|
35 | .post-form-w { | |
36 | display: none; |
|
36 | display: none; | |
37 | } |
|
37 | } | |
38 | } |
|
38 | } | |
39 |
|
39 | |||
40 | input[name="image"] { |
|
40 | input[name="image"] { | |
41 | display: block; |
|
41 | display: block; | |
42 | width: 100px; |
|
42 | width: 100px; | |
43 | height: 100px; |
|
43 | height: 100px; | |
44 | cursor: pointer; |
|
44 | cursor: pointer; | |
45 | position: absolute; |
|
45 | position: absolute; | |
46 | opacity: 0; |
|
46 | opacity: 0; | |
47 | z-index: 1; |
|
47 | z-index: 1; | |
48 | } |
|
48 | } | |
49 |
|
49 | |||
50 | .file_wrap { |
|
50 | .file_wrap { | |
51 | width: 100px; |
|
51 | width: 100px; | |
52 | height: 100px; |
|
52 | height: 100px; | |
53 | border: solid 1px white; |
|
53 | border: solid 1px white; | |
54 | display: inline-block; |
|
54 | display: inline-block; | |
55 | } |
|
55 | } | |
56 |
|
56 | |||
57 | form > .file_wrap { |
|
57 | form > .file_wrap { | |
58 | float: left; |
|
58 | float: left; | |
59 | } |
|
59 | } | |
60 |
|
60 | |||
61 | .file-thumb { |
|
61 | .file-thumb { | |
62 | width: 100px; |
|
62 | width: 100px; | |
63 | height: 100px; |
|
63 | height: 100px; | |
64 | background-size: cover; |
|
64 | background-size: cover; | |
65 | background-position: center; |
|
65 | background-position: center; | |
66 | } |
|
66 | } | |
67 |
|
67 | |||
68 | .compact-form-text { |
|
68 | .compact-form-text { | |
69 | margin-left:110px; |
|
69 | margin-left:110px; | |
70 | } |
|
70 | } | |
71 |
|
71 | |||
72 | textarea, input { |
|
72 | textarea, input { | |
73 | -moz-box-sizing: border-box; |
|
73 | -moz-box-sizing: border-box; | |
74 | -webkit-box-sizing: border-box; |
|
74 | -webkit-box-sizing: border-box; | |
75 | box-sizing: border-box; |
|
75 | box-sizing: border-box; | |
76 | } |
|
76 | } | |
77 |
|
77 | |||
78 | .compact-form-text > textarea { |
|
78 | .compact-form-text > textarea { | |
79 | height: 100px; |
|
79 | height: 100px; | |
80 | width: 100%; |
|
80 | width: 100%; | |
81 | } |
|
81 | } | |
82 |
|
82 | |||
83 | .post-button-form { |
|
83 | .post-button-form { | |
84 | display: inline; |
|
84 | display: inline; | |
85 | } |
|
85 | } | |
86 |
|
86 | |||
87 | .post-button-form > button, #autoupdate { |
|
87 | .post-button-form > button, #autoupdate { | |
88 | border: none; |
|
88 | border: none; | |
89 | margin: inherit; |
|
89 | margin: inherit; | |
90 | padding: inherit; |
|
90 | padding: inherit; | |
91 | background: none; |
|
91 | background: none; | |
92 | font-size: inherit; |
|
92 | font-size: inherit; | |
93 | } |
|
93 | } | |
94 |
|
94 | |||
95 | #form-close-button { |
|
95 | #form-close-button { | |
96 | display: none; |
|
96 | display: none; | |
97 | } |
|
97 | } | |
98 |
|
98 | |||
99 | .post-image-full { |
|
99 | .post-image-full { | |
100 | width: 100%; |
|
100 | width: 100%; | |
101 | } |
|
101 | } | |
102 |
|
102 | |||
103 | #preview-text { |
|
103 | #preview-text { | |
104 | display: none; |
|
104 | display: none; | |
105 | } |
|
105 | } | |
106 |
|
106 | |||
107 | .random-images-table { |
|
107 | .random-images-table { | |
108 | text-align: center; |
|
108 | text-align: center; | |
109 | width: 100%; |
|
109 | width: 100%; | |
110 | } |
|
110 | } | |
111 |
|
111 | |||
112 | .random-images-table > div { |
|
112 | .random-images-table > div { | |
113 | margin-left: auto; |
|
113 | margin-left: auto; | |
114 | margin-right: auto; |
|
114 | margin-right: auto; | |
115 | } |
|
115 | } | |
|
116 | ||||
|
117 | .tag-image, .tag-text-data { | |||
|
118 | display: inline-block; | |||
|
119 | } | |||
|
120 | ||||
|
121 | .tag-text-data > h2 { | |||
|
122 | margin: 0; | |||
|
123 | } | |||
|
124 | ||||
|
125 | .tag-image { | |||
|
126 | margin-right: 5px; | |||
|
127 | } |
@@ -1,179 +1,181 b'' | |||||
1 | {% extends "boards/base.html" %} |
|
1 | {% extends "boards/base.html" %} | |
2 |
|
2 | |||
3 | {% load i18n %} |
|
3 | {% load i18n %} | |
4 | {% load board %} |
|
4 | {% load board %} | |
5 | {% load static %} |
|
5 | {% load static %} | |
6 | {% load tz %} |
|
6 | {% load tz %} | |
7 |
|
7 | |||
8 | {% block head %} |
|
8 | {% block head %} | |
9 | <meta name="robots" content="noindex"> |
|
9 | <meta name="robots" content="noindex"> | |
10 |
|
10 | |||
11 | {% if tag %} |
|
11 | {% if tag %} | |
12 | <title>{{ tag.name }} - {{ site_name }}</title> |
|
12 | <title>{{ tag.name }} - {{ site_name }}</title> | |
13 | {% else %} |
|
13 | {% else %} | |
14 | <title>{{ site_name }}</title> |
|
14 | <title>{{ site_name }}</title> | |
15 | {% endif %} |
|
15 | {% endif %} | |
16 |
|
16 | |||
17 | {% if prev_page_link %} |
|
17 | {% if prev_page_link %} | |
18 | <link rel="prev" href="{{ prev_page_link }}" /> |
|
18 | <link rel="prev" href="{{ prev_page_link }}" /> | |
19 | {% endif %} |
|
19 | {% endif %} | |
20 | {% if next_page_link %} |
|
20 | {% if next_page_link %} | |
21 | <link rel="next" href="{{ next_page_link }}" /> |
|
21 | <link rel="next" href="{{ next_page_link }}" /> | |
22 | {% endif %} |
|
22 | {% endif %} | |
23 |
|
23 | |||
24 | {% endblock %} |
|
24 | {% endblock %} | |
25 |
|
25 | |||
26 | {% block content %} |
|
26 | {% block content %} | |
27 |
|
27 | |||
28 | {% get_current_language as LANGUAGE_CODE %} |
|
28 | {% get_current_language as LANGUAGE_CODE %} | |
29 | {% get_current_timezone as TIME_ZONE %} |
|
29 | {% get_current_timezone as TIME_ZONE %} | |
30 |
|
30 | |||
31 | {% for banner in banners %} |
|
31 | {% for banner in banners %} | |
32 | <div class="post"> |
|
32 | <div class="post"> | |
33 | <div class="title">{{ banner.title }}</div> |
|
33 | <div class="title">{{ banner.title }}</div> | |
34 | <div>{{ banner.text }}</div> |
|
34 | <div>{{ banner.text }}</div> | |
35 | <div>{% trans 'Related message' %}: <a href="{{ banner.post.get_absolute_url }}">>>{{ banner.post.id }}</a></div> |
|
35 | <div>{% trans 'Related message' %}: <a href="{{ banner.post.get_absolute_url }}">>>{{ banner.post.id }}</a></div> | |
36 | </div> |
|
36 | </div> | |
37 | {% endfor %} |
|
37 | {% endfor %} | |
38 |
|
38 | |||
39 | {% if tag %} |
|
39 | {% if tag %} | |
40 | <div class="tag_info"> |
|
40 | <div class="tag_info"> | |
41 | <div> |
|
41 | <div class="tag-image"> | |
42 | {% for image in random_images %} |
|
42 | {% for image in random_images %} | |
43 | <a href="{{ image.get_random_associated_post.get_absolute_url }}"><img |
|
43 | <a href="{{ image.get_random_associated_post.get_absolute_url }}"><img | |
44 | src="{{ image.image.url_200x150 }}" |
|
44 | src="{{ image.image.url_200x150 }}" | |
45 | width="{{ image.pre_width }}" |
|
45 | width="{{ image.pre_width }}" | |
46 | height="{{ image.pre_height }}"/></a> |
|
46 | height="{{ image.pre_height }}"/></a> | |
47 | {% endfor %} |
|
47 | {% endfor %} | |
48 | </div> |
|
48 | </div> | |
49 | <h2> |
|
49 | <div class="tag-text-data"> | |
50 | <form action="{% url 'tag' tag.name %}" method="post" class="post-button-form"> |
|
50 | <h2> | |
51 | {% if is_favorite %} |
|
51 | <form action="{% url 'tag' tag.name %}" method="post" class="post-button-form"> | |
52 | <button name="method" value="unsubscribe" class="fav">★</button> |
|
52 | {% if is_favorite %} | |
53 | {% else %} |
|
53 | <button name="method" value="unsubscribe" class="fav">★</button> | |
54 | <button name="method" value="subscribe" class="not_fav">★</button> |
|
54 | {% else %} | |
55 | {% endif %} |
|
55 | <button name="method" value="subscribe" class="not_fav">★</button> | |
56 | </form> |
|
56 | {% endif %} | |
57 | <form action="{% url 'tag' tag.name %}" method="post" class="post-button-form"> |
|
57 | </form> | |
58 | {% if is_hidden %} |
|
58 | <form action="{% url 'tag' tag.name %}" method="post" class="post-button-form"> | |
59 | <button name="method" value="unhide" class="fav">H</button> |
|
59 | {% if is_hidden %} | |
60 | {% else %} |
|
60 | <button name="method" value="unhide" class="fav">H</button> | |
61 | <button name="method" value="hide" class="not_fav">H</button> |
|
61 | {% else %} | |
|
62 | <button name="method" value="hide" class="not_fav">H</button> | |||
|
63 | {% endif %} | |||
|
64 | </form> | |||
|
65 | {% autoescape off %} | |||
|
66 | {{ tag.get_view }} | |||
|
67 | {% endautoescape %} | |||
|
68 | {% if moderator %} | |||
|
69 | <span class="moderator_info">| <a href="{% url 'admin:boards_tag_change' tag.id %}">{% trans 'Edit tag' %}</a></span> | |||
62 | {% endif %} |
|
70 | {% endif %} | |
63 |
</ |
|
71 | </h2> | |
64 |
{% |
|
72 | {% if tag.get_description %} | |
65 |
{ |
|
73 | {% autoescape off %} | |
66 | {% endautoescape %} |
|
74 | <p>{{ tag.get_description }}</p> | |
67 |
|
|
75 | {% endautoescape %} | |
68 | <span class="moderator_info">[<a href="{% url 'admin:boards_tag_change' tag.id %}">{% trans 'Edit tag' %}</a>]</span> |
|
|||
69 | {% endif %} |
|
76 | {% endif %} | |
70 | </h2> |
|
77 | <p>{% blocktrans with active_thread_count=tag.get_active_thread_count thread_count=tag.get_thread_count post_count=tag.get_post_count %}This tag has {{ active_thread_count}}/{{ thread_count }} threads and {{ post_count }} posts.{% endblocktrans %}</p> | |
71 | {% if tag.get_description %} |
|
78 | </div> | |
72 | {% autoescape off %} |
|
|||
73 | <p>{{ tag.get_description }}</p> |
|
|||
74 | {% endautoescape %} |
|
|||
75 | {% endif %} |
|
|||
76 | <p>{% blocktrans with active_thread_count=tag.get_active_thread_count thread_count=tag.get_thread_count post_count=tag.get_post_count %}This tag has {{ active_thread_count}}/{{ thread_count }} threads and {{ post_count }} posts.{% endblocktrans %}</p> |
|
|||
77 | </div> |
|
79 | </div> | |
78 | {% endif %} |
|
80 | {% endif %} | |
79 |
|
81 | |||
80 | {% if threads %} |
|
82 | {% if threads %} | |
81 | {% if prev_page_link %} |
|
83 | {% if prev_page_link %} | |
82 | <div class="page_link"> |
|
84 | <div class="page_link"> | |
83 | <a href="{{ prev_page_link }}">{% trans "Previous page" %}</a> |
|
85 | <a href="{{ prev_page_link }}">{% trans "Previous page" %}</a> | |
84 | </div> |
|
86 | </div> | |
85 | {% endif %} |
|
87 | {% endif %} | |
86 |
|
88 | |||
87 | {% for thread in threads %} |
|
89 | {% for thread in threads %} | |
88 | <div class="thread"> |
|
90 | <div class="thread"> | |
89 | {% post_view thread.get_opening_post moderator=moderator is_opening=True thread=thread truncated=True need_open_link=True %} |
|
91 | {% post_view thread.get_opening_post moderator=moderator is_opening=True thread=thread truncated=True need_open_link=True %} | |
90 | {% if not thread.archived %} |
|
92 | {% if not thread.archived %} | |
91 | {% with last_replies=thread.get_last_replies %} |
|
93 | {% with last_replies=thread.get_last_replies %} | |
92 | {% if last_replies %} |
|
94 | {% if last_replies %} | |
93 | {% with skipped_replies_count=thread.get_skipped_replies_count %} |
|
95 | {% with skipped_replies_count=thread.get_skipped_replies_count %} | |
94 | {% if skipped_replies_count %} |
|
96 | {% if skipped_replies_count %} | |
95 | <div class="skipped_replies"> |
|
97 | <div class="skipped_replies"> | |
96 | <a href="{% url 'thread' thread.get_opening_post_id %}"> |
|
98 | <a href="{% url 'thread' thread.get_opening_post_id %}"> | |
97 | {% blocktrans with count=skipped_replies_count %}Skipped {{ count }} replies. Open thread to see all replies.{% endblocktrans %} |
|
99 | {% blocktrans with count=skipped_replies_count %}Skipped {{ count }} replies. Open thread to see all replies.{% endblocktrans %} | |
98 | </a> |
|
100 | </a> | |
99 | </div> |
|
101 | </div> | |
100 | {% endif %} |
|
102 | {% endif %} | |
101 | {% endwith %} |
|
103 | {% endwith %} | |
102 | <div class="last-replies"> |
|
104 | <div class="last-replies"> | |
103 | {% for post in last_replies %} |
|
105 | {% for post in last_replies %} | |
104 | {% post_view post is_opening=False moderator=moderator truncated=True %} |
|
106 | {% post_view post is_opening=False moderator=moderator truncated=True %} | |
105 | {% endfor %} |
|
107 | {% endfor %} | |
106 | </div> |
|
108 | </div> | |
107 | {% endif %} |
|
109 | {% endif %} | |
108 | {% endwith %} |
|
110 | {% endwith %} | |
109 | {% endif %} |
|
111 | {% endif %} | |
110 | </div> |
|
112 | </div> | |
111 | {% endfor %} |
|
113 | {% endfor %} | |
112 |
|
114 | |||
113 | {% if next_page_link %} |
|
115 | {% if next_page_link %} | |
114 | <div class="page_link"> |
|
116 | <div class="page_link"> | |
115 | <a href="{{ next_page_link }}">{% trans "Next page" %}</a> |
|
117 | <a href="{{ next_page_link }}">{% trans "Next page" %}</a> | |
116 | </div> |
|
118 | </div> | |
117 | {% endif %} |
|
119 | {% endif %} | |
118 | {% else %} |
|
120 | {% else %} | |
119 | <div class="post"> |
|
121 | <div class="post"> | |
120 | {% trans 'No threads exist. Create the first one!' %}</div> |
|
122 | {% trans 'No threads exist. Create the first one!' %}</div> | |
121 | {% endif %} |
|
123 | {% endif %} | |
122 |
|
124 | |||
123 | <div class="post-form-w"> |
|
125 | <div class="post-form-w"> | |
124 | <script src="{% static 'js/panel.js' %}"></script> |
|
126 | <script src="{% static 'js/panel.js' %}"></script> | |
125 | <div class="post-form"> |
|
127 | <div class="post-form"> | |
126 | <div class="form-title">{% trans "Create new thread" %}</div> |
|
128 | <div class="form-title">{% trans "Create new thread" %}</div> | |
127 | <div class="swappable-form-full"> |
|
129 | <div class="swappable-form-full"> | |
128 | <form enctype="multipart/form-data" method="post" id="form">{% csrf_token %} |
|
130 | <form enctype="multipart/form-data" method="post" id="form">{% csrf_token %} | |
129 | {{ form.as_div }} |
|
131 | {{ form.as_div }} | |
130 | <div class="form-submit"> |
|
132 | <div class="form-submit"> | |
131 | <input type="submit" value="{% trans "Post" %}"/> |
|
133 | <input type="submit" value="{% trans "Post" %}"/> | |
132 | </div> |
|
134 | </div> | |
133 | </form> |
|
135 | </form> | |
134 | </div> |
|
136 | </div> | |
135 | <div> |
|
137 | <div> | |
136 | {% trans 'Tags must be delimited by spaces. Text or image is required.' %} |
|
138 | {% trans 'Tags must be delimited by spaces. Text or image is required.' %} | |
137 | </div> |
|
139 | </div> | |
138 | <div><button id="preview-button">{% trans 'Preview' %}</button></div> |
|
140 | <div><button id="preview-button">{% trans 'Preview' %}</button></div> | |
139 | <div id="preview-text"></div> |
|
141 | <div id="preview-text"></div> | |
140 | <div><a href="{% url "staticpage" name="help" %}">{% trans 'Text syntax' %}</a></div> |
|
142 | <div><a href="{% url "staticpage" name="help" %}">{% trans 'Text syntax' %}</a></div> | |
141 | <div><a href="{% url "tags" "required" %}">{% trans 'Tags' %}</a></div> |
|
143 | <div><a href="{% url "tags" "required" %}">{% trans 'Tags' %}</a></div> | |
142 | </div> |
|
144 | </div> | |
143 | </div> |
|
145 | </div> | |
144 |
|
146 | |||
145 | <script src="{% static 'js/form.js' %}"></script> |
|
147 | <script src="{% static 'js/form.js' %}"></script> | |
146 | <script src="{% static 'js/thread_create.js' %}"></script> |
|
148 | <script src="{% static 'js/thread_create.js' %}"></script> | |
147 |
|
149 | |||
148 | {% endblock %} |
|
150 | {% endblock %} | |
149 |
|
151 | |||
150 | {% block metapanel %} |
|
152 | {% block metapanel %} | |
151 |
|
153 | |||
152 | <span class="metapanel"> |
|
154 | <span class="metapanel"> | |
153 | <b><a href="{% url "authors" %}">{{ site_name }}</a> {{ version }}</b> |
|
155 | <b><a href="{% url "authors" %}">{{ site_name }}</a> {{ version }}</b> | |
154 | {% trans "Pages:" %} |
|
156 | {% trans "Pages:" %} | |
155 | [ |
|
157 | [ | |
156 | {% with dividers=paginator.get_dividers %} |
|
158 | {% with dividers=paginator.get_dividers %} | |
157 | {% for page in paginator.get_divided_range %} |
|
159 | {% for page in paginator.get_divided_range %} | |
158 | {% if page in dividers %} |
|
160 | {% if page in dividers %} | |
159 | …, |
|
161 | …, | |
160 | {% endif %} |
|
162 | {% endif %} | |
161 | <a |
|
163 | <a | |
162 | {% ifequal page current_page.number %} |
|
164 | {% ifequal page current_page.number %} | |
163 | class="current_page" |
|
165 | class="current_page" | |
164 | {% endifequal %} |
|
166 | {% endifequal %} | |
165 | href=" |
|
167 | href=" | |
166 | {% if tag %} |
|
168 | {% if tag %} | |
167 | {% url "tag" tag_name=tag.name %}?page={{ page }} |
|
169 | {% url "tag" tag_name=tag.name %}?page={{ page }} | |
168 | {% else %} |
|
170 | {% else %} | |
169 | {% url "index" %}?page={{ page }} |
|
171 | {% url "index" %}?page={{ page }} | |
170 | {% endif %} |
|
172 | {% endif %} | |
171 | ">{{ page }}</a> |
|
173 | ">{{ page }}</a> | |
172 | {% if not forloop.last %},{% endif %} |
|
174 | {% if not forloop.last %},{% endif %} | |
173 | {% endfor %} |
|
175 | {% endfor %} | |
174 | {% endwith %} |
|
176 | {% endwith %} | |
175 | ] |
|
177 | ] | |
176 | [<a href="rss/">RSS</a>] |
|
178 | [<a href="rss/">RSS</a>] | |
177 | </span> |
|
179 | </span> | |
178 |
|
180 | |||
179 | {% endblock %} |
|
181 | {% endblock %} |
General Comments 0
You need to be logged in to leave comments.
Login now