Skip to content

Commit

Permalink
Merge pull request #55 from picture-pro/48-fix-meta
Browse files Browse the repository at this point in the history
48 fix meta
  • Loading branch information
johnbchron authored Feb 28, 2024
2 parents 41c0969 + 6d92ccd commit 056e29f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 9 additions & 4 deletions crates/site-app/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,29 @@ use crate::{

#[component]
pub fn App() -> impl IntoView {
// dummy change
// Provides context that manages stylesheets, titles, meta tags, etc.
provide_meta_context();

view! {
<Style>{include_str!("../style/fonts.css")}</Style>
<Stylesheet id="leptos" href="/pkg/site.css"/>

// sets the document title
<Title text="Welcome to Leptos"/>
<Html lang="en" attr:data-theme="wireframe" />

// set the metadata
<Title text="PicturePro"/>
<Meta charset="utf-8"/>
<Meta name="viewport" content="width=device-width, initial-scale=1"/>
<Meta name="description" content="Lorem ipsum dolor sit amet, consectetur adipiscing elit."/>
<Meta name="keywords" content="photo, image, share, sell"/>

// content for this welcome page
<Router fallback=|| {
let mut outside_errors = Errors::default();
outside_errors.insert_with_default_key(AppError::NotFound);
view! { <ErrorTemplate outside_errors/> }.into_view()
}>
<div data-theme="wireframe" class="w-full min-h-screen flex flex-col items-stretch justify-stretch bg-base-200">
<div class="w-full min-h-screen flex flex-col items-stretch justify-stretch bg-base-200">
<Navbar/>
<Routes>
<Route path="" view=pages::home_page::HomePage/>
Expand Down
2 changes: 1 addition & 1 deletion crates/site-app/src/pages/qr_code.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ pub fn QrCode(
{ qr_code.map(|r| {
match r {
Ok(qr_code) => view! {
<img src={format!("data:image/png;base64,{}", qr_code)} class=class />
<img src={format!("data:image/png;base64,{}", qr_code)} alt="A QR code" class=class />
}.into_view(),
Err(e) => view! {
<div>
Expand Down

0 comments on commit 056e29f

Please sign in to comment.