summaryrefslogtreecommitdiffstats
path: root/templates/admin_dashboard.rs.html
diff options
context:
space:
mode:
Diffstat (limited to 'templates/admin_dashboard.rs.html')
-rw-r--r--templates/admin_dashboard.rs.html27
1 files changed, 26 insertions, 1 deletions
diff --git a/templates/admin_dashboard.rs.html b/templates/admin_dashboard.rs.html
index cf7d27c..e8b94a2 100644
--- a/templates/admin_dashboard.rs.html
+++ b/templates/admin_dashboard.rs.html
@@ -1,8 +1,33 @@
@use super::base_html;
+@use crate::db::artworks::Artwork;
-@()
+@(artworks: Vec<Artwork>)
@:base_html({
+<form action="/artworks" method="post" enctype="multipart/form-data">
+ <label for="title">title:</label><br>
+ <input type="text" id="title" name="title"><br>
+ <label for="artist">artist handle:</label><br>
+ <input type="text" id="artist" name="artist" required><br>
+ <label for="url">url source:</label><br>
+ <input type="text" id="url" name="url"><br>
+ <label for="description">description:</label><br>
+ <textarea id="description" name="description"></textarea><br>
+ <input type="file" name="file" multiple>
+ <button type="post">post artwork</button>
+</form>
+<ul>
+@for artwork in artworks {
+ <li>
+ @if let Some(title) = artwork.title {
+ <h2>@title</h2>
+ }
+ @for file in artwork.files {
+ <img src="/uploads/@file.file_id().@file.extension()">
+ }
+ </li>
+}
+</ul>
<form action="/admin/logout" method="post">
<button type="logout">log out</button>
</form>