diff --git a/main.go b/main.go index f2c55d9..7768069 100644 --- a/main.go +++ b/main.go @@ -367,6 +367,7 @@ func (a *apiServer) routes() http.Handler { r.Get("/", http.RedirectHandler("/history", http.StatusFound).ServeHTTP) r.Get("/new", a.handleNewPage) r.Get("/history", a.handleHistoryPage) + r.Get("/settings", a.handleSettingsPage) r.Handle("/static/*", staticHandler()) r.Get("/unlock/{id}", a.handlePasteView) r.Post("/unlock/{id}", a.handlePasteView) diff --git a/palette b/palette index 8219986..b5929b7 100755 Binary files a/palette and b/palette differ diff --git a/web.go b/web.go index 26b02d7..df8cecf 100644 --- a/web.go +++ b/web.go @@ -66,6 +66,10 @@ func (a *apiServer) handleHistoryPage(w http.ResponseWriter, r *http.Request) { renderPage(w, "history.html", map[string]any{"Page": "history"}) } +func (a *apiServer) handleSettingsPage(w http.ResponseWriter, r *http.Request) { + renderPage(w, "settings.html", map[string]any{"Page": "settings"}) +} + func agoString(ts int64) string { s := time.Now().Unix() - ts switch { diff --git a/web/static/app.css b/web/static/app.css index 94456ee..eb1906a 100644 --- a/web/static/app.css +++ b/web/static/app.css @@ -128,6 +128,11 @@ body { .stats-v { color: var(--fg); word-break: break-all; } .meta-bar .spacer { flex: 1; } .iconbtn { border: 1px solid var(--border); background: var(--surface-2); color: var(--muted-fg); border-radius: var(--radius); padding: 5px 12px; font: inherit; font-size: 21.6px; cursor: pointer; text-decoration: none; } +.iconbtn.gear { display: inline-flex; align-items: center; padding: 5px 9px; } +.iconbtn.gear svg { width: 22px; height: 22px; } +.settings-head { padding: 12px 18px; border-bottom: 1px solid var(--border); } +.settings-head h1 { font-size: 29.2px; font-weight: 600; margin: 0; } +.settings-body { padding: 16px 18px; color: var(--muted-fg); font-size: 21.6px; } .iconbtn:hover { color: var(--fg); border-color: var(--muted); } .iconbtn.danger:hover { color: #ff8fa3; border-color: #ff8fa3; } .code-head { diff --git a/web/templates/layout.html b/web/templates/layout.html index bed6d01..3bc7385 100644 --- a/web/templates/layout.html +++ b/web/templates/layout.html @@ -13,5 +13,8 @@ Git
+ + + {{end}} diff --git a/web/templates/settings.html b/web/templates/settings.html new file mode 100644 index 0000000..649d4e6 --- /dev/null +++ b/web/templates/settings.html @@ -0,0 +1,13 @@ +{{template "head" .}} +{{template "topbar" .}} +
+
+
+

Settings

+
+
+

Settings are under construction.

+
+
+
+{{template "foot" .}}