intake/intake/templates/home.jinja2

109 lines
2.5 KiB
Django/Jinja

<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Intake</title>
<link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwgAADsIBFShKgAAAABh0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMS41ZEdYUgAAAGFJREFUOE+lkFEKwDAIxXrzXXB3ckMm9EnAV/YRCxFCcUXEL3Jc77NDjpDA/VGL3RFWYEICfeGC8oQc9IPuCAnQDcoRVmBCAn3hgvKEHPSD7ggJ0A3KEVZgQgJ94YLSJ9YDUzNGDXGZ/JEAAAAASUVORK5CYII=">
<style>
main {
max-width: 700px;
margin: 0 auto;
}
article {
border: 1px solid black; border-radius: 6px;
padding: 5px;
margin-bottom: 20px;
word-break: break-word;
}
.item-title {
font-size: 1.4em;
}
article img {
max-width: 100%;
}
button, summary {
cursor: pointer;
}
summary {
display: block;
}
summary:focus {
outline: 1px dotted gray;
}
.wide {
width: 100%;
resize: vertical;
}
</style>
</head>
<body>
<main>
<article>
<details open>
<summary><span class="item-title">Channels</span></summary>
{% if not channels %}
<p>No channels found.</p>
{% else %}
{% for channel in channels %}
<p><a href="{{ url_for('channel_feed', name=channel) }}">{{ channel }}</a></p>
{% endfor %}
{% endif %}
<p><a href="{{ url_for('channels_edit') }}">Edit channels</a></p>
</details>
</article>
<article>
<details open>
<summary><span class="item-title">Sources</span></summary>
{% if not sources %}
<p>No sources found.</p>
{% else %}
{% for source in sources %}
<p><a href="{{ url_for('source_feed', name=source.source_name) }}">{{ source.source_name|safe }}</a> (<a href="{{ url_for('source_edit', name=source.source_name) }}">edit</a>)</p>
{% endfor %}
{% endif %}
</details>
</article>
<article>
<details open>
<summary><span class="item-title">Add item</span></summary>
<form action="add" method="post">
<p>
{# <label for="title">Title</label> #}
<input type="text" name="title" class="wide" placeholder="Title">
</p>
<p>
{# <label for="link">Link</label> #}
<input type="url" name="link" class="wide" placeholder="Link">
</p>
<p>
{# <label for="body">Body</label> #}
<textarea name="body" class="wide" placeholder="Body"></textarea>
</p>
<p>
{# <label for="tags">Tags</label> #}
<input type="text" name="tags" class="wide" placeholder="Tags, comma-separated">
</p>
<p>
<label for="tts">TTS:</label>
<input type="datetime-local" name="tts">
</p>
<p>
<label for="ttl">TTL:</label>
<input type="datetime-local" name="ttl">
</p>
<p>
<label for="ttd">TTD:</label>
<input type="datetime-local" name="ttd">
</p>
<p>
<input type="submit" value="Add">
</form>
</details>
</article>
</main>
</body>
</html>