Upload files to "templates"

This commit is contained in:
2024-11-29 14:35:49 -05:00
parent 007ce3959d
commit 48463d414b
4 changed files with 114 additions and 143 deletions

View File

@ -1,28 +1,33 @@
{% extends "base.html" %}
{% block content %}
<h1>Notebook</h1>
<!-- Notebook Form -->
<form method="POST">
<label for="category">Category:</label>
<select name="category" id="category">
<select name="category" id="category" required>
<option value="notes">Notes</option>
<option value="ips">IPs</option>
<option value="domains">Domains</option>
<option value="services">Services</option>
<option value="tasks">Scheduled Tasks</option>
</select>
<label for="entry">Entry:</label>
<input type="text" name="entry" id="entry" required>
<textarea name="entry" id="entry" rows="2" required></textarea>
<button type="submit">Add</button>
</form>
<hr>
<!-- Display Notebook Entries -->
{% for category, entries in notebook.items() %}
<h2>{{ category.capitalize() }}</h2>
<ul>
{% for entry in entries %}
<li>
{{ entry }} <a href="{{ url_for('delete_entry', category=category, index=loop.index0) }}">Delete</a>
{{ entry }}
<a href="{{ url_for('delete_entry', category=category, index=loop.index0) }}">Delete</a>
</li>
{% endfor %}
</ul>