Move github link to the footer.

This commit is contained in:
Jeremy Wall 2022-12-22 14:43:30 -05:00
parent 7343c77a04
commit dec0fc8d6d
3 changed files with 30 additions and 1 deletions

View File

@ -0,0 +1,26 @@
// Copyright 2022 Jeremy Wall
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
use sycamore::prelude::*;
#[component]
pub fn Footer<G: Html>(cx: Scope) -> View<G> {
view! {cx,
nav(class="no-print") {
ul {
li { a(href="https://github.com/zaphar/kitchen") { "On Github" } }
}
}
}
}

View File

@ -13,6 +13,7 @@
// limitations under the License. // limitations under the License.
pub mod add_recipe; pub mod add_recipe;
pub mod categories; pub mod categories;
pub mod footer;
pub mod header; pub mod header;
pub mod recipe; pub mod recipe;
pub mod recipe_list; pub mod recipe_list;
@ -23,6 +24,7 @@ pub mod tabs;
pub use add_recipe::*; pub use add_recipe::*;
pub use categories::*; pub use categories::*;
pub use footer::*;
pub use header::*; pub use header::*;
pub use recipe::*; pub use recipe::*;
pub use recipe_list::*; pub use recipe_list::*;

View File

@ -14,7 +14,7 @@
use sycamore::{futures::spawn_local_scoped, prelude::*}; use sycamore::{futures::spawn_local_scoped, prelude::*};
use tracing::{error, info, instrument}; use tracing::{error, info, instrument};
use crate::components::Header; use crate::components::{Footer, Header};
use crate::{api, routing::Handler as RouteHandler}; use crate::{api, routing::Handler as RouteHandler};
#[instrument] #[instrument]
@ -39,6 +39,7 @@ pub fn UI<G: Html>(cx: Scope) -> View<G> {
div(class="app") { div(class="app") {
Header { } Header { }
RouteHandler() RouteHandler()
Footer { }
} }
}); });
} }