summaryrefslogtreecommitdiffstats
path: root/templates/index.html
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2023-02-21 16:48:59 +0100
committerAnton Luka Šijanec <anton@sijanec.eu>2023-02-21 16:48:59 +0100
commite791103cbbecbec2a87e9d1ab643ccb4fa36e311 (patch)
treef888ac0391bbccecf6b2ae621202a04908dc100a /templates/index.html
parentnekončano, začenjam webapp (diff)
downloadtravnik-e791103cbbecbec2a87e9d1ab643ccb4fa36e311.tar
travnik-e791103cbbecbec2a87e9d1ab643ccb4fa36e311.tar.gz
travnik-e791103cbbecbec2a87e9d1ab643ccb4fa36e311.tar.bz2
travnik-e791103cbbecbec2a87e9d1ab643ccb4fa36e311.tar.lz
travnik-e791103cbbecbec2a87e9d1ab643ccb4fa36e311.tar.xz
travnik-e791103cbbecbec2a87e9d1ab643ccb4fa36e311.tar.zst
travnik-e791103cbbecbec2a87e9d1ab643ccb4fa36e311.zip
Diffstat (limited to 'templates/index.html')
-rw-r--r--templates/index.html28
1 files changed, 26 insertions, 2 deletions
diff --git a/templates/index.html b/templates/index.html
index b4f0804..ea3c3fe 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -16,7 +16,7 @@
<label for=regex>
regex
</label>
- <input name=regex id=regex placeholder=DVDRip value="{{ request.args.get("regex")|e }}" />
+ <input name=regex id=regex placeholder=DVDRip value="{{ request.args.get("regex") if request.args.get("regex") else "" | e }}" />
razvrsti
<select name=order>
<option {{ "selected" if request.args.get("order") == "naraščajoče" else "" }} value=naraščajoče>naraščajoče</option>
@@ -30,8 +30,32 @@
<option {{ "selected" if request.args.get("sort") == "datotekah" }} value=datotekah>številu datotek</option>
</select>
<input type=submit value=išči />
+ {% if request.args.get("regex") %}
+ <p>število zadetkov: {{ lentorrents }}</p>
+ {% endif %}
+ {% for torrent in found_torrents %}
+ <h2><a href={{ torrent.magnet }}>{{ torrent.name | e }}</a></h2>
+ <p>velikost: {{ (torrent.size/(1024**3)) | round(3) }} GiB | datum najdbe: {{ torrent.found.strftime("%c") }} | število datotek: {{ torrent.files }}</p>
+ <b><ul>
+ {% macro direktorij(dir) %}
+ {% for ime, element in dir.items() %}
+ <li>
+ {{ ime }}
+ {% if element is mapping %}
+ <ul>
+ {{ direktorij(element) }}
+ </ul>
+ {% else %}
+ ({{ (element/(1024**3)) | round(3) }} MiB)
+ {% endif %}
+ </li>
+ {% endfor %}
+ {% endmacro %}
+ </ul></b>
+ {{ direktorij(torrent.tree) }}
+ {% endfor %}
</form>
<hr>
- <p><a href=//ni.šijanec.eu./sijanec/travnik>travnik</a> ima <b>{{ torrentov }}</b> {{ mno(torrentov, ["torrentov", "torrent", "torrenta", "torrente"]) }}. prižigal se je v <b>{{ zagontekst }}</b> v {{ roundstartuptime }} s in porablja {{ rammib }} MiB fizičnega pomnilnika.
+ <p><a href=//ni.šijanec.eu./sijanec/travnik>travnik</a> ima <b>{{ torrentov }}</b> {{ mno(torrentov, ["torrentov", "torrent", "torrenta", "torrente"]) }}. prižgal se je v <b>{{ zagontekst }}</b> v {{ roundstartuptime }} s in porablja {{ rammib }} MiB fizičnega pomnilnika.
</body>
</html>