save some more bytes on the wire

This commit is contained in:
ed 2021-06-19 01:18:48 +02:00
parent 093e955100
commit 789a602914
2 changed files with 146 additions and 146 deletions

View file

@ -2,134 +2,134 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>⇆🎉 {{ title }}</title> <title>⇆🎉 {{ title }}</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=0.8"> <meta name="viewport" content="width=device-width, initial-scale=0.8">
<link rel="stylesheet" type="text/css" media="screen" href="/.cpr/browser.css{{ ts }}"> <link rel="stylesheet" type="text/css" media="screen" href="/.cpr/browser.css{{ ts }}">
<link rel="stylesheet" type="text/css" media="screen" href="/.cpr/upload.css{{ ts }}"> <link rel="stylesheet" type="text/css" media="screen" href="/.cpr/upload.css{{ ts }}">
{%- if css %} {%- if css %}
<link rel="stylesheet" type="text/css" media="screen" href="{{ css }}{{ ts }}"> <link rel="stylesheet" type="text/css" media="screen" href="{{ css }}{{ ts }}">
{%- endif %} {%- endif %}
</head> </head>
<body> <body>
<div id="ops"></div> <div id="ops"></div>
<div id="op_search" class="opview"> <div id="op_search" class="opview">
{%- if have_tags_idx %} {%- if have_tags_idx %}
<div id="srch_form" class="tags"></div> <div id="srch_form" class="tags"></div>
{%- else %} {%- else %}
<div id="srch_form"></div> <div id="srch_form"></div>
{%- endif %} {%- endif %}
<div id="srch_q"></div> <div id="srch_q"></div>
</div> </div>
<div id="op_player" class="opview opbox opwide"></div> <div id="op_player" class="opview opbox opwide"></div>
<div id="op_bup" class="opview opbox act"> <div id="op_bup" class="opview opbox act">
<div id="u2err"></div> <div id="u2err"></div>
<form method="post" enctype="multipart/form-data" accept-charset="utf-8" action="{{ url_suf }}"> <form method="post" enctype="multipart/form-data" accept-charset="utf-8" action="{{ url_suf }}">
<input type="hidden" name="act" value="bput" /> <input type="hidden" name="act" value="bput" />
<input type="file" name="f" multiple><br /> <input type="file" name="f" multiple><br />
<input type="submit" value="start upload"> <input type="submit" value="start upload">
</form> </form>
</div> </div>
<div id="op_mkdir" class="opview opbox act"> <div id="op_mkdir" class="opview opbox act">
<form method="post" enctype="multipart/form-data" accept-charset="utf-8" action="{{ url_suf }}"> <form method="post" enctype="multipart/form-data" accept-charset="utf-8" action="{{ url_suf }}">
<input type="hidden" name="act" value="mkdir" /> <input type="hidden" name="act" value="mkdir" />
<input type="text" name="name" size="30"> <input type="text" name="name" size="30">
<input type="submit" value="mkdir"> <input type="submit" value="mkdir">
</form> </form>
</div> </div>
<div id="op_new_md" class="opview opbox"> <div id="op_new_md" class="opview opbox">
<form method="post" enctype="multipart/form-data" accept-charset="utf-8" action="{{ url_suf }}"> <form method="post" enctype="multipart/form-data" accept-charset="utf-8" action="{{ url_suf }}">
<input type="hidden" name="act" value="new_md" /> <input type="hidden" name="act" value="new_md" />
<input type="text" name="name" size="30"> <input type="text" name="name" size="30">
<input type="submit" value="create doc"> <input type="submit" value="create doc">
</form> </form>
</div> </div>
<div id="op_msg" class="opview opbox act"> <div id="op_msg" class="opview opbox act">
<form method="post" enctype="application/x-www-form-urlencoded" accept-charset="utf-8" action="{{ url_suf }}"> <form method="post" enctype="application/x-www-form-urlencoded" accept-charset="utf-8" action="{{ url_suf }}">
<input type="text" name="msg" size="30"> <input type="text" name="msg" size="30">
<input type="submit" value="send msg"> <input type="submit" value="send msg">
</form> </form>
</div> </div>
<div id="op_up2k" class="opview"></div> <div id="op_up2k" class="opview"></div>
<div id="op_cfg" class="opview opbox opwide"></div> <div id="op_cfg" class="opview opbox opwide"></div>
<h1 id="path"> <h1 id="path">
<a href="#" id="entree" tt="show directory tree$NHotkey: B">🌲</a> <a href="#" id="entree" tt="show directory tree$NHotkey: B">🌲</a>
{%- for n in vpnodes %} {%- for n in vpnodes %}
<a href="/{{ n[0] }}">{{ n[1] }}</a> <a href="/{{ n[0] }}">{{ n[1] }}</a>
{%- endfor %} {%- endfor %}
</h1> </h1>
<div id="tree"></div> <div id="tree"></div>
<div id="wrap"> <div id="wrap">
<div id="pro" class="logue">{{ logues[0] }}</div> <div id="pro" class="logue">{{ logues[0] }}</div>
<table id="files"> <table id="files">
<thead> <thead>
<tr> <tr>
<th name="lead"><span>c</span></th> <th name="lead"><span>c</span></th>
<th name="href"><span>File Name</span></th> <th name="href"><span>File Name</span></th>
<th name="sz" sort="int"><span>Size</span></th> <th name="sz" sort="int"><span>Size</span></th>
{%- for k in taglist %} {%- for k in taglist %}
{%- if k.startswith('.') %} {%- if k.startswith('.') %}
<th name="tags/{{ k }}" sort="int"><span>{{ k[1:] }}</span></th> <th name="tags/{{ k }}" sort="int"><span>{{ k[1:] }}</span></th>
{%- else %} {%- else %}
<th name="tags/{{ k }}"><span>{{ k[0]|upper }}{{ k[1:] }}</span></th> <th name="tags/{{ k }}"><span>{{ k[0]|upper }}{{ k[1:] }}</span></th>
{%- endif %} {%- endif %}
{%- endfor %} {%- endfor %}
<th name="ext"><span>T</span></th> <th name="ext"><span>T</span></th>
<th name="ts"><span>Date</span></th> <th name="ts"><span>Date</span></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{%- for f in files %} {%- for f in files %}
<tr><td>{{ f.lead }}</td><td><a href="{{ f.href }}">{{ f.name|e }}</a></td><td>{{ f.sz }}</td> <tr><td>{{ f.lead }}</td><td><a href="{{ f.href }}">{{ f.name|e }}</a></td><td>{{ f.sz }}</td>
{%- if f.tags is defined %} {%- if f.tags is defined %}
{%- for k in taglist %} {%- for k in taglist %}
<td>{{ f.tags[k] }}</td> <td>{{ f.tags[k] }}</td>
{%- endfor %} {%- endfor %}
{%- endif %} {%- endif %}
<td>{{ f.ext }}</td><td>{{ f.dt }}</td></tr> <td>{{ f.ext }}</td><td>{{ f.dt }}</td></tr>
{%- endfor %} {%- endfor %}
</tbody> </tbody>
</table> </table>
<div id="epi" class="logue">{{ logues[1] }}</div> <div id="epi" class="logue">{{ logues[1] }}</div>
<h2><a href="?h">control-panel</a></h2> <h2><a href="?h">control-panel</a></h2>
</div> </div>
{%- if srv_info %} {%- if srv_info %}
<div id="srv_info"><span>{{ srv_info }}</span></div> <div id="srv_info"><span>{{ srv_info }}</span></div>
{%- endif %} {%- endif %}
<div id="widget"></div> <div id="widget"></div>
<script> <script>
var perms = {{ perms }}, var perms = {{ perms }},
tag_order_cfg = {{ tag_order }}, tag_order_cfg = {{ tag_order }},
have_up2k_idx = {{ have_up2k_idx|tojson }}, have_up2k_idx = {{ have_up2k_idx|tojson }},
have_tags_idx = {{ have_tags_idx|tojson }}, have_tags_idx = {{ have_tags_idx|tojson }},
have_zip = {{ have_zip|tojson }}; have_zip = {{ have_zip|tojson }};
</script> </script>
<script src="/.cpr/util.js{{ ts }}"></script> <script src="/.cpr/util.js{{ ts }}"></script>
<script src="/.cpr/browser.js{{ ts }}"></script> <script src="/.cpr/browser.js{{ ts }}"></script>
<script src="/.cpr/up2k.js{{ ts }}"></script> <script src="/.cpr/up2k.js{{ ts }}"></script>
</body> </body>
</html> </html>

View file

@ -2,59 +2,59 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>{{ title }}</title> <title>{{ title }}</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=0.8"> <meta name="viewport" content="width=device-width, initial-scale=0.8">
<style> <style>
html{font-family:sans-serif} html{font-family:sans-serif}
td{border:1px solid #999;border-width:1px 1px 0 0;padding:0 5px} td{border:1px solid #999;border-width:1px 1px 0 0;padding:0 5px}
a{display:block} a{display:block}
</style> </style>
</head> </head>
<body> <body>
{%- if srv_info %} {%- if srv_info %}
<p><span>{{ srv_info }}</span></p> <p><span>{{ srv_info }}</span></p>
{%- endif %} {%- endif %}
{%- if have_b_u %} {%- if have_b_u %}
<form method="post" enctype="multipart/form-data" accept-charset="utf-8" action="{{ url_suf }}"> <form method="post" enctype="multipart/form-data" accept-charset="utf-8" action="{{ url_suf }}">
<input type="hidden" name="act" value="bput" /> <input type="hidden" name="act" value="bput" />
<input type="file" name="f" multiple /><br /> <input type="file" name="f" multiple /><br />
<input type="submit" value="start upload" /> <input type="submit" value="start upload" />
</form> </form>
<br /> <br />
{%- endif %} {%- endif %}
{%- if logues[0] %} {%- if logues[0] %}
<div>{{ logues[0] }}</div><br /> <div>{{ logues[0] }}</div><br />
{%- endif %} {%- endif %}
<table id="files"> <table id="files">
<thead> <thead>
<tr> <tr>
<th name="lead"><span>c</span></th> <th name="lead"><span>c</span></th>
<th name="href"><span>File Name</span></th> <th name="href"><span>File Name</span></th>
<th name="sz" sort="int"><span>Size</span></th> <th name="sz" sort="int"><span>Size</span></th>
<th name="ts"><span>Date</span></th> <th name="ts"><span>Date</span></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr><td></td><td><a href="../{{ url_suf }}">parent folder</a></td><td>-</td><td>-</td></tr> <tr><td></td><td><a href="../{{ url_suf }}">parent folder</a></td><td>-</td><td>-</td></tr>
{%- for f in files %} {%- for f in files %}
<tr><td>{{ f.lead }}</td><td><a href="{{ f.href }}{{ url_suf }}">{{ f.name|e }}</a></td><td>{{ f.sz }}</td><td>{{ f.dt }}</td></tr> <tr><td>{{ f.lead }}</td><td><a href="{{ f.href }}{{ url_suf }}">{{ f.name|e }}</a></td><td>{{ f.sz }}</td><td>{{ f.dt }}</td></tr>
{%- endfor %} {%- endfor %}
</tbody> </tbody>
</table> </table>
{%- if logues[1] %} {%- if logues[1] %}
<div>{{ logues[1] }}</div><br /> <div>{{ logues[1] }}</div><br />
{%- endif %} {%- endif %}
<h2><a href="{{ url_suf }}{{ url_suf and '&amp;' or '?' }}h">control-panel</a></h2> <h2><a href="{{ url_suf }}{{ url_suf and '&amp;' or '?' }}h">control-panel</a></h2>
</body> </body>
</html> </html>