/
mixins.jade
executable file
·195 lines (187 loc) · 9.64 KB
/
mixins.jade
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
//captcha
mixin captcha()
article.captcha
img(alt="captcha")
input(type="hidden" name="c_key" value="Not")
br
input(type="text" name="c_value" placeholder="Captcha" autocomplete="off" required)
// post
mixin post(post, board, mod)
article.post(data-num=post.id)
- if(mod && mod.boards == null || mod && mod.boards.indexOf(board) != -1)
article.admin_action
article.post_num='Post ' + post.id
- if(mod.status >=1)
form(action="/admin/action" method="post")
input(type="hidden" name="type" value=4)
input(type="hidden" name="board" value=board)
input(type="hidden" name="thread" value=post.id)
input(type="submit" value="Delete post")
form(action="/admin/action" method="post")
input(type="hidden" name="type" value=8)
input(type="hidden" name="board" value=board)
input(type="hidden" name="thread" value=post.id)
input(type="submit" value="Prevention")
- if(mod.status >=2)
a(href="#ban" data-post=post.id).ban_button
input(type="button" value="Ban author")
form(action="/admin/action" method="post")
input(type="hidden" name="type" value=6)
input(type="hidden" name="board" value=board)
input(type="hidden" name="thread" value=post.id)
input(type="submit" value="Delete posts of the author")
form(action="/admin/action" method="post")
input(type="hidden" name="type" value=7)
input(type="hidden" name="board" value=board)
input(type="hidden" name="thread" value=post.id)
input(type="submit" value="Delete posts and threads of the author")
article.post_data
span.title=post.title
span.name!=post.admin ? '<span class="mod">##MOD##</span>' : post.name
span.trip=post.trip
span.date=post.createdAt.toUTCString().slice(0, -4)
a(href="#" data-board=board data-thread=post.thread).id='#'+ post.id
- if(post.sage)
img(src="/src/img/main/t_sage.png" title="Sage").icon
- if(mod && mod.boards == null || mod && mod.boards.indexOf(board) != -1)
img(src="/src/img/main/list.png").icon#admin_list
- if(post.image)
figure.post_image
a(href='/src/img/trd/' + board + '/' + post.thread + '/' + post.id + '.' + post.image target="_blank") Open in full size
br
a(href="#picture" data-addr=board + '/' + post.thread + '/' + post.id + '.' + post.image).picture_open
img(src="/small/" + board + "/" + post.thread + "/" + post.id + "." + post.image + "?tn=200" alt="small-image")
article.post_text!=post.text
article.post_answ
div.clearfix
// OP post
mixin op_post(post, board, mod)
article.op_post(data-num=post.id)
- if(mod && mod.boards == null || mod && mod.boards.indexOf(board) != -1)
article.admin_action
article.post_num='Post ' + post.id
- if(mod.status >=2)
form(action="/admin/action" method="post")
input(type="hidden" name="type" value=1)
input(type="hidden" name="board" value=board)
input(type="hidden" name="thread" value=post.id)
input(type="submit" value="Attach/detach thread")
form(action="/admin/action" method="post")
input(type="hidden" name="type" value=2)
input(type="hidden" name="board" value=board)
input(type="hidden" name="thread" value=post.id)
input(type="submit" value="Close/open thread")
form(action="/admin/action" method="post")
input(type="hidden" name="type" value=3)
input(type="hidden" name="board" value=board)
input(type="hidden" name="thread" value=post.id)
input(type="submit" value="Delete thread")
a(href="#ban" data-post=post.id).ban_button
input(type="button" value="Ban author")
form(action="/admin/action" method="post")
input(type="hidden" name="type" value=6)
input(type="hidden" name="board" value=board)
input(type="hidden" name="thread" value=post.id)
input(type="submit" value="Delete posts of the author")
form(action="/admin/action" method="post")
input(type="hidden" name="type" value=7)
input(type="hidden" name="board" value=board)
input(type="hidden" name="thread" value=post.id)
input(type="submit" value="Delete posts and threads of the author")
form(action="/admin/action" method="post")
input(type="hidden" name="type" value=8)
input(type="hidden" name="board" value=board)
input(type="hidden" name="thread" value=post.id)
input(type="submit" value="Prevention")
article.post_data
span.title=post.title
span.name!=post.admin ? '<span class="mod">##MOD##</span>' : post.name
span.trip=post.trip
span.date=post.createdAt.toUTCString().slice(0, -4)
a(href="#" data-board=board data-thread=post.id).id='#'+ post.id
- if(post.sage)
img(src="/src/img/main/t_sage.png" title="Sage").icon
- if(post.attached)
img(src="/src/img/main/t_attach.png" title="Attached").icon
- if(post.close)
img(src="/src/img/main/t_lock.png" title="Closed").icon
- if(mod && mod.boards == null || mod && mod.boards.indexOf(board) != -1)
img(src="/src/img/main/list.png").icon#admin_list
- if(post.image)
figure.post_image
a(href='/src/img/trd/' + board + '/' + post.id + '/' + post.id + '.' + post.image target="_blank") Open in full size
br
a(href="#picture" data-addr=board + '/' + post.id + '/' + post.id + '.' + post.image).picture_open
img(src="/small/" + board + "/" + post.id + "/" + post.id + "." + post.image + "?tn=200" alt="small-image")
article.post_text!=post.text
article.post_answ
div.clearfix
// form post/thread
mixin posting_form(image_permit)
article.posting_form_open Open posting form
article.posting_form
form(method="post" enctype="multipart/form-data")
input(type="text" name="title" placeholder="Title")
br
input(type="text" name="name" placeholder="Name")
br
textarea(name="text" placeholder="Post" required)#post_area
br
label Sage
input(type="checkbox" name="sage" value="1")
br
- if(image_permit)
input(type="file" name="image")
br
mixin captcha()
input(type="button" value="Submit").submit_but
// boards list with category
mixin boards_list(boards)
section.boards_list_layout
- each category, i in boards
article.board_category=i + ': '
- each board, j in category
a(href="/" + board[0] title=board[1])='/' + board[0] + '/ '
// boards list with category for index page
mixin boards_list_index(boards)
section.boards_list_layout_index
- each category, i in boards
article.board_category_index=i + ': '
- each board, j in category
article.board_index
a(href="/" + board[0])=board[1]
// modal window with picture
mixin picture()
section(data-remodal-id="picture").remodal
img(alt="full_picture")#full_picture
// floating posting form
mixin floating_posting_form(image_permit)
article.floating_form
article.floating_form_panel
img(src="/src/img/main/cross.png" alt="close_window")#close_floating_form
article.floating_form_main
form(method="post" enctype="multipart/form-data")
input(type="hidden" name="title" placeholder="Title")
input(type="text" name="name" placeholder="Name")
br
textarea(name="text" placeholder="Post" required)#post_area
br
label Sage
input(type="checkbox" name="sage" value="1")
br
- if(image_permit)
input(type="file" name="image")
mixin captcha()
input(type="button" value="Submit").submit_but
// ban author window
mixin ban_window(board)
section(data-remodal-id="ban").remodal
form(action="/admin/action" method="post")
input(type="hidden" name="type" value=5)
input(type="hidden" name="board" value=board)
input(type="hidden" name="thread")#thread_ban
input(type="text" name="reason" placeholder="Ban reason" required)
br
input(type="text" name="time" pattern='^[0-9]+$' placeholder="Ban days" required)
br
input(type="submit" value="Ban author")