Skip to content

Commit

Permalink
chore: fix basic accessibility issues to make Lighthouse happy
Browse files Browse the repository at this point in the history
  • Loading branch information
saikatdas0790 committed Nov 13, 2023
1 parent bb67456 commit e5ab226
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
5 changes: 3 additions & 2 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ pub fn App() -> impl IntoView {
provide_meta_context();

view! {
<Html lang="en"/>
<Stylesheet id="leptos" href="/pkg/hot-or-not-web-leptos-ssr.css"/>

// sets the document title
<Title text="Welcome to Leptos"/>
<Title text="Welcome to Hot or Not"/>

// content for this welcome page
<Router fallback=|| {
Expand All @@ -40,7 +41,7 @@ fn HomePage() -> impl IntoView {
let on_click = move |_| set_count.update(|count| *count += 1);

view! {
<h1>"Welcome to Leptos!"</h1>
<h1>"Welcome to Hot or Not!"</h1>
<button on:click=on_click>"Click Me: " {count}</button>
<SomeComponent/>
}
Expand Down
4 changes: 2 additions & 2 deletions src/component/some_component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use stylers::style;
pub fn SomeComponent() -> impl IntoView {
let styles = style! {
h2 {
color: var(--red-6);
background-color: var(--green-2);
color: var(--red-8);
background-color: var(--green-1);
padding: var(--size-7);
}
};
Expand Down
4 changes: 2 additions & 2 deletions style/main.css
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
:root{--red-6: #fa5252;--green-2: #b2f2bb;--size-7: 2rem;}
h2.l-189504{color: var(--red-6);background-color: var(--green-2);padding: var(--size-7);}
:root{--red-8: #e03131;--green-1: #d3f9d8;--size-7: 2rem;}
h2.l-189504{color: var(--red-8);background-color: var(--green-1);padding: var(--size-7);}
2 changes: 1 addition & 1 deletion style/stylers.css
Original file line number Diff line number Diff line change
@@ -1 +1 @@
h2.l-189504{color: var(--red-6);background-color: var(--green-2);padding: var(--size-7);}
h2.l-189504{color: var(--red-8);background-color: var(--green-1);padding: var(--size-7);}

0 comments on commit e5ab226

Please sign in to comment.