From 898a65f92ad8687ecb52cc6373474ccfb2a53f8e Mon Sep 17 00:00:00 2001 From: Samantha Piatt Date: Wed, 3 Apr 2024 14:47:57 -0400 Subject: [PATCH] Add footer with sitemap. --- src/app.postcss | 38 ++++++++++++++++++++++++++++++- src/lib/components/Content.svelte | 2 +- src/lib/components/Footer.svelte | 25 ++++++++++++++++++++ src/lib/configuration.ts | 37 ++++++++++++++++++++++++++++++ src/routes/+layout.svelte | 5 +++- tests/routes/help/test.ts | 3 ++- 6 files changed, 106 insertions(+), 4 deletions(-) create mode 100644 src/lib/components/Footer.svelte diff --git a/src/app.postcss b/src/app.postcss index 4d3236e2..9695975c 100644 --- a/src/app.postcss +++ b/src/app.postcss @@ -8,7 +8,8 @@ body { @apply h-full overflow-hidden; } -body { +#shell-header, +section.main-content { padding: 0 1em; } @@ -125,6 +126,41 @@ header .app-bar { border-bottom: solid rgb(var(--color-surface-400)) 2px; } +#page-footer { + margin: 3em 0 0 0; + border-style: solid; + border-top-width: 2px; + @apply bg-primary-100-800-token border-surface-400-500-token; +} +#sitemap-footer { + padding: 0.5em 0 0; + margin: 0 auto; + text-align: center; + padding: 1em 15%; +} +#sitemap-footer ul { + text-align: left; + margin: 0 2em; +} +#main-footer { + padding: 1em; + @apply bg-primary-300-600-token; +} +#main-footer ul { + margin: 0 auto; + text-align: center; +} +#main-footer ul li { + display: inline; + padding: 0 1em; + border-style: solid; + border-right-width: 2px; + @apply border-primary-400-500-token; +} +#main-footer ul li:last-child { + border-right: none; +} + .key-focus { border: 2px solid rgb(var(--color-surface-500)) !important; } diff --git a/src/lib/components/Content.svelte b/src/lib/components/Content.svelte index 1d936583..beb3c4dd 100644 --- a/src/lib/components/Content.svelte +++ b/src/lib/components/Content.svelte @@ -4,7 +4,7 @@ export let full = false; -
+
{#if title}

{title}

{/if} {#if subtitle}

{subtitle}

{/if} diff --git a/src/lib/components/Footer.svelte b/src/lib/components/Footer.svelte new file mode 100644 index 00000000..32138212 --- /dev/null +++ b/src/lib/components/Footer.svelte @@ -0,0 +1,25 @@ + + +{#if branding.footer.addSitemap && branding.sitemap.length > 0} + +{/if} + diff --git a/src/lib/configuration.ts b/src/lib/configuration.ts index 1a445e23..2978efd8 100644 --- a/src/lib/configuration.ts +++ b/src/lib/configuration.ts @@ -1,5 +1,42 @@ export const branding = { applicationName: 'PIC‑SURE', + sitemap: [ + { + category: 'Explore PIC-Sure', + links: [ + { title: 'User Guide', url: 'https://pic-sure.gitbook.io/pic-sure', newTab: true }, + { title: 'Data Dashboard', url: '#' }, + ], + }, + { + category: 'About', + links: [ + { title: 'Some link', url: '#' }, + { title: 'Wow, another link', url: '#' }, + { title: "You're probably crazy but, it's another link", url: '#' }, + { title: "Yep, you're crazy", url: '#' }, + ], + }, + ], + footer: { + addSitemap: true, + links: [ + { + title: 'Terms of Service', + url: '#', + }, + { + title: 'Privacy Policy', + url: 'https://pic-sure.gitbook.io/pic-sure/privacy-policy', + newTab: true, + }, + { + title: 'Contact Us', + url: 'https://hms-dbmi.atlassian.net/servicedesk/customer/portal/5', + newTab: true, + }, + ], + }, apiPage: { cards: [ { diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 920c60e8..d81746c5 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -5,6 +5,7 @@ import '@fortawesome/fontawesome-free/css/all.min.css'; import '../app.postcss'; import Navigation from '$lib/components/Navigation.svelte'; + import Footer from '$lib/components/Footer.svelte'; storePopup.set({ computePosition, autoUpdate, offset, shift, flip, arrow }); @@ -24,5 +25,7 @@ - + +