Skip to content

Commit

Permalink
refactor: remove pageStyle wide all together
Browse files Browse the repository at this point in the history
  • Loading branch information
HEIGE-PCloud committed Apr 14, 2023
1 parent 8ef33b0 commit 9ea5205
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 27 deletions.
10 changes: 0 additions & 10 deletions assets/css/_page/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
3 changes: 0 additions & 3 deletions exampleSite/config/_default/params.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion exampleSite/content/posts/tests/showcase-tests/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ categories: [Tests]
authors: [PCloud]
hiddenFromHomePage: true
toc: false
pageStyle: wide
hiddenFromSearch: true
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 >}} 过时文章提示
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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` 部分相同.
Expand Down
7 changes: 0 additions & 7 deletions layouts/posts/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,6 @@ <h2 class="toc-title">{{ T "contents" }}</h2>
</div>
{{- end -}}

{{- /* Page Style */ -}}
{{- if eq $params.pageStyle "wide" -}}
<script>document.getElementsByTagName("main")[0].setAttribute("pageStyle", "wide")</script>
{{- else -}}
<script>document.getElementsByTagName("main")[0].setAttribute("pageStyle", "normal")</script>
{{- end -}}

{{- /* TOC Style */ -}}
{{- if eq $toc.enable true -}}
{{- if eq $toc.keepStatic true -}}
Expand Down

1 comment on commit 9ea5205

@vercel
Copy link

@vercel vercel bot commented on 9ea5205 Apr 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.