hyaenidae/server/templates/index.rs.html

24 lines
762 B
HTML
Raw Normal View History

2021-01-08 04:44:43 +00:00
@use crate::{profiles::Profile, templates::layouts::home};
@use hyaenidae_accounts::LogoutState;
@use hyaenidae_toolkit::{templates::{card, card_body, card_title}, Card};
2020-12-16 02:40:41 +00:00
2021-01-08 04:44:43 +00:00
@(logout_opt: &Option<LogoutState>, profile: &Option<Profile>)
2020-12-16 02:40:41 +00:00
2021-01-08 04:44:43 +00:00
@:home("Hyaenidae", "A simple website", logout_opt, {}, {
@if let Some(profile) = profile {
@:card(&Card::full_width().classes(&["account-page"]).dark(true), {
2021-01-08 04:44:43 +00:00
@:card_title({ Welcome, @profile.name() })
2020-12-16 02:40:41 +00:00
@:card_body({
2021-01-08 04:44:43 +00:00
<span>e</span>
2020-12-16 02:40:41 +00:00
})
})
} else {
@:card(&Card::full_width().classes(&["account-page"]).dark(true), {
2021-01-08 04:44:43 +00:00
@:card_title({ Home })
2020-12-16 02:40:41 +00:00
@:card_body({
2021-01-08 04:44:43 +00:00
<span>e</span>
2020-12-16 02:40:41 +00:00
})
})
}
})