aboutsummaryrefslogtreecommitdiff
path: root/cgi/templates
diff options
context:
space:
mode:
authorLibravatar Choom 2022-12-18 12:07:18 -0300
committerLibravatar Choom 2022-12-18 12:56:20 -0300
commit7eed990b51be5d76e787c201e343cba3488fa252 (patch)
tree5725737e4305727bbc161f2748bf0eea0a267a88 /cgi/templates
parent28b8f6106eadf5c94d79509df7a311b9dfe529c2 (diff)
downloadweabot-7eed990b51be5d76e787c201e343cba3488fa252.tar.gz
weabot-7eed990b51be5d76e787c201e343cba3488fa252.tar.xz
weabot-7eed990b51be5d76e787c201e343cba3488fa252.zip
Fix thumb ib
Diffstat (limited to 'cgi/templates')
-rw-r--r--cgi/templates/board.html67
-rw-r--r--cgi/templates/board.jp.html65
2 files changed, 69 insertions, 63 deletions
diff --git a/cgi/templates/board.html b/cgi/templates/board.html
index 778fb31..12f39d9 100644
--- a/cgi/templates/board.html
+++ b/cgi/templates/board.html
@@ -139,13 +139,14 @@
<span class="unhide" style="display:none;">Hilo <a href="#{boards_url}#{board}/res/#{thread['id']}.html">#{thread['id']}</a> oculto. <a class="tt" href="#">Ver hilo</a></span>
<?py #endif ?>
<?py for post in thread['posts']: ?>
- <?py if int(post['parentid']) != 0 and not post['IS_DELETED']: ?>
+ <?py if not post['IS_DELETED']: ?>
+ <?py if int(post['parentid']) != 0: ?>
<table>
<tr>
<td class="ell">…</td>
<td class="reply" id="p#{post['id']}">
<?py elif post['file']: ?>
- <?py if post['image_width'] != '0': ?>
+ <?py if post['image_width'] != 0: ?>
<div class="fs"><span>Nombre de archivo:</span><a href="#{images_url}#{board}/src/#{post['file']}" class="expimg" target="_blank" data-id="#{post['id']}" data-thumb="#{images_url}#{board}/thumb/#{post['thumb']}" data-w="#{post['image_width']}" data-h="#{post['image_height']}" data-tw="#{post['thumb_width']}" data-th="#{post['thumb_height']}">#{post['file']}</a>-(#{post['file_size']} B, #{post['image_width']}x#{post['image_height']})
<?py else: ?>
<div class="fs"><span>Nombre de archivo:</span><a href="#{images_url}#{board}/src/#{post['file']}" target="_blank">#{post['file']}</a>-(#{post['file_size']} B)
@@ -169,7 +170,6 @@
<?py #endif ?>
</a>
<?py #endif ?>
- <?py if not post['IS_DELETED']: ?>
<a name="#{post['id']}"></a>
<div class="info"><label><input type="checkbox" name="delete" value="#{post['id']}" />
<?py if post['subject'] : ?>
@@ -198,39 +198,42 @@
<?py if int(post['expires']): ?>
<small>Expira el ${post['expires_formatted']}</small>
<?py #endif ?>
- <?py if int(post['parentid']) != 0: ?>
- <?py if post['file']: ?>
- <div class="fs">
- <?py if post['image_width'] != '0': ?>
- <a href="#{images_url}#{board}/src/#{post['file']}" class="expimg" target="_blank" data-id="#{post['id']}" data-thumb="#{images_url}#{board}/thumb/#{post['thumb']}" data-w="#{post['image_width']}" data-h="#{post['image_height']}" data-tw="#{post['thumb_width']}" data-th="#{post['thumb_height']}">#{post['file']}</a>-(#{post['file_size']} B, #{post['image_width']}x#{post['image_height']})
- <?py else: ?>
- <a href="#{images_url}#{board}/src/#{post['file']}" target="_blank">#{post['file']}</a>-(#{post['file_size']} B)
- <?py #endif ?>
- <?py if post['file'][-3:] == 'gif': ?>
- <small>GIF animado</small>
- <?py elif not post['thumb'].startswith('mime'): ?>
- <small>Imagen miniatura</small>
- <?py #endif ?>
- </div>
- <a target="_blank" href="#{images_url}#{board}/src/#{post['file']}" id="thumb#{post['id']}">
- <?py if post['thumb'].startswith('mime'): ?>
- <img class="thumb" alt="#{post['id']}" src="/static/#{post['thumb']}" width="#{post['thumb_width']}" height="#{post['thumb_height']}" />
- <?py elif post['file'][-3:] == 'gif': ?>
- <img class="thumb" alt="#{post['id']}" src="#{images_url}#{board}/src/#{post['file']}" width="#{post['thumb_width']}" height="#{post['thumb_height']}" />
- <?py else: ?>
- <img class="thumb" alt="#{post['id']}" src="#{images_url}#{board}/thumb/#{post['thumb']}" width="#{post['thumb_width']}" height="#{post['thumb_height']}" />
- <?py #endif ?>
- </a>
- <?py #endif ?>
- <?py #endif ?>
- <?py if int(post['parentid']) == 0 and not replythread: ?>
+ <?py if post['parentid'] == 0 and not replythread: ?>
[<a href="#{boards_url}#{board}/res/#{post['id']}.html" class="hsbn">Responder</a>]
<?py if post['file'] == '': ?>
[<a href="#" title="Ocultar Hilo" class="tt">Ocultar</a>]
<?py #endif ?>
<?py #endif ?>
- </div>
- <?py if post['thumb_width'] != '0' and post['parentid'] != '0': ?>
+ <?py if post['parentid'] == 0: ?>
+ </div>
+ <?py #endif ?>
+ <?py if post['parentid'] != 0 and post['file']: ?>
+ <div class="fs">
+ <?py if post['image_width'] != 0: ?>
+ <a href="#{images_url}#{board}/src/#{post['file']}" class="expimg" target="_blank" data-id="#{post['id']}" data-thumb="#{images_url}#{board}/thumb/#{post['thumb']}" data-w="#{post['image_width']}" data-h="#{post['image_height']}" data-tw="#{post['thumb_width']}" data-th="#{post['thumb_height']}">#{post['file']}</a>-(#{post['file_size']} B, #{post['image_width']}x#{post['image_height']})
+ <?py else: ?>
+ <a href="#{images_url}#{board}/src/#{post['file']}" target="_blank">#{post['file']}</a>-(#{post['file_size']} B)
+ <?py #endif ?>
+ <?py if post['file'][-3:] == 'gif': ?>
+ <small>GIF animado</small>
+ <?py elif not post['thumb'].startswith('mime'): ?>
+ <small>Imagen miniatura</small>
+ <?py #endif ?>
+ </div>
+ </div><?py #.info( ?>
+ <a target="_blank" href="#{images_url}#{board}/src/#{post['file']}" id="thumb#{post['id']}">
+ <?py if post['thumb'].startswith('mime'): ?>
+ <img class="thumb" alt="#{post['id']}" src="/static/#{post['thumb']}" width="#{post['thumb_width']}" height="#{post['thumb_height']}" />
+ <?py elif post['file'][-3:] == 'gif': ?>
+ <img class="thumb" alt="#{post['id']}" src="#{images_url}#{board}/src/#{post['file']}" width="#{post['thumb_width']}" height="#{post['thumb_height']}" />
+ <?py else: ?>
+ <img class="thumb" alt="#{post['id']}" src="#{images_url}#{board}/thumb/#{post['thumb']}" width="#{post['thumb_width']}" height="#{post['thumb_height']}" />
+ <?py #endif ?>
+ </a>
+ <?py else: ?>
+ </div><?py #.info( ?>
+ <?py #endif ?>
+ <?py if post['thumb_width'] != 0 and post['parentid'] != '0': ?>
<blockquote style="margin-left:#{int(post['thumb_width'])+40}px;">
<?py else: ?>
<blockquote>
@@ -243,7 +246,6 @@
<?py if int(post['expires_alert']): ?>
<div style="color:red;font-weight:bold;">Este hilo es viejo y desaparecerá pronto.</div>
<?py #endif ?>
- <?py #endif ?>
<?py if not post['parentid']: ?>
<?py if not replythread: ?>
<?py if thread['omitted'] == 1: ?>
@@ -255,6 +257,7 @@
<?py else: ?>
</td></tr></table>
<?py #endif ?>
+ <?py #endif ?>
<?py #endfor ?>
</div>
<div class="cut"></div>
diff --git a/cgi/templates/board.jp.html b/cgi/templates/board.jp.html
index 8e1a1c0..ea4bfca 100644
--- a/cgi/templates/board.jp.html
+++ b/cgi/templates/board.jp.html
@@ -139,11 +139,12 @@
<span class="unhide" style="display:none;">スレ<a href="#{boards_url}#{board}/res/#{thread['id']}.html">#{thread['id']}</a>は隠しました. <a class="tt" href="#">スレを表示</a></span>
<?py #endif ?>
<?py for post in thread['posts']: ?>
- <?py if int(post['parentid']) != 0 and not post['IS_DELETED']: ?>
+ <?py if not post['IS_DELETED']: ?>
+ <?py if int(post['parentid']) != 0: ?>
<table><tr><td class="ell">…</td>
<td class="reply" id="p#{post['id']}">
<?py elif post['file']: ?>
- <?py if post['image_width'] != '0': ?>
+ <?py if post['image_width'] != 0: ?>
<div class="fs"><span>画像ファイル名:</span><a href="#{images_url}#{board}/src/#{post['file']}" class="expimg" target="_blank" data-id="#{post['id']}" data-thumb="#{images_url}#{board}/thumb/#{post['thumb']}" data-w="#{post['image_width']}" data-h="#{post['image_height']}" data-tw="#{post['thumb_width']}" data-th="#{post['thumb_height']}">#{post['file']}</a>-(#{post['file_size']} B, #{post['image_width']}x#{post['image_height']})
<?py else: ?>
<div class="fs"><span>画像ファイル名:</span><a href="#{images_url}#{board}/src/#{post['file']}" target="_blank">#{post['file']}</a>-(#{post['file_size']} B)
@@ -167,7 +168,6 @@
<?py #endif ?>
</a>
<?py #endif ?>
- <?py if not post['IS_DELETED']: ?>
<a name="#{post['id']}"></a>
<div class="info"><label><input type="checkbox" name="delete" value="#{post['id']}" /><span class="subj">#{post['subject'] if post['subject'] else default_subject}</span></label>
<?py if post['email']: ?>
@@ -193,39 +193,42 @@
<?py if int(post['expires']): ?>
<small>${post['expires_formatted']}頃消えます</small>
<?py #endif ?>
- <?py if int(post['parentid']) != 0: ?>
- <?py if post['file']: ?>
- <div class="fs">
- <?py if post['image_width'] != '0': ?>
- <a href="#{images_url}#{board}/src/#{post['file']}" class="expimg" target="_blank" data-id="#{post['id']}" data-thumb="#{images_url}#{board}/thumb/#{post['thumb']}" data-w="#{post['image_width']}" data-h="#{post['image_height']}" data-tw="#{post['thumb_width']}" data-th="#{post['thumb_height']}">#{post['file']}</a>-(#{post['file_size']} B, #{post['image_width']}x#{post['image_height']})
- <?py else: ?>
- <a href="#{images_url}#{board}/src/#{post['file']}" target="_blank">#{post['file']}</a>-(#{post['file_size']} B)
- <?py #endif ?>
- <?py if post['file'][-3:] == 'gif': ?>
- <small>アニメGIF</small>
- <?py elif not post['thumb'].startswith('mime'): ?>
- <small>サムネ表示</small>
- <?py #endif ?>
- </div>
- <a target="_blank" href="#{images_url}#{board}/src/#{post['file']}" id="thumb#{post['id']}">
- <?py if post['thumb'].startswith('mime'): ?>
- <img class="thumb" alt="#{post['id']}" src="/static/#{post['thumb']}" width="#{post['thumb_width']}" height="#{post['thumb_height']}" />
- <?py elif post['file'][-3:] == 'gif': ?>
- <img class="thumb" alt="#{post['id']}" src="#{images_url}#{board}/src/#{post['file']}" width="#{post['thumb_width']}" height="#{post['thumb_height']}" />
- <?py else: ?>
- <img class="thumb" alt="#{post['id']}" src="#{images_url}#{board}/thumb/#{post['thumb']}" width="#{post['thumb_width']}" height="#{post['thumb_height']}" />
- <?py #endif ?>
- </a>
- <?py #endif ?>
- <?py #endif ?>
<?py if int(post['parentid']) == 0 and not replythread: ?>
[<a href="#{boards_url}#{board}/res/#{post['id']}.html" class="hsbn">返信</a>]
<?py if post['file'] == '': ?>
[<a href="#" title="スレを隠す" class="tt">隠す</a>]
<?py #endif ?>
<?py #endif ?>
- </div>
- <?py if post['thumb_width'] != '0' and post['parentid'] != '0': ?>
+ <?py if int(post['parentid']) == 0: ?>
+ </div><?py #.info ?>
+ <?py #endif ?>
+ <?py if post['parentid'] != 0 and post['file']: ?>
+ <div class="fs">
+ <?py if post['image_width'] != 0: ?>
+ <a href="#{images_url}#{board}/src/#{post['file']}" class="expimg" target="_blank" data-id="#{post['id']}" data-thumb="#{images_url}#{board}/thumb/#{post['thumb']}" data-w="#{post['image_width']}" data-h="#{post['image_height']}" data-tw="#{post['thumb_width']}" data-th="#{post['thumb_height']}">#{post['file']}</a>-(#{post['file_size']} B, #{post['image_width']}x#{post['image_height']})
+ <?py else: ?>
+ <a href="#{images_url}#{board}/src/#{post['file']}" target="_blank">#{post['file']}</a>-(#{post['file_size']} B)
+ <?py #endif ?>
+ <?py if post['file'][-3:] == 'gif': ?>
+ <small>アニメGIF</small>
+ <?py elif not post['thumb'].startswith('mime'): ?>
+ <small>サムネ表示</small>
+ <?py #endif ?>
+ </div>
+ </div><?py #.info( ?>
+ <a target="_blank" href="#{images_url}#{board}/src/#{post['file']}" id="thumb#{post['id']}">
+ <?py if post['thumb'].startswith('mime'): ?>
+ <img class="thumb" alt="#{post['id']}" src="/static/#{post['thumb']}" width="#{post['thumb_width']}" height="#{post['thumb_height']}" />
+ <?py elif post['file'][-3:] == 'gif': ?>
+ <img class="thumb" alt="#{post['id']}" src="#{images_url}#{board}/src/#{post['file']}" width="#{post['thumb_width']}" height="#{post['thumb_height']}" />
+ <?py else: ?>
+ <img class="thumb" alt="#{post['id']}" src="#{images_url}#{board}/thumb/#{post['thumb']}" width="#{post['thumb_width']}" height="#{post['thumb_height']}" />
+ <?py #endif ?>
+ </a>
+ <?py else: ?>
+ </div><?py #.info( ?>
+ <?py #endif ?>
+ <?py if post['thumb_width'] != 0 and post['parentid'] != '0': ?>
<blockquote style="margin-left:#{int(post['thumb_width'])+40}px;">
<?py else: ?>
<blockquote>
@@ -238,7 +241,6 @@
<?py if int(post['expires_alert']): ?>
<div style="color:red;font-weight:bold">このスレは古いので、もうすぐ消えます。</div>
<?py #endif ?>
- <?py #endif ?>
<?py if not post['parentid']: ?>
<?py if not replythread: ?>
<?py if thread['omitted']: ?>
@@ -248,6 +250,7 @@
<?py else: ?>
</td></tr></table>
<?py #endif ?>
+ <?py #endif ?>
<?py #endfor ?>
</div>
<div class="cut"></div>