2021-01-11 04:09:47 +00:00
|
|
|
@use crate::{templates::{layouts::root, nav}, nav::NavState};
|
2021-01-16 04:50:15 +00:00
|
|
|
@use crate::templates::statics::nav_js;
|
2021-01-11 04:09:47 +00:00
|
|
|
@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};
|
2021-01-08 04:44:43 +00:00
|
|
|
|
2021-01-10 01:49:33 +00:00
|
|
|
@(title: &str, description: &str, nav_state: &NavState, head: Content, body: Content)
|
2021-01-08 04:44:43 +00:00
|
|
|
|
2021-01-16 04:50:15 +00:00
|
|
|
@:root(title, description, nav_state.dark(), {
|
|
|
|
<script src="@crate::statics_path(nav_js.name)"></script>
|
|
|
|
@:head()
|
|
|
|
}, {
|
2021-01-11 04:09:47 +00:00
|
|
|
@:bar(nav_state.dark(), "desktop-bar", {
|
|
|
|
<div>
|
2021-01-24 04:04:27 +00:00
|
|
|
@:link(&Link::current_tab("/").plain(true), {
|
2021-01-11 04:09:47 +00:00
|
|
|
<h2>Hyaenidae</h2>
|
|
|
|
})
|
2021-01-08 04:44:43 +00:00
|
|
|
</div>
|
2021-01-11 04:09:47 +00:00
|
|
|
<nav>
|
2021-01-10 01:49:33 +00:00
|
|
|
@:nav(nav_state)
|
2021-01-11 04:09:47 +00:00
|
|
|
</nav>
|
|
|
|
})
|
|
|
|
@:bar(nav_state.dark(), "mobile-bar", {
|
2021-01-24 04:04:27 +00:00
|
|
|
@:link(&Link::current_tab("/").plain(true), {
|
2021-01-11 04:09:47 +00:00
|
|
|
<h2>Hyaenidae</h2>
|
|
|
|
})
|
2021-01-24 04:04:27 +00:00
|
|
|
<h3 class="nav-link">@:link(&Link::current_tab(nav_state.href()).plain(true), { Nav })</h3>
|
2021-01-11 04:09:47 +00:00
|
|
|
})
|
2021-01-08 04:44:43 +00:00
|
|
|
<div class="home-content">
|
|
|
|
@:centered(false, {
|
|
|
|
@:body()
|
|
|
|
})
|
|
|
|
</div>
|
2021-01-11 04:09:47 +00:00
|
|
|
<div class="nav-body @nav_state.class_string()">
|
2021-01-16 04:50:15 +00:00
|
|
|
<div class="nav-link nav-background">
|
2021-01-24 04:04:27 +00:00
|
|
|
@:link(&Link::current_tab(nav_state.href()).plain(true), {
|
2021-01-16 04:50:15 +00:00
|
|
|
<div class="nav-background">
|
|
|
|
</div>
|
|
|
|
})
|
|
|
|
</div>
|
2021-01-11 04:09:47 +00:00
|
|
|
<nav class="nav-links">
|
2021-01-13 04:39:59 +00:00
|
|
|
@:centered(false, {
|
|
|
|
@:card(&Card::full_width().classes(&["nav"]).dark(nav_state.dark()), {
|
|
|
|
@:card_body({
|
|
|
|
@:nav(nav_state)
|
|
|
|
})
|
|
|
|
@:card_body({
|
2021-01-16 04:50:15 +00:00
|
|
|
<div class="nav-link">
|
|
|
|
@:button_group(&[
|
|
|
|
Button::primary_outline("Close").href(nav_state.href()).dark(nav_state.dark()),
|
|
|
|
])
|
|
|
|
</div>
|
2021-01-13 04:39:59 +00:00
|
|
|
})
|
2021-01-11 04:09:47 +00:00
|
|
|
})
|
|
|
|
})
|
|
|
|
</nav>
|
|
|
|
</div>
|
2021-01-08 04:44:43 +00:00
|
|
|
})
|
|
|
|
|