initial os release. I really expect SO much bugs, guys. good luck =)
This commit is contained in:
commit
a6eac5275c
3 changed files with 7965 additions and 0 deletions
33
examples/leptos-axum/src/routes/home.rs
Normal file
33
examples/leptos-axum/src/routes/home.rs
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
use leptos::prelude::*;
|
||||
use sabry::styly;
|
||||
|
||||
styly!(s "src/routes/home.scss");
|
||||
|
||||
styly!(s2 {
|
||||
@use "theme";
|
||||
.card {
|
||||
@include theme.surface(secondary);
|
||||
}
|
||||
.pocwarn {
|
||||
@include theme.surface(secondary);
|
||||
text-transform: uppercase;
|
||||
}
|
||||
});
|
||||
|
||||
/// Renders the home page of your application.
|
||||
#[component]
|
||||
pub fn Route() -> impl IntoView {
|
||||
// Creates a reactive value to update the button
|
||||
let count = RwSignal::new(0);
|
||||
let on_click = move |_| *count.write() += 1;
|
||||
|
||||
view! {
|
||||
<section class=s::table>
|
||||
<h1>"Welcome to Leptos!"</h1>
|
||||
<button class=s::btn on:click=on_click>"Ima CRAZY button, clicked: " {count} " times!"</button>
|
||||
<span class=s2::card>"DISCLAIMER:"</span>
|
||||
<p class=s2::pocwarn>"This isn't a design example! Its just proof of sabry's capabilities."</p>
|
||||
<p class=s2::pocwarn>"Plz dont make websites/apps which look like this page :D"</p>
|
||||
</section>
|
||||
}
|
||||
}
|
||||
12
examples/leptos-axum/src/routes/home.scss
Normal file
12
examples/leptos-axum/src/routes/home.scss
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
@use "tokens";
|
||||
@use "utils";
|
||||
@use "theme";
|
||||
|
||||
.btn {
|
||||
@include tokens.clickable(accent);
|
||||
}
|
||||
|
||||
.table {
|
||||
@include utils.flex(column, center, center);
|
||||
@include theme.surface(primary);
|
||||
}
|
||||
1
examples/leptos-axum/src/routes/mod.rs
Normal file
1
examples/leptos-axum/src/routes/mod.rs
Normal file
|
|
@ -0,0 +1 @@
|
|||
pub mod home;
|
||||
Loading…
Reference in a new issue