let there be light

This commit is contained in:
Jurgis Sakalauskas
2026-04-28 11:48:29 +03:00
commit beb1294d86
15 changed files with 966 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}kob{% endblock %}</title>
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
</head>
<body>
{% block content %}{% endblock %}
</body>
</html>
+12
View File
@@ -0,0 +1,12 @@
{% extends "base.html" %}
{% block content %}
<div class="confirm">
<p>Delete this article?</p>
<p class="article-title">{{ article.title }}</p>
<form method="post" action="{{ url_for('delete_do', article_id=article.id) }}">
<input type="hidden" name="page" value="{{ page }}">
<button type="submit" class="danger">Yes, delete</button>
</form>
<a class="page-btn" href="{{ url_for('index', page=page) }}">Cancel</a>
</div>
{% endblock %}
+7
View File
@@ -0,0 +1,7 @@
{% extends "base.html" %}
{% block content %}
<div class="error">
<p>{{ message }}</p>
<a class="page-btn" href="{{ url_for('index') }}">Back</a>
</div>
{% endblock %}
+32
View File
@@ -0,0 +1,32 @@
{% extends "base.html" %}
{% block content %}
<form method="post" action="{{ url_for('add') }}" class="add-form">
<input type="url" name="url" placeholder="https://..." required autofocus>
<button type="submit">Add</button>
</form>
<ul class="articles">
{% for a in articles %}
<li>
<a class="article-title" href="{{ url_for('download', article_id=a.id) }}">{{ a.title }}</a>
<a class="delete" href="{{ url_for('delete_confirm', article_id=a.id, page=page) }}">Delete</a>
</li>
{% else %}
<li class="empty">No articles yet.</li>
{% endfor %}
</ul>
<nav class="pagination">
{% if page > 1 %}
<a class="page-btn" href="{{ url_for('index', page=page-1) }}">&larr; Prev</a>
{% else %}
<span class="page-btn disabled">&larr; Prev</span>
{% endif %}
<span class="page-info">{{ page }} / {{ total_pages }}</span>
{% if page < total_pages %}
<a class="page-btn" href="{{ url_for('index', page=page+1) }}">Next &rarr;</a>
{% else %}
<span class="page-btn disabled">Next &rarr;</span>
{% endif %}
</nav>
{% endblock %}