mirror of
https://github.com/YGGverse/rssto.git
synced 2026-04-02 10:05:32 +00:00
draft initial http application
This commit is contained in:
parent
4c99208535
commit
353c78b2f0
12 changed files with 406 additions and 0 deletions
24
crates/http/templates/index.html.tera
Normal file
24
crates/http/templates/index.html.tera
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{% extends "layout" %}
|
||||
{% block content %}
|
||||
{% if rows %}
|
||||
{% for row in rows %}
|
||||
<div>
|
||||
<a name="{{ row.content_id }}"></a>
|
||||
<h2><a href="/{{ row.link }}">{{ row.title }}</a></h2>
|
||||
{% if row.time %}<p>{{ row.time }}</p>{% endif %}
|
||||
<div>
|
||||
{{ row.description }}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<div>Nothing.</div>
|
||||
{% endif %}
|
||||
{% if next %}<a href="{{ next }}">Next</a>{% endif %}
|
||||
{% if back %}<a href="{{ back }}">Back</a>{% endif %}
|
||||
{% if total %}
|
||||
<span>
|
||||
Page {{ page }} / {{ pages }} ({{ total }} torrent{{ total | pluralize(plural="s") }} total)
|
||||
</span>
|
||||
{% endif %}
|
||||
{% endblock content %}
|
||||
12
crates/http/templates/info.html.tera
Normal file
12
crates/http/templates/info.html.tera
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{% extends "layout" %}
|
||||
{% block content %}
|
||||
<div>
|
||||
<h1>{{ title }}</h1>
|
||||
<div>
|
||||
{{ description }}
|
||||
</div>
|
||||
<div>
|
||||
<a href="{{ link }}">{{ time }}</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
22
crates/http/templates/layout.html.tera
Normal file
22
crates/http/templates/layout.html.tera
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>{{ title }}</title>
|
||||
{% if meta.description %}
|
||||
<meta name="description" content="{{ meta.description }}" />
|
||||
{% endif %}
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<a href="/">{{ meta.title }}</a>
|
||||
<form action="/" method="GET">
|
||||
<input type="text" name="search" value="{% if search %}{{ search }}{% endif %}" placeholder="Keyword..." />
|
||||
<input type="submit" value="Search" />
|
||||
</form>
|
||||
</header>
|
||||
<main>
|
||||
{% block content %}{% endblock content %}
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue