diff --git a/assets/css/_common/outline/sidebar/index.scss b/assets/css/_common/outline/sidebar/index.scss index d74ca3f..0fe80e5 100644 --- a/assets/css/_common/outline/sidebar/index.scss +++ b/assets/css/_common/outline/sidebar/index.scss @@ -13,6 +13,9 @@ } .cc-license { + + margin-top: 6px; + .cc-opacity { border-bottom: 0; opacity: .7; diff --git a/assets/css/_common/outline/sidebar/sidebar-author-links.scss b/assets/css/_common/outline/sidebar/sidebar-author-links.scss index 3479984..f065881 100644 --- a/assets/css/_common/outline/sidebar/sidebar-author-links.scss +++ b/assets/css/_common/outline/sidebar/sidebar-author-links.scss @@ -1,4 +1,4 @@ -.links-of-author { +.links-of-author, .links-of-social { a { font-size: $font-size-smaller; } diff --git a/assets/css/_common/outline/sidebar/site-state.scss b/assets/css/_common/outline/sidebar/site-state.scss index 08068e8..9958eb2 100644 --- a/assets/css/_common/outline/sidebar/site-state.scss +++ b/assets/css/_common/outline/sidebar/site-state.scss @@ -8,6 +8,11 @@ // Fix issue #103 // The click area of the link becomes smaller padding: 0 15px; + border-left: 1px solid #eee; + + &:first-child { + border-left: none; + } a { border-bottom: 0; @@ -15,6 +20,8 @@ } } + + .site-state-item-count { display: block; font-size: $site-state-item-count-font-size; diff --git a/assets/css/_schemes/Muse/_sidebar.scss b/assets/css/_schemes/Muse/_sidebar.scss index 27aff87..464a8c5 100644 --- a/assets/css/_schemes/Muse/_sidebar.scss +++ b/assets/css/_schemes/Muse/_sidebar.scss @@ -51,7 +51,7 @@ } } -.links-of-author { +.links-of-author, .links-of-social { &:not(:first-child) { margin-top: 15px; } diff --git a/assets/css/_schemes/Pisces/_sidebar.scss b/assets/css/_schemes/Pisces/_sidebar.scss index be53aa0..c8a5715 100644 --- a/assets/css/_schemes/Pisces/_sidebar.scss +++ b/assets/css/_schemes/Pisces/_sidebar.scss @@ -49,11 +49,11 @@ } } -.links-of-author { +.links-of-author, .links-of-social { @include flex-wrap(); } -.links-of-author-item { +.links-of-author-item, .links-of-social-item { @include sidebar-inline-links-item(); @if not $social_icons_only { diff --git a/data/resources.yaml b/data/resources.yaml index 88179ba..f7c4ac1 100644 --- a/data/resources.yaml +++ b/data/resources.yaml @@ -1,9 +1,9 @@ # Public CDN vendor list # -vendors: { - "cdnjs": "//cdnjs.cloudflare.com/ajax/libs/${name}/${version}/${file}", - "unpkg": "//unpkg.com/${name}@${version}/${file}" -} +vendors: + cdnjs: "//cdnjs.cloudflare.com/ajax/libs/${name}/${version}/${file}" + unpkg: "//unpkg.com/${name}@${version}/${file}" + # Javascript Resources # diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index bbcfea2..e0247c2 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -116,8 +116,8 @@ params: # Available values: by | by-nc | by-nc-nd | by-nc-sa | by-nd | by-sa | cc-zero license: by-nc-sa # Available values: big | small - size: small - sidebar: false + size: big + sidebar: true post: false # You can set a language value if you prefer a translated version of CC license, e.g. deed.zh # CC licenses are available in 39 languages, you can find the specific and correct abbreviation you need on https://creativecommons.org @@ -175,7 +175,7 @@ params: # Manual define the sidebar width. If commented, will be default for: # Muse | Mist: 320 # Pisces | Gemini: 240 - width: 240 + width: 256 # Sidebar Display (only for Muse | Mist), available values: # - post expand on posts automatically. Default. @@ -192,11 +192,11 @@ params: # Sidebar Avatar avatar: # Replace the default image and set the url here. - url: #/images/avatar.gif + url: /imgs/hugo_next_avatar.png # If true, the avatar will be displayed in circle. - rounded: false + rounded: true # If true, the avatar will be rotated with the cursor. - rotated: false + rotated: true # Posts / Categories / Tags in sidebar. siteState: true @@ -205,10 +205,18 @@ params: # Usage: `Key: permalink || icon` # Key is the link label showing to end users. # Value before `||` delimiter is the target permalink, value after `||` delimiter is the name of Font Awesome icon. - social: - #GitHub: https://github.com/yourname || fab fa-github - #E-Mail: mailto:yourname@gmail.com || fa fa-envelope - #Weibo: https://weibo.com/yourname || fab fa-weibo + socials: + # - name: GitHub + # icon: fab fa-github + # url: https://github.com/yourname + # weight: 1 + # - name: 微博 + # icon: fab fa-weibo + # url: https://weibo.com/yourname + # weight: 2 + social0: Github || https://github.com/elkan1788 || fab fa-github + #social1: E-Mail || mailto:yourname@gmail.com || fa fa-envelope + social2: 知乎 || https://www.zhihu.com/people/lisenhui || fa fa-book #Google: https://plus.google.com/yourname || fab fa-google #Twitter: https://twitter.com/yourname || fab fa-twitter #FB Page: https://www.facebook.com/yourname || fab fa-facebook @@ -220,17 +228,18 @@ params: socialIcons: enable: true iconsOnly: false - transition: false + transition: true # Blog rolls linksSets: icon: fa fa-globe - title: Links + title: 友情链接 # Available values: block | inline - layout: block + layout: inline - links: - #Title: https://example.com + links: + link0: Hugo-NexT || https://gitee.com/hugo-next/hugo-theme-next + link1: 凡梦星尘空间站 || https://lisenhui.cn # Table of Contents in the Sidebar # Front-matter variable (nonsupport wrap expand_all). diff --git a/exampleSite/content/hello-world.md b/exampleSite/content/hello-world.md index a34ef48..6597354 100644 --- a/exampleSite/content/hello-world.md +++ b/exampleSite/content/hello-world.md @@ -10,10 +10,10 @@ publishDate: '2022-05-21T17:06:24+08:00' weight: 1 categories: - - + - Blog tags: - - - - + - Hugo + - Startup toc: false draft: true diff --git a/i18n/zh-cn.yaml b/i18n/zh-cn.yaml index 49b2eb5..d2200f5 100644 --- a/i18n/zh-cn.yaml +++ b/i18n/zh-cn.yaml @@ -11,20 +11,22 @@ MSearchLabel: ColoneFlag: other: ":" -SitePostsTitle: +SbPostsLable: other: "日志" -SiteCatesTitle: +SbCatesTitle: other: "分类" -SiteTagsTitle: +SbTagsTitle: other: "标签" TableOfContents: other: "文章目录" -SiteInfo: +SiteOverview: other: "站点概览" -RSSTitle: +RSSLable: other: "RSS 订阅" CCLinkTitle: other: "共享知识" +BackTop: + other: "返回顶部" PostPublishDate: other: "发表于" diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 7bb5e52..65af36d 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -35,6 +35,7 @@ {{- if ne $P.sidebar.display "remove" }} + {{- partial "sidebar" (dict "P" $P "Page" .Page "Scratch" .Scratch) }} {{- end }} diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html new file mode 100644 index 0000000..0b4818c --- /dev/null +++ b/layouts/partials/sidebar.html @@ -0,0 +1,37 @@ + + + \ No newline at end of file diff --git a/layouts/partials/sidebar/navtoc.html b/layouts/partials/sidebar/navtoc.html new file mode 100644 index 0000000..e69de29 diff --git a/layouts/partials/sidebar/overview.html b/layouts/partials/sidebar/overview.html new file mode 100644 index 0000000..954ab17 --- /dev/null +++ b/layouts/partials/sidebar/overview.html @@ -0,0 +1,94 @@ +{{- $author := .P.author }} +{{- $Site := .Page.Site }} + + +{{- if .P.siteState }} +
+ +
+{{- end }} +{{- if and .P.chat.enable (or (or .P.chatra.enable .P.tidio.enable) .P.gitter.enable) }} + +{{- end }} + + +{{- $lang := .Scratch.Get "lang" }} +{{- with .P.creativeCommons }} +{{- if .sidebar }} +
+ + {{ T + +
+{{- end }} +{{- end }} + +{{- if .P.links }} + +{{- end }} \ No newline at end of file