From af1a0454643a49ccb7d97a8d270ef32549dd6ada Mon Sep 17 00:00:00 2001 From: antifallobst Date: Thu, 7 Dec 2023 17:01:04 +0100 Subject: [PATCH] feat: added an impress --- src/content/impress.rs | 16 ++++++++++++++++ src/content/mod.rs | 1 + src/main.rs | 5 ++++- src/topbar/guest/mod.rs | 1 + 4 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 src/content/impress.rs diff --git a/src/content/impress.rs b/src/content/impress.rs new file mode 100644 index 0000000..3f02785 --- /dev/null +++ b/src/content/impress.rs @@ -0,0 +1,16 @@ +use yew::prelude::*; + +#[function_component] +pub fn Impress() -> Html { + html! { +
+

{"Impress / Impressum"}

+
+

{ + "This website is hosted in germany. By the german law websites that are for private use don't require an impress. \ + This is neither a commercial site nor are our non-profit services available to the public at the moment." + }

+
+
+ } +} diff --git a/src/content/mod.rs b/src/content/mod.rs index 864faf8..e087ef0 100644 --- a/src/content/mod.rs +++ b/src/content/mod.rs @@ -1,4 +1,5 @@ pub mod about; pub mod error; pub mod home; +pub mod impress; pub mod profile; diff --git a/src/main.rs b/src/main.rs index 89ba8a3..dd6f6c8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,7 +3,7 @@ mod content; mod topbar; use backend::Session; -use content::{about::About, error, home::Home, profile::Profile}; +use content::{about::About, error, home::Home, impress::Impress, profile::Profile}; use gloo::dialogs::alert; use gloo_storage::{SessionStorage, Storage}; use std::ops::Deref; @@ -21,6 +21,8 @@ enum Route { Community, #[at("/about")] About, + #[at("/impress")] + Impress, #[at("/profile/:username")] Profile { username: String }, #[not_found] @@ -34,6 +36,7 @@ fn switch(routes: Route) -> Html { Route::Services => html! {

{ "Services" }

}, Route::Community => html! {

{ "Community" }

}, Route::About => html! {}, + Route::Impress => html! { }, Route::Profile { username } => html! { }, Route::NotFound => html! { }, } diff --git a/src/topbar/guest/mod.rs b/src/topbar/guest/mod.rs index e6c7bc0..433be64 100644 --- a/src/topbar/guest/mod.rs +++ b/src/topbar/guest/mod.rs @@ -77,6 +77,7 @@ pub fn TopBar() -> Html {
  • +