61 lines
1.9 KiB
Rust
61 lines
1.9 KiB
Rust
use yew::prelude::*;
|
|
use yew_side_effect::title::Title;
|
|
|
|
use crate::components;
|
|
|
|
#[derive(Properties, PartialEq)]
|
|
pub struct IndexProps {
|
|
pub token: Option<String>,
|
|
pub logged_in: bool,
|
|
}
|
|
|
|
pub struct Index;
|
|
|
|
impl Component for Index {
|
|
type Message = ();
|
|
type Properties = IndexProps;
|
|
|
|
fn create(_ctx: &Context<Self>) -> Self {
|
|
Self
|
|
}
|
|
|
|
fn view(&self, ctx: &Context<Self>) -> Html {
|
|
html! {
|
|
<>
|
|
<components::logged_in_handler::LoggedInHandler logged_in={ctx.props().logged_in} />
|
|
|
|
<Title value="Mentorenwahl" />
|
|
<div id="wrapper">
|
|
<section class={classes!("hero", "is-success", "is-fullheight")}>
|
|
<div class={classes!("hero-head")}>
|
|
<components::navbar::Navbar
|
|
token={ctx.props().token.to_owned()}
|
|
logged_in={ctx.props().logged_in}
|
|
default_theme=false
|
|
/>
|
|
</div>
|
|
|
|
<div class={classes!("hero-body")}>
|
|
<div class={classes!("container", "has-text-centered")}>
|
|
<p class={classes!("title")}>
|
|
{ "Mentorenwahl" }
|
|
</p>
|
|
<p class={classes!("subtitle")}>
|
|
{ "Programmierprojekt des Otto-Hahn-Gymnasiums Furtwangen vermarktet als GFS" }
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class={classes!("hero-foot")}>
|
|
</div>
|
|
</section>
|
|
|
|
<main>
|
|
</main>
|
|
</div>
|
|
<components::footer::Footer />
|
|
</>
|
|
}
|
|
}
|
|
}
|