From b8e1c5a3d9d37e8e49cce22a0fdcda260ed481dc Mon Sep 17 00:00:00 2001 From: tdro Date: Sat, 30 Dec 2023 16:39:52 -0500 Subject: config: Add settings page Adjust icons --- Makefile | 75 +++++++++++----------- config.json | 30 ++++++--- config.toml | 30 ++++++--- config.yaml | 23 +++++-- static/icons/feather/LICENSE | 4 +- static/icons/feather/archive.svg | 15 ----- static/icons/feather/eye-off.svg | 4 +- static/icons/feather/eye.svg | 15 ++++- static/icons/feather/file-text.svg | 17 +++++ static/icons/feather/globe.svg | 4 +- static/icons/feather/heart.svg | 4 +- static/icons/feather/refresh-cw.svg | 4 +- static/icons/feather/tag.svg | 14 ---- static/icons/feather/trash-2.svg | 4 +- static/icons/tabler/archive.svg | 19 ++++++ static/icons/tabler/book-2.svg | 17 +++-- static/icons/tabler/clock.svg | 17 +++-- static/icons/tabler/code.svg | 17 +++-- static/icons/tabler/notes.svg | 21 ++++-- static/icons/tabler/pinned.svg | 17 +++-- static/icons/tabler/robot.svg | 34 +++++++--- static/icons/tabler/settings.svg | 18 ++++++ static/icons/tabler/square-letter-m.svg | 21 ++++-- static/icons/tabler/tags.svg | 19 ++++++ themes/default/layouts/_default/home.settings.html | 32 +++++++++ 25 files changed, 339 insertions(+), 136 deletions(-) delete mode 100644 static/icons/feather/archive.svg create mode 100644 static/icons/feather/file-text.svg delete mode 100644 static/icons/feather/tag.svg create mode 100644 static/icons/tabler/archive.svg create mode 100644 static/icons/tabler/settings.svg create mode 100644 static/icons/tabler/tags.svg create mode 100644 themes/default/layouts/_default/home.settings.html diff --git a/Makefile b/Makefile index f623415..caf2dee 100644 --- a/Makefile +++ b/Makefile @@ -31,43 +31,44 @@ build-site: # Build site build-icons: # Build icons rm -rf static/icons mkdir -p static/icons/feather static/icons/tabler - curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/LICENSE --output-dir static/icons/feather - curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/alert-circle.svg --output-dir static/icons/feather - curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/archive.svg --output-dir static/icons/feather - curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/arrow-down-circle.svg --output-dir static/icons/feather - curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/arrow-left.svg --output-dir static/icons/feather - curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/arrow-right.svg --output-dir static/icons/feather - curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/arrow-up.svg --output-dir static/icons/feather - curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/at-sign.svg --output-dir static/icons/feather - curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/calendar.svg --output-dir static/icons/feather - curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/circle.svg --output-dir static/icons/feather - curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/clock.svg --output-dir static/icons/feather - curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/edit.svg --output-dir static/icons/feather - curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/external-link.svg --output-dir static/icons/feather - curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/eye-off.svg --output-dir static/icons/feather - curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/eye.svg --output-dir static/icons/feather - curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/file-text.svg --output-dir static/icons/feather - curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/git-commit.svg --output-dir static/icons/feather - curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/globe.svg --output-dir static/icons/feather - curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/heart.svg --output-dir static/icons/feather - curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/home.svg --output-dir static/icons/feather - curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/link.svg --output-dir static/icons/feather - curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/map-pin.svg --output-dir static/icons/feather - curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/refresh-cw.svg --output-dir static/icons/feather - curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/rss.svg --output-dir static/icons/feather - curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/search.svg --output-dir static/icons/feather - curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/tag.svg --output-dir static/icons/feather - curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/trash-2.svg --output-dir static/icons/feather - curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/user.svg --output-dir static/icons/feather - curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/users.svg --output-dir static/icons/feather - curl --silent --remote-name https://raw.githubusercontent.com/tabler/tabler-icons/master/LICENSE --output-dir static/icons/tabler - curl --silent --remote-name https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/book-2.svg --output-dir static/icons/tabler - curl --silent --remote-name https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/clock.svg --output-dir static/icons/tabler - curl --silent --remote-name https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/code.svg --output-dir static/icons/tabler - curl --silent --remote-name https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/notes.svg --output-dir static/icons/tabler - curl --silent --remote-name https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/pinned.svg --output-dir static/icons/tabler - curl --silent --remote-name https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/robot.svg --output-dir static/icons/tabler - curl --silent --remote-name https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/square-letter-m.svg --output-dir static/icons/tabler + curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/LICENSE --output-dir static/icons/feather + curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/alert-circle.svg --output-dir static/icons/feather + curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/arrow-down-circle.svg --output-dir static/icons/feather + curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/arrow-left.svg --output-dir static/icons/feather + curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/arrow-right.svg --output-dir static/icons/feather + curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/arrow-up.svg --output-dir static/icons/feather + curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/at-sign.svg --output-dir static/icons/feather + curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/calendar.svg --output-dir static/icons/feather + curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/circle.svg --output-dir static/icons/feather + curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/clock.svg --output-dir static/icons/feather + curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/edit.svg --output-dir static/icons/feather + curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/external-link.svg --output-dir static/icons/feather + curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/eye-off.svg --output-dir static/icons/feather + curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/eye.svg --output-dir static/icons/feather + curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/file-text.svg --output-dir static/icons/feather + curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/git-commit.svg --output-dir static/icons/feather + curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/globe.svg --output-dir static/icons/feather + curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/heart.svg --output-dir static/icons/feather + curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/home.svg --output-dir static/icons/feather + curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/link.svg --output-dir static/icons/feather + curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/map-pin.svg --output-dir static/icons/feather + curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/refresh-cw.svg --output-dir static/icons/feather + curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/rss.svg --output-dir static/icons/feather + curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/search.svg --output-dir static/icons/feather + curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/trash-2.svg --output-dir static/icons/feather + curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/user.svg --output-dir static/icons/feather + curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/users.svg --output-dir static/icons/feather + curl --silent --remote-name https://raw.githubusercontent.com/tabler/tabler-icons/master/LICENSE --output-dir static/icons/tabler + curl --silent --remote-name https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/archive.svg --output-dir static/icons/tabler + curl --silent --remote-name https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/book-2.svg --output-dir static/icons/tabler + curl --silent --remote-name https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/clock.svg --output-dir static/icons/tabler + curl --silent --remote-name https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/code.svg --output-dir static/icons/tabler + curl --silent --remote-name https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/notes.svg --output-dir static/icons/tabler + curl --silent --remote-name https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/pinned.svg --output-dir static/icons/tabler + curl --silent --remote-name https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/robot.svg --output-dir static/icons/tabler + curl --silent --remote-name https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/settings.svg --output-dir static/icons/tabler + curl --silent --remote-name https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/square-letter-m.svg --output-dir static/icons/tabler + curl --silent --remote-name https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/tags.svg --output-dir static/icons/tabler git add -f static/icons test: # Test everything diff --git a/config.json b/config.json index 50bd995..9bc0475 100644 --- a/config.json +++ b/config.json @@ -39,38 +39,44 @@ { "name": "Tags", "url": "/tags/", - "identifier": "feather/tag", + "identifier": "tabler/tags", "weight": 2, "icon": "home" }, { "name": "Archives", "url": "/archives/messages/", - "identifier": "tabler/clock", + "identifier": "tabler/archive", "weight": 3 }, { "name": "Authors", "url": "/authors/", "identifier": "feather/users", + "weight": 4 + }, + { + "name": "Settings", + "url": "/settings/", + "identifier": "tabler/settings", "weight": 5 }, + { + "name": "Sources", + "url": "/sources/", + "identifier": "feather/git-commit", + "weight": 6 + }, { "name": "RSS Feed", "url": "/rss.xml", "identifier": "feather/rss", - "weight": 6 + "weight": 7 }, { "name": "JSON Feed", "url": "/index.json", "identifier": "feather/circle", - "weight": 7 - }, - { - "name": "Sources", - "url": "/sources/", - "identifier": "feather/git-commit", "weight": 8 } ] @@ -213,6 +219,11 @@ "baseName": "index", "mediaType": "text/html" }, + "settings": { + "path": "settings", + "baseName": "index", + "mediaType": "text/html" + }, "sources": { "path": "sources", "baseName": "index", @@ -251,6 +262,7 @@ "sources", "browserconfig", "archives", + "settings", "webmanifest" ], "section": [ diff --git a/config.toml b/config.toml index 64b9524..e7bd944 100644 --- a/config.toml +++ b/config.toml @@ -33,38 +33,44 @@ enableRobotsTXT = true [[menu.main]] name = "Tags" url = "/tags/" - identifier = "feather/tag" + identifier = "tabler/tags" weight = 2 icon = "home" [[menu.main]] name = "Archives" url = "/archives/messages/" - identifier = "tabler/clock" + identifier = "tabler/archive" weight = 3 [[menu.main]] name = "Authors" url = "/authors/" identifier = "feather/users" + weight = 4 + + [[menu.main]] + name = "Settings" + url = "/settings/" + identifier = "tabler/settings" weight = 5 + [[menu.main]] + name = "Sources" + url = "/sources/" + identifier = "feather/git-commit" + weight = 6 + [[menu.main]] name = "RSS Feed" url = "/rss.xml" identifier = "feather/rss" - weight = 6 + weight = 7 [[menu.main]] name = "JSON Feed" url = "/index.json" identifier = "feather/circle" - weight = 7 - - [[menu.main]] - name = "Sources" - url = "/sources/" - identifier = "feather/git-commit" weight = 8 [params] @@ -148,6 +154,10 @@ enableRobotsTXT = true path = "archives/messages" baseName = "index" mediaType = "text/html" + [outputFormats.settings] + path = "settings" + baseName = "index" + mediaType = "text/html" [outputFormats.sources] path = "sources" baseName = "index" @@ -169,7 +179,7 @@ enableRobotsTXT = true mediaType = "text/html" [outputs] - home = ["html", "rss", "xslt.rss", "xslt.sitemap", "json", "authors", "authors.section", "sources", "browserconfig", "archives", "webmanifest"] + home = ["html", "rss", "xslt.rss", "xslt.sitemap", "json", "authors", "authors.section", "sources", "browserconfig", "archives", "settings", "webmanifest"] section = ["html", "rss", "gallery", "following", "webring"] taxonomy = ["html", "rss"] term = ["html", "rss"] diff --git a/config.yaml b/config.yaml index dc1d427..5a040ab 100644 --- a/config.yaml +++ b/config.yaml @@ -37,28 +37,32 @@ menu: weight: 1 - name: Tags url: /tags/ - identifier: feather/tag + identifier: tabler/tags weight: 2 icon: home - name: Archives url: /archives/messages/ - identifier: tabler/clock + identifier: tabler/archive weight: 3 - name: Authors url: /authors/ identifier: feather/users + weight: 4 + - name: Settings + url: /settings/ + identifier: tabler/settings weight: 5 + - name: Sources + url: /sources/ + identifier: feather/git-commit + weight: 6 - name: RSS Feed url: /rss.xml identifier: feather/rss - weight: 6 + weight: 7 - name: JSON Feed url: /index.json identifier: feather/circle - weight: 7 - - name: Sources - url: /sources/ - identifier: feather/git-commit weight: 8 params: @@ -144,6 +148,10 @@ outputFormats: path: archives/messages baseName: index mediaType: text/html + settings: + path: settings + baseName: index + mediaType: text/html sources: path: sources baseName: index @@ -176,6 +184,7 @@ outputs: - sources - browserconfig - archives + - settings - webmanifest section: - html diff --git a/static/icons/feather/LICENSE b/static/icons/feather/LICENSE index b869713..1f4f433 100644 --- a/static/icons/feather/LICENSE +++ b/static/icons/feather/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2013-2017 Cole Bemis +Copyright (c) 2013-2023 Cole Bemis Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +SOFTWARE. diff --git a/static/icons/feather/archive.svg b/static/icons/feather/archive.svg deleted file mode 100644 index 978eb76..0000000 --- a/static/icons/feather/archive.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - diff --git a/static/icons/feather/eye-off.svg b/static/icons/feather/eye-off.svg index 98c45f6..e7552f4 100644 --- a/static/icons/feather/eye-off.svg +++ b/static/icons/feather/eye-off.svg @@ -9,6 +9,8 @@ stroke-linecap="round" stroke-linejoin="round" > - + diff --git a/static/icons/feather/eye.svg b/static/icons/feather/eye.svg index 5fb707b..edaab72 100644 --- a/static/icons/feather/eye.svg +++ b/static/icons/feather/eye.svg @@ -1 +1,14 @@ - \ No newline at end of file + + + + diff --git a/static/icons/feather/file-text.svg b/static/icons/feather/file-text.svg new file mode 100644 index 0000000..6cba58c --- /dev/null +++ b/static/icons/feather/file-text.svg @@ -0,0 +1,17 @@ + + + + + + + diff --git a/static/icons/feather/globe.svg b/static/icons/feather/globe.svg index a9c820f..7617e0c 100644 --- a/static/icons/feather/globe.svg +++ b/static/icons/feather/globe.svg @@ -11,5 +11,7 @@ > - + diff --git a/static/icons/feather/heart.svg b/static/icons/feather/heart.svg index 8e0b98d..5f083d2 100644 --- a/static/icons/feather/heart.svg +++ b/static/icons/feather/heart.svg @@ -9,5 +9,7 @@ stroke-linecap="round" stroke-linejoin="round" > - + diff --git a/static/icons/feather/refresh-cw.svg b/static/icons/feather/refresh-cw.svg index 1773a2f..c2cb05d 100644 --- a/static/icons/feather/refresh-cw.svg +++ b/static/icons/feather/refresh-cw.svg @@ -11,5 +11,7 @@ > - + diff --git a/static/icons/feather/tag.svg b/static/icons/feather/tag.svg deleted file mode 100644 index e8500cd..0000000 --- a/static/icons/feather/tag.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - diff --git a/static/icons/feather/trash-2.svg b/static/icons/feather/trash-2.svg index f3bd2bd..237872e 100644 --- a/static/icons/feather/trash-2.svg +++ b/static/icons/feather/trash-2.svg @@ -10,7 +10,9 @@ stroke-linejoin="round" > - + diff --git a/static/icons/tabler/archive.svg b/static/icons/tabler/archive.svg new file mode 100644 index 0000000..8772d7f --- /dev/null +++ b/static/icons/tabler/archive.svg @@ -0,0 +1,19 @@ + + + + + + diff --git a/static/icons/tabler/book-2.svg b/static/icons/tabler/book-2.svg index e136c71..695784f 100644 --- a/static/icons/tabler/book-2.svg +++ b/static/icons/tabler/book-2.svg @@ -1,8 +1,17 @@ - - + + - - diff --git a/static/icons/tabler/clock.svg b/static/icons/tabler/clock.svg index e7a91d3..d8d9af3 100644 --- a/static/icons/tabler/clock.svg +++ b/static/icons/tabler/clock.svg @@ -1,7 +1,16 @@ - - + + - - diff --git a/static/icons/tabler/code.svg b/static/icons/tabler/code.svg index 3a18207..df80bc2 100644 --- a/static/icons/tabler/code.svg +++ b/static/icons/tabler/code.svg @@ -1,8 +1,17 @@ - - + + - - diff --git a/static/icons/tabler/notes.svg b/static/icons/tabler/notes.svg index bed52e0..e6947da 100644 --- a/static/icons/tabler/notes.svg +++ b/static/icons/tabler/notes.svg @@ -1,9 +1,20 @@ - - - + + + - - diff --git a/static/icons/tabler/pinned.svg b/static/icons/tabler/pinned.svg index 56e24ba..4a232b6 100644 --- a/static/icons/tabler/pinned.svg +++ b/static/icons/tabler/pinned.svg @@ -1,8 +1,17 @@ - - + + - - diff --git a/static/icons/tabler/robot.svg b/static/icons/tabler/robot.svg index 0b94b49..64f2658 100644 --- a/static/icons/tabler/robot.svg +++ b/static/icons/tabler/robot.svg @@ -1,11 +1,25 @@ - - - - - - - - + + + + + + + + + + + - - diff --git a/static/icons/tabler/settings.svg b/static/icons/tabler/settings.svg new file mode 100644 index 0000000..caa2e55 --- /dev/null +++ b/static/icons/tabler/settings.svg @@ -0,0 +1,18 @@ + + + + + diff --git a/static/icons/tabler/square-letter-m.svg b/static/icons/tabler/square-letter-m.svg index 07486bc..f3670dd 100644 --- a/static/icons/tabler/square-letter-m.svg +++ b/static/icons/tabler/square-letter-m.svg @@ -1,7 +1,18 @@ - - - + + + - - diff --git a/static/icons/tabler/tags.svg b/static/icons/tabler/tags.svg new file mode 100644 index 0000000..b2f166c --- /dev/null +++ b/static/icons/tabler/tags.svg @@ -0,0 +1,19 @@ + + + + + + diff --git a/themes/default/layouts/_default/home.settings.html b/themes/default/layouts/_default/home.settings.html new file mode 100644 index 0000000..44b3399 --- /dev/null +++ b/themes/default/layouts/_default/home.settings.html @@ -0,0 +1,32 @@ +{{- define "title" -}}Settings — {{ end -}} +{{- define "description" -}}A list of all interface settings — {{ end -}} +{{- define "styles" -}} + +{{- end -}} + +{{- define "header" -}} + {{- partial "navigator-middle.html" + (dict + "Context" . + "IconLabel" "Back" + "Id" "back" + "Title" "Settings" + "Icon" "arrow-left" + "Subtitle" "Interface" + "Href" (or (and (gt .Paginator.PageNumber 1) (.Paginator.Prev.URL | absURL)) "/") + ) + -}} +{{- end -}} + +{{- define "middle" -}} +{{- end -}} + +{{- define "footer" -}} + {{- partial "base-footer.html" . -}} +{{- end -}} + +{{- define "right" -}} + {{- partial "navigator-right.html" . -}} +{{- end -}} -- cgit v1.2.3