Files
universal_web_loco_rewrite/assets/views/admin/images/index.html
2026-05-17 18:15:22 +02:00

39 lines
1.3 KiB
HTML

{% extends "admin/base.html" %}
{% block title %}Images{% endblock title %}
{% block content %}
<div class="space-y-2">
<div class="flex flex-wrap items-center justify-between gap-3">
<div>
<h1 class="text-2xl font-bold">Images</h1>
<p class="text-sm opacity-70">Upload images for blog posts and audio covers.</p>
</div>
<a href="/admin/dashboard" class="btn btn-ghost btn-sm">Back to dashboard</a>
</div>
<div class="card border border-base-300 bg-base-100 shadow-sm">
<div class="card-body">
{% if uploaded %}
<div class="alert mb-4">
<div>
<p class="font-medium">Uploaded image id: {{ uploaded }}</p>
<p class="text-sm opacity-70">URL: {{ uploaded_url }}</p>
</div>
</div>
{% endif %}
<form method="post" action="/admin/images/upload" enctype="multipart/form-data" class="space-y-2">
<div class="form-control">
<label class="label"><span class="label-text">Image file</span></label>
<input type="file" name="file" accept="image/jpeg,image/png,image/webp,image/gif" required class="file-input file-input-bordered w-full">
</div>
<div class="flex flex-wrap gap-2 pt-2">
<button type="submit" class="btn btn-neutral btn-sm">Upload</button>
</div>
</form>
</div>
</div>
</div>
{% endblock content %}