aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Choom 2022-12-20 04:20:49 -0300
committerLibravatar Choom 2022-12-20 08:49:04 -0300
commit1010ac07fdc3991faf31d2771f7c653583f54835 (patch)
tree8840b91e9185e1cf11c9ba0c21bb3b82175ef130
parentbf739f69d56825b846a732e45dd5752ba84a3e5e (diff)
downloadweabot-1010ac07fdc3991faf31d2771f7c653583f54835.tar.gz
weabot-1010ac07fdc3991faf31d2771f7c653583f54835.tar.xz
weabot-1010ac07fdc3991faf31d2771f7c653583f54835.zip
Fix expansion imagen
-rw-r--r--cgi/templates/board.html359
-rw-r--r--cgi/templates/board.jp.html358
-rw-r--r--static/css/ib.css8
-rw-r--r--static/js/autorefresh.js2
-rw-r--r--static/js/weabot.js119
5 files changed, 413 insertions, 433 deletions
diff --git a/cgi/templates/board.html b/cgi/templates/board.html
index 12f39d9..b9593ea 100644
--- a/cgi/templates/board.html
+++ b/cgi/templates/board.html
@@ -1,39 +1,49 @@
<?py include('templates/base_top.html') ?>
-<?py if replythread or oek_finish: ?>
- &#91;<a href="#{boards_url}#{board}/">Volver al IB</a>&#93;
+<?py if oek_finish: ?>
+ <div class="nav">
+ &#91;<a href="#{boards_url}#{board}/">Volver al IB</a>&#93;
+ </div>
+ <hr />
<?py #endif ?>
<?py if replythread: ?>
- &#91;<a href="/cgi/catalog/${board}">Catálogo</a>&#93;
- &#91;<a href="#bottom" name="top">Bajar</a>&#93;
+ <div class="nav">
+ &#91;<a href="#{boards_url}#{board}/">Volver al IB</a>&#93;
+ &#91;<a href="/cgi/catalog/${board}">Catálogo</a>&#93;
+ &#91;<a href="#bottom" name="top">Bajar</a>&#93;
+ </div>
<div class="replymode">Modo Respuesta</div>
<?py #endif ?>
<a name="postbox"></a>
<div class="postarea">
<?py if allow_oekaki and not oek_finish: ?>
- <center><form class="oekform" action="#{cgi_url}oekaki/paint" method="post" enctype="multipart/form-data">
- <input type="hidden" name="board" value="#{board}" />
- <?py if replythread: ?>
- <input type="hidden" name="parent" value="#{replythread}" />
- <?py #endif ?>
- Usar: <select name="oek_applet">
- <option value="neo">PaintBBS NEO</option>
- <option value="tegaki">Tegaki</option>
- <option value="wpaint">wPaint</option>
- <option value="shipainter|n|n">Shi-Painter</option>
- <option value="shipainter|y|n">Shi-Painter Pro</option>
- </select>
- <span id="oek_size"><input type="text" name="oek_x" size="4" maxlength="4" value="300" /> x <input type="text" name="oek_y" size="4" maxlength="4" value="300" /></span>
- <input type="submit" value="Dibujar" /><br /><a href="#{cgi_url}oekaki/finish/#{board}/#{replythread}">Recuperar dibujo guardado</a>
- </form></center>
+ <center>
+ <form class="oekform" action="#{cgi_url}oekaki/paint" method="post" enctype="multipart/form-data">
+ <input type="hidden" name="board" value="#{board}" />
+ <?py if replythread: ?>
+ <input type="hidden" name="parent" value="#{replythread}" />
+ <?py #endif ?>
+ Usar: <select name="oek_applet">
+ <option value="neo">PaintBBS NEO</option>
+ <option value="tegaki">Tegaki</option>
+ <option value="wpaint">wPaint</option>
+ <option value="shipainter|n|n">Shi-Painter</option>
+ <option value="shipainter|y|n">Shi-Painter Pro</option>
+ </select>
+ <span id="oek_size"><input type="text" name="oek_x" size="4" maxlength="4" value="300" /> x <input type="text" name="oek_y" size="4" maxlength="4" value="300" /></span>
+ <input type="submit" value="Dibujar" /><br /><a href="#{cgi_url}oekaki/finish/#{board}/#{replythread}">Recuperar dibujo guardado</a>
+ </form>
+ </center>
<?py #endif ?>
<?py if oek_finish: ?>
-<center style="margin-bottom:0.5em;"><table border=""><tr><td>
+<center style="margin:0.5em 0;">
+ <table><tr><td>
<?py if oek_finish == "no": ?>
- <font size="+3">No hay dibujo</font>
+ <div style="font-size:xx-large;margin:0.25em;">No hay dibujo</div>
<?py else: ?>
<img src="#{images_url}#{board}/temp/#{oek_finish}.png?ts=#{ts}" />
<?py #endif ?>
-</td></tr></table></center>
+ </td></tr></table>
+</center>
<?py #endif ?>
<form name="postform" id="postform" action="#{cgi_url}post" method="post" enctype="multipart/form-data">
<input type="hidden" name="board" value="#{board}" />
@@ -54,82 +64,76 @@
<td>
<input type="text" name="fieldb" size="25" accesskey="e" />
<?py if disable_subject: ?>
- <?py if replythread: ?>
- <input type="submit" value="Responder" accesskey="z" />
- <?py else: ?>
- <input type="submit" value="Crear hilo" accesskey="z" />
- <?py #endif ?>
+ <input type="submit" value="#{'Responder' if replythread else 'Crear hilo'}" accesskey="z" />
<?py #endif ?>
</td>
</tr>
<?py if not disable_subject: ?>
<tr>
- <td class="postblock">Asunto</td>
- <td>
- <input type="text" name="subject" size="35" maxlength="100" accesskey="s" />
- <?py if replythread: ?>
- <input type="submit" value="Responder" accesskey="z" />
- <?py else: ?>
- <input type="submit" value="Crear hilo" accesskey="z" />
- <?py #endif ?>
- </td>
+ <td class="postblock">Asunto</td>
+ <td>
+ <input type="text" name="subject" size="35" maxlength="100" accesskey="s" />
+ <input type="submit" value="#{'Responder' if replythread else 'Crear hilo'}" accesskey="z" />
+ </td>
</tr>
<?py #endif ?>
<tr>
- <td class="postblock">Mensaje</td>
- <td><textarea name="message" cols="50" rows="6" accesskey="m"></textarea></td>
+ <td class="postblock">Mensaje</td>
+ <td><textarea name="message" cols="50" rows="6" accesskey="m"></textarea></td>
</tr>
<?py if not oek_finish: ?>
- <?py if (replythread and allow_image_replies) or (not replythread and allow_images): ?>
- <tr>
- <td class="postblock">Archivo</td>
- <td>
- <input type="file" name="file" id="file" accesskey="f" />
- <span id="filepreview" style="display:none;"></span>
- <?py if allow_spoilers: ?>
- <label>[<input type="checkbox" name="spoil" id="spoil" />Spoiler]</label>
- <?py #endif ?>
- <?py if allow_noimage and not replythread: ?>
- <label>[<input type="checkbox" name="noimage" id="noimage" />Sin imagen]</label>
+ <?py if (replythread and allow_image_replies) or (not replythread and allow_images): ?>
+ <tr>
+ <td class="postblock">Archivo</td>
+ <td>
+ <input type="file" name="file" id="file" accesskey="f" />
+ <span id="filepreview" style="display:none;"></span>
+ <?py if allow_spoilers: ?>
+ <label>[<input type="checkbox" name="spoil" id="spoil" />Spoiler]</label>
+ <?py #endif ?>
+ <?py if allow_noimage and not replythread: ?>
+ <label>[<input type="checkbox" name="noimage" id="noimage" />Sin imagen]</label>
+ <?py #endif ?>
+ </td>
+ </tr>
<?py #endif ?>
- </td>
- </tr>
- <?py #endif ?>
<?py elif oek_finish != 'no': ?>
<input type="hidden" name="oek_file" value="#{oek_finish}" />
<?py #endif ?>
<tr class="pass">
- <td class="postblock">Clave</td>
- <td><input type="password" name="password" size="8" accesskey="p" /> (para eliminar el post)</form></td>
+ <td class="postblock">Clave</td>
+ <td><input type="password" name="password" size="8" accesskey="p" /> (para eliminar el post)</form></td>
</tr>
<tr>
- <td colspan="2" id="rules">
- <ul>
- #{postarea_desc}
- <?py if supported_filetypes: ?>
- <li>Archivos permitidos: #{', '.join(supported_filetypes).upper()}. Hasta #{maxsize}KB. Miniaturas: #{maxdimensions}x#{maxdimensions}px</li>
- <?py #endif ?>
- <li><a href="/cgi/catalog/${board}">Catálogo de hilos</a> (Orden: <a href="/cgi/catalog/${board}?sort=1">Nuevo</a>/<a href="/cgi/catalog/${board}?sort=2">Viejo</a>/<a href="/cgi/catalog/${board}?sort=3">Más</a>/<a href="/cgi/catalog/${board}?sort=4">Menos</a>)</li>
- <?py if int(maxage) != 0: ?>
- <li>Los hilos son automáticamente eliminados a los <b>#{maxage}</b> días de edad.</li>
- <?py #endif ?>
- <li>¿Eres nuevo? <a href="/guia.html">Leer antes de postear</a> · <a href="/faq.html">Preguntas frecuentes</a> · <a href="/bai/">Contacto</a></li>
- <li id="search"><form method="get" action="/tools/search.py" style="display: inline-block;"><input type="hidden" name="board" value="${board}"><label for="searchin">Buscar: </label><input type="text" name="q" id="searchin" value="" size="10"> <input type="submit" value="Ir"></form>
- <?py if not force_css: ?>
- · <span>Estilo: <select id="styles">
- <?py for title in styles: ?><option value="#{title}">#{title}</option><?py #endfor ?>
- </select></span>
- <?py #endif ?></li>
- </ul>
- </td>
+ <td colspan="2" id="rules">
+ <ul>
+ #{postarea_desc}
+ <?py if supported_filetypes: ?>
+ <li>Archivos permitidos: #{', '.join(supported_filetypes).upper()}. Hasta #{maxsize}KB. Miniaturas: #{maxdimensions}x#{maxdimensions}px</li>
+ <?py #endif ?>
+ <li><a href="/cgi/catalog/${board}">Catálogo de hilos</a> (Orden: <a href="/cgi/catalog/${board}?sort=1">Nuevo</a>/<a href="/cgi/catalog/${board}?sort=2">Viejo</a>/<a href="/cgi/catalog/${board}?sort=3">Más</a>/<a href="/cgi/catalog/${board}?sort=4">Menos</a>)</li>
+ <?py if maxage: ?>
+ <li>Los hilos son automáticamente eliminados a los <b>#{maxage}</b> días de edad.</li>
+ <?py #endif ?>
+ <li>¿Eres nuevo? <a href="/guia.html">Leer antes de postear</a> · <a href="/faq.html">Preguntas frecuentes</a> · <a href="/bai/">Contacto</a></li>
+ <li id="search"><form method="get" action="/tools/search.py" style="display:inline-block;"><input type="hidden" name="board" value="${board}"><label for="searchin">Buscar: </label><input type="text" name="q" id="searchin" value="" size="10"> <input type="submit" value="Ir"></form>
+ <?py if not force_css: ?>
+ · <span>Estilo: <select id="styles">
+ <?py for title in styles: ?><option value="#{title}">#{title}</option><?py #endfor ?>
+ </select></span>
+ <?py #endif ?>
+ </li>
+ </ul>
+ </td>
</tr>
</table>
-</div>
+</div><?py #div .postarea?>
<hr />
<?py if postarea_extra: ?>
-<center>#{postarea_extra}</center>
-<hr />
+ <center>#{postarea_extra}</center>
+ <hr />
<?py #endif ?>
+
<form id="delform" action="#{cgi_url}delete" method="post">
<input type="hidden" name="board" value="#{board}" />
<?py if threads: ?>
@@ -139,141 +143,138 @@
<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 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: ?>
- <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)
- <?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 ?>
- <?py if not replythread: ?>
- [<a href="#" title="Ocultar hilo" class="tt">Ocultar hilo</a>]
+ <?py if not post['IS_DELETED']: ?>
+ <?py if post['parentid']: ?>
+ <table>
+ <tr>
+ <td class="ell">…</td>
+ <td class="reply" id="p#{post['id']}">
+ <?py elif post['file']: ?>
+ <div class="fs">
+ <?py if post['image_width']: ?>
+ <span>Nombre de archivo:</span><a href="#{images_url}#{board}/src/#{post['file']}" class="expimg" target="_blank" data-id="#{post['id']}" data-w="#{post['image_width']}" data-h="#{post['image_height']}">#{post['file']}</a>-(#{post['file_size']} B, #{post['image_width']}x#{post['image_height']})
+ <?py else: ?>
+ <span>Nombre de archivo:</span><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 ?>
+ <?py if not replythread: ?>
+ [<a href="#" class="tt">Ocultar hilo</a>]
+ <?py #endif ?>
+ </div><?py #div .fs ?>
+ <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 ?>
- </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 ?>
<a name="#{post['id']}"></a>
- <div class="info"><label><input type="checkbox" name="delete" value="#{post['id']}" />
- <?py if post['subject'] : ?>
- <span class="subj">#{post['subject']}</span>
- <?py #endif ?></label>
- <?py if post['email']: ?>
- <?py if post['tripcode']: ?>
- <a href="mailto:#{post['email']}"><span class="name"><b>#{post['name']}</b> #{post['tripcode']}</span></a>
+ <div class="info">
+ <label>
+ <input type="checkbox" name="delete" value="#{post['id']}" />
+ <?py if post['subject']: ?>
+ <span class="subj">#{post['subject']}</span>
+ <?py #endif ?>
+ </label>
+ <?py if post['email']: ?>
+ <a href="mailto:#{post['email']}"><span class="name"><b>#{post['name']}</b> #{post['tripcode'] if post['tripcode'] else ''}</span></a>
<?py else: ?>
- <a href="mailto:#{post['email']}"><span class="name"><b>#{post['name']}</b></span></a>
- <?py #endif ?>
- <?py else: ?>
- <?py if post['tripcode']: ?>
- <span class="name"><b>#{post['name']}</b> #{post['tripcode']}</span>
- <?py else: ?>
- <span class="name"><b>#{post['name']}</b></span>
- <?py #endif ?>
- <?py #endif ?>
- <span class="date" data-unix="#{post['timestamp']}">#{post['timestamp_formatted']}</span>
- <?py if replythread: ?>
- <span class="reflink"><a href="##{post['id']}">No.</a><a href="#" class="num">#{post['id']}</a></span>
- <?py else: ?>
- <span class="reflink"><a href="#{boards_url}#{board}/res/#{post['parentid'] if post['parentid'] != "0" else post['id']}.html##{post['id']}">No.</a><a href="#{boards_url}#{board}/res/#{post['parentid'] if post['parentid'] != "0" else post['id']}.html#i#{post['id']}">#{post['id']}</a></span>
- <?py #endif ?>
- <a class="rep" href="#{cgi_url}report/#{board}/#{post['id']}" rel="nofollow">rep</a>
- <?py if int(post['expires']): ?>
- <small>Expira el ${post['expires_formatted']}</small>
- <?py #endif ?>
- <?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>]
+ <span class="name"><b>#{post['name']}</b> #{post['tripcode'] if post['tripcode'] else ''}</span>
<?py #endif ?>
- <?py #endif ?>
- <?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']})
+ <span class="date" data-unix="#{post['timestamp']}">#{post['timestamp_formatted']}</span>
+ <?py if replythread: ?>
+ <span class="reflink"><a href="##{post['id']}">No.</a><a href="#" class="num">#{post['id']}</a></span>
<?py else: ?>
- <a href="#{images_url}#{board}/src/#{post['file']}" target="_blank">#{post['file']}</a>-(#{post['file_size']} B)
+ <span class="reflink"><a href="#{boards_url}#{board}/res/#{post['parentid'] if post['parentid'] != 0 else post['id']}.html##{post['id']}">No.</a><a href="#{boards_url}#{board}/res/#{post['parentid'] if post['parentid'] != 0 else post['id']}.html#i#{post['id']}">#{post['id']}</a></span>
<?py #endif ?>
- <?py if post['file'][-3:] == 'gif': ?>
- <small>GIF animado</small>
- <?py elif not post['thumb'].startswith('mime'): ?>
- <small>Imagen miniatura</small>
+ <a class="rep" href="#{cgi_url}report/#{board}/#{post['id']}" rel="nofollow">rep</a>
+ <?py if post['expires']: ?>
+ <small>Expira el ${post['expires_formatted']}</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 if not post['parentid'] and not replythread: ?>
+ [<a href="#{boards_url}#{board}/res/#{post['id']}.html" class="hsbn">Responder</a>]
+ <?py if not post['file']: ?>
+ [<a href="#" class="tt">Ocultar hilo</a>]
+ <?py #endif ?>
<?py #endif ?>
- </a>
- <?py else: ?>
- </div><?py #.info( ?>
+ <?py if post['parentid'] and post['file']: ?>
+ <div class="fs">
+ <?py if post['image_width']: ?>
+ <a href="#{images_url}#{board}/src/#{post['file']}" class="expimg" target="_blank" data-id="#{post['id']}" data-w="#{post['image_width']}" data-h="#{post['image_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><?py #div .fs ?>
+ <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 if post['thumb_width'] != 0 and post['parentid'] != '0': ?>
- <blockquote style="margin-left:#{int(post['thumb_width'])+40}px;">
+ </div><?py #div .info ?>
+ <?py if post['thumb_width'] and post['parentid']: ?>
+ <blockquote style="margin-left:#{post['thumb_width']+40}px;">#{post['message']}</blockquote>
<?py else: ?>
- <blockquote>
+ <blockquote>#{post['message']}</blockquote>
<?py #endif ?>
- #{post['message']}
- </blockquote>
<?py if not replythread and post['shortened']: ?>
<blockquote class="abbrev">(Post muy largo... Presiona <a href="#{boards_url}#{board}/res/#{post['id'] if not post['parentid'] else post['parentid']}.html##{post['id']}">aqu&iacute;</a> para verlo completo.)</blockquote>
<?py #endif ?>
- <?py if int(post['expires_alert']): ?>
+ <?py if post['expires_alert']: ?>
<div style="color:red;font-weight:bold;">Este hilo es viejo y desaparecerá pronto.</div>
<?py #endif ?>
- <?py if not post['parentid']: ?>
- <?py if not replythread: ?>
+ <?py if not post['parentid'] and not replythread: ?>
<?py if thread['omitted'] == 1: ?>
<div class="omitted">Un post omitido. Haz clic en Responder para ver.</div>
<?py elif thread['omitted'] > 1: ?>
<div class="omitted">#{thread['omitted']} posts omitidos. Haz clic en Responder para ver.</div>
<?py #endif ?>
+ <?py else: ?>
+ </td>
+ </tr>
+ </table>
<?py #endif ?>
- <?py else: ?>
- </td></tr></table>
<?py #endif ?>
- <?py #endif ?>
<?py #endfor ?>
- </div>
+ </div><?py #div .thread ?>
<div class="cut"></div>
<?py if replythread: ?>
<hr />
- <div class="nav">&#91;<a href="#{boards_url}#{board}/">Volver al IB</a>&#93;
+ <div class="nav">
+ &#91;<a href="#{boards_url}#{board}/">Volver al IB</a>&#93;
&#91;<a href="/cgi/catalog/${board}">Catálogo</a>&#93;
- &#91;<a href="#top" name="bottom">Subir</a>&#93;</div>
+ &#91;<a href="#top" name="bottom">Subir</a>&#93;
+ </div>
<?py #endif ?>
- <hr />
+ <hr />
<?py #endfor ?>
- <div class="userdel">Eliminar post <label>[<input type="checkbox" name="imageonly" id="imageonly" />Sólo imagen]</label><br />
- Clave <input type="password" name="password" size="8" /> <input name="deletepost" value="Eliminar" type="submit" /></div>
+
+ <div class="userdel">
+ Eliminar post <label>[<input type="checkbox" name="imageonly" id="imageonly" />Sólo imagen]</label>
+ <br />
+ Clave <input type="password" name="password" size="8" /> <input name="deletepost" value="Eliminar" type="submit" />
+ </div>
<?py #endif ?>
</form>
+
<?py if pagenav: ?>
<div class="pg">#{pagenav}</div>
<?py #endif ?>
-<?py include('templates/base_bottom.html') ?>
+
+<?py include('templates/base_bottom.html') ?> \ No newline at end of file
diff --git a/cgi/templates/board.jp.html b/cgi/templates/board.jp.html
index ea4bfca..6bc5e19 100644
--- a/cgi/templates/board.jp.html
+++ b/cgi/templates/board.jp.html
@@ -1,39 +1,51 @@
<?py include('templates/base_top.html') ?>
-<?py if replythread or oek_finish: ?>
- &#91;<a href="#{boards_url}#{board}/">掲示板に戻る</a>&#93;
+<?py if oek_finish: ?>
+ <div class="nav">
+ &#91;<a href="#{boards_url}#{board}/">掲示板に戻る</a>&#93;
+ </div>
+ <hr />
<?py #endif ?>
<?py if replythread: ?>
- &#91;<a href="/cgi/catalog/${board}">カタログ</a>&#93;
- &#91;<a href="#bottom" name="top">ボトムへ行く</a>&#93;
+ <div class="nav">
+ &#91;<a href="#{boards_url}#{board}/">掲示板に戻る</a>&#93;
+ &#91;<a href="/cgi/catalog/${board}">カタログ</a>&#93;
+ &#91;<a href="#bottom" name="top">ボトムへ行</a>&#93;
+ </div>
<div class="replymode">レス送信モード</div>
<?py #endif ?>
<a name="postbox"></a>
<div class="postarea">
<?py if allow_oekaki and not oek_finish: ?>
- <center><form class="oekform" action="#{cgi_url}oekaki/paint" method="post" enctype="multipart/form-data">
- <input type="hidden" name="board" value="#{board}" />
- <?py if replythread: ?>
- <input type="hidden" name="parent" value="#{replythread}" />
- <?py #endif ?>
- <select name="oek_applet">
- <option value="neo">PaintBBS NEO</option>
- <option value="tegaki">Tegaki</option>
- <option value="wpaint">wPaint</option>
- <option value="shipainter|n|n">Shi-Painter</option>
- <option value="shipainter|y|n">Shi-Painter Pro</option>
- </select>
- <span id="oek_size"><input type="text" name="oek_x" size="4" maxlength="4" value="300" /> x <input type="text" name="oek_y" size="4" maxlength="4" value="300" /></span>
- <input type="submit" value="お絵かきする" /><br /><a href="#{cgi_url}oekaki/finish/#{board}/#{replythread}">アップロード途中の画像</a>
- </form></center>
+ <center>
+ <form class="oekform" action="#{cgi_url}oekaki/paint" method="post" enctype="multipart/form-data">
+ <input type="hidden" name="board" value="#{board}" />
+ <?py if replythread: ?>
+ <input type="hidden" name="parent" value="#{replythread}" />
+ <?py #endif ?>
+ Usar: <select name="oek_applet">
+ <option value="neo">PaintBBS NEO</option>
+ <option value="tegaki">Tegaki</option>
+ <option value="wpaint">wPaint</option>
+ <option value="shipainter|n|n">Shi-Painter</option>
+ <option value="shipainter|y|n">Shi-Painter Pro</option>
+ </select>
+ <span id="oek_size"><input type="text" name="oek_x" size="4" maxlength="4" value="300" /> x <input type="text" name="oek_y" size="4" maxlength="4" value="300" /></span>
+ <input type="submit" value="お絵かきする" />
+ <br />
+ <a href="#{cgi_url}oekaki/finish/#{board}/#{replythread}">アップロード途中の画像</a>
+ </form>
+ </center>
<?py #endif ?>
<?py if oek_finish: ?>
-<center style="margin-bottom:0.5em;"><table border=""><tr><td>
+<center style="margin:0.5em 0;">
+ <table><tr><td>
<?py if oek_finish == "no": ?>
- <font size="+3">画像が見当たりません</font>
+ <div style="font-size:xx-large;margin:0.25em;">画像が見当たりません</div>
<?py else: ?>
- <img src="#{boards_url}oek_temp/#{oek_finish}.png?ts=#{ts}" />
+ <img src="#{images_url}#{board}/temp/#{oek_finish}.png?ts=#{ts}" />
<?py #endif ?>
-</td></tr></table></center>
+ </td></tr></table>
+</center>
<?py #endif ?>
<form name="postform" id="postform" action="#{cgi_url}post" method="post" enctype="multipart/form-data">
<input type="hidden" name="board" value="#{board}" />
@@ -54,82 +66,76 @@
<td>
<input type="text" name="fieldb" size="25" accesskey="e" />
<?py if disable_subject: ?>
- <?py if replythread: ?>
- <input type="submit" value="返信" accesskey="z" />
- <?py else: ?>
- <input type="submit" value="スレッドを立てる" accesskey="z" />
- <?py #endif ?>
+ <input type="submit" value="#{'返信' if replythread else 'スレッドを立てる'}" accesskey="z" />
<?py #endif ?>
</td>
</tr>
<?py if not disable_subject: ?>
<tr>
- <td class="postblock">題  名</td>
- <td>
- <input type="text" name="subject" size="35" maxlength="100" accesskey="s" />
- <?py if replythread: ?>
- <input type="submit" value="返信" accesskey="z" />
- <?py else: ?>
- <input type="submit" value="スレッドを立てる" accesskey="z" />
- <?py #endif ?>
- </td>
+ <td class="postblock">題  名</td>
+ <td>
+ <input type="text" name="subject" size="35" maxlength="100" accesskey="s" />
+ <input type="submit" value="#{'返信' if replythread else 'スレッドを立てる'}" accesskey="z" />
+ </td>
</tr>
<?py #endif ?>
<tr>
- <td class="postblock">コメント</td>
- <td><textarea name="message" cols="50" rows="6" accesskey="m"></textarea></td>
+ <td class="postblock">コメント</td>
+ <td><textarea name="message" cols="50" rows="6" accesskey="m"></textarea></td>
</tr>
<?py if not oek_finish: ?>
- <?py if (replythread and allow_image_replies) or (not replythread and allow_images): ?>
- <tr>
- <td class="postblock">添付File</td>
- <td>
- <input type="file" name="file" id="file" accesskey="f" />
- <span id="filepreview" style="display:none;"></span>
- <?py if allow_spoilers: ?>
- <label>[<input type="checkbox" name="spoil" id="spoil" />ネタバレ]</label>
- <?py #endif ?>
- <?py if allow_noimage and not replythread: ?>
- <label>[<input type="checkbox" name="noimage" id="noimage" />画像なし]</label>
+ <?py if (replythread and allow_image_replies) or (not replythread and allow_images): ?>
+ <tr>
+ <td class="postblock">添付File</td>
+ <td>
+ <input type="file" name="file" id="file" accesskey="f" />
+ <span id="filepreview" style="display:none;"></span>
+ <?py if allow_spoilers: ?>
+ <label>[<input type="checkbox" name="spoil" id="spoil" />ネタバレ]</label>
+ <?py #endif ?>
+ <?py if allow_noimage and not replythread: ?>
+ <label>[<input type="checkbox" name="noimage" id="noimage" />画像なし]</label>
+ <?py #endif ?>
+ </td>
+ </tr>
<?py #endif ?>
- </td>
- </tr>
- <?py #endif ?>
<?py elif oek_finish != 'no': ?>
<input type="hidden" name="oek_file" value="#{oek_finish}" />
<?py #endif ?>
<tr class="pass">
- <td class="postblock">削除キー</td>
- <td><input type="password" name="password" size="8" accesskey="p" /> (削除用)</form></td>
+ <td class="postblock">削除キー</td>
+ <td><input type="password" name="password" size="8" accesskey="p" /> (削除用)</form></td>
</tr>
<tr>
- <td colspan="2" id="rules">
- <ul>
- #{postarea_desc}
- <?py if supported_filetypes: ?>
- <li>添付可能:#{', '.join(supported_filetypes).upper()}. #{maxsize}KBまで. #{maxdimensions}x#{maxdimensions}以上は縮小.</li>
- <?py #endif ?>
- <li><a href="#{cgi_url}catalog/${board}">カタログ</a> (ソート:<a href="/cgi/catalog/${board}?sort=1">新順</a>/<a href="/cgi/catalog/${board}?sort=2">古順</a>/<a href="/cgi/catalog/${board}?sort=3">多順</a>/<a href="/cgi/catalog/${board}?sort=4">少順</a>)</li>
- <?py if int(maxage) != 0: ?>
- <li>スレは<b>#{maxage}</b>日間経つと自動的に消されられます.</li>
- <?py #endif ?>
- <li><a href="/guia.html">使い方</a> · <a href="/faq.html">よくある質問</a> · <a href="/bai/">管理人への連絡</a></li>
- <li id="search"><form method="get" action="/tools/search.py" style="display: inline-block;"><input type="hidden" name="board" value="${board}"><label for="searchin">検索:</label><input type="text" name="q" id="searchin" value="" size="10"> <input type="submit" value="GO"></form>
- <?py if not force_css: ?>
- · <span>スタイル:<select id="styles">
- <?py for title in styles: ?><option value="#{title}">#{title}</option><?py #endfor ?>
- </select></span>
- <?py #endif ?></li>
- </ul>
- </td>
+ <td colspan="2" id="rules">
+ <ul>
+ #{postarea_desc}
+ <?py if supported_filetypes: ?>
+ <li>添付可能:#{', '.join(supported_filetypes).upper()}. #{maxsize}KBまで. #{maxdimensions}x#{maxdimensions}以上は縮小.</li>
+ <?py #endif ?>
+ <li><a href="#{cgi_url}catalog/${board}">カタログ</a> (ソート:<a href="/cgi/catalog/${board}?sort=1">新順</a>/<a href="/cgi/catalog/${board}?sort=2">古順</a>/<a href="/cgi/catalog/${board}?sort=3">多順</a>/<a href="/cgi/catalog/${board}?sort=4">少順</a>)</li>
+ <?py if maxage: ?>
+ <li>スレは<b>#{maxage}</b>日間経つと自動的に消されられます.</li>
+ <?py #endif ?>
+ <li><a href="/guia.html">使い方</a> · <a href="/faq.html">よくある質問</a> · <a href="/bai/">管理人への連絡</a></li>
+ <li id="search"><form method="get" action="/tools/search.py" style="display: inline-block;"><input type="hidden" name="board" value="${board}"><label for="searchin">検索:</label><input type="text" name="q" id="searchin" value="" size="10"> <input type="submit" value="GO"></form>
+ <?py if not force_css: ?>
+ · <span>スタイル:<select id="styles">
+ <?py for title in styles: ?><option value="#{title}">#{title}</option><?py #endfor ?>
+ </select></span>
+ <?py #endif ?>
+ </li>
+ </ul>
+ </td>
</tr>
</table>
-</div>
+</div><?py #div .postarea?>
<hr />
<?py if postarea_extra: ?>
-<center>#{postarea_extra}</center>
-<hr />
+ <center>#{postarea_extra}</center>
+ <hr />
<?py #endif ?>
+
<form id="delform" action="#{cgi_url}delete" method="post">
<input type="hidden" name="board" value="#{board}" />
<?py if threads: ?>
@@ -139,136 +145,134 @@
<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 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: ?>
- <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)
+ <?py if not post['IS_DELETED']: ?>
+ <?py if post['parentid']: ?>
+ <table>
+ <tr>
+ <td class="ell">…</td>
+ <td class="reply" id="p#{post['id']}">
+ <?py elif post['file']: ?>
+ <div class="fs">
+ <?py if post['image_width']: ?>
+ <span>画像ファイル名:</span><a href="#{images_url}#{board}/src/#{post['file']}" class="expimg" target="_blank" data-id="#{post['id']}" data-w="#{post['image_width']}" data-h="#{post['image_height']}">#{post['file']}</a>-(#{post['file_size']} B, #{post['image_width']}x#{post['image_height']})
+ <?py else: ?>
+ <span>画像ファイル名:</span><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 ?>
+ <?py if not replythread: ?>
+ [<a href="#" class="tt">スレを隠す</a>]
+ <?py #endif ?>
+ </div><?py #div .fs ?>
+ <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 if post['file'][-3:] == 'gif': ?>
- <small>アニメGIF</small>
- <?py elif not post['thumb'].startswith('mime'): ?>
- <small>サムネ表示</small>
- <?py #endif ?>
- <?py if not replythread: ?>
- [<a href="#" title="スレを隠す" class="tt">隠す</a>]
- <?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 ?>
<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']: ?>
- <?py if post['tripcode']: ?>
- Name <a href="mailto:#{post['email']}"><span class="name"><b>#{post['name']}</b> #{post['tripcode']}</span></a>
- <?py else: ?>
- Name <a href="mailto:#{post['email']}"><span class="name"><b>#{post['name']}</b></span></a>
- <?py #endif ?>
- <?py else: ?>
- <?py if post['tripcode']: ?>
- Name <span class="name"><b>#{post['name']}</b> #{post['tripcode']}</span>
+ <div class="info">
+ <label>
+ <input type="checkbox" name="delete" value="#{post['id']}" />
+ <?py if post['subject']: ?>
+ <span class="subj">#{post['subject']}</span>
+ <?py #endif ?>
+ </label>
+ <?py if post['email']: ?>
+ Name <a href="mailto:#{post['email']}"><span class="name"><b>#{post['name']}</b> #{post['tripcode'] if post['tripcode'] else ''}</span></a>
<?py else: ?>
- Name <span class="name"><b>#{post['name']}</b></span>
- <?py #endif ?>
- <?py #endif ?>
- <span class="date" data-unix="#{post['timestamp']}">#{post['timestamp_formatted']}</span>
- <?py if replythread: ?>
- <span class="reflink"><a href="##{post['id']}">No.</a><a href="#" class="num">#{post['id']}</a></span>
- <?py else: ?>
- <span class="reflink"><a href="#{boards_url}#{board}/res/#{post['parentid'] if post['parentid'] != "0" else post['id']}.html##{post['id']}">No.</a><a href="#{boards_url}#{board}/res/#{post['parentid'] if post['parentid'] != "0" else post['id']}.html#i#{post['id']}">#{post['id']}</a></span>
- <?py #endif ?>
- <a class="rep" href="#{cgi_url}report/#{board}/#{post['id']}" rel="nofollow">rep</a>
- <?py if int(post['expires']): ?>
- <small>${post['expires_formatted']}頃消えます</small>
- <?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>]
+ Name <span class="name"><b>#{post['name']}</b> #{post['tripcode'] if post['tripcode'] else ''}</span>
<?py #endif ?>
- <?py #endif ?>
- <?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']})
+ <span class="date" data-unix="#{post['timestamp']}">#{post['timestamp_formatted']}</span>
+ <?py if replythread: ?>
+ <span class="reflink"><a href="##{post['id']}">No.</a><a href="#" class="num">#{post['id']}</a></span>
<?py else: ?>
- <a href="#{images_url}#{board}/src/#{post['file']}" target="_blank">#{post['file']}</a>-(#{post['file_size']} B)
+ <span class="reflink"><a href="#{boards_url}#{board}/res/#{post['parentid'] if post['parentid'] != 0 else post['id']}.html##{post['id']}">No.</a><a href="#{boards_url}#{board}/res/#{post['parentid'] if post['parentid'] != 0 else post['id']}.html#i#{post['id']}">#{post['id']}</a></span>
<?py #endif ?>
- <?py if post['file'][-3:] == 'gif': ?>
- <small>アニメGIF</small>
- <?py elif not post['thumb'].startswith('mime'): ?>
- <small>サムネ表示</small>
+ <a class="rep" href="#{cgi_url}report/#{board}/#{post['id']}" rel="nofollow">rep</a>
+ <?py if post['expires']: ?>
+ <small>${post['expires_formatted']}頃消えます</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 if not post['parentid'] and not replythread: ?>
+ [<a href="#{boards_url}#{board}/res/#{post['id']}.html" class="hsbn">Responder</a>]
+ <?py if not post['file']: ?>
+ [<a href="#" class="tt">スレを隠す</a>]
+ <?py #endif ?>
<?py #endif ?>
- </a>
- <?py else: ?>
- </div><?py #.info( ?>
+ <?py if post['parentid'] and post['file']: ?>
+ <div class="fs">
+ <?py if post['image_width']: ?>
+ <a href="#{images_url}#{board}/src/#{post['file']}" class="expimg" target="_blank" data-id="#{post['id']}" data-w="#{post['image_width']}" data-h="#{post['image_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><?py #div .fs ?>
+ <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 if post['thumb_width'] != 0 and post['parentid'] != '0': ?>
- <blockquote style="margin-left:#{int(post['thumb_width'])+40}px;">
+ </div><?py #div .info ?>
+ <?py if post['thumb_width'] and post['parentid']: ?>
+ <blockquote style="margin-left:#{post['thumb_width']+40}px;">#{post['message']}</blockquote>
<?py else: ?>
- <blockquote>
+ <blockquote>#{post['message']}</blockquote>
<?py #endif ?>
- #{post['message']}
- </blockquote>
<?py if not replythread and post['shortened']: ?>
<blockquote class="abbrev">(投稿は長すぎ... 全部読むには<a href="#{boards_url}#{board}/res/#{post['id'] if post['parentid'] == "0" else post['parentid']}.html##{post['id']}">こっちら</a>へ)</blockquote>
<?py #endif ?>
- <?py if int(post['expires_alert']): ?>
+ <?py if post['expires_alert']: ?>
<div style="color:red;font-weight:bold">このスレは古いので、もうすぐ消えます。</div>
<?py #endif ?>
- <?py if not post['parentid']: ?>
- <?py if not replythread: ?>
- <?py if thread['omitted']: ?>
- <span class="omitted">レス${thread['omitted']}件省略。全て読むには返信ボタンを押してください。</span>
- <?py #endif ?>
+ <?py if not post['parentid'] and not replythread and thread['omitted']: ?>
+ <span class="omitted">レス${thread['omitted']}件省略。全て読むには返信ボタンを押してください。</span>
+ <?py else: ?>
+ </td>
+ </tr>
+ </table>
<?py #endif ?>
- <?py else: ?>
- </td></tr></table>
<?py #endif ?>
- <?py #endif ?>
<?py #endfor ?>
- </div>
+ </div><?py #div .thread ?>
<div class="cut"></div>
<?py if replythread: ?>
<hr />
- <div class="nav">&#91;<a href="#{boards_url}#{board}/">掲示板に戻る</a>&#93;
+ <div class="nav">
+ &#91;<a href="#{boards_url}#{board}/">掲示板に戻る</a>&#93;
&#91;<a href="/cgi/catalog/${board}">カタログ</a>&#93;
- &#91;<a href="#top" name="bottom">トップへ戻る</a>&#93;</div>
+ &#91;<a href="#top" name="bottom">トップへ戻る</a>&#93;
+ </div>
<?py #endif ?>
- <hr />
+ <hr />
<?py #endfor ?>
+
<div class="userdel">
- 【記事削除】<label>[<input type="checkbox" name="imageonly" id="imageonly" />画像だけ消す]</label><br />
+ 【記事削除】<label>[<input type="checkbox" name="imageonly" id="imageonly" />画像だけ消す]</label>
+ <br />
削除キー<input type="password" name="password" size="8" /> <input name="deletepost" value="削除" type="submit" />
</div>
<?py #endif ?>
</form>
+
<?py if pagenav: ?>
<div class="pg">#{pagenav}</div>
<?py #endif ?>
-<?py include('templates/base_bottom.html') ?>
+
+<?py include('templates/base_bottom.html') ?> \ No newline at end of file
diff --git a/static/css/ib.css b/static/css/ib.css
index fb0433d..666522a 100644
--- a/static/css/ib.css
+++ b/static/css/ib.css
@@ -27,6 +27,7 @@ body[data-brd="2d"], body[data-brd="2d"] textarea {
.postarea table {
margin: 0 auto;
text-align: left;
+ line-height: 1em;
}
#main_nav {
font-size: 14px;
@@ -95,6 +96,7 @@ textarea {
#rules {
width: 468px;
font-size: 13px;
+ line-height: 15px;
}
#rules ul {
margin: 4px 0 0;
@@ -126,6 +128,9 @@ textarea {
float: left;
margin: 0 20px;
}
+.thumb.expanded {
+ margin-bottom: 1em;
+}
.ell {
font-family: Mona, IPAMonaPGothic, Monapo, "MS PGothic", YOzFontAA97;
vertical-align: top;
@@ -392,6 +397,9 @@ textarea {
width: auto;
height: auto;
}
+ .thumb.expanded {
+ margin-bottom: 8px;
+ }
blockquote {
margin: 8px !important;
}
diff --git a/static/js/autorefresh.js b/static/js/autorefresh.js
index cd4bf39..af61c8b 100644
--- a/static/js/autorefresh.js
+++ b/static/js/autorefresh.js
@@ -303,7 +303,7 @@ function detectService() {
thread_first_length = thread_length;
replylist = document.getElementsByClassName("thread");
replylist += document.getElementsByClassName("reply");
- var footer = document.getElementsByClassName("nav")[0];
+ var footer = document.getElementsByClassName("nav")[1];
var mnl = document.createElement("a");
mnl.id = "shownew";
mnl.href = "#";
diff --git a/static/js/weabot.js b/static/js/weabot.js
index 28e31cb..48ac7cd 100644
--- a/static/js/weabot.js
+++ b/static/js/weabot.js
@@ -34,12 +34,7 @@ function postClick(num) {
function insert(text) {
var textarea = document.forms.postform.message;
if (textarea) {
- if (textarea.createTextRange && textarea.caretPos) {
- // IE
- var caretPos = textarea.caretPos;
- caretPos.text =
- caretPos.text.charAt(caretPos.text.length - 1) == " " ? text + " " : text;
- } else if (textarea.setSelectionRange) {
+ if (textarea.setSelectionRange) {
// Firefox
var start = textarea.selectionStart;
var end = textarea.selectionEnd;
@@ -76,78 +71,50 @@ function highlight(post) {
}
function expandimg(e) {
- var post_id = e.dataset.id;
- var img_url = e.href;
- var thumb_url = e.dataset.thumb;
- var img_w = parseInt(e.dataset.w);
- var img_h = parseInt(e.dataset.h);
- var thumb_w = parseInt(e.dataset.tw);
- if (thumb_w < 1) return true;
- var thumb_h = parseInt(e.dataset.th);
- var format = img_url.substring(img_url.lastIndexOf(".") + 1, img_url.length);
- var exp_vid = 0;
-
- if (window.innerWidth > 900)
- var ratio = Math.min((window.innerWidth - 130) / img_w, 1);
- else var ratio = Math.min((window.innerWidth - 40) / img_w, 1);
-
- var img_cont = document.getElementById("thumb" + post_id);
- var post_block = img_cont.parentElement.parentElement.getElementsByTagName(
- "blockquote"
- )[0];
- var img;
-
- for (var i = 0; i < img_cont.childNodes.length; i++)
- if (img_cont.childNodes[i].nodeName.toLowerCase() == "img") {
- img = img_cont.childNodes[i];
- } else if (img_cont.childNodes[i].nodeName.toLowerCase() == "video") {
- img = img_cont.childNodes[i];
- exp_vid = 1;
+ var imgw = parseInt(e.dataset.w);
+ var imgh = parseInt(e.dataset.h);
+
+ var pid = e.dataset.id;
+ var cont = document.getElementById('thumb'+pid);
+ var thumb = cont.firstElementChild;
+ var aux = e.parentNode.parentNode;
+
+ if (e.dataset.expanded == 'true') {
+ cont.removeChild(cont.lastElementChild);
+ thumb.removeAttribute('style');
+ e.dataset.expanded = '';
+
+ if (aux.className != "thread") {
+ var bq = aux.nextElementSibling;
+ bq.removeAttribute('style');
+ bq.style.marginLeft = (thumb.width + 32) + 'px';
}
-
- if (img) {
- if (format == "webm" || format == "mp4" && exp_vid == 0)
- var new_img = document.createElement("video");
- else var new_img = document.createElement("img");
-
- new_img.setAttribute("class", "thumb");
- new_img.setAttribute("alt", "" + post_id);
-
- if (img.getAttribute("width") == "" + thumb_w &&
- img.getAttribute("height") == "" + thumb_h) {
- // thumbnail -> fullsize
- if (format == "webm" || format == "mp4") {
- new_img.setAttribute("controls", "");
- new_img.setAttribute("loop", "");
- new_img.setAttribute("autoplay", "");
- }
- new_img.setAttribute("src", "" + img_url);
- new_img.setAttribute("width", img_w);
- new_img.setAttribute("height", img_h);
- new_img.setAttribute("style", "max-width:" +
- Math.floor(img_w * ratio) + "px;max-height:" +
- Math.floor(img_h * ratio) + "px;");
- post_block.setAttribute("style", "");
- img_cont.style.display = "table";
- } else {
- // fullsize -> thumbnail
- if (format == "webm" || format == "mp4") {
- new_img.removeAttribute("controls");
- new_img.removeAttribute("loop");
- new_img.removeAttribute("autoplay");
- }
- new_img.setAttribute("src", "" + thumb_url);
- new_img.setAttribute("width", thumb_w);
- new_img.setAttribute("height", thumb_h);
- post_block.setAttribute("style", "margin-left:" +
- (parseInt(thumb_w) + 40) + "px;max-width:" +
- (1000 - parseInt(thumb_w)) + "px");
- img_cont.removeAttribute("style");
+ } else {
+ var imgurl = e.href;
+ var format = imgurl.split('.').pop();
+ var maxw = document.body.clientWidth - thumb.getBoundingClientRect().left - 40;
+
+ if (imgw > maxw) {
+ var ratio = maxw / imgw;
+ imgw = maxw;
+ imgh = imgh * ratio;
}
- while (img_cont.lastChild) img_cont.removeChild(img_cont.lastChild);
-
- img_cont.appendChild(new_img);
+ var exp = document.createElement('img');
+ exp.className = 'thumb expanded';
+ exp.alt = pid;
+ exp.src = imgurl;
+ exp.style.maxWidth = imgw + 'px';
+ exp.style.maxHeight = imgh + 'px';
+ cont.appendChild(exp);
+ thumb.style.display = 'none';
+ e.dataset.expanded = 'true';
+
+ if (aux.className != "thread") {
+ var bq = aux.nextElementSibling;
+ bq.style.marginLeft = '';
+ bq.style.display = 'table';
+ }
}
}
@@ -397,4 +364,4 @@ document.addEventListener("dblclick", function(e) {
togglePost(e.target.closest(".info"));
return;
}
-}, false); \ No newline at end of file
+}, false);