##// END OF EJS Templates
Added image format and size label to images
neko259 -
r1245:ea38de1e default
parent child Browse files
Show More
@@ -1,105 +1,110 b''
1 1 import hashlib
2 2 import os
3 3 from random import random
4 4 import time
5 5 from django.db import models
6 from django.template.defaultfilters import filesizeformat
6 7 from boards import thumbs
7 8 from boards.models.base import Viewable
8 9
9 10 __author__ = 'neko259'
10 11
11 12
12 13 IMAGE_THUMB_SIZE = (200, 150)
13 14 IMAGES_DIRECTORY = 'images/'
14 15 FILE_EXTENSION_DELIMITER = '.'
15 16 HASH_LENGTH = 36
16 17
17 18 CSS_CLASS_IMAGE = 'image'
18 19 CSS_CLASS_THUMB = 'thumb'
19 20
20 21
21 22 class PostImageManager(models.Manager):
22 23 def create_with_hash(self, image):
23 24 image_hash = self.get_hash(image)
24 25 existing = self.filter(hash=image_hash)
25 26 if len(existing) > 0:
26 27 post_image = existing[0]
27 28 else:
28 29 post_image = PostImage.objects.create(image=image)
29 30
30 31 return post_image
31 32
32 33 def get_hash(self, image):
33 34 """
34 35 Gets hash of an image.
35 36 """
36 37 md5 = hashlib.md5()
37 38 for chunk in image.chunks():
38 39 md5.update(chunk)
39 40 return md5.hexdigest()
40 41
41 42
42 43 class PostImage(models.Model, Viewable):
43 44 objects = PostImageManager()
44 45
45 46 class Meta:
46 47 app_label = 'boards'
47 48 ordering = ('id',)
48 49
49 50 def _update_image_filename(self, filename):
50 51 """
51 52 Gets unique image filename
52 53 """
53 54
54 55 path = IMAGES_DIRECTORY
55 56
56 57 # TODO Use something other than random number in file name
57 58 new_name = '{}{}.{}'.format(
58 59 str(int(time.mktime(time.gmtime()))),
59 60 str(int(random() * 1000)),
60 61 filename.split(FILE_EXTENSION_DELIMITER)[-1:][0])
61 62
62 63 return os.path.join(path, new_name)
63 64
64 65 width = models.IntegerField(default=0)
65 66 height = models.IntegerField(default=0)
66 67
67 68 pre_width = models.IntegerField(default=0)
68 69 pre_height = models.IntegerField(default=0)
69 70
70 71 image = thumbs.ImageWithThumbsField(upload_to=_update_image_filename,
71 72 blank=True, sizes=(IMAGE_THUMB_SIZE,),
72 73 width_field='width',
73 74 height_field='height',
74 75 preview_width_field='pre_width',
75 76 preview_height_field='pre_height')
76 77 hash = models.CharField(max_length=HASH_LENGTH)
77 78
78 79 def save(self, *args, **kwargs):
79 80 """
80 81 Saves the model and computes the image hash for deduplication purposes.
81 82 """
82 83
83 84 if not self.pk and self.image:
84 85 self.hash = PostImage.objects.get_hash(self.image)
85 86 super(PostImage, self).save(*args, **kwargs)
86 87
87 88 def __str__(self):
88 89 return self.image.url
89 90
90 91 def get_view(self):
92 metadata = '{}, {}'.format(self.image.name.split('.')[-1],
93 filesizeformat(self.image.size))
91 94 return '<div class="{}">' \
92 95 '<a class="{}" href="{full}">' \
93 96 '<img class="post-image-preview"' \
94 97 ' src="{}"' \
95 98 ' alt="{}"' \
96 99 ' width="{}"' \
97 100 ' height="{}"' \
98 101 ' data-width="{}"' \
99 102 ' data-height="{}" />' \
100 103 '</a>' \
104 '<div class="image-metadata">{image_meta}</div>' \
101 105 '</div>'\
102 106 .format(CSS_CLASS_IMAGE, CSS_CLASS_THUMB,
103 107 self.image.url_200x150,
104 108 str(self.hash), str(self.pre_width),
105 str(self.pre_height), str(self.width), str(self.height), full=self.image.url)
109 str(self.pre_height), str(self.width), str(self.height),
110 full=self.image.url, image_meta=metadata)
@@ -1,545 +1,549 b''
1 1 * {
2 2 text-decoration: none;
3 3 font-weight: inherit;
4 4 }
5 5
6 6 b, strong {
7 7 font-weight: bold;
8 8 }
9 9
10 10 html {
11 11 background: #555;
12 12 color: #ffffff;
13 13 }
14 14
15 15 body {
16 16 margin: 0;
17 17 }
18 18
19 19 #admin_panel {
20 20 background: #FF0000;
21 21 color: #00FF00
22 22 }
23 23
24 24 .input_field_error {
25 25 color: #FF0000;
26 26 }
27 27
28 28 .title {
29 29 font-weight: bold;
30 30 color: #ffcc00;
31 31 }
32 32
33 33 .link, a {
34 34 color: #afdcec;
35 35 }
36 36
37 37 .block {
38 38 display: inline-block;
39 39 vertical-align: top;
40 40 }
41 41
42 42 .tag {
43 43 color: #FFD37D;
44 44 }
45 45
46 46 .post_id {
47 47 color: #fff380;
48 48 }
49 49
50 50 .post, .dead_post, .archive_post, #posts-table {
51 51 background: #333;
52 52 padding: 10px;
53 53 clear: left;
54 54 word-wrap: break-word;
55 55 border-top: 1px solid #777;
56 56 border-bottom: 1px solid #777;
57 57 }
58 58
59 59 .post + .post {
60 60 border-top: none;
61 61 }
62 62
63 63 .dead_post + .dead_post {
64 64 border-top: none;
65 65 }
66 66
67 67 .archive_post + .archive_post {
68 68 border-top: none;
69 69 }
70 70
71 71 .metadata {
72 72 padding-top: 5px;
73 73 margin-top: 10px;
74 74 border-top: solid 1px #666;
75 75 color: #ddd;
76 76 }
77 77
78 78 .navigation_panel, .tag_info {
79 79 background: #222;
80 80 margin-bottom: 5px;
81 81 margin-top: 5px;
82 82 padding: 10px;
83 83 border-bottom: solid 1px #888;
84 84 border-top: solid 1px #888;
85 85 color: #eee;
86 86 }
87 87
88 88 .navigation_panel .link:first-child {
89 89 border-right: 1px solid #fff;
90 90 font-weight: bold;
91 91 margin-right: 1ex;
92 92 padding-right: 1ex;
93 93 }
94 94
95 95 .navigation_panel .right-link {
96 96 border-left: 1px solid #fff;
97 97 border-right: none;
98 98 float: right;
99 99 margin-left: 1ex;
100 100 margin-right: 0;
101 101 padding-left: 1ex;
102 102 padding-right: 0;
103 103 }
104 104
105 105 .navigation_panel .link {
106 106 font-weight: bold;
107 107 }
108 108
109 109 .navigation_panel::after, .post::after {
110 110 clear: both;
111 111 content: ".";
112 112 display: block;
113 113 height: 0;
114 114 line-height: 0;
115 115 visibility: hidden;
116 116 }
117 117
118 118 .header {
119 119 border-bottom: solid 2px #ccc;
120 120 margin-bottom: 5px;
121 121 border-top: none;
122 122 margin-top: 0;
123 123 }
124 124
125 125 .footer {
126 126 border-top: solid 2px #ccc;
127 127 margin-top: 5px;
128 128 border-bottom: none;
129 129 margin-bottom: 0;
130 130 }
131 131
132 132 p, .br {
133 133 margin-top: .5em;
134 134 margin-bottom: .5em;
135 135 }
136 136
137 137 .post-form-w {
138 138 background: #333344;
139 139 border-top: solid 1px #888;
140 140 border-bottom: solid 1px #888;
141 141 color: #fff;
142 142 padding: 10px;
143 143 margin-bottom: 5px;
144 144 margin-top: 5px;
145 145 }
146 146
147 147 .form-row {
148 148 width: 100%;
149 149 display: table-row;
150 150 }
151 151
152 152 .form-label {
153 153 padding: .25em 1ex .25em 0;
154 154 vertical-align: top;
155 155 display: table-cell;
156 156 }
157 157
158 158 .form-input {
159 159 padding: .25em 0;
160 160 width: 100%;
161 161 display: table-cell;
162 162 }
163 163
164 164 .form-errors {
165 165 font-weight: bolder;
166 166 vertical-align: middle;
167 167 display: table-cell;
168 168 }
169 169
170 170 .post-form input:not([name="image"]), .post-form textarea, .post-form select {
171 171 background: #333;
172 172 color: #fff;
173 173 border: solid 1px;
174 174 padding: 0;
175 175 font: medium sans-serif;
176 176 width: 100%;
177 177 }
178 178
179 179 .post-form textarea {
180 180 resize: vertical;
181 181 }
182 182
183 183 .form-submit {
184 184 display: table;
185 185 margin-bottom: 1ex;
186 186 margin-top: 1ex;
187 187 }
188 188
189 189 .form-title {
190 190 font-weight: bold;
191 191 font-size: 2ex;
192 192 margin-bottom: 0.5ex;
193 193 }
194 194
195 195 .post-form input[type="submit"], input[type="submit"] {
196 196 background: #222;
197 197 border: solid 2px #fff;
198 198 color: #fff;
199 199 padding: 0.5ex;
200 200 }
201 201
202 202 input[type="submit"]:hover {
203 203 background: #060;
204 204 }
205 205
206 206 blockquote {
207 207 border-left: solid 2px;
208 208 padding-left: 5px;
209 209 color: #B1FB17;
210 210 margin: 0;
211 211 }
212 212
213 213 .post > .image {
214 214 float: left;
215 215 margin: 0 1ex .5ex 0;
216 216 min-width: 1px;
217 217 text-align: center;
218 218 display: table-row;
219 219 }
220 220
221 221 .post > .metadata {
222 222 clear: left;
223 223 }
224 224
225 225 .get {
226 226 font-weight: bold;
227 227 color: #d55;
228 228 }
229 229
230 230 * {
231 231 text-decoration: none;
232 232 }
233 233
234 234 .dead_post {
235 235 border-left: solid 5px #982C2C;
236 236 }
237 237
238 238 .archive_post {
239 239 border-left: solid 5px #B7B7B7;
240 240 }
241 241
242 242 .mark_btn {
243 243 border: 1px solid;
244 244 padding: 2px 2ex;
245 245 display: inline-block;
246 246 margin: 0 5px 4px 0;
247 247 }
248 248
249 249 .mark_btn:hover {
250 250 background: #555;
251 251 }
252 252
253 253 .quote {
254 254 color: #92cf38;
255 255 font-style: italic;
256 256 }
257 257
258 258 .multiquote {
259 259 padding: 3px;
260 260 display: inline-block;
261 261 background: #222;
262 262 border-style: solid;
263 263 border-width: 1px 1px 1px 4px;
264 264 font-size: 0.9em;
265 265 }
266 266
267 267 .spoiler {
268 268 background: black;
269 269 color: black;
270 270 padding: 0 1ex 0 1ex;
271 271 }
272 272
273 273 .spoiler:hover {
274 274 color: #ddd;
275 275 }
276 276
277 277 .comment {
278 278 color: #eb2;
279 279 }
280 280
281 281 a:hover {
282 282 text-decoration: underline;
283 283 }
284 284
285 285 .last-replies {
286 286 margin-left: 3ex;
287 287 margin-right: 3ex;
288 288 border-left: solid 1px #777;
289 289 border-right: solid 1px #777;
290 290 }
291 291
292 292 .last-replies > .post:first-child {
293 293 border-top: none;
294 294 }
295 295
296 296 .thread {
297 297 margin-bottom: 3ex;
298 298 margin-top: 1ex;
299 299 }
300 300
301 301 .post:target {
302 302 border: solid 2px white;
303 303 }
304 304
305 305 pre{
306 306 white-space:pre-wrap
307 307 }
308 308
309 309 li {
310 310 list-style-position: inside;
311 311 }
312 312
313 313 .fancybox-skin {
314 314 position: relative;
315 315 background-color: #fff;
316 316 color: #ddd;
317 317 text-shadow: none;
318 318 }
319 319
320 320 .fancybox-image {
321 321 border: 1px solid black;
322 322 }
323 323
324 324 .image-mode-tab {
325 325 background: #444;
326 326 color: #eee;
327 327 margin-top: 5px;
328 328 padding: 5px;
329 329 border-top: 1px solid #888;
330 330 border-bottom: 1px solid #888;
331 331 }
332 332
333 333 .image-mode-tab > label {
334 334 margin: 0 1ex;
335 335 }
336 336
337 337 .image-mode-tab > label > input {
338 338 margin-right: .5ex;
339 339 }
340 340
341 341 #posts-table {
342 342 margin-top: 5px;
343 343 margin-bottom: 5px;
344 344 }
345 345
346 346 .tag_info > h2 {
347 347 margin: 0;
348 348 }
349 349
350 350 .post-info {
351 351 color: #ddd;
352 352 margin-bottom: 1ex;
353 353 }
354 354
355 355 .moderator_info {
356 356 color: #e99d41;
357 357 float: right;
358 358 font-weight: bold;
359 359 opacity: 0.4;
360 360 }
361 361
362 362 .moderator_info:hover {
363 363 opacity: 1;
364 364 }
365 365
366 366 .refmap {
367 367 font-size: 0.9em;
368 368 color: #ccc;
369 369 margin-top: 1em;
370 370 }
371 371
372 372 .fav {
373 373 color: yellow;
374 374 }
375 375
376 376 .not_fav {
377 377 color: #ccc;
378 378 }
379 379
380 380 .role {
381 381 text-decoration: underline;
382 382 }
383 383
384 384 .form-email {
385 385 display: none;
386 386 }
387 387
388 388 .bar-value {
389 389 background: rgba(50, 55, 164, 0.45);
390 390 font-size: 0.9em;
391 391 height: 1.5em;
392 392 }
393 393
394 394 .bar-bg {
395 395 position: relative;
396 396 border-top: solid 1px #888;
397 397 border-bottom: solid 1px #888;
398 398 margin-top: 5px;
399 399 overflow: hidden;
400 400 }
401 401
402 402 .bar-text {
403 403 padding: 2px;
404 404 position: absolute;
405 405 left: 0;
406 406 top: 0;
407 407 }
408 408
409 409 .page_link {
410 410 background: #444;
411 411 border-top: solid 1px #888;
412 412 border-bottom: solid 1px #888;
413 413 padding: 5px;
414 414 color: #eee;
415 415 font-size: 2ex;
416 416 }
417 417
418 418 .skipped_replies {
419 419 padding: 5px;
420 420 margin-left: 3ex;
421 421 margin-right: 3ex;
422 422 border-left: solid 1px #888;
423 423 border-right: solid 1px #888;
424 424 border-bottom: solid 1px #888;
425 425 background: #000;
426 426 }
427 427
428 428 .current_page {
429 429 padding: 2px;
430 430 background-color: #afdcec;
431 431 color: #000;
432 432 }
433 433
434 434 .current_mode {
435 435 font-weight: bold;
436 436 }
437 437
438 438 .gallery_image {
439 439 border: solid 1px;
440 440 padding: 0.5ex;
441 441 margin: 0.5ex;
442 442 text-align: center;
443 443 }
444 444
445 445 code {
446 446 border: dashed 1px #ccc;
447 447 background: #111;
448 448 padding: 2px;
449 449 font-size: 1.2em;
450 450 display: inline-block;
451 451 }
452 452
453 453 pre {
454 454 overflow: auto;
455 455 }
456 456
457 457 .img-full {
458 458 background: #222;
459 459 border: solid 1px white;
460 460 }
461 461
462 462 .tag_item {
463 463 display: inline-block;
464 464 }
465 465
466 466 #id_models li {
467 467 list-style: none;
468 468 }
469 469
470 470 #id_q {
471 471 margin-left: 1ex;
472 472 }
473 473
474 474 ul {
475 475 padding-left: 0px;
476 476 }
477 477
478 478 .quote-header {
479 479 border-bottom: 2px solid #ddd;
480 480 margin-bottom: 1ex;
481 481 padding-bottom: .5ex;
482 482 color: #ddd;
483 483 font-size: 1.2em;
484 484 }
485 485
486 486 /* Reflink preview */
487 487 .post_preview {
488 488 border-left: 1px solid #777;
489 489 border-right: 1px solid #777;
490 490 max-width: 600px;
491 491 }
492 492
493 493 /* Code highlighter */
494 494 .hljs {
495 495 color: #fff;
496 496 background: #000;
497 497 display: inline-block;
498 498 }
499 499
500 500 .hljs, .hljs-subst, .hljs-tag .hljs-title, .lisp .hljs-title, .clojure .hljs-built_in, .nginx .hljs-title {
501 501 color: #fff;
502 502 }
503 503
504 504 #up {
505 505 position: fixed;
506 506 bottom: 5px;
507 507 right: 5px;
508 508 border: 1px solid #777;
509 509 background: #000;
510 510 padding: 4px;
511 511 }
512 512
513 513 .user-cast {
514 514 border: solid #ffffff 1px;
515 515 padding: .2ex;
516 516 background: #152154;
517 517 color: #fff;
518 518 }
519 519
520 520 .highlight {
521 521 background-color: #222;
522 522 }
523 523
524 524 .post-button-form > button:hover {
525 525 text-decoration: underline;
526 526 }
527 527
528 528 .tree_reply > .post {
529 margin-left: 1ex;
530 529 margin-top: 1ex;
531 530 border-left: solid 1px #777;
532 border-right: solid 1px #777;
531 padding-right: 0;
533 532 }
534 533
535 534 #preview-text {
536 535 border: solid 1px white;
537 536 margin: 1ex 0 1ex 0;
538 537 padding: 1ex;
539 538 }
540 539
541 540 button {
542 541 border: 1px solid white;
543 542 margin-bottom: .5ex;
544 543 margin-top: .5ex;
545 544 }
545
546 .image-metadata {
547 font-style: italic;
548 font-size: 0.9em;
549 } No newline at end of file
@@ -1,378 +1,383 b''
1 1 html {
2 2 background: rgb(238, 238, 238);
3 3 color: rgb(51, 51, 51);
4 4 }
5 5
6 6 #admin_panel {
7 7 background: #FF0000;
8 8 color: #00FF00
9 9 }
10 10
11 11 .input_field {
12 12
13 13 }
14 14
15 15 .input_field_name {
16 16
17 17 }
18 18
19 19 .input_field_error {
20 20 color: #FF0000;
21 21 }
22 22
23 23
24 24 .title {
25 25 font-weight: bold;
26 26 color: #333;
27 27 font-size: 2ex;
28 28 }
29 29
30 30 .link, a {
31 31 color: #ff7000;
32 32 }
33 33
34 34 .block {
35 35 display: inline-block;
36 36 vertical-align: top;
37 37 }
38 38
39 39 .tag {
40 40 color: #222;
41 41 }
42 42
43 43 .post_id:hover {
44 44 color: #11f;
45 45 }
46 46
47 47 .post_id {
48 48 color: #444;
49 49 }
50 50
51 51 .post, .dead_post, #posts-table {
52 52 margin: 5px;
53 53 padding: 10px;
54 54 background: rgb(221, 221, 221);
55 55 border: 1px solid rgb(204, 204, 204);
56 56 border-radius: 5px 5px 5px 5px;
57 57 clear: left;
58 58 word-wrap: break-word;
59 59 display: table;
60 60 }
61 61
62 62 .metadata {
63 63 padding: 5px;
64 64 margin-top: 10px;
65 65 border: solid 1px #666;
66 66 font-size: 0.9em;
67 67 display: table;
68 68 }
69 69
70 70 .navigation_panel, .tag_info, .page_link {
71 71 margin: 5px;
72 72 padding: 10px;
73 73 border: 1px solid rgb(204, 204, 204);
74 74 border-radius: 5px 5px 5px 5px;
75 75 }
76 76
77 77 .navigation_panel .link {
78 78 border-right: 1px solid #000;
79 79 font-weight: bold;
80 80 margin-right: 1ex;
81 81 padding-right: 1ex;
82 82 }
83 83 .navigation_panel .link:last-child {
84 84 border-left: 1px solid #000;
85 85 border-right: none;
86 86 float: right;
87 87 margin-left: 1ex;
88 88 margin-right: 0;
89 89 padding-left: 1ex;
90 90 padding-right: 0;
91 91 }
92 92
93 93 .navigation_panel::after, .post::after {
94 94 clear: both;
95 95 content: ".";
96 96 display: block;
97 97 height: 0;
98 98 line-height: 0;
99 99 visibility: hidden;
100 100 }
101 101
102 102 p {
103 103 margin-top: .5em;
104 104 margin-bottom: .5em;
105 105 }
106 106
107 107 .post-form-w {
108 108 display: table;
109 109 padding: 10px;
110 110 margin: 5px
111 111 }
112 112
113 113 .form-row {
114 114 display: table-row;
115 115 }
116 116
117 117 .form-label, .form-input, .form-errors {
118 118 display: table-cell;
119 119 }
120 120
121 121 .form-label {
122 122 padding: .25em 1ex .25em 0;
123 123 vertical-align: top;
124 124 }
125 125
126 126 .form-input {
127 127 padding: .25em 0;
128 128 }
129 129
130 130 .form-errors {
131 131 padding-left: 1ex;
132 132 font-weight: bold;
133 133 vertical-align: middle;
134 134 }
135 135
136 136 .post-form input:not([name="image"]), .post-form textarea {
137 137 background: #fff;
138 138 color: #000;
139 139 border: solid 1px;
140 140 padding: 0;
141 141 width: 100%;
142 142 font: medium sans;
143 143 }
144 144
145 145 .form-submit {
146 146 border-bottom: 2px solid #ddd;
147 147 margin-bottom: .5em;
148 148 padding-bottom: .5em;
149 149 }
150 150
151 151 .form-title {
152 152 font-weight: bold;
153 153 }
154 154
155 155 input[type="submit"] {
156 156 background: #fff;
157 157 border: solid 1px #000;
158 158 color: #000;
159 159 }
160 160
161 161 blockquote {
162 162 border-left: solid 2px;
163 163 padding-left: 5px;
164 164 color: #B1FB17;
165 165 margin: 0;
166 166 }
167 167
168 168 .post > .image {
169 169 float: left;
170 170 margin: 0 1ex .5ex 0;
171 171 min-width: 1px;
172 172 text-align: center;
173 173 display: table-row;
174 174 }
175 175
176 176 .post > .metadata {
177 177 clear: left;
178 178 }
179 179
180 180 .get {
181 181 font-weight: bold;
182 182 color: #d55;
183 183 }
184 184
185 185 * {
186 186 text-decoration: none;
187 187 }
188 188
189 189 .dead_post {
190 190 border-top: solid #d5494f;
191 191 }
192 192
193 193 .archive_post {
194 194 border-top: solid #575e9f;
195 195 }
196 196
197 197 .quote {
198 198 color: #080;
199 199 font-style: italic;
200 200 }
201 201
202 202 .spoiler {
203 203 background: white;
204 204 color: white;
205 205 }
206 206
207 207 .spoiler:hover {
208 208 color: black;
209 209 }
210 210
211 211 .comment {
212 212 color: #8B6914;
213 213 font-style: italic;
214 214 }
215 215
216 216 a:hover {
217 217 text-decoration: underline;
218 218 }
219 219
220 220 .last-replies {
221 221 margin-left: 3ex;
222 222 }
223 223
224 224 .thread {
225 225 margin-bottom: 3ex;
226 226 }
227 227
228 228 .post:target {
229 229 border: solid 2px black;
230 230 }
231 231
232 232 pre{
233 233 white-space:pre-wrap
234 234 }
235 235
236 236 li {
237 237 list-style-position: inside;
238 238 }
239 239
240 240 .fancybox-skin {
241 241 position: relative;
242 242 background-color: #fff;
243 243 color: #ddd;
244 244 text-shadow: none;
245 245 }
246 246
247 247 .fancybox-image {
248 248 border: 1px solid black;
249 249 }
250 250
251 251 .image-mode-tab {
252 252 display: table;
253 253 margin: 5px;
254 254 padding: 5px;
255 255 background: rgb(221, 221, 221);
256 256 border: 1px solid rgb(204, 204, 204);
257 257 border-radius: 5px 5px 5px 5px;
258 258 }
259 259
260 260 .image-mode-tab > label {
261 261 margin: 0 1ex;
262 262 }
263 263
264 264 .image-mode-tab > label > input {
265 265 margin-right: .5ex;
266 266 }
267 267
268 268 #posts-table {
269 269 margin: 5px;
270 270 }
271 271
272 272 .tag_info, .page_link {
273 273 display: table;
274 274 }
275 275
276 276 .tag_info > h2 {
277 277 margin: 0;
278 278 }
279 279
280 280 .moderator_info {
281 281 color: #e99d41;
282 282 border: dashed 1px;
283 283 padding: 3px;
284 284 }
285 285
286 286 .refmap {
287 287 font-size: 0.9em;
288 288 color: #444;
289 289 margin-top: 1em;
290 290 }
291 291
292 292 input[type="submit"]:hover {
293 293 background: #ccc;
294 294 }
295 295
296 296
297 297 .fav {
298 298 color: rgb(255, 102, 0);
299 299 }
300 300
301 301 .not_fav {
302 302 color: #555;
303 303 }
304 304
305 305 .role {
306 306 text-decoration: underline;
307 307 }
308 308
309 309 .form-email {
310 310 display: none;
311 311 }
312 312
313 313 .mark_btn {
314 314 padding: 2px 2ex;
315 315 border: 1px solid;
316 316 }
317 317
318 318 .mark_btn:hover {
319 319 background: #ccc;
320 320 }
321 321
322 322 .bar-value {
323 323 background: rgba(251, 199, 16, 0.61);
324 324 padding: 2px;
325 325 font-size: 0.9em;
326 326 height: 1.5em;
327 327 }
328 328
329 329 .bar-bg {
330 330 position: relative;
331 331 border: 1px solid rgb(204, 204, 204);
332 332 border-radius: 5px 5px 5px 5px;
333 333 margin: 5px;
334 334 overflow: hidden;
335 335 }
336 336
337 337 .bar-text {
338 338 padding: 2px;
339 339 position: absolute;
340 340 left: 0;
341 341 top: 0;
342 342 }
343 343
344 344 .skipped_replies {
345 345 margin: 5px;
346 346 }
347 347
348 348 .current_page, .current_mode {
349 349 border: solid 1px #000;
350 350 padding: 2px;
351 351 }
352 352
353 353 .tag_item {
354 354 display: inline-block;
355 355 border: 1px solid #ccc;
356 356 margin: 0.3ex;
357 357 padding: 0.2ex;
358 358 }
359 359
360 360 .multiquote {
361 361 padding: 3px;
362 362 display: inline-block;
363 363 background: #ddd;
364 364 border-style: solid;
365 365 border-width: 1px 1px 1px 4px;
366 366 border-color: #222;
367 367 font-size: 0.9em;
368 368 }
369 369
370 370 .highlight {
371 371 background-color: #F9E8A5;
372 372 }
373 373
374 374 #preview-text {
375 375 border: solid 1px black;
376 376 margin: 1ex 0 1ex 0;
377 377 padding: 1ex;
378 378 }
379
380 .image-metadata {
381 font-style: italic;
382 font-size: 0.9em;
383 } No newline at end of file
@@ -1,409 +1,414 b''
1 1 * {
2 2 font-size: inherit;
3 3 margin: 0;
4 4 padding: 0;
5 5 }
6 6 html {
7 7 background: #fff;
8 8 color: #000;
9 9 font: medium sans-serif;
10 10 }
11 11 a {
12 12 color: inherit;
13 13 text-decoration: underline;
14 14 }
15 15 li {
16 16 list-style-position: inside;
17 17 }
18 18
19 19 #admin_panel {
20 20 background: #182F6F;
21 21 color: #fff;
22 22 padding: .5ex 1ex .5ex 1ex;
23 23 }
24 24
25 25 .navigation_panel {
26 26 background: #182F6F;
27 27 color: #B4CFEC;
28 28 margin-bottom: 1em;
29 29 padding: .5ex 1ex 1ex 1ex;
30 30 }
31 31 .navigation_panel::after {
32 32 clear: both;
33 33 content: ".";
34 34 display: block;
35 35 height: 0;
36 36 line-height: 0;
37 37 visibility: hidden;
38 38 }
39 39
40 40 .navigation_panel a:link, .navigation_panel a:visited, .navigation_panel a:hover {
41 41 text-decoration: none;
42 42 }
43 43
44 44 .navigation_panel .link {
45 45 border-right: 1px solid #fff;
46 46 color: #fff;
47 47 font-weight: bold;
48 48 margin-right: 1ex;
49 49 padding-right: 1ex;
50 50 }
51 51 .navigation_panel .right-link {
52 52 border-left: 1px solid #fff;
53 53 border-right: none;
54 54 float: right;
55 55 margin-left: 1ex;
56 56 margin-right: 0;
57 57 padding-left: 1ex;
58 58 padding-right: 0;
59 59 }
60 60
61 61 .navigation_panel .tag {
62 62 color: #fff;
63 63 }
64 64
65 65 .input_field {
66 66
67 67 }
68 68
69 69 .input_field_name {
70 70
71 71 }
72 72
73 73 .input_field_error {
74 74 color: #FF0000;
75 75 }
76 76
77 77
78 78 .title {
79 79 color: #182F6F;
80 80 font-weight: bold;
81 81 }
82 82
83 83 .post-form-w {
84 84 background: #182F6F;
85 85 border-radius: 1ex;
86 86 color: #fff;
87 87 margin: 1em 1ex;
88 88 padding: 1ex;
89 89 }
90 90
91 91 .form-row {
92 92 display: table;
93 93 width: 100%;
94 94 }
95 95 .form-label, .form-input {
96 96 display: table-cell;
97 97 vertical-align: top;
98 98 }
99 99 .form-label {
100 100 padding: .25em 1ex .25em 0;
101 101 width: 14ex;
102 102 }
103 103 .form-input {
104 104 padding: .25em 0;
105 105 }
106 106 .form-input > * {
107 107 background: #fff;
108 108 color: #000;
109 109 border: none;
110 110 padding: 0;
111 111 resize: vertical;
112 112 }
113 113
114 114 .form-input > :not(.file_wrap) {
115 115 width: 100%;
116 116 }
117 117
118 118 .form-submit {
119 119 border-bottom: 1px solid #666;
120 120 margin-bottom: .5em;
121 121 padding-bottom: .5em;
122 122 }
123 123 .form-title {
124 124 font-weight: bold;
125 125 margin-bottom: .5em;
126 126 }
127 127 .post-form .settings_item {
128 128 margin: .5em 0;
129 129 }
130 130 .form-submit input {
131 131 margin-top: .5em;
132 132 padding: .2em 1ex;
133 133 }
134 134 .form-label {
135 135 text-align: left;
136 136 }
137 137
138 138 .block {
139 139 display: inline-block;
140 140 vertical-align: top;
141 141 }
142 142
143 143 .post_id {
144 144 color: #a00;
145 145 }
146 146
147 147 .post {
148 148 clear: left;
149 149 margin: 0 1ex 1em 1ex;
150 150 overflow-x: auto;
151 151 word-wrap: break-word;
152 152 background: #FFF;
153 153 padding: 1ex;
154 154 border: 1px solid #666;
155 155 box-shadow: 1px 1px 2px 1px #666;
156 156 }
157 157
158 158 #posts > .post:last-child {
159 159 border-bottom: none;
160 160 padding-bottom: 0;
161 161 }
162 162
163 163 .metadata {
164 164 background: #C0E4E8;
165 165 border: 1px solid #7F9699;
166 166 border-radius: .4ex;
167 167 display: table;
168 168 margin-top: .5em;
169 169 padding: .4em;
170 170 }
171 171
172 172 .post ul, .post ol {
173 173 margin: .5em 0 .5em 3ex;
174 174 }
175 175 .post li {
176 176 margin: .2em 0;
177 177 }
178 178 .post p {
179 179 margin: .5em 0;
180 180 }
181 181 .post blockquote {
182 182 border-left: 3px solid #182F6F;
183 183 margin: .5em 0 .5em 3ex;
184 184 padding-left: 1ex;
185 185 }
186 186 .post blockquote > blockquote {
187 187 padding-top: .1em;
188 188 }
189 189
190 190 .post > .image {
191 191 float: left;
192 192 margin-right: 1ex;
193 193 }
194 194 .post > .metadata {
195 195 clear: left;
196 196 }
197 197
198 198 .post > .message .get {
199 199 color: #182F6F; font-weight: bold;
200 200 }
201 201
202 202 .dead_post > .metadata {
203 203 background: #eee;
204 204 }
205 205
206 206 .quote, .multiquote {
207 207 color: #182F6F;
208 208 }
209 209
210 210 .spoiler {
211 211 background: black;
212 212 color: black;
213 213 }
214 214
215 215 .spoiler:hover {
216 216 background: #ffffff;
217 217 }
218 218
219 219 .comment {
220 220 color: #557055;
221 221 }
222 222
223 223 .last-replies {
224 224 margin-left: 6ex;
225 225 }
226 226
227 227 .thread > .post > .message > .post-info {
228 228 border-bottom: 1px solid #ccc;
229 229 padding-bottom: .5em;
230 230 }
231 231
232 232 :target .post_id {
233 233 background: #182F6F;
234 234 color: #FFF;
235 235 text-decoration: none;
236 236 }
237 237
238 238 .image-mode-tab {
239 239 background: #182F6F;
240 240 color: #FFF;
241 241 display: table;
242 242 margin: 1em auto 1em 0;
243 243 padding: .2em .5ex;
244 244 }
245 245
246 246 .image-mode-tab > label {
247 247 margin: 0 1ex;
248 248 }
249 249
250 250 .image-mode-tab > label > input {
251 251 margin-right: .5ex;
252 252 }
253 253
254 254 .tag_info, .page_link {
255 255 margin: 1em 0;
256 256 text-align: center;
257 257 }
258 258
259 259 .form-errors {
260 260 margin-left: 1ex;
261 261 }
262 262
263 263 .moderator_info {
264 264 font-weight: bold;
265 265 float: right;
266 266 }
267 267
268 268 .refmap {
269 269 border: 1px dashed #aaa;
270 270 padding: 0.5em;
271 271 display: table;
272 272 }
273 273
274 274 .fav {
275 275 color: blue;
276 276 }
277 277
278 278 .not_fav {
279 279 color: #ccc;
280 280 }
281 281
282 282 .role {
283 283 text-decoration: underline;
284 284 }
285 285
286 286 .form-email {
287 287 display: none;
288 288 }
289 289
290 290 .bar-value {
291 291 background: #E3E7F2;
292 292 padding: .1em 1ex;
293 293 moz-box-sizing: border-box;
294 294 box-sizing: border-box;
295 295 height: 1.5em;
296 296 }
297 297
298 298 .bar-bg {
299 299 background: #EA4649;
300 300 border: 1px solid #666;
301 301 margin: 0 1ex 1em 1ex;
302 302 position: relative;
303 303 overflow: hidden;
304 304 }
305 305
306 306 .bar-text {
307 307 padding: 2px;
308 308 position: absolute;
309 309 left: 0;
310 310 top: 0;
311 311 }
312 312
313 313 .skipped_replies {
314 314 margin: 1ex;
315 315 }
316 316
317 317 #mark-panel {
318 318 background: #eee;
319 319 border-bottom: 1px solid #182F6F;
320 320 }
321 321
322 322 .mark_btn {
323 323 display: inline-block;
324 324 padding: .2em 1ex;
325 325 border-left: 1px solid #182F6F;
326 326 }
327 327
328 328 .mark_btn:first-child {
329 329 border-left: none;
330 330 }
331 331
332 332 .mark_btn:last-child {
333 333 border-right: 1px solid #182F6F;
334 334 }
335 335
336 336 .current_page {
337 337 border-bottom: 1px solid #FFF;
338 338 padding: 0px 0.5ex;
339 339 }
340 340
341 341 .image-mode-tab a {
342 342 text-decoration: none;
343 343 }
344 344 .image-mode-tab .current_mode::before {
345 345 content: "βœ“ ";
346 346 padding: 0 0 0 .5ex;
347 347 color: #182F6F;
348 348 background: #FFF;
349 349 }
350 350 .image-mode-tab .current_mode {
351 351 padding: 0 .5ex 0 0;
352 352 color: #182F6F;
353 353 background: #FFF;
354 354 }
355 355
356 356 .gallery_image_metadata {
357 357 margin-bottom: 1em;
358 358 }
359 359
360 360 .gallery_image {
361 361 padding: 4px;
362 362 margin: .5em 0 0 1ex;
363 363 text-align: center;
364 364 vertical-align: top;
365 365 }
366 366
367 367 .swappable-form-full > form {
368 368 display: table;
369 369 width: 100%;
370 370 }
371 371
372 372 #id_models li {
373 373 list-style: none;
374 374 }
375 375
376 376 #id_q {
377 377 margin-left: 1ex;
378 378 }
379 379
380 380 .br {
381 381 margin-top: 0.5em;
382 382 margin-bottom: 0.5em;
383 383 }
384 384
385 385 .message, .refmap {
386 386 margin-top: .5em;
387 387 }
388 388
389 389 .user-cast {
390 390 padding: 0.2em .5ex;
391 391 background: #008;
392 392 color: #FFF;
393 393 display: inline-block;
394 394 text-decoration: none;
395 395 }
396 396
397 397 .highlight {
398 398 background-color: #D4F0F9;
399 399 }
400 400
401 401 .dead_post {
402 402 border-right: 1ex solid #666;
403 403 }
404 404
405 405 #preview-text {
406 406 border: solid 1px white;
407 407 margin: 1ex 0 1ex 0;
408 408 padding: 1ex;
409 409 }
410
411 .image-metadata {
412 font-style: italic;
413 font-size: 0.9em;
414 } No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now