aboutsummaryrefslogtreecommitdiff
path: root/cgi/templates/mobile
diff options
context:
space:
mode:
Diffstat (limited to 'cgi/templates/mobile')
-rw-r--r--cgi/templates/mobile/base_top.html14
-rw-r--r--cgi/templates/mobile/board.html55
-rw-r--r--cgi/templates/mobile/error.html6
-rw-r--r--cgi/templates/mobile/latest.html14
-rw-r--r--cgi/templates/mobile/newest.html14
-rw-r--r--cgi/templates/mobile/threadlist.html43
-rw-r--r--cgi/templates/mobile/txt_newthread.html35
-rw-r--r--cgi/templates/mobile/txt_thread.html74
-rw-r--r--cgi/templates/mobile/txt_threadlist.html26
9 files changed, 281 insertions, 0 deletions
diff --git a/cgi/templates/mobile/base_top.html b/cgi/templates/mobile/base_top.html
new file mode 100644
index 0000000..6a6c5bd
--- /dev/null
+++ b/cgi/templates/mobile/base_top.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<?py if (replythread and threads) or board: ?>
+ <title>#{board_name}@Bienvenido a Internet Móvil</title>
+<?py else: ?>
+ <title>Bienvenido a Internet Móvil</title>
+<?py #endif ?>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <link rel="shortcut icon" href="#{static_url}img/favicon.ico" />
+ <link rel="stylesheet" type="text/css" href="#{static_url}css/mobile.css?v=8" />
+ <script type="text/javascript" src="#{static_url}js/mobile.js?v=9"></script>
+</head>
diff --git a/cgi/templates/mobile/board.html b/cgi/templates/mobile/board.html
new file mode 100644
index 0000000..70b8461
--- /dev/null
+++ b/cgi/templates/mobile/board.html
@@ -0,0 +1,55 @@
+<?py include('templates/mobile/base_top.html') ?>
+<body class="img"><a name="top"></a>
+<div class="nav"><div><a href="//m.bienvenidoainternet.org">Home</a><a href="#{cgi_url}mobile/#{board}/">Volver</a><a href="#form">&#9660;</a></div></div>
+<?py for thread in threads: ?>
+<div id="thread">
+<?py for post in thread['posts']: ?>
+ <?py if post['IS_DELETED'] == "1": ?>
+ <div class="pst"><h3 class="del"><a name="#{post['id']}"></a>No.#{post['id']} eliminado por el usuario.</h3></div>
+ <?py elif post['IS_DELETED'] == "2": ?>
+ <div class="pst"><h3 class="del"><a name="#{post['id']}"></a>No.#{post['id']} eliminado por miembro del staff.</h3></div>
+ <?py else: ?>
+ <?py if post['parentid'] == "0": ?>
+ <div class="first"><h1>#{post["subject"]} <span>(#{thread['length']})</span></h1>
+ <?py else: ?>
+ <div class="pst">
+ <?py if post['subject']: ?>
+ <h2>#{post["subject"]}</h2>
+ <?py #endif ?>
+ <?py #endif ?><h3><a href="#" class="num" name="#{post['id']}">#{post['id']}</a>#{post['name']} #{post['tripcode']} #{post['timestamp_formatted']}</h3>
+ <?py if post['file']: ?><a href="/#{board}/src/#{post['file']}" target="_blank" class="thm"><img src="/#{board}/mobile/#{post['thumb']}" /><br />#{int(post['file_size'])//1024}KB #{post['file'].split(".")[1].upper()}</a><?py #endif ?>
+ <div class="msg">#{post['message']}</div></div>
+ <?py #endif ?>
+<?py #endfor ?>
+<?py if threads[0]['posts'][0]['locked'] != "1": ?>
+<a href="./#{thread['id']}" id="n">Recargar</a><span id="n2"></span>
+<?py #endif ?>
+<div class="nav"><div><a href="//m.bienvenidoainternet.org">Home</a><a href="#{cgi_url}mobile/#{board}/">Volver</a><a href="#top">&#9650;</a></div></div>
+<?py if threads[0]['posts'][0]['locked'] == "1": ?>
+ <div class="warn red" style="text-align:center;">El hilo ha sido cerrado. Ya no se puede postear en &eacute;l.</div>
+<?py else: ?>
+<form name="postform" id="postform" action="/cgi/post" method="post" enctype="multipart/form-data">
+ <input type="hidden" name="board" value="#{board}" /><input type="hidden" name="parent" value="#{replythread}" /><input type="hidden" name="mobile" value="true" /><input type="hidden" name="password" value="" />
+ <div style="display:none;"><input type="text" name="name" /><input type="text" name="email" /></div>
+ <?py if not disable_subject: ?>
+ <input class="fld" type="text" name="subject" placeholder="Asunto (opcional)" />
+ <?py #endif ?>
+ <?py if not disable_name: ?>
+ <input class="fld" type="text" name="fielda" placeholder="Nombre (opcional)" />
+ <?py #endif ?>
+ <input class="fld" type="text" name="fieldb" placeholder="E-mail (opcional)" />
+ <textarea name="message" rows="6"></textarea>
+<?py if allow_image_replies: ?>
+ <div class="file"><input type="file" name="file" class="fld" />
+ <?py if allow_spoilers: ?>
+ <label class="fld"><input type="checkbox" name="spoil" /> Spoiler</label>
+ <?py #endif ?></div>
+<?py #endif ?>
+ <input id="post" type="submit" value="Responder" />
+</form>
+<?py #endif ?>
+</div>
+<?py #endfor ?>
+<a name="form"></a>
+</body>
+</html> \ No newline at end of file
diff --git a/cgi/templates/mobile/error.html b/cgi/templates/mobile/error.html
new file mode 100644
index 0000000..00ae4f4
--- /dev/null
+++ b/cgi/templates/mobile/error.html
@@ -0,0 +1,6 @@
+<?py include('templates/mobile/base_top.html') ?>
+<body class="img">
+<div class="top"><a href="//m.bienvenidoainternet.org"><img src="#{static_url}css/img/0back.png" /><br />Home</a>Error</div><br />
+<hr size="1"><br /><br /><div style="color:red;font-size:x-large;font-weight:bold;text-align:center;">#{error}</div><br /><br /><hr size="1">
+</body>
+</html> \ No newline at end of file
diff --git a/cgi/templates/mobile/latest.html b/cgi/templates/mobile/latest.html
new file mode 100644
index 0000000..615b21c
--- /dev/null
+++ b/cgi/templates/mobile/latest.html
@@ -0,0 +1,14 @@
+<?py include('templates/mobile/base_top.html') ?>
+<body class="txt">
+<div class="top">
+ <a href="/movil.html"><img src="#{static_url}css/img/0info.png" /><br />Info</a>
+ Bienvenido a Internet Móvil
+</div>
+<div class="bar"><a href="//m.bienvenidoainternet.org">Secciones</a><a href="/cgi/mobilehome" class="sel">Hilos activos</a><a href="/cgi/mobilenewest">Nuevos hilos</a></div>
+<div class="list">
+ <?py for thread in latest_age: ?>
+ <a href="/cgi/mobileread${thread['url']}">#{thread['content']}<div>${thread['board_fulln']} <span>R:<span>#{int(thread['length'])-1}</span></span></div></a>
+ <?py #endfor ?>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/cgi/templates/mobile/newest.html b/cgi/templates/mobile/newest.html
new file mode 100644
index 0000000..37fd67f
--- /dev/null
+++ b/cgi/templates/mobile/newest.html
@@ -0,0 +1,14 @@
+<?py include('templates/mobile/base_top.html') ?>
+<body class="txt">
+<div class="top">
+ <a href="/movil.html"><img src="#{static_url}css/img/0info.png" /><br />Info</a>
+ Bienvenido a Internet Móvil
+</div>
+<div class="bar"><a href="//m.bienvenidoainternet.org">Secciones</a><a href="/cgi/mobilehome">Hilos activos</a><a href="/cgi/mobilenewest" class="sel">Nuevos hilos</a></div>
+<div class="list">
+ <?py for thread in newthreads: ?>
+ <a href="/cgi/mobileread${thread['url']}">#{thread['content']}<div>${thread['board_fulln']}</div></a>
+ <?py #endfor ?>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/cgi/templates/mobile/threadlist.html b/cgi/templates/mobile/threadlist.html
new file mode 100644
index 0000000..edb81eb
--- /dev/null
+++ b/cgi/templates/mobile/threadlist.html
@@ -0,0 +1,43 @@
+<?py include('templates/mobile/base_top.html') ?>
+<body class="img">
+<div class="top">
+ <a href="//m.bienvenidoainternet.org"><img src="#{static_url}css/img/0back.png" /><br />Home</a>
+ #{board_name}
+</div>
+<?py if mode == 1: ?>
+ <div class="bar"><a href="#{cgi_url}mobile/#{board}" class="sel">Portada</a><a href="#{cgi_url}mobilelist/#{board}">Lista</a><a href="#{cgi_url}mobilecat/#{board}">Cat&aacute;logo</a><a href="#{cgi_url}mobilenew/#{board}">Nuevo hilo</a></div>
+ <?py for thread in more_threads: ?>
+ <div class="prev">
+ <a href="#{cgi_url}mobileread/#{board}/#{thread['id']}"><img class="thm" src="/#{board}/mobile/#{thread['thumb']}" />
+ <b>#{thread["subject"]}</b> (R:#{int(thread["length"])-1})</a>
+ <h3>#{thread['name']} #{thread['tripcode']} #{thread['timestamp_formatted']}</h3>
+ #{thread['message']}#{" [...]" if thread['shortened'] else ""}
+ <?py if thread['lastreply']: ?>
+ <div class="pst"><h3>#{thread['lastreply']['name']} #{thread['lastreply']['tripcode']} #{thread['lastreply']['timestamp_formatted']}</h3>
+ #{thread['lastreply']['message']}#{" [...]" if thread['lastreply']['shortened'] else ""}</div>
+ <?py #endif ?>
+ </div>
+ <?py #endfor ?>
+<?py elif mode == 2: ?>
+ <div class="bar"><a href="#{cgi_url}mobile/#{board}">Portada</a><a href="#{cgi_url}mobilelist/#{board}" class="sel">Lista</a><a href="#{cgi_url}mobilecat/#{board}">Cat&aacute;logo</a><a href="#{cgi_url}mobilenew/#{board}">Nuevo hilo</a></div>
+ <div class="search"><input id="search" placeholder="Buscar en asuntos" style="padding:7px;" type="text"></div>
+ <div class="ord"><span>Orden:</span><a data-sort="0" class="sel" href="#">Normal</a><a data-sort="1" href="#">Nuevo</a><a data-sort="2" href="#">Viejo</a><a data-sort="3" href="#">Más</a><a data-sort="4" href="#">Menos</a></div>
+ <div id="to_sort" class="list">
+ <?py i = 1 ?>
+ <?py for thread in more_threads: ?>
+ <a data-num="${i}" data-res="#{thread['length']}" data-id="#{thread['id']}" href="#{cgi_url}mobileread/#{board}/#{thread['id']}"><strong>#{thread["subject"]}</strong>: #{thread['message']}#{" [...]" if thread['shortened'] else ""}<br />
+ <span class="info"><span>&Uacute;ltima: #{thread['lastreply']['timestamp_formatted'] if thread['lastreply'] else thread['timestamp_formatted']}</span> Respuestas: <b>#{int(thread["length"])-1}</b></span></a>
+ <?py i += 1 ?>
+ <?py #endfor ?>
+ </div>
+<?py else: ?>
+ <div class="bar"><a href="#{cgi_url}mobile/#{board}">Portada</a><a href="#{cgi_url}mobilelist/#{board}">Lista</a><a href="#{cgi_url}mobilecat/#{board}" class="sel">Cat&aacute;logo</a><a href="#{cgi_url}mobilenew/#{board}">Nuevo hilo</a></div>
+ <div class="search"><input id="catsearch" placeholder="Buscar en catálogo" style="padding:7px;" type="text"></div>
+ <div class="ord"><span>Orden:</span><a data-sort="0" class="sel" href="#">Normal</a><a data-sort="1" href="#">Nuevo</a><a data-sort="2" href="#">Viejo</a><a data-sort="3" href="#">Más</a><a data-sort="4" href="#">Menos</a></div>
+ <div id="to_sort" style="text-align:center;margin-top:0.5em;">
+ <?py i = 1 ?>
+ <?py for thread in more_threads: ?><a data-num="${i}" data-res="#{thread['length']}" data-id="#{thread['id']}" class="cat" href="#{cgi_url}mobileread/#{board}/#{thread['id']}"><img src="/#{board}/mobile/#{thread['thumb']}" /><br />(#{int(thread["length"])-1}R) <strong>#{thread["subject"]}</strong>: #{thread['message']}#{" [...]" if thread['shortened'] else ""}</a><?py i += 1 ?><?py #endfor ?>
+ </div>
+<?py #endif ?>
+</body>
+</html> \ No newline at end of file
diff --git a/cgi/templates/mobile/txt_newthread.html b/cgi/templates/mobile/txt_newthread.html
new file mode 100644
index 0000000..b19d2fa
--- /dev/null
+++ b/cgi/templates/mobile/txt_newthread.html
@@ -0,0 +1,35 @@
+<?py include('templates/mobile/base_top.html') ?>
+<body class="#{"txt" if board_type == '1' else "img"}">
+<div class="top">
+ <a href="//m.bienvenidoainternet.org"><img src="#{static_url}css/img/0back.png" /><br />Home</a>
+ #{board_name}
+</div>
+<?py if board_type == '1': ?>
+<div class="bar"><a href="#{cgi_url}mobile/#{board}">Portada</a><a href="#{cgi_url}mobilelist/#{board}">Todos los hilos</a><a href="#{cgi_url}mobilenew/#{board}" class="sel">Nuevo hilo</a></div>
+<?py else: ?>
+<div class="bar"><a href="#{cgi_url}mobile/#{board}">Portada</a><a href="#{cgi_url}mobilelist/#{board}">Lista</a><a href="#{cgi_url}mobilecat/#{board}">Cat&aacute;logo</a><a href="#{cgi_url}mobilenew/#{board}" class="sel">Nuevo hilo</a></div>
+<?py #endif ?>
+<form name="postform" id="postform" action="/cgi/post" method="post" enctype="multipart/form-data">
+ <input type="hidden" name="board" value="#{board}" /> <input type="hidden" name="mobile" value="true" /><input type="hidden" name="password" value="" />
+ <div style="display:none;"><input type="text" name="name" maxlength="50" /><input type="text" name="email" maxlength="50" /></div>
+ <?py if not disable_subject: ?>
+ <input class="fld imp" type="text" name="subject" placeholder="Asunto#{" (opcional)" if board_type == '0' else ""}" maxlength="100" />
+ <?py #endif ?>
+ <?py if not disable_name: ?>
+ <input class="fld" type="text" name="fielda" placeholder="Nombre (opcional)" maxlength="50" />
+ <?py #endif ?>
+ <input class="fld" type="text" name="fieldb" placeholder="E-mail (opcional)" maxlength="50" />
+ <textarea name="message" rows="#{"8" if board_type == '1' else "6"}"></textarea>
+<?py if allow_images: ?>
+ <div class="file"><input type="file" name="file" class="fld" />
+ <?py if allow_spoilers: ?>
+ <label class="fld"><input type="checkbox" name="spoil" /> Spoiler</label>
+ <?py #endif ?></div>
+<?py #endif ?>
+ <input id="post" type="submit" value="Crear nuevo hilo" />
+</form>
+<?py if allow_images: ?>
+ <div class="rules">Formatos permitidos: #{', '.join(supported_filetypes).upper()}<br />Tamaño máximo: #{maxsize} KB</div>
+<?py #endif ?>
+</body>
+</html> \ No newline at end of file
diff --git a/cgi/templates/mobile/txt_thread.html b/cgi/templates/mobile/txt_thread.html
new file mode 100644
index 0000000..8a19a94
--- /dev/null
+++ b/cgi/templates/mobile/txt_thread.html
@@ -0,0 +1,74 @@
+<?py include('templates/mobile/base_top.html') ?>
+<body class="txt">
+<a name="top"></a>
+<?py for thread in threads: ?>
+<div class="nav"><div><a href="//m.bienvenidoainternet.org">Home</a><a href="#{cgi_url}mobile/#{board}/">Volver</a><a href="#form">&#9660;</a></div></div>
+<div id="nav2">
+ <a href="#{cgi_url}mobileread/#{board}/#{thread['timestamp']}">Ver hilo completo</a>
+<?py if thread['length'] > 51: ?>
+ <a href="#{cgi_url}mobileread/#{board}/#{thread['timestamp']}/l25" rel="nofollow">Últimos 25</a>
+<?py #endif ?>
+<?py if thread['length'] > 50: ?>
+ <a href="#{cgi_url}mobileread/#{board}/#{thread['timestamp']}/-50" rel="nofollow">Primeros 50</a>
+<?py #endif ?>
+<?py r = range(thread['length'] / 50) ?>
+<?py for i in r[:-1]: ?>
+ <a href="#{cgi_url}mobileread/#{board}/#{thread['timestamp']}/#{(i+1)*50+1}-#{(i+2)*50}" rel="nofollow">#{(i+1)*50+1}-#{(i+2)*50}</a>
+<?py #endfor ?>
+<?py if r: ?>
+ <a href="#{cgi_url}mobileread/#{board}/#{thread['timestamp']}/#{(r[-1]+1)*50+1}-#{(r[-1]+2)*50}" rel="nofollow">#{(r[-1]+1)*50+1}-</a>
+<?py #endif ?>
+</div>
+<?py if thread['length'] > 1000: ?>
+ <div class="stop red">■ El hilo superó los 1000 mensajes y ha sido cerrado.</div>
+<?py elif thread['length'] > 950: ?>
+ <div class="warn red">■ El hilo ha recibido más de 950 mensajes. Límite: 1000</div>
+<?py elif thread['length'] > 900: ?>
+ <div class="warn yellow">■ El hilo ha recibido más de 900 mensajes. Límite: 1000</div>
+<?py #endif ?>
+<div id="thread">
+<h1>#{thread['subject']} <span>(#{thread['length']})</span></h1>
+<?py for post in thread['posts']: ?>
+<?py if post['IS_DELETED'] == '1': ?>
+<div class="pst"><h3 class="del"><a href="#" class="num">#{str(post['num']).zfill(4)}</a> Eliminado por el usuario.</h3></div>
+<?py elif post['IS_DELETED'] == '2': ?>
+<div class="pst"><h3 class="del"><a href="#" class="num">#{str(post['num']).zfill(4)}</a> Eliminado por miembro del staff.</h3></div>
+<?py else: ?>
+<div id="p#{post['id']}" class="pst">
+ <h3><a href="#" class="num">#{str(post['num']).zfill(4)}</a> #{post['name']} #{post['tripcode']}</h3>
+ <?py if post['file']: ?><a href="/#{board}/src/#{post['file']}" target="_blank" class="thm"><img src="/#{board}/mobile/#{post['thumb']}" /><br />#{int(post['file_size'])//1024}KB #{post['file'].split(".")[1].upper()}</a><?py #endif ?>
+ <div class="msg">#{post['message']}</div>
+ <h4>#{post['timestamp_formatted']}</h4>
+</div>
+<?py #endif ?>
+<?py #endfor ?>
+<?py if thread['locked'] != '1': ?>
+<a href="#{cgi_url}mobileread/#{board}/#{thread['timestamp']}/#{thread['length']}-n" id="n">Ver nuevos posts</a><span id="n2"></span>
+<?py #endif ?>
+<div class="nav">
+ <div><a href="//m.bienvenidoainternet.org">Home</a><a href="#{cgi_url}mobile/#{board}/">Volver</a><a href="#top">&#9650;</a></div>
+ <?py if nextrange: ?>
+ <div><a href="#{cgi_url}mobileread/#{board}/#{thread['timestamp']}">Hilo completo</a><a href="#{cgi_url}mobileread/#{board}/#{thread['timestamp']}/-50">Primeros 50</a><a href="#{cgi_url}mobileread/#{board}/#{thread['timestamp']}/l10">Últimos 25</a></div>
+ <?py #endif ?>
+</div>
+<?py if thread['locked'] != '1': ?>
+ <form name="postform" id="postform" action="/cgi/post" method="post" enctype="multipart/form-data">
+ <input type="hidden" name="board" value="#{board}" /><input type="hidden" name="parent" value="#{thread['id']}" /><input type="hidden" name="mobile" value="true" /><input type="hidden" name="password" value="" />
+ <div style="display:none"><input type="text" name="name" /><input type="text" name="email" /></div>
+ <input class="fld" type="text" name="fielda" placeholder="Nombre (opcional)" />
+ <input class="fld" type="text" name="fieldb" placeholder="E-mail (opcional)" />
+ <textarea name="message" rows="6"></textarea>
+<?py if allow_image_replies: ?>
+ <div class="file"><input type="file" name="file" class="fld" />
+ <?py if allow_spoilers: ?>
+ <label class="fld"><input type="checkbox" name="spoil" /> Spoiler</label>
+ <?py #endif ?></div>
+<?py #endif ?>
+ <input id="post" type="submit" value="Responder" />
+ </form>
+<?py #endif ?>
+</div>
+<a name="form"></a>
+<?py #endfor ?>
+</body>
+</html> \ No newline at end of file
diff --git a/cgi/templates/mobile/txt_threadlist.html b/cgi/templates/mobile/txt_threadlist.html
new file mode 100644
index 0000000..5e3d133
--- /dev/null
+++ b/cgi/templates/mobile/txt_threadlist.html
@@ -0,0 +1,26 @@
+<?py include('templates/mobile/base_top.html') ?>
+<body class="txt">
+<div class="top">
+ <a href="//m.bienvenidoainternet.org"><img src="#{static_url}css/img/0back.png" /><br />Home</a>
+ #{board_name}
+</div>
+<?py if mode == 1: ?>
+<div class="bar"><a href="#{cgi_url}mobile/#{board}" class="sel">Portada</a><a href="#{cgi_url}mobilelist/#{board}">Todos los hilos</a><a href="#{cgi_url}mobilenew/#{board}">Nuevo hilo</a></div>
+<?py else: ?>
+<div class="bar"><a href="#{cgi_url}mobile/#{board}">Portada</a><a href="#{cgi_url}mobilelist/#{board}" class="sel">Todos los hilos</a><a href="#{cgi_url}mobilenew/#{board}">Nuevo hilo</a></div>
+<div class="search"><input id="search" placeholder="Buscar en asuntos" type="text"></div>
+<div class="ord"><span>Orden:</span><a data-sort="0" class="sel" href="#">Normal</a><a data-sort="1" href="#">Nuevo</a><a data-sort="2" href="#">Viejo</a><a data-sort="3" href="#">Más</a><a data-sort="4" href="#">Menos</a></div>
+<?py #endif ?>
+<div id="to_sort" class="list">
+ <?py i = 1 ?>
+ <?py for thread in more_threads: ?>
+ <?py if int(thread["length"]) > 10: ?>
+ <a data-num="${i}" data-res="${thread['length']}" data-id="${thread['id']}" href="#{cgi_url}mobileread/#{board}/#{thread['timestamp']}/l10">#{thread['subject']}<br /><span class="info"><span>Última: #{timestamps[i-1][1]}</span> Respuestas: <b>#{thread['length']}</b></span></a>
+ <?py else: ?>
+ <a data-num="${i}" data-res="#{thread['length']}" data-id="#{thread['id']}" href="#{cgi_url}mobileread/#{board}/#{thread['timestamp']}/l10">#{thread['subject']}<br /><span class="info"><span>Última: #{timestamps[i-1][1]}</span> Respuestas: <b>#{thread['length']}</b></span></a>
+ <?py #endif ?>
+ <?py i += 1 ?>
+ <?py #endfor ?>
+</div>
+</body>
+</html> \ No newline at end of file