diff --git a/README.md b/README.md index a395eb1..f3abf8d 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ > All page designs & configuration compatibility with Hexo NexT, it's very easy migrate your site from Hexo to Hugo and enjoy yourself. -[](https://gitter.im/hugo-next/community) [](https://github.com/gohugoio/hugo/releases/latest) [](https://github.com/hugo-next/hugo-theme-next) [](https://github.com/hugo-next/hugo-theme-next/find/main) [](https://github.com/hugo-next/hugo-theme-next/blob/main/LICENSE) +[](https://gitter.im/hugo-next/community) [](https://github.com/gohugoio/hugo/releases/latest) [](https://github.com/hugo-next/hugo-theme-next) [](https://github.com/hugo-next/hugo-theme-next/find/main) [](https://github.com/hugo-next/hugo-theme-next/blob/main/LICENSE) ## 4 Scheme diff --git a/README.zh.md b/README.zh.md index b9a0973..9c6336a 100644 --- a/README.zh.md +++ b/README.zh.md @@ -10,7 +10,7 @@ > 本主题的所有页面设计和配置项都与原来 `Hexo` 引擎的 `NexT` 主题保持了良好的兼容性,可以非常平滑的从 `Hexo` 迁移至 `Hugo` 引擎,欢迎大家使用并反馈。 -[](https://gitter.im/hugo-next/community) [](https://github.com/gohugoio/hugo/releases/latest) [](https://github.com/hugo-next/hugo-theme-next) [](https://github.com/hugo-next/hugo-theme-next/find/main) [](https://github.com/hugo-next/hugo-theme-next/blob/main/LICENSE) +[](https://gitter.im/hugo-next/community) [](https://github.com/gohugoio/hugo/releases/latest) [](https://github.com/hugo-next/hugo-theme-next) [](https://github.com/hugo-next/hugo-theme-next/find/main) [](https://github.com/hugo-next/hugo-theme-next/blob/main/LICENSE) ## 4 种页面模式 diff --git a/archetypes/default.md b/archetypes/default.md index de95136..57a7d26 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -7,7 +7,7 @@ date: {{ .Date }} lastmod: {{ .Date }} categories: - - + - tags: - - @@ -30,7 +30,7 @@ tags: # 在当前页面开启或关闭评论功能 # Switch to enabled or disabled comment plugins in this post #comment: -# enable: false +# enable: false # 开启文章目录功能 # Enable table of content #toc: false diff --git a/assets/css/_common/components/post/post-header.scss b/assets/css/_common/components/post/post-header.scss index 8be25e6..d185c4c 100644 --- a/assets/css/_common/components/post/post-header.scss +++ b/assets/css/_common/components/post/post-header.scss @@ -114,7 +114,7 @@ height: 0; } -@if $busuanzi_enable and $busuanzi_post_views { +@if $busuanzi_post_views { #busuanzi_container_page_pv { display: inline-block; } diff --git a/assets/css/_common/outline/footer/index.scss b/assets/css/_common/outline/footer/index.scss index 1c6964a..4bfdcd2 100644 --- a/assets/css/_common/outline/footer/index.scss +++ b/assets/css/_common/outline/footer/index.scss @@ -98,17 +98,15 @@ } } -@if $busuanzi_enable { - .busuanzi-count { - @if $busuanzi_visitors { - #busuanzi_container_site_uv { - display: none; - } +.busuanzi-count { + @if $busuanzi_visitors { + #busuanzi_container_site_uv { + display: none; } - @if $busuanzi_views { - #busuanzi_container_site_pv { - display: none; - } + } + @if $busuanzi_views { + #busuanzi_container_site_pv { + display: none; } } } diff --git a/assets/css/_sitevars.scss b/assets/css/_sitevars.scss deleted file mode 100644 index 31aac4c..0000000 --- a/assets/css/_sitevars.scss +++ /dev/null @@ -1,96 +0,0 @@ -// All variables from site's config content. -// In order not to conflict with the existing variables of SCSS and better identify, -// add a cfg_ prefix before the variable name - -{{- $P := .Site.Params -}} - -// Base variables -$scheme: {{ default $P.scheme "Gemini" }}; -$cfg_darkmode: {{ $P.darkmode }}; - -$cfg_thm_cor_light: {{ $P.themeColor.light }}; -$cfg_thm_cor_dark: {{ $P.themeColor.dark }}; - -$cfg_font_enable: {{ default $P.font.enable false }}; -$cfg_font_global_size: {{ default $P.font.global.size 1 }}; -$cfg_font_headings_size: {{ default $P.font.headings.size 1 }}; -$cfg_font_title_size: {{ default $P.font.title.size 1 }}; -$cfg_font_codes_size: {{ default $P.font.codes.size 1 }}; -$cfg_font_posts_size: {{ default $P.font.posts.size 1 }}; - -// TODO -$cfg_hl_light_bg: #222; -$cfg_hl_light_fg: #000; -$cfg_hl_dark_bg: #000; -$cfg_hl_dark_fg: #222; - -$cfg_sidebar_width: {{ $P.sidebar.width }}; -$cfg_sidebar_position: {{ $P.sidebar.position }}; -$cfg_sidebar_padding: {{ default $P.sidebar.padding 18 }}; -$cfg_sidebar_offset: {{ default $P.sidebar.offset 12 }}; - -// TODO -$cfg_note_light_bg_offset: 0; - -// Scaffolding Variables -$cfg_bd_scrollbar_overlay: {{ $P.bodyScrollbar.overlay }}; -$cfg_bd_scrollbar_stable: {{ $P.bodyScrollbar.stable }}; - -$cfg_codeblock_copy_btn_style: {{ $P.codeblock.copyBtn.style }}; - -$cfg_mermaid_enable: {{ $P.mermaid.enable }}; - -$cfg_note_style: {{ $P.note.style }}; -$cfg_note_icons: {{ $P.note.icons }}; - -$cfg_pdf_enable: {{ $P.pdf.enable }}; -$cfg_pdf_height: {{ $P.pdf.height }}; - -$cfg_tabs_trans_tabs: {{ $P.tabs.transition.tabs }}; -$cfg_tabs_trans_labels: {{ $P.tabs.transition.labels }}; - -// Outline Variables -$cfg_footer_icon_color: {{ $P.footer.icon.color }}; -$cfg_footer_icon_animated: {{ $P.footer.icon.animated }}; - -$cfg_footer_beian_enable: {{ $P.footer.beian.enable }}; - -$cfg_busuanzi_enable: {{ $P.busuanzi.enable }}; -$cfg_busuanzi_visitors: {{ $P.busuanzi.visitors }}; -$cfg_busuanzi_views: {{ $P.busuanzi.views }}; - -$cfg_bookmark_enable: {{ $P.bookmark.enable }}; -$cfg_bookmark_color: {{ $P.bookmark.color }}; - -$cfg_github_banner_enable: {{ $P.githubBanner.enable }}; - -$cfg_local_search_enable: {{ $P.localSearch.enable }}; -$cfg_algolia_search_enable: {{ $P.algoliaSearch.enable }}; - -$cfg_mobile_layout_economy: {{ $P.mobileLayoutEconomy }}; - -$cfg_note_icons: {{ $P.note.icons }}; - -$cfg_social_icons_only: {{ $P.socialIcons.iconsOnly }}; - -$cfg_avatar_rounded: {{ $P.avatar.rounded }}; -$cfg_avatar_rotated: {{ $P.avatar.rotated }}; - -$cfg_toc_enable: {{ $P.toc.enable }}; -$cfg_toc_wrap: {{ $P.toc.wrap }}; -$cfg_toc_expand_all: {{ $P.toc.expandAll }}; - -$cfg_site_state: {{ $P.siteState }}; - -// -$cfg_back2top_enable: {{ $P.backTop.enable }}; -$cfg_back2top_scrollpercent: {{ $P.backTop.scrollPercent }}; -$cfg_back2top_sidebar: {{ $P.backTop.sidebar }}; - -$cfg_reading_progress_enable: {{ $P.readingProgress.enable }}; -$cfg_reading_progress_color: {{ $P.readingProgress.color }}; -$cfg_reading_progress_height: {{ $P.readingProgress.height }}; -$cfg_reading_progress_reversed: {{ $P.readingProgress.reversed }}; -$cfg_reading_progress_start: {{ $P.readingProgress.start }}; -$cfg_reading_progress_position: {{ $P.readingProgress.position }}; - diff --git a/assets/css/main.scss b/assets/css/main.scss index 718a92c..b43208e 100644 --- a/assets/css/main.scss +++ b/assets/css/main.scss @@ -34,7 +34,6 @@ $footer_vendors_enable : {{ isset $P.footer "vendors" }}; {{ end }} // Counter -$busuanzi_enable : {{ $P.busuanzi.enable }}; $busuanzi_visitors : {{ $P.busuanzi.visitors }}; $busuanzi_views : {{ $P.busuanzi.views }}; $busuanzi_post_views : {{ $P.busuanzi.postViews }}; diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 646ca35..947960d 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -753,6 +753,7 @@ params: # Waline comments system # More info seee: https://waline.js.org/ waline: + pageView: true placeholder: "请文明发言" emoji: false imgUploader: false @@ -859,12 +860,11 @@ params: # Show Views / Visitors of the website / page with busuanzi. # For more information: http://ibruce.info/2015/04/04/busuanzi/ busuanzi: - enable: true - visitors: true + visitors: false visitorsIcon: fa fa-user - views: true + views: false viewsIcon: fa fa-eye - postViews: true + postViews: false postViewsIcon: far fa-eye @@ -968,7 +968,7 @@ params: # Use Animate.css to animate everything. # For more information: https://animate.style motion: - enable: false + enable: true async: true transition: # All available transition variants: https://theme-next.js.org/animate/ diff --git a/images/screenshot.png b/images/screenshot.png index e9e016d..5c30e0a 100644 Binary files a/images/screenshot.png and b/images/screenshot.png differ diff --git a/images/tn.png b/images/tn.png index 563e227..10ab8e2 100644 Binary files a/images/tn.png and b/images/tn.png differ diff --git a/layouts/partials/post/footer_meta/tags.html b/layouts/partials/post/footer_meta/tags.html index a24c48e..09498da 100644 --- a/layouts/partials/post/footer_meta/tags.html +++ b/layouts/partials/post/footer_meta/tags.html @@ -1,9 +1,9 @@ {{- with .Params.tags }} -{{- if gt (len .) 0 }}
-{{- end }} -{{- end }} +{{- end }} \ No newline at end of file diff --git a/layouts/partials/post/header_meta/categories.html b/layouts/partials/post/header_meta/categories.html index 6daa8e2..db09ec4 100644 --- a/layouts/partials/post/header_meta/categories.html +++ b/layouts/partials/post/header_meta/categories.html @@ -1,11 +1,11 @@ {{- if .Site.Params.postMeta.categories }} -{{- if and .Params.categories (gt (len .Params.categories) 0) }} +{{- with .Params.categories }}