diff --git a/ui/js/components/nav.js b/ui/js/components/nav.js
index 513693a9..9d9b1ffe 100644
--- a/ui/js/components/nav.js
+++ b/ui/js/components/nav.js
@@ -1,10 +1,10 @@
const nav = document.querySelector('.js-nav')
-const storageKey = 'pangolinNavScrollPosition'
+const STORAGE_KEY = 'pangolinNavScrollPosition'
-window.addEventListener('DOMContentLoaded', () => {
- nav.scrollTop = localStorage.getItem(storageKey)
+window.addEventListener('load', () => {
+ nav.scrollTop = localStorage.getItem(STORAGE_KEY)
})
window.addEventListener('beforeunload', () => {
- localStorage.setItem(storageKey, nav.scrollTop)
+ localStorage.setItem(STORAGE_KEY, nav.scrollTop)
})
diff --git a/ui/templates/base.njk b/ui/templates/base.njk
index 92438c3e..887fe76e 100644
--- a/ui/templates/base.njk
+++ b/ui/templates/base.njk
@@ -11,13 +11,12 @@
{% endif %}
-
-
{% if websocket.port %}
{% endif %}
+
{% if project.branding -%}