Add themes, update layout, fix pages
Some checks failed
Build Crate / build (push) Failing after 1m53s
Some checks failed
Build Crate / build (push) Failing after 1m53s
This commit is contained in:
27
src/templates/table_tennis/index.rs
Normal file
27
src/templates/table_tennis/index.rs
Normal file
@@ -0,0 +1,27 @@
|
||||
use crate::{components::layout::Layout, state_enums::ContentState};
|
||||
use perseus::prelude::*;
|
||||
use sycamore::prelude::*;
|
||||
|
||||
fn index_page<G: Html>(cx: Scope) -> View<G> {
|
||||
view! { cx,
|
||||
Layout(content_state = ContentState::TableTennis) {
|
||||
// Anything we put in here will be rendered inside the `<main>` block of the layout
|
||||
p { "Hello World!" }
|
||||
br {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[engine_only_fn]
|
||||
fn head(cx: Scope) -> View<SsrNode> {
|
||||
view! { cx,
|
||||
title { "Index Page" }
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_template<G: Html>() -> Template<G> {
|
||||
Template::build("table_tennis")
|
||||
.view(index_page)
|
||||
.head(head)
|
||||
.build()
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
pub mod index;
|
||||
|
||||
Reference in New Issue
Block a user