Removed unused code

This commit is contained in:
xeovalyte 2024-02-12 10:22:59 +01:00
parent 860e756e79
commit ce2cac6103
No known key found for this signature in database
7 changed files with 44 additions and 83 deletions

View File

@ -3,7 +3,7 @@
<head> <head>
<!-- Add a plain CSS file: see https://trunkrs.dev/assets/#css --> <!-- Add a plain CSS file: see https://trunkrs.dev/assets/#css -->
<!-- If using Tailwind with Leptos CSR, see https://trunkrs.dev/assets/#tailwind instead--> <!-- If using Tailwind with Leptos CSR, see https://trunkrs.dev/assets/#tailwind instead-->
<link data-trunk rel="css" rel="stylesheet" href="public/styles.css" /> <link data-trunk rel="sass" href="public/styles.scss" />
<!-- Include favicon in dist output: see https://trunkrs.dev/assets/#icon --> <!-- Include favicon in dist output: see https://trunkrs.dev/assets/#icon -->
<link data-trunk rel="icon" href="public/favicon.ico" /> <link data-trunk rel="icon" href="public/favicon.ico" />

View File

@ -1,52 +0,0 @@
/* --------------------- Open Props --------------------------- */
/* the props */
@import "https://unpkg.com/open-props";
/* optional imports that use the props */
@import "https://unpkg.com/open-props/normalize.min.css";
@import "https://unpkg.com/open-props/buttons.min.css";
/* ------------------------------------------------------------ */
body {
font-family: sans-serif;
text-align: center;
}
.container {
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
}
.buttons {
display: flex;
justify-content: space-evenly;
}
h1,
h2,
h3,
h4,
h5,
h6 {
text-align: center;
margin: 0 auto;
padding: 2rem;
}
p,
button {
margin: var(--size-6);
}
body > picture,
button {
display: block;
margin-left: auto;
margin-right: auto;
text-align: center;
margin: 2rem;
}

View File

@ -0,0 +1,39 @@
$primary-color: #eb6330;
$primary-color-light: hsl(16.36, 82.38%, 55.49%, 0.8);
$secondary-color: #465651;
$accent-color: #89969f;
$primary-bg-color: #0d0b0b;
$secondary-bg-color: #151719;
$secondary-bg-color-light: hsl(204, 11%, 12%, 1);
$secondary-bg-color-lighter: hsl(204, 11%, 15%, 1);
$accent-bg-color: #181a19;
$text-color: #f3efef;
html,
body {
height: 100vh;
margin: 0;
font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
}
body {
background-color: $primary-bg-color;
color: $text-color;
align-items: center;
}
main {
height: 100%;
padding: 20px;
display: flex;
flex-direction: column;
margin-left: auto;
margin-right: auto;
max-width: 1000px;
}
a {
text-decoration: none;
font-weight: bold;
color: $text-color;
}

View File

@ -1,16 +0,0 @@
use leptos::*;
/// A parameterized incrementing button
#[component]
pub fn Button(#[prop(default = 1)] increment: i32) -> impl IntoView {
let (count, set_count) = create_signal(0);
view! {
<button
on:click= move |_| {
set_count.update(|n| *n += increment)
}
>
"Click me: " {count}
</button>
}
}

View File

@ -1 +1,2 @@
pub mod counter_btn;

View File

@ -26,7 +26,7 @@ pub fn App() -> impl IntoView {
/> />
// sets the document title // sets the document title
<Title text="Welcome to Leptos CSR"/> <Title text="WRB Timings"/>
// injects metadata in the <head> of the page // injects metadata in the <head> of the page
<Meta charset="UTF-8" /> <Meta charset="UTF-8" />

View File

@ -1,4 +1,3 @@
use crate::components::counter_btn::Button;
use leptos::*; use leptos::*;
/// Default Home Page /// Default Home Page
@ -7,17 +6,7 @@ pub fn Home() -> impl IntoView {
view! { view! {
<div class="container"> <div class="container">
<picture> <h1>"Welcome to WRB Timings"</h1>
<source srcset="https://raw.githubusercontent.com/leptos-rs/leptos/main/docs/logos/Leptos_logo_pref_dark_RGB.svg" media="(prefers-color-scheme: dark)" />
<img src="https://raw.githubusercontent.com/leptos-rs/leptos/main/docs/logos/Leptos_logo_RGB.svg" alt="Leptos Logo" height="200" width="400"/>
</picture>
<h1>"Welcome to Leptos"</h1>
<div class="buttons">
<Button />
<Button increment=5 />
</div>
</div> </div>
} }