mirror of
https://github.com/sakaljurgis/kob.git
synced 2026-07-08 22:17:41 +00:00
let there be light
This commit is contained in:
@@ -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>
|
||||
@@ -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 %}
|
||||
@@ -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 %}
|
||||
@@ -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) }}">← Prev</a>
|
||||
{% else %}
|
||||
<span class="page-btn disabled">← 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 →</a>
|
||||
{% else %}
|
||||
<span class="page-btn disabled">Next →</span>
|
||||
{% endif %}
|
||||
</nav>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user