-
+
+
+
+
+
+
+
-
{{ end }}
diff --git a/pkg/webui/index.go b/pkg/webui/index.go
index da28318..d88a7fa 100644
--- a/pkg/webui/index.go
+++ b/pkg/webui/index.go
@@ -10,7 +10,6 @@ import (
type Page struct {
IsAdmin bool
LightMode bool
- Precedent string
Section string
Title string
}
diff --git a/pkg/webui/settings.go b/pkg/webui/settings.go
index 5496343..8b8eccc 100644
--- a/pkg/webui/settings.go
+++ b/pkg/webui/settings.go
@@ -41,12 +41,10 @@ func handleSettingsPOST(db *database.DB) http.Handler {
errorResponse(w, r, http.StatusInternalServerError, err)
return
}
+ page := makePage(r, &Page{Title: "Settings", Section: "settings"})
+ page.LightMode = settings.LightMode
render(w, settingsTemplates, http.StatusOK, SettingsPage{
- Page: &Page{
- LightMode: settings.LightMode,
- Title: "Settings",
- Section: "settings",
- },
+ Page: page,
Settings: &settings,
})
})
diff --git a/pkg/webui/states.go b/pkg/webui/states.go
index f5d4134..f7df310 100644
--- a/pkg/webui/states.go
+++ b/pkg/webui/states.go
@@ -126,9 +126,8 @@ func handleStatesIdGET(db *database.DB) http.Handler {
}
render(w, statesIdTemplate, http.StatusOK, StatesData{
Page: makePage(r, &Page{
- Precedent: "/states",
- Section: "states",
- Title: state.Path,
+ Section: "states",
+ Title: state.Path,
}),
State: state,
Usernames: usernames,
diff --git a/pkg/webui/versions.go b/pkg/webui/versions.go
index 4fd1c00..1a7c2ba 100644
--- a/pkg/webui/versions.go
+++ b/pkg/webui/versions.go
@@ -48,9 +48,8 @@ func handleVersionsGET(db *database.DB) http.Handler {
versionData := string(version.Data[:])
render(w, versionsTemplate, http.StatusOK, VersionsData{
Page: makePage(r, &Page{
- Precedent: path.Join("/states/", state.Id.String()),
- Section: "states",
- Title: state.Path,
+ Section: "states",
+ Title: state.Path,
}),
Account: account,
State: state,