asonix
e0858b7b3d
Currently i18n'd - login page - register page - cookie page - delete account confirmation page - 404 page - 500 page - part of account settings
72 lines
2.5 KiB
HTML
72 lines
2.5 KiB
HTML
@use crate::{templates::layouts::root, nav::NavState};
|
|
@use crate::templates::statics::nav_js;
|
|
@use hyaenidae_toolkit::templates::{bar, centered};
|
|
@use hyaenidae_toolkit::{templates::{card, card_body}, Card};
|
|
@use hyaenidae_toolkit::{templates::link, Link};
|
|
@use hyaenidae_toolkit::{templates::button_group, Button};
|
|
|
|
@(title: &str, description: &str, nav_state: &NavState, head: Content, body: Content)
|
|
|
|
@:root(title, description, nav_state.dark(), {
|
|
<script src="@crate::statics_path(nav_js.name)"></script>
|
|
@:head()
|
|
}, {
|
|
@:bar(nav_state.dark(), "desktop-bar", {
|
|
<div>
|
|
@:link(&Link::current_tab("/").plain(true), {
|
|
<h2>Hyaenidae</h2>
|
|
})
|
|
</div>
|
|
<nav>
|
|
<div class="narrow-nav">
|
|
@:button_group(&nav_state.narrow_buttons)
|
|
</div>
|
|
<div class="wide-nav">
|
|
@:button_group(&nav_state.buttons)
|
|
</div>
|
|
</nav>
|
|
})
|
|
@:bar(nav_state.dark(), "mobile-bar", {
|
|
@:link(&Link::current_tab("/").plain(true), {
|
|
<h2>Hyaenidae</h2>
|
|
})
|
|
<h3 class="nav-link">@:link(&Link::current_tab(nav_state.href()).plain(true), { Nav })</h3>
|
|
})
|
|
<div class="home-content">
|
|
@:body()
|
|
</div>
|
|
<div class="nav-body @nav_state.class_string()">
|
|
<div class="nav-link nav-background">
|
|
@:link(&Link::current_tab(nav_state.href()).plain(true), {
|
|
<div class="nav-background">
|
|
</div>
|
|
})
|
|
</div>
|
|
<nav class="nav-links">
|
|
@:centered(false, {
|
|
@:card(&Card::full_width().classes(&["nav"]).dark(nav_state.dark()), {
|
|
@if !nav_state.site_buttons.is_empty() {
|
|
@:card_body({
|
|
<div class="nav-heading">
|
|
<h3>Site Navigation</h3>
|
|
</div>
|
|
@:button_group(&nav_state.site_buttons)
|
|
})
|
|
}
|
|
@:card_body({
|
|
<div class="nav-heading">
|
|
<h3>Account Navigation</h3>
|
|
</div>
|
|
@:button_group(&nav_state.account_buttons)
|
|
})
|
|
@:card_body({
|
|
@:button_group(&[
|
|
Button::primary_outline("Close").href(nav_state.href()).class("nav-link"),
|
|
])
|
|
})
|
|
})
|
|
})
|
|
</nav>
|
|
</div>
|
|
})
|