some stuff
This commit is contained in:
parent
746250f876
commit
6cf595a65a
4 changed files with 52 additions and 37 deletions
|
@ -5,8 +5,14 @@ use crate::{AppState, axum_ructe::render};
|
|||
pub(crate) fn router() -> axum::Router<AppState> {
|
||||
axum::Router::new()
|
||||
.route("/", get(home))
|
||||
.route("/dancers", get(dancers))
|
||||
}
|
||||
|
||||
async fn home() -> impl IntoResponse {
|
||||
render!(crate::templates::management_html)
|
||||
}
|
||||
|
||||
|
||||
async fn dancers() -> impl IntoResponse {
|
||||
render!(crate::templates::dancers_html)
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
</a>
|
||||
</div>
|
||||
<div hx-boost="true">
|
||||
<a href="/dancers">
|
||||
<a href="/management/dancers">
|
||||
<button>Dancers</button>
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
<div hx-boost="true">
|
||||
<a href="/">
|
||||
<button type="button">Return to Main Page</button>
|
||||
<button type="button" class="focus:outline-none text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300 font-medium rounded-lg text-sm px-5 py-2.5 mr-2 mb-2">
|
||||
Return to Main Page
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -1,10 +1,16 @@
|
|||
@use super::base_html;
|
||||
@use super::components::return_to_main_html;
|
||||
|
||||
@(shift_id: u32)
|
||||
|
||||
@:base_html({
|
||||
|
||||
<form hx-swap="outerHTML" hx-post="/api/drinks" class="h-full flex items-center justify-center gap-28">
|
||||
<div hx-swap="outerHTML" hx-target="this" class="h-full">
|
||||
<div class="fixed right-0 top-0 pr-4 pt-4">
|
||||
@:return_to_main_html()
|
||||
</div>
|
||||
|
||||
<form hx-swap="outerHTML" hx-post="/api/drinks" class="h-full flex items-center justify-center gap-28">
|
||||
<fieldset class="flex flex-col text-4xl text-center overflow-hidden border border-black rounded-2xl">
|
||||
<input hidden required type="radio" id="two" name="price" value="2" class="peer/two" />
|
||||
<label class="p-4 hover:bg-blue-300 peer-checked/two:bg-blue-400" for="two">$2</label>
|
||||
|
@ -39,6 +45,7 @@
|
|||
Submit
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue