53 lines
2.6 KiB
HTML
53 lines
2.6 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
|
<meta charset="UTF-8">
|
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Comfortaa:wght@400;500;700&display=swap">
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/comic_edit.css') }}">
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/styles.css') }}">
|
|
<link rel="icon" href="{{ url_for('static', filename='artberry.ico') }}" type="image/x-icon">
|
|
|
|
<title>🫐comic edit - artberry🫐</title>
|
|
</head>
|
|
<body>
|
|
<h1>Edit Comic: {{ comic.name }}</h1>
|
|
<form class="upload-form" method="POST" action="{{ url_for('comic_edit', comic_id=comic.id) }}" enctype="multipart/form-data">
|
|
{{ form.hidden_tag() }}
|
|
<h2>Add a New Page:</h2>
|
|
<div class="form-group">
|
|
<label for="new_page">Select a File:</label>
|
|
<input type="file" name="new_page" accept="image/*" required class="file-input">
|
|
</div>
|
|
<button type="submit" name="action" value="add">Add Page</button>
|
|
</form>
|
|
<div class="page-controls">
|
|
<h2>Existing Pages:</h2>
|
|
<ul>
|
|
{% for page in comic_pages %}
|
|
<li>
|
|
<img src="{{ url_for('static', filename='comics/' + comic.name + '/' + page) }}" alt="Comic Page {{ loop.index }}">
|
|
<h3>Page {{ loop.index }}</h3>
|
|
<div class="form-group">
|
|
<form method="POST" action="{{ url_for('comic_edit', comic_id=comic.id) }}" class="form-group">
|
|
{{ form.hidden_tag() }}
|
|
<input type="hidden" name="page" value="{{ page }}">
|
|
<button type="submit" name="action" value="delete">Delete</button>
|
|
</form>
|
|
</div>
|
|
<div class="form-group">
|
|
<form method="POST" action="{{ url_for('comic_edit', comic_id=comic.id) }}" enctype="multipart/form-data" class="form-group">
|
|
{{ form.hidden_tag() }}
|
|
<label for="new_page_update">Replace with:</label>
|
|
<input type="file" name="new_page" accept="image/*" required class="file-input">
|
|
<button type="submit" name="action" value="update">Replace</button>
|
|
</form>
|
|
</div>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
<a href="{{ url_for('comics') }}" class="back-link">Return to Comics List</a>
|
|
</body>
|
|
</html>
|