Skip to content

Commit 15d309a

Browse files
committed
feat(app): add a footer
1 parent f069c85 commit 15d309a

File tree

3 files changed

+38
-4
lines changed

3 files changed

+38
-4
lines changed

crates/site-app/src/components.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
mod copy_button;
22
mod create_button;
33
mod data_table;
4+
mod footer;
45
pub mod form_layout;
56
mod icons;
67
mod input_field;
@@ -11,7 +12,7 @@ mod refetch_while_focused;
1112
mod store_path;
1213

1314
pub use self::{
14-
copy_button::*, create_button::*, data_table::*, icons::*, input_field::*,
15-
item_links::*, navbar::*, popover::*, refetch_while_focused::*,
16-
store_path::*,
15+
copy_button::*, create_button::*, data_table::*, footer::*, icons::*,
16+
input_field::*, item_links::*, navbar::*, popover::*,
17+
refetch_while_focused::*, store_path::*,
1718
};
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
use leptos::prelude::*;
2+
3+
const LICENSE_HREF: &str =
4+
"https://github.com/rambit-systems/rambit/blob/main/LICENSE.md";
5+
const PORRIDGE_CO_HREF: &str = "https://github.com/porridge-co";
6+
7+
#[component]
8+
pub fn Footer() -> impl IntoView {
9+
const CLASS: &str = "elevation-flat flex flex-row px-4 gap-4 items-center \
10+
h-14 rounded-b-none! mt-8 text-sm";
11+
const LINK_CLASS: &str = "text-link";
12+
13+
view! {
14+
<div class=CLASS>
15+
<a
16+
href=LICENSE_HREF class=LINK_CLASS
17+
target="_blank" rel="noopener noreferrer"
18+
>"License"</a>
19+
20+
<div class="flex-1" />
21+
22+
<p>
23+
"Made with zeal by "
24+
<a
25+
href=PORRIDGE_CO_HREF class=LINK_CLASS
26+
target="_blank" rel="noopener noreferrer"
27+
>"Porridge Co."</a>
28+
</p>
29+
</div>
30+
}
31+
}

crates/site-app/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,11 @@ fn LeptosFetchDevtools() -> impl IntoView {
107107
fn PageContainer(children: Children) -> impl IntoView {
108108
view! {
109109
<main class="elevation-suppressed text-base-11 font-medium text-base/[1.2]">
110-
<div class="page-container flex flex-col min-h-svh pb-8">
110+
<div class="page-container flex flex-col min-h-svh">
111111
<self::components::Navbar />
112112
{ children() }
113+
<div class="flex-1" />
114+
<self::components::Footer />
113115
</div>
114116
</main>
115117
}

0 commit comments

Comments
 (0)