From e370f40933bc4b4c159af8e5d9eb42b710c733ea Mon Sep 17 00:00:00 2001 From: Eltrac Date: Wed, 24 Sep 2025 22:48:53 +0800 Subject: remove: font size setting --- assets/js/settings.js | 29 ----------------------------- layouts/404.html | 2 +- layouts/_partials/items/post.html | 2 +- layouts/_shortcodes/bookcard.html | 2 +- layouts/blank.html | 2 +- layouts/fictions/page.html | 2 +- layouts/fictions/section.html | 2 +- layouts/highlights.html | 2 +- layouts/library/page.html | 2 +- layouts/page.html | 2 +- layouts/posts/page.html | 2 +- layouts/settings.html | 23 +---------------------- 12 files changed, 11 insertions(+), 61 deletions(-) diff --git a/assets/js/settings.js b/assets/js/settings.js index 6aa35cd7..ecc027d2 100644 --- a/assets/js/settings.js +++ b/assets/js/settings.js @@ -1,33 +1,4 @@ (() => { - /** - * =========== - * Font Size - * =========== - */ - - const setFontSize = (size) => { - if (size) localStorage.setItem('geedeapro.ui.fontSize', size); - const fontSizeSelected = size || localStorage.getItem('geedeapro.ui.fontSize') || 'medium'; - - const markdownBodies = document.querySelectorAll('.markdown-body'); - - const fontSizeClass = { - 'small': ['text-size-sm', 'md:text-size-base'], - 'medium': ['text-size-lg', 'md:text-size-xl'], - 'large': ['text-size-xl', 'md:text-size-2xl'] - } - - markdownBodies.forEach((body) => { - // remove existing font size classes - body.classList.remove(...fontSizeClass['small'], - ...fontSizeClass['medium'], - ...fontSizeClass['large']) - // add required font classes - body.classList.add(...fontSizeClass[fontSizeSelected]) - }); - } - setFontSize(); - /** * =========================== * Initialize Settings Page diff --git a/layouts/404.html b/layouts/404.html index 0beea0c1..6f17a145 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -37,7 +37,7 @@
-
+

404

Windows 和幽灵偷走了你的页面

可恶的微软和能量体生物!

diff --git a/layouts/_partials/items/post.html b/layouts/_partials/items/post.html index 5cdec34a..8aefb8a7 100644 --- a/layouts/_partials/items/post.html +++ b/layouts/_partials/items/post.html @@ -32,7 +32,7 @@ {{ end }} {{ if or $showSummary .ctx.Params.description }} -
{{ if $showSummary }} {{ .ctx.Summary }} diff --git a/layouts/_shortcodes/bookcard.html b/layouts/_shortcodes/bookcard.html index d128193b..48e6924c 100644 --- a/layouts/_shortcodes/bookcard.html +++ b/layouts/_shortcodes/bookcard.html @@ -2,7 +2,7 @@ {{- $book := index (where $books "File.BaseFileName" (.Get 0)) 0 -}} {{- if $book }} -
+
diff --git a/layouts/blank.html b/layouts/blank.html index 17510827..d2c6c14f 100644 --- a/layouts/blank.html +++ b/layouts/blank.html @@ -2,7 +2,7 @@
{{ partial "components/logo" (dict "imageClass" "w-20 md:w-[7rem] my-4") }} -
+
{{ .Content }}

* * *

diff --git a/layouts/fictions/page.html b/layouts/fictions/page.html index 03e9256f..ec67e524 100644 --- a/layouts/fictions/page.html +++ b/layouts/fictions/page.html @@ -16,7 +16,7 @@ -
{{ .Content }}
diff --git a/layouts/fictions/section.html b/layouts/fictions/section.html index e459ce1d..65a4e394 100644 --- a/layouts/fictions/section.html +++ b/layouts/fictions/section.html @@ -2,7 +2,7 @@
{{ partial "header.html" . }}
-
+
{{ with .Content }}{{ . }}{{ end }}
diff --git a/layouts/highlights.html b/layouts/highlights.html index 12fb1a84..e35872d3 100644 --- a/layouts/highlights.html +++ b/layouts/highlights.html @@ -2,7 +2,7 @@
{{ partial "header" . }}

{{ .Title }}

-
+

{{ .Content }}

diff --git a/layouts/library/page.html b/layouts/library/page.html index 1e9753a5..bcd36854 100644 --- a/layouts/library/page.html +++ b/layouts/library/page.html @@ -27,7 +27,7 @@

-
+
{{ partial "posts/toc" . }}
{{ .Content }}
{{ partial "posts/endnotes" . }} diff --git a/layouts/page.html b/layouts/page.html index 7b01bf7c..db5fa837 100644 --- a/layouts/page.html +++ b/layouts/page.html @@ -1,7 +1,7 @@ {{ define "main" }} {{ partial "header.html" . }}
-
{{ partial "posts/toc" . }} {{ .Content }} diff --git a/layouts/posts/page.html b/layouts/posts/page.html index ef891f7e..0320820d 100644 --- a/layouts/posts/page.html +++ b/layouts/posts/page.html @@ -35,7 +35,7 @@ -
{{ partial "posts/toc" . }}
{{ .Content }}
diff --git a/layouts/settings.html b/layouts/settings.html index a3e6f332..916336b8 100644 --- a/layouts/settings.html +++ b/layouts/settings.html @@ -1,28 +1,7 @@ {{ define "main" }}
{{ partial "header" . }} - -
- {{ .Content }} -
- -

{{ T "settings.fontSize" . }}

-
-
- {{ $buttonClass := "font-extrabold bg-neutral-100 dark:bg-neutral-800 hover:bg-neutral-200/50 dark:hover:bg-neutral-700/50 rounded py-5" }} - - - -
-
-

{{ T "settings.loremIpsum" . }}

-
-
- -
- -

{{ T "settings.otherOptions" . }}

+
{{ .Content }}
{{ partial "footer.html" . }} -- cgit v1.2.3