diff options
| author | 2024-11-14 21:43:54 +0000 | |
|---|---|---|
| committer | 2024-11-14 21:43:54 +0000 | |
| commit | 67b54449a1bbde257e9454419e7bb70ebc515c0f (patch) | |
| tree | e23710c2d1f5d219205f26af727b478e455a0071 /templates | |
| parent | 469a3ad33914f7eff6edc9ca7fabb12f2950da84 (diff) | |
| download | critch-main.tar.gz critch-main.tar.bz2 critch-main.zip | |
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/admin_dashboard.rs.html | 27 | 
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> | 
