From 6c4b3c2622e945eb1672a6b7fab2df4572bebe61 Mon Sep 17 00:00:00 2001 From: Kyle Maas Date: Thu, 20 Oct 2022 21:51:57 +0000 Subject: [PATCH 1/3] Wrap logo in h1 tag for search engines --- .../static/js/components/page-layout/PageHeader/Logo.jsx | 8 +++++--- .../js/components/page-layout/PageHeader/PageHeader.scss | 4 ++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/frontend/src/static/js/components/page-layout/PageHeader/Logo.jsx b/frontend/src/static/js/components/page-layout/PageHeader/Logo.jsx index 074d43f55..768fb9338 100644 --- a/frontend/src/static/js/components/page-layout/PageHeader/Logo.jsx +++ b/frontend/src/static/js/components/page-layout/PageHeader/Logo.jsx @@ -4,9 +4,11 @@ export const Logo = ({ src, loading = 'lazy', title, alt, href = '#' }) => { return src ? (
- - {alt - +

+ + {alt + +

) : null; diff --git a/frontend/src/static/js/components/page-layout/PageHeader/PageHeader.scss b/frontend/src/static/js/components/page-layout/PageHeader/PageHeader.scss index 7d00ee104..d5431fb68 100755 --- a/frontend/src/static/js/components/page-layout/PageHeader/PageHeader.scss +++ b/frontend/src/static/js/components/page-layout/PageHeader/PageHeader.scss @@ -253,6 +253,10 @@ a.user-menu-top-link { font-size: 1em; } + h1 { + margin: 0; + } + a { color: inherit; display: block; From 9a7dc4caff17f840dfbe8f962799b7701e7f5c33 Mon Sep 17 00:00:00 2001 From: Kyle Maas Date: Thu, 20 Oct 2022 22:07:55 +0000 Subject: [PATCH 2/3] Add static h1 as well --- frontend/src/static/js/utils/renderer.js | 4 ++++ templates/components/header.html | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/static/js/utils/renderer.js b/frontend/src/static/js/utils/renderer.js index 7e663b6a9..289da05ff 100755 --- a/frontend/src/static/js/utils/renderer.js +++ b/frontend/src/static/js/utils/renderer.js @@ -19,6 +19,10 @@ export function renderPage(idSelector, PageComponent) { const appSidebar = document.getElementById('app-sidebar'); const appContent = idSelector ? document.getElementById(idSelector) : undefined; + while (appHeader.firstChild) { + appHeader.removeChild(appHeader.firstChild); + } + if (appContent && PageComponent) { ReactDOM.render( diff --git a/templates/components/header.html b/templates/components/header.html index 1a1eb052c..68ae944e7 100644 --- a/templates/components/header.html +++ b/templates/components/header.html @@ -1 +1 @@ -
\ No newline at end of file +

{{ PORTAL_NAME }}

From a7e3962ac07dc43d2e9f5dbf102634322a3cdf55 Mon Sep 17 00:00:00 2001 From: Kyle Maas Date: Mon, 14 Nov 2022 00:27:24 +0000 Subject: [PATCH 3/3] Add static indexable links for the sidebar --- frontend/src/static/js/utils/renderer.js | 3 +++ templates/components/sidebar.html | 27 +++++++++++++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/frontend/src/static/js/utils/renderer.js b/frontend/src/static/js/utils/renderer.js index 289da05ff..e6d25dda7 100755 --- a/frontend/src/static/js/utils/renderer.js +++ b/frontend/src/static/js/utils/renderer.js @@ -22,6 +22,9 @@ export function renderPage(idSelector, PageComponent) { while (appHeader.firstChild) { appHeader.removeChild(appHeader.firstChild); } + while (appSidebar.firstChild) { + appSidebar.removeChild(appSidebar.firstChild); + } if (appContent && PageComponent) { ReactDOM.render( diff --git a/templates/components/sidebar.html b/templates/components/sidebar.html index 947de45f2..8895f19ba 100644 --- a/templates/components/sidebar.html +++ b/templates/components/sidebar.html @@ -1 +1,26 @@ -
\ No newline at end of file +
+ + + +