Whitepaper is flying, tailwind added, routing setup done, components for whitepaper. go to /why-micro-datacenters

This commit is contained in:
jeangab
2023-03-29 11:21:28 -04:00
parent bdd9da9b36
commit 28910b9039
14 changed files with 2920 additions and 6 deletions

View File

@@ -1,3 +1,5 @@
use crate::routes::whymdc::page::WhyMicroDatacentersProps;
use crate::routes::whymdc::page::WhyMicroDatacenters;
use leptos::*;
use leptos_meta::*;
use leptos_router::*;
@@ -22,6 +24,7 @@ pub fn App(cx: Scope) -> impl IntoView {
<main>
<Routes>
<Route path="" view=|cx| view! { cx, <HomePage/> }/>
<Route path="/why-micro-datacenters" view=|cx| view! { cx, <WhyMicroDatacenters/> }/>
</Routes>
</main>
</Router>
@@ -36,7 +39,7 @@ fn HomePage(cx: Scope) -> impl IntoView {
let on_click = move |_| set_count.update(|count| *count += 1);
view! { cx,
<h1>"Welcome to Leptos!"</h1>
<h1 class="text-9xl">"Welcome to Nationtech.io!"</h1>
<button on:click=on_click>"Click Me: " {count}</button>
}
}

View File

@@ -1,4 +1,5 @@
pub mod app;
mod routes;
use cfg_if::cfg_if;
cfg_if! {

1
src/routes/mod.rs Normal file
View File

@@ -0,0 +1 @@
pub mod whymdc;

View File

@@ -0,0 +1,8 @@
use leptos::*;
#[component]
pub fn Subtitle(cx: Scope, children: Children) -> impl IntoView {
view! { cx,
<h3 class="text-3xl font-bold text-white">{children(cx)}</h3>
}
}

2
src/routes/whymdc/mod.rs Normal file
View File

@@ -0,0 +1,2 @@
pub mod page;
pub mod components;

14
src/routes/whymdc/page.rs Normal file
View File

@@ -0,0 +1,14 @@
use super::components::*;
use leptos::*;
#[component]
pub fn WhyMicroDatacenters(cx: Scope) -> impl IntoView {
view! { cx,
<div class="min-h-[500px] p-8 bg-cover bg-[url('/img/edge-cloud-1024x576.png')]">
<h1 class="text-orange-400 text-7xl font-extrabold mb-6">"Micro centres de données"</h1>
<Subtitle>
<span class="max-w-lg inline-block pb-2">"Pourquoi les centres de données grande échelle sont-ils voués à disparaître?"</span>
</Subtitle>
</div>
}
}

16
src/style/main.css Normal file
View File

@@ -0,0 +1,16 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
/* TODO look into font file type, woff2 seems better */
@font-face {
font-family: "Nunito";
src: url("/fonts/Nunito-Italic-VariableFont_wght.ttf");
font-style: "italic";
}
@font-face {
font-family: "Nunito";
src: url("/fonts/Nunito-VariableFont_wght.ttf");
}