new pull, new meta style from live constant etherdumpÄ
This commit is contained in:
@@ -2,23 +2,39 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>{% block title %}{{title}}{% endblock %}</title>
|
||||
<title>etherdump</title>
|
||||
<link rel="stylesheet" type="text/css" href="{%block css %}styles.css{%endblock%}">
|
||||
{% block scripts %}
|
||||
<script src="jquery-latest.js"></script>
|
||||
<script src="jquery.tablesorter.min.js"></script>
|
||||
<script src="script.js"></script>
|
||||
{% endblock scripts %}
|
||||
</head>
|
||||
<body>
|
||||
{% block header %}<h1>{{title}}</h1>{% endblock %}
|
||||
{% block info %}<p class="info">Last updated {{timestamp}}</p>{% endblock %}
|
||||
{% block info %}<p class="info">This listing is updated automatically once daily. Last update {{timestamp}}.</p>{% endblock %}
|
||||
{% block namefilter %}
|
||||
<div id="namefilter">
|
||||
<input type="text" id="namefilterinput" value="" placeholder="name filter" autofocus >
|
||||
<button id="newpadbutton">go/start pad</button>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
var newpadbutton = document.getElementById("newpadbutton");
|
||||
newpadbutton.addEventListener("click", function (e) {
|
||||
var elt = document.getElementById("namefilterinput"),
|
||||
newpadname = elt.value,
|
||||
padbase = document.querySelector("td.versions a").href;
|
||||
newpadname = newpadname.replace(/^\s*/g, "");
|
||||
newpadname = newpadname.replace(/\s*$/g, "");
|
||||
elt.value = newpadname;
|
||||
padbase = padbase.replace(/\/[^/]+$/, "");
|
||||
if (!newpadname) { alert("type the pad name, then click 'go'")}
|
||||
else {
|
||||
var newpadhref = padbase + "/" + encodeURIComponent(newpadname);
|
||||
// console.log("goto", newpadhref);
|
||||
window.location = newpadhref;
|
||||
};
|
||||
e.preventDefault();
|
||||
})
|
||||
var namefilter = (function (opts) {
|
||||
var timeout_id = null,
|
||||
filter_value = '',
|
||||
@@ -27,7 +43,7 @@ var namefilter = (function (opts) {
|
||||
// console.log("update", filter_value);
|
||||
var pat = new RegExp(filter_value, "i");
|
||||
$("tbody tr").each(function () {
|
||||
var n = $(".pad_name", this).text();
|
||||
var n = $(".name", this).text();
|
||||
// console.log("n", n);
|
||||
if (filter_value == "" || n.match(pat) !== null) {
|
||||
$(this).show();
|
||||
@@ -51,7 +67,7 @@ $("#namefilterinput").bind("keyup", function (e) { namefilter($(this).val()); })
|
||||
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("table.listing").tablesorter();
|
||||
$("table.listing").tablesorter({sortList: [[2,1]]});
|
||||
}
|
||||
);
|
||||
|
||||
@@ -61,24 +77,32 @@ $(document).ready(function()
|
||||
<table class="listing tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>link</th>
|
||||
<th>pad name (click to view archived page)</th>
|
||||
<th>group</th>
|
||||
<th>name</th>
|
||||
<th>versions</th>
|
||||
<th>last edited</th>
|
||||
<th>size</th>
|
||||
<th>revisions</th>
|
||||
<th>authors</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for pad in pads %}
|
||||
<tr>
|
||||
<td class="pad_url"><a class="edit" href="{{ pad.url }}">edit</a></td>
|
||||
<td class="pad_name"><a href="{{ pad.html_path }}">{{ pad.pad_name }}</a></td>
|
||||
<td class="pad_group">{{ pad.group_name|default(pad.group_id) }}</td>
|
||||
<td class="pad_last_edited">{{ pad.last_edited_str }}</td>
|
||||
<td class="pad_size">{{ pad.text_length_human }}</td>
|
||||
<td class="name">
|
||||
{{ pad.padid }}
|
||||
</td>
|
||||
<td class="versions">
|
||||
{% for v in pad.versions %}<a href="{{v.url}}">{{v.type}}</a> {% endfor %}
|
||||
</td>
|
||||
<td class="lastedited">{{ pad.lastedited_iso|replace("T", " ") }}</td>
|
||||
<td class="revisions">{{ pad.revisions }}</td>
|
||||
<td class="authors">{{ pad.author_ids|length }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div id="footer">
|
||||
<a href="index">index of all pads (password required)</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user