2023-07-02 04:52:35 -04:00
|
|
|
use crate::error_template::{AppError, ErrorTemplate};
|
2024-01-05 05:19:12 -05:00
|
|
|
|
2024-01-05 08:30:48 -05:00
|
|
|
//use crate::routes::{blog::*, home::*, projects::*};
|
2023-07-02 04:52:35 -04:00
|
|
|
use leptos::*;
|
|
|
|
use leptos_meta::*;
|
|
|
|
use leptos_router::*;
|
2024-01-05 08:30:48 -05:00
|
|
|
|
|
|
|
pub mod error_template;
|
|
|
|
pub mod components;
|
|
|
|
pub mod routes;
|
|
|
|
|
|
|
|
use crate::routes::{home::*, blog::*, projects::*};
|
2023-07-02 04:52:35 -04:00
|
|
|
|
|
|
|
#[component]
|
2024-01-05 08:30:48 -05:00
|
|
|
pub fn App() -> impl IntoView {
|
2023-07-02 04:52:35 -04:00
|
|
|
// Provides context that manages stylesheets, titles, meta tags, etc.
|
2024-01-05 08:30:48 -05:00
|
|
|
provide_meta_context();
|
2023-07-02 04:52:35 -04:00
|
|
|
|
|
|
|
view! {
|
|
|
|
<Stylesheet id="leptos" href="/pkg/doordesk.css"/>
|
|
|
|
|
|
|
|
// sets the document title
|
2024-01-05 05:19:12 -05:00
|
|
|
<Title text="doordesk"/>
|
2023-07-02 04:52:35 -04:00
|
|
|
|
|
|
|
// content for this welcome page
|
2024-01-05 08:30:48 -05:00
|
|
|
<Router fallback=|| {
|
2023-07-02 04:52:35 -04:00
|
|
|
let mut outside_errors = Errors::default();
|
|
|
|
outside_errors.insert_with_default_key(AppError::NotFound);
|
2024-01-05 08:30:48 -05:00
|
|
|
view! { <ErrorTemplate outside_errors/> }.into_view()
|
2023-07-02 04:52:35 -04:00
|
|
|
}>
|
2023-07-10 20:59:52 -04:00
|
|
|
<nav class="bg-gradient-to-b from-zinc-800 to-zinc-900 shadow-lg sticky top-0">
|
|
|
|
<ul class="container flex items-center p-3">
|
|
|
|
<li class="mx-1.5 sm:mx-6">
|
|
|
|
"DoorDesk"
|
|
|
|
</li>
|
|
|
|
<li class="mx-1.5 sm:mx-6">
|
|
|
|
<A href="" exact=true>"Home"</A>
|
|
|
|
</li>
|
|
|
|
<li class="mx-1.5 sm:mx-6">
|
|
|
|
<A href="/blog">"Blog"</A>
|
|
|
|
</li>
|
|
|
|
<li class="mx-1.5 sm:mx-6">
|
|
|
|
<A href="/projects">"Projects"</A>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
2023-07-02 04:52:35 -04:00
|
|
|
<main>
|
|
|
|
<Routes>
|
2024-01-05 08:30:48 -05:00
|
|
|
<Route path="" view=Home/>
|
|
|
|
<Route path="blog" view=Blog/>
|
|
|
|
<Route path="projects" view=Projects/>
|
2023-07-02 04:52:35 -04:00
|
|
|
</Routes>
|
|
|
|
</main>
|
2024-01-05 05:19:12 -05:00
|
|
|
<p class="text-center hover:rotate-180 duration-200 w-8 m-auto">
|
|
|
|
<a href="https://open.spotify.com/playlist/3JRNw9gpt1w5ptsw8uDeYc?si=8f7e4191113f41f9">":)"</a>
|
|
|
|
</p>
|
|
|
|
<br />
|
2023-07-02 04:52:35 -04:00
|
|
|
</Router>
|
|
|
|
}
|
|
|
|
}
|