Add basic detail routes

This commit is contained in:
sqozz 2017-12-29 03:03:47 +01:00
parent 16878ee228
commit d42f9a9ac4
4 changed files with 22 additions and 1 deletions

View File

@ -75,6 +75,12 @@ def search():
results = c.fetchall()
return render_template("result.html", results=results, strings=strings, language="english", categories=settings["categories"])
@app.route("/details", methods=['GET'])
def details():
info_hash = request.args["h"]
print(info_hash)
return render_template("details.html", strings=strings, language="english", categories=settings["categories"])
def scrapeAll():
TRACKER_URL = "http://tracker.lootbox.cf:6969/"
statedump = requests.get(TRACKER_URL + "stats" + "?mode=statedump")

4
static/css/details.css Normal file
View File

@ -0,0 +1,4 @@
table, th, td {
width: 100%;
border: 1px solid white;
}

11
templates/details.html Normal file
View File

@ -0,0 +1,11 @@
<!--
vim: ts=2 noexpandtab
-->
{% extends "index.html" %}
{% block title %}{{ super() }} - Results{% endblock%}
{% set active_page = "search" %}
{% block content %}
<link href="{{ url_for("static", filename="css/details.css") }}" rel="stylesheet">
<script src="{{ url_for("static", filename="js/main.js") }}"></script>
<h1>DETAILS</h1>
{% endblock content%}

View File

@ -31,7 +31,7 @@ vim: ts=2 noexpandtab
<div class="cover-container">
<div class="masthead clearfix">
<div class="inner">
<h3 class="masthead-brand"><a href="/">TorrentIndexer</a></h3>
<h3 class="masthead-brand"><a href="/">Torrent Indexer</a></h3>
<nav>
<ul class="nav masthead-nav">
{% for href, id, caption, icon in navigation_bar %}