From 9ea5205118add6132b4ca5565506416aba9596df Mon Sep 17 00:00:00 2001 From: HEIGE-PCloud Date: Fri, 14 Apr 2023 01:32:54 +0100 Subject: [PATCH] refactor: remove pageStyle wide all together --- assets/css/_page/_index.scss | 10 ---------- exampleSite/config/_default/params.toml | 3 --- .../content/posts/tests/showcase-tests/index.en.md | 1 - .../posts/theme-documentation-basics/index.en.md | 2 -- .../posts/theme-documentation-basics/index.zh-cn.md | 2 -- .../posts/theme-documentation-content/index.en.md | 1 - .../posts/theme-documentation-content/index.zh-cn.md | 1 - layouts/posts/single.html | 7 ------- 8 files changed, 27 deletions(-) diff --git a/assets/css/_page/_index.scss b/assets/css/_page/_index.scss index 069671618..c8de0057c 100644 --- a/assets/css/_page/_index.scss +++ b/assets/css/_page/_index.scss @@ -3,16 +3,6 @@ max-width: 800px; width: 60%; margin: 0 auto; - [pageStyle=wide][autoTOC=true] & { - margin-left: 10%; - margin-right: auto; - width: 67.5%; - } - [pageStyle=wide][autoTOC=false] & { - width: 70%; - margin-left: 15%; - margin-right: 15%; - } [header-desktop] & { padding-top: $header-height; } diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index f7a01d090..0d9178ad1 100644 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -169,9 +169,6 @@ cacheRemoteImages = false # whether to show the full text content in RSS # 是否在 RSS 中显示全文内容 rssFullText = false - # Page style ("normal", "wide") - # 页面样式 ("normal", "wide") - pageStyle = "normal" # whether to enable series navigation # 是否使用系列导航 seriesNavigation = true diff --git a/exampleSite/content/posts/tests/showcase-tests/index.en.md b/exampleSite/content/posts/tests/showcase-tests/index.en.md index 73ff74c5d..babfcf12d 100644 --- a/exampleSite/content/posts/tests/showcase-tests/index.en.md +++ b/exampleSite/content/posts/tests/showcase-tests/index.en.md @@ -8,7 +8,6 @@ categories: [Tests] authors: [PCloud] hiddenFromHomePage: true toc: false -pageStyle: wide hiddenFromSearch: true --- diff --git a/exampleSite/content/posts/theme-documentation-basics/index.en.md b/exampleSite/content/posts/theme-documentation-basics/index.en.md index 20d41cf8e..8602031fd 100644 --- a/exampleSite/content/posts/theme-documentation-basics/index.en.md +++ b/exampleSite/content/posts/theme-documentation-basics/index.en.md @@ -467,8 +467,6 @@ Please open the code block below to view the complete sample configuration :(far # "https://github.com/user/repo/issues/new?title=[bug]%20{title}&body=|Field|Value|%0A|-|-|%0A|Title|{title}|%0A|Url|{url}|%0A|Filename|https://github.com/user/repo/blob/main/{path}|" # {{< version 0.2.4 >}} whether to show the full text content in RSS rssFullText = false - # {{< version 0.2.11 >}} page layout style ("normal", "wide") - pageStyle = "normal" # {{< version 0.2.13 >}} whether to enable series navigation seriesNavigation = true # {{< version 0.2.13 >}} outdated article reminder config diff --git a/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md b/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md index 726ef1bda..e662ed9cc 100644 --- a/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md +++ b/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md @@ -471,8 +471,6 @@ hugo # "https://github.com/user/repo/issues/new?title=[bug]%20{title}&body=|Field|Value|%0A|-|-|%0A|Title|{title}|%0A|Url|{url}|%0A|Filename|https://github.com/user/repo/blob/main/{path}|" # {{< version 0.2.4 >}} 是否在 RSS 中显示全文内容 rssFullText = false - # {{< version 0.2.11 >}} 页面样式 ("normal", "wide") - pageStyle = "normal" # {{< version 0.2.13 >}} 是否在文章开头显示系列导航 seriesNavigation = true # {{< version 0.2.13 >}} 过时文章提示 diff --git a/exampleSite/content/posts/theme-documentation-content/index.en.md b/exampleSite/content/posts/theme-documentation-content/index.en.md index 31bfbb51c..bed3b14cc 100644 --- a/exampleSite/content/posts/theme-documentation-content/index.en.md +++ b/exampleSite/content/posts/theme-documentation-content/index.en.md @@ -206,7 +206,6 @@ related: * **linkToEdit**: {{< version 0.2.13 >}} if `false`, turn off the **edit this page** link in the footer. You can set it to the link to edit the page. Use the magic variable `{path}` to specify the relative path of the post, for example, the `{path}` for this post is `posts/theme-documentation-content/index.en.md`. * **linkToReport**: {{< version 0.2.14 >}} if `false`, turn off the **report issue** link in the footer. You can set it to the link to report issues about the page. Use the magic variables: `{path}` to specify the relative path of the post, for example, the `{path}` for this post is `posts/theme-documentation-content/index.en.md`, `{title}` to specify the title of the post, for example, the `{title}` for this post is `Theme Documentation - Content` and `{url}` to specify the url of the post, for example, the `{url}` for this post is `https://hugodoit.pages.dev/theme-documentation-content/`. * **rssFullText**: {{< version 0.2.4 >}} if `true`, the full text content will be shown in RSS. -* **pageStyle**: {{< version 0.2.11 >}} adjust the page layout style, "normal" or "wide". * **license**: {{< version 0.2.14 >}} set the license info (HTML format is supported). * **toc**: {{< version 0.2.9 changed >}} the same as the `params.page.toc` part in the [site configuration](../theme-documentation-basics#site-configuration). diff --git a/exampleSite/content/posts/theme-documentation-content/index.zh-cn.md b/exampleSite/content/posts/theme-documentation-content/index.zh-cn.md index 9e5bde74e..73657addc 100644 --- a/exampleSite/content/posts/theme-documentation-content/index.zh-cn.md +++ b/exampleSite/content/posts/theme-documentation-content/index.zh-cn.md @@ -205,7 +205,6 @@ related: * **linkToEdit**:{{< version 0.2.13 >}} 如果设为 `false`, 则关闭页脚 **编辑此页** 的链接. 你可以将其设置为一个用于编辑这个页面的链接. 使用魔法变量 `{path}` 来获取这篇文章的相对路径, 这篇文章的 `{path}` 是 `posts/theme-documentation-content/index.zh-cn.md`. * **linkToReport**: {{< version 0.2.14 >}} 如果设为 `false`, 则关闭页脚 **报告问题** 的链接. 你可以将其设置为一个用于报告此页面中错误的链接. 使用魔法变量 `{path}` 来获取文章的相对路径, 这篇文章的 `{path}` 是 `posts/theme-documentation-content/index.en.md`, 使用 `{title}` 来获取文章的标题, 这篇文章的 `{title}` 为 `Theme Documentation - Content`, 使用 `{url}` 来获取文章的链接, 这篇文章的 `{url}` 为 `https://hugodoit.pages.dev/theme-documentation-content/`. * **rssFullText**: {{< version 0.2.4 >}} 如果设为 `true`, 在 RSS 中将会显示全文内容. -* **pageStyle**: {{< version 0.2.11 >}} 调整页面样式, 可选择"normal"或"wide". * **license**: {{< version 0.2.14 >}} 许可协议信息 (支持 HTML 格式). * **toc**: {{< version 0.2.9 changed >}} 和 [网站配置](../theme-documentation-basics#site-configuration) 中的 `params.page.toc` 部分相同. diff --git a/layouts/posts/single.html b/layouts/posts/single.html index 54443ceab..115f2e6f9 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -20,13 +20,6 @@

{{ T "contents" }}

{{- end -}} - {{- /* Page Style */ -}} - {{- if eq $params.pageStyle "wide" -}} - - {{- else -}} - - {{- end -}} - {{- /* TOC Style */ -}} {{- if eq $toc.enable true -}} {{- if eq $toc.keepStatic true -}}