Show More
@@ -1,30 +1,30 b'' | |||
|
1 | 1 | class Tripcode: |
|
2 | 2 | def __init__(self, code_str): |
|
3 | 3 | self.tripcode = code_str |
|
4 | 4 | |
|
5 | 5 | def get_color(self): |
|
6 | 6 | return self.tripcode[:6] |
|
7 | 7 | |
|
8 | 8 | def get_background(self): |
|
9 | 9 | code = self.get_color() |
|
10 | 10 | result = '' |
|
11 | 11 | |
|
12 | 12 | for i in range(0, len(code), 2): |
|
13 | 13 | p = code[i:i+2] |
|
14 | 14 | background = hex(255 - int(p, 16))[2:] |
|
15 | 15 | if len(background) < 2: |
|
16 | 16 | background = '0' + background |
|
17 | 17 | result += background |
|
18 | 18 | |
|
19 | 19 | return result |
|
20 | 20 | |
|
21 | 21 | def get_short_text(self): |
|
22 | 22 | return self.tripcode[:8] |
|
23 | 23 | |
|
24 | 24 | def get_full_text(self): |
|
25 | 25 | return self.tripcode |
|
26 | 26 | |
|
27 | 27 | def get_view(self): |
|
28 |
return '<span |
|
|
29 |
.format(self.get_full_text(), self.get_color(), |
|
|
30 | self.get_short_text()) | |
|
28 | return '<span class="tripcode" title="{title}" style="border: solid 2px #{color}; border-left: solid 1ex #{color};">{text}</span>'\ | |
|
29 | .format(title=self.get_full_text(), color=self.get_color(), | |
|
30 | text=self.get_short_text()) |
@@ -1,132 +1,136 b'' | |||
|
1 | 1 | .ui-button { |
|
2 | 2 | display: none; |
|
3 | 3 | } |
|
4 | 4 | |
|
5 | 5 | .ui-dialog-content { |
|
6 | 6 | padding: 0; |
|
7 | 7 | min-height: 0; |
|
8 | 8 | } |
|
9 | 9 | |
|
10 | 10 | .mark_btn { |
|
11 | 11 | cursor: pointer; |
|
12 | 12 | } |
|
13 | 13 | |
|
14 | 14 | .img-full { |
|
15 | 15 | position: fixed; |
|
16 | 16 | background-color: #CCC; |
|
17 | 17 | border: 1px solid #000; |
|
18 | 18 | cursor: pointer; |
|
19 | 19 | } |
|
20 | 20 | |
|
21 | 21 | .strikethrough { |
|
22 | 22 | text-decoration: line-through; |
|
23 | 23 | } |
|
24 | 24 | |
|
25 | 25 | .post_preview { |
|
26 | 26 | z-index: 300; |
|
27 | 27 | position:absolute; |
|
28 | 28 | } |
|
29 | 29 | |
|
30 | 30 | .gallery_image { |
|
31 | 31 | display: inline-block; |
|
32 | 32 | } |
|
33 | 33 | |
|
34 | 34 | @media print { |
|
35 | 35 | .post-form-w { |
|
36 | 36 | display: none; |
|
37 | 37 | } |
|
38 | 38 | } |
|
39 | 39 | |
|
40 | 40 | input[name="image"] { |
|
41 | 41 | display: block; |
|
42 | 42 | width: 100px; |
|
43 | 43 | height: 100px; |
|
44 | 44 | cursor: pointer; |
|
45 | 45 | position: absolute; |
|
46 | 46 | opacity: 0; |
|
47 | 47 | z-index: 1; |
|
48 | 48 | } |
|
49 | 49 | |
|
50 | 50 | .file_wrap { |
|
51 | 51 | width: 100px; |
|
52 | 52 | height: 100px; |
|
53 | 53 | border: solid 1px white; |
|
54 | 54 | display: inline-block; |
|
55 | 55 | } |
|
56 | 56 | |
|
57 | 57 | form > .file_wrap { |
|
58 | 58 | float: left; |
|
59 | 59 | } |
|
60 | 60 | |
|
61 | 61 | .file-thumb { |
|
62 | 62 | width: 100px; |
|
63 | 63 | height: 100px; |
|
64 | 64 | background-size: cover; |
|
65 | 65 | background-position: center; |
|
66 | 66 | } |
|
67 | 67 | |
|
68 | 68 | .compact-form-text { |
|
69 | 69 | margin-left:110px; |
|
70 | 70 | } |
|
71 | 71 | |
|
72 | 72 | textarea, input { |
|
73 | 73 | -moz-box-sizing: border-box; |
|
74 | 74 | -webkit-box-sizing: border-box; |
|
75 | 75 | box-sizing: border-box; |
|
76 | 76 | } |
|
77 | 77 | |
|
78 | 78 | .compact-form-text > textarea { |
|
79 | 79 | height: 100px; |
|
80 | 80 | width: 100%; |
|
81 | 81 | } |
|
82 | 82 | |
|
83 | 83 | .post-button-form { |
|
84 | 84 | display: inline; |
|
85 | 85 | } |
|
86 | 86 | |
|
87 | 87 | .post-button-form > button, #autoupdate { |
|
88 | 88 | border: none; |
|
89 | 89 | margin: inherit; |
|
90 | 90 | padding: inherit; |
|
91 | 91 | background: none; |
|
92 | 92 | font-size: inherit; |
|
93 | 93 | } |
|
94 | 94 | |
|
95 | 95 | #form-close-button { |
|
96 | 96 | display: none; |
|
97 | 97 | } |
|
98 | 98 | |
|
99 | 99 | .post-image-full { |
|
100 | 100 | width: 100%; |
|
101 | 101 | height: auto; |
|
102 | 102 | } |
|
103 | 103 | |
|
104 | 104 | #preview-text { |
|
105 | 105 | display: none; |
|
106 | 106 | } |
|
107 | 107 | |
|
108 | 108 | .random-images-table { |
|
109 | 109 | text-align: center; |
|
110 | 110 | width: 100%; |
|
111 | 111 | } |
|
112 | 112 | |
|
113 | 113 | .random-images-table > div { |
|
114 | 114 | margin-left: auto; |
|
115 | 115 | margin-right: auto; |
|
116 | 116 | } |
|
117 | 117 | |
|
118 | 118 | .tag-image, .tag-text-data { |
|
119 | 119 | display: inline-block; |
|
120 | 120 | } |
|
121 | 121 | |
|
122 | 122 | .tag-text-data > h2 { |
|
123 | 123 | margin: 0; |
|
124 | 124 | } |
|
125 | 125 | |
|
126 | 126 | .tag-image { |
|
127 | 127 | margin-right: 5px; |
|
128 | 128 | } |
|
129 | 129 | |
|
130 | 130 | .reply-to-message { |
|
131 | 131 | display: none; |
|
132 | 132 | } |
|
133 | ||
|
134 | .tripcode { | |
|
135 | padding: 2px; | |
|
136 | } No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now