content: added a small about page

This commit is contained in:
antifallobst 2023-10-03 01:10:49 +02:00
parent de0e2b0976
commit b730d0d595
Signed by: antifallobst
GPG Key ID: 2B4F402172791BAF
4 changed files with 24 additions and 9 deletions

18
src/content/about.rs Normal file
View File

@ -0,0 +1,18 @@
use yew::prelude::*;
#[function_component]
pub fn About() -> Html {
html! {
<div class="content">
<p class="content-box-heading">{"About Us"}</p>
<div class="content-box-data">
<p>{
"Nerdcult is a platform for Open Source development. \
We focus on forging a friendly community of developers. \
Nerdcult is completely free to use, we don't collect personal data and are non-profit. \
All of our backend and frontend code is open source. "
}</p>
</div>
</div>
}
}

View File

@ -1,2 +1,3 @@
pub mod about;
pub mod home; pub mod home;
pub mod error; pub mod error;

View File

@ -4,7 +4,7 @@ mod topbar;
use anyhow::Result; use anyhow::Result;
use backend::Session; use backend::Session;
use content::{error, home::Home}; use content::{about::About, error, home::Home};
use std::ops::Deref; use std::ops::Deref;
use topbar::TopBar; use topbar::TopBar;
use yew::prelude::*; use yew::prelude::*;
@ -30,7 +30,7 @@ fn switch(routes: Route) -> Html {
Route::Home => html! { <Home/> }, Route::Home => html! { <Home/> },
Route::Services => html! {<h1>{ "Services" }</h1>}, Route::Services => html! {<h1>{ "Services" }</h1>},
Route::Community => html! {<h1>{ "Community" }</h1>}, Route::Community => html! {<h1>{ "Community" }</h1>},
Route::About => html! {<h1>{ "About" }</h1>}, Route::About => html! {<About/>},
Route::NotFound => html! { <error::NotFound/> }, Route::NotFound => html! { <error::NotFound/> },
} }
} }

View File

@ -37,22 +37,18 @@ main {
position: relative; position: relative;
display: inline-block; display: inline-block;
padding: 16px; padding: 16px;
text-align: center;
} }
.content-box-heading { .content-box-heading {
font-family: Roboto; font: bold 24px Roboto;
font-weight: bold;
font-size: 24px;
color: #FFFFFF; color: #FFFFFF;
text-align: center;
width: 100%; width: 100%;
} }
.content-box-data { .content-box-data {
font-family: Roboto; font: normal 18px Roboto;
font-size: 18px;
color: #FFFFFF; color: #FFFFFF;
text-align: center;
width: 100%; width: 100%;
} }