diff --git a/archetypes/default.md b/archetypes/default.md index 518c212..de95136 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -1,21 +1,47 @@ --- -title: '{{ replace .Name "-" " " | title }}' -description: 'Short description of the article.' -keywords: 'Key words' -isCJKLanguage: true +title: "{{ replace .Name "-" " " | title }}" +description: "{{ .Name }}" +keywords: "{{replace .Name "-" ","}}" -author: 'Author of the article' -lastmod: '{{ .Date }}' -publishDate: '{{ .Date }}' -weight: 1 +date: {{ .Date }} +lastmod: {{ .Date }} categories: - tags: - - - - + - + - -toc: false -draft: true -url: '{{ lower .Name }}.html' +# 原文作者 +# Post's origin author name +#author: +# 原文链接 +# Post's origin link URL +#link: +# 图片链接,用在open graph和twitter卡片上 +# Image source link that will use in open graph and twitter card +#imgs: +# 在首页展开内容 +# Expand content on the home page +#expand: true +# 外部链接地址,访问时直接跳转 +# It's means that will redirecting to external links +#extlink: +# 在当前页面开启或关闭评论功能 +# Switch to enabled or disabled comment plugins in this post +#comment: +# enable: false +# 开启文章目录功能 +# Enable table of content +#toc: false +# 绝对访问路径 +# Absolute link for visit +#url: "{{ lower .Name }}.html" +# 开启文章置顶,数字越小越靠前 +# Sticky post set-top in home page and the smaller nubmer will more forward. +#weight: 1 --- + +{{ .Name }} + + diff --git a/assets/css/_common/components/pages/categories.scss b/assets/css/_common/components/pages/categories.scss index 130c58f..b79ac03 100644 --- a/assets/css/_common/components/pages/categories.scss +++ b/assets/css/_common/components/pages/categories.scss @@ -1,10 +1,14 @@ .category-all-page { + + min-height: 700px; + .category-all-title { + font-size: 1.35em; text-align: center; } .category-all { - margin-top: 20px; + margin-top: 40px; } .category-list { diff --git a/assets/css/_common/components/pages/tag-cloud.scss b/assets/css/_common/components/pages/tag-cloud.scss index 011834b..71bc6ad 100644 --- a/assets/css/_common/components/pages/tag-cloud.scss +++ b/assets/css/_common/components/pages/tag-cloud.scss @@ -1,5 +1,19 @@ .tag-cloud { text-align: center; + min-height: 700px; + + .tag-cloud-title { + text-align: center; + font-size: 1.35em; + + .tag-list-count { + font-size: 0.56em; + } + } + + .tag-cloud-tags { + margin-top: 40px; + } a { display: inline-block; @@ -12,6 +26,7 @@ .tag-cloud-#{$tag-cloud} { border-bottom-color: $tag-cloud-color; color: $tag-cloud-color; + font-size: #{0.85+($tag-cloud * 0.05)}em } } diff --git a/assets/css/_common/components/post/index.scss b/assets/css/_common/components/post/index.scss index 34044f4..b8c55d9 100644 --- a/assets/css/_common/components/post/index.scss +++ b/assets/css/_common/components/post/index.scss @@ -18,7 +18,7 @@ .use-motion { @if $motion_trans_post_block { - .post-block, .pagination, .comments { + .post-block, .pagination, .comments, .post-comments { visibility: hidden; } } diff --git a/assets/css/_common/components/post/post-followme.scss b/assets/css/_common/components/post/post-followme.scss index 34cfec9..1461877 100644 --- a/assets/css/_common/components/post/post-followme.scss +++ b/assets/css/_common/components/post/post-followme.scss @@ -1,9 +1,11 @@ @if $follow_me { .followme { color: $grey; - padding: 1em 1.5em; + /* padding: 1em 1.5em; */ text-align: center; @include post-card(); + border-left: none; + border-bottom: #46b404 solid 5px; .social-list { @include flex-wrap(); @@ -11,6 +13,10 @@ .social-item { margin: .5em 2em; + a:hover { + font-weight: bold; + } + @include tablet-mobile() { margin: .5em .75em; } diff --git a/assets/css/_common/components/post/post-footer.scss b/assets/css/_common/components/post/post-footer.scss index fa231a5..be39fda 100644 --- a/assets/css/_common/components/post/post-footer.scss +++ b/assets/css/_common/components/post/post-footer.scss @@ -5,6 +5,25 @@ // See https://caniuse.com/flexbox-gap .post-footer { @include flex-column(); + + hr{ + text-align:center; + line-height:0px; + height: 0px; + background-image: none; + border-bottom: .125em dashed #999; + margin: 24px 0 12px 0; + + &:after{ + content: $post_end_line_tip; + font-size: .9em; + font-weight: bold; + background: #fff; + padding: 0 5px; + z-index:2; + } +} + } .post-eof { @@ -19,21 +38,51 @@ } @if $creative_commons_post { - .post-copyright ul { - list-style: none; - padding: .5em 1em; - @include post-card(); + + .post-copyright { + border-left: 3px solid #ff2a2a; + background: var(--card-bg-color); + + img { + margin: 8px; + opacity: .8; + filter: blur(.08em); + -webkit-transform: rotate(320deg); + -moz-transform: rotate(320deg); + -ms-transform: rotate(320deg); + -o-transform: rotate(320deg); + transform: rotate(320deg); + } + + ul { + list-style: none; + padding: .5em 1em; + @include post-card(); + border: none; + background: none; + } } + } .post-tags { - margin-top: 40px; + margin-bottom: 20px; text-align: center; a { display: inline-block; font-size: $font-size-smaller; + &:before { + @if $post_end_tag_icon { + content: "🔖"; + font-size: 1.25em; + } + @else { + content: "#"; + } + } + &:not(:last-child) { margin-right: 10px; } diff --git a/assets/css/_common/components/post/post-header.scss b/assets/css/_common/components/post/post-header.scss index 3c7eb44..8be25e6 100644 --- a/assets/css/_common/components/post/post-header.scss +++ b/assets/css/_common/components/post/post-header.scss @@ -1,6 +1,6 @@ .posts-expand .post-header { font-size: $font-size-large; - margin-bottom: 60px; + margin-bottom: 40px; text-align: center; } @@ -94,9 +94,10 @@ margin: 0 .5em; } +/* Make post meta dislay in oneline .post-meta-item-icon { margin-right: 3px; -} +} */ .post-meta-item-text { @if not $post_meta_item_text { @@ -115,6 +116,6 @@ @if $busuanzi_enable and $busuanzi_post_views { #busuanzi_container_page_pv { - display: none; + display: inline-block; } } diff --git a/assets/css/_common/components/post/post-reward.scss b/assets/css/_common/components/post/post-reward.scss index d96301e..ca7d163 100644 --- a/assets/css/_common/components/post/post-reward.scss +++ b/assets/css/_common/components/post/post-reward.scss @@ -1,8 +1,13 @@ .reward-container { margin: $post-card-margin; - padding: 1em 0; + /* padding: 1em 0; */ text-align: center; + div>i { + font-size: 1.85em; + margin-right: 4px; + } + button { @include button($sidebar-highlight); border: 2px solid $sidebar-highlight; @@ -21,7 +26,7 @@ display: block; } - div { + .post-reward-item { display: inline-block; span { @@ -29,19 +34,23 @@ } @if $reward_settings_animation { + &:hover span { animation: next-roll .1s infinite linear; // The animation may affect :hover of img in dark mode pointer-events: none; } - } + + } } img { display: inline-block; - margin: .8em 2em 0; + margin: .8em 1.2em; max-width: 100%; width: 180px; + border: #eee 1px solid; + box-shadow:rgba(0,0,0,0.2) 0 1px 5px 0px; } } diff --git a/assets/css/_common/components/reading-progress.scss b/assets/css/_common/components/reading-progress.scss index 791dcc9..b85cdbf 100644 --- a/assets/css/_common/components/reading-progress.scss +++ b/assets/css/_common/components/reading-progress.scss @@ -1,8 +1,8 @@ @if $reading_progress_enable { .reading-progress-bar { --progress: 0; - background: convert($reading_progress_color); - height: convert($reading_progress_height); + background: $reading_progress_color; + height: $reading_progress_height; position: fixed; z-index: $zindex-5; diff --git a/assets/css/_common/components/third-party/index.scss b/assets/css/_common/components/third-party/index.scss index 101dc72..d6b6a2a 100644 --- a/assets/css/_common/components/third-party/index.scss +++ b/assets/css/_common/components/third-party/index.scss @@ -5,6 +5,8 @@ @import 'related-posts'; @import 'math'; @import 'gitter'; +@import 'livere'; +@import 'waline'; .use-motion .animated { // Fix issue #48 #55 diff --git a/assets/css/_common/components/third-party/livere.scss b/assets/css/_common/components/third-party/livere.scss new file mode 100644 index 0000000..23a0170 --- /dev/null +++ b/assets/css/_common/components/third-party/livere.scss @@ -0,0 +1,5 @@ + @if $livere_enable { + #livereAdWrapper, #taboola-livere { + display: none; + } + } diff --git a/assets/css/_common/components/third-party/waline.scss b/assets/css/_common/components/third-party/waline.scss new file mode 100644 index 0000000..dc2b87c --- /dev/null +++ b/assets/css/_common/components/third-party/waline.scss @@ -0,0 +1,5 @@ +@if $waline_enable { + .wl-actions>button:nth-child(3) { + display: none + } +} \ No newline at end of file diff --git a/assets/css/_common/outline/header/bookmark.scss b/assets/css/_common/outline/header/bookmark.scss index 28876ce..1401168 100644 --- a/assets/css/_common/outline/header/bookmark.scss +++ b/assets/css/_common/outline/header/bookmark.scss @@ -3,15 +3,24 @@ border-bottom: 0; position: fixed; top: -10px; + transition: top .3s; - @include sidebar-toggle-position(true); + -moz-transition:top .3s; + -webkit-transition:top .3s; + -o-transition:top .3s; + + @if not $github_banner_enable { + @include sidebar-toggle-position(true); + } @else { + left: 30px; + } @include tablet-mobile() { display: none; } &::before { - color: convert($bookmark_color); + color: $bookmark_color; font-size: 32px; line-height: 1; @include font-family-icons('\f02e'); 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/_common/scaffolding/comments.scss b/assets/css/_common/scaffolding/comments.scss index 8ace888..a0402cd 100644 --- a/assets/css/_common/scaffolding/comments.scss +++ b/assets/css/_common/scaffolding/comments.scss @@ -37,3 +37,119 @@ padding-top: 0; } } + +.post-comments { + @if $scheme !='Gemini' { + margin-top: 60px; + } + + overflow: hidden; + + .comment-head { + margin-bottom: 20px; + + .comment-headline { + display: inline-block; + vertical-align: middle; + font-weight: 700; + font-size: 1.4em; + } + + @if $two_comments_enable { + .comment-switch { + display: inline-block; + float: right; + margin: 2px auto; + padding: 4px 16px; + width: max-content; + border-radius: 8px; + background: #eee; + + .first-comment { + color: $first_comment_color; + + @if $two_comments_actived==$first_comment_name { + font-weight: bold; + } + } + + .second-comment { + color: $second_comment_color; + + @if $two_comments_actived==$second_comment_name { + font-weight: bold; + } + } + + $switch_btn_bg_color: $first_comment_color; + + .switch-btn { + position: relative; + display: inline-block; + margin: -4px 8px 0; + width: 42px; + height: 22px; + border-radius: 34px; + vertical-align: middle; + cursor: pointer; + -webkit-transition: .4s; + -moz-transition: .4s; + -o-transition: .4s; + -ms-transition: .4s; + transition: .4s; + + @if $two_comments_actived==$second_comment_name { + $switch_btn_bg_color: $second_comment_color; + } + + background-color: $switch_btn_bg_color; + + &:before { + position: absolute; + bottom: 4px; + left: 4px; + width: 14px; + height: 14px; + border-radius: 50%; + content: ''; + background-color: #fff; + -webkit-transition: .4s; + -moz-transition: .4s; + -o-transition: .4s; + -ms-transition: .4s; + transition: .4s + } + + &.move:before { + -webkit-transform: translateX(20px); + -moz-transform: translateX(20px); + -o-transform: translateX(20px); + -ms-transform: translateX(20px); + transform: translateX(20px); + } + } + } + } + } + + @if $two_comments_enable { + $first_comment_display: none; + $second_comment_display: none; + + @if $two_comments_actived==$first_comment_name { + $first_comment_display: block; + } + + @if $two_comments_actived==$second_comment_name { + $second_comment_display: block; + } + + .comment-wrap>div:nth-child(1) { + display: $first_comment_display; + } + + .comment-wrap>div:nth-child(2) { + display: $second_comment_display; + } + } +} \ No newline at end of file diff --git a/assets/css/_common/scaffolding/fontawesome/animation.scss b/assets/css/_common/scaffolding/fontawesome/animation.scss new file mode 100644 index 0000000..cedac48 --- /dev/null +++ b/assets/css/_common/scaffolding/fontawesome/animation.scss @@ -0,0 +1,4 @@ +.fa-spin { + -webkit-animation: fa-spin .8s infinite linear; + animation: fa-spin .8s infinite linear; +} \ No newline at end of file diff --git a/assets/css/_common/scaffolding/fontawesome/index.scss b/assets/css/_common/scaffolding/fontawesome/index.scss new file mode 100644 index 0000000..ed88f4c --- /dev/null +++ b/assets/css/_common/scaffolding/fontawesome/index.scss @@ -0,0 +1 @@ +@import 'animation'; \ No newline at end of file diff --git a/assets/css/_common/scaffolding/highlight/index.scss b/assets/css/_common/scaffolding/highlight/index.scss index caad07d..8181783 100644 --- a/assets/css/_common/scaffolding/highlight/index.scss +++ b/assets/css/_common/scaffolding/highlight/index.scss @@ -43,6 +43,7 @@ pre, code { font-family: $code-font-family; + color: #fff; } code { @@ -61,6 +62,7 @@ kbd { font-family: inherit; padding: .1em .3em; white-space: nowrap; + color: #fff; } // `highlight.line_number: false` and `highlight.wrap: false` diff --git a/assets/css/_common/scaffolding/index.scss b/assets/css/_common/scaffolding/index.scss index aec7a8d..5cd24ed 100644 --- a/assets/css/_common/scaffolding/index.scss +++ b/assets/css/_common/scaffolding/index.scss @@ -10,3 +10,4 @@ @import 'tags'; @import 'pagination'; @import 'comments'; +@import 'fontawesome'; diff --git a/assets/css/_common/scaffolding/tags/pdf.scss b/assets/css/_common/scaffolding/tags/pdf.scss index e61cad9..b873a21 100644 --- a/assets/css/_common/scaffolding/tags/pdf.scss +++ b/assets/css/_common/scaffolding/tags/pdf.scss @@ -1,7 +1,7 @@ @if $pdf_enable { .pdfobject-container { iframe, embed { - height: convert($pdf_height); + height: $pdf_height; width: 100%; } } diff --git a/assets/css/_mixins.scss b/assets/css/_mixins.scss index 7685639..9e435a8 100644 --- a/assets/css/_mixins.scss +++ b/assets/css/_mixins.scss @@ -125,9 +125,7 @@ } @mixin sidebar-toggle-position($reverse) { - // TODO how use nth function. - //$alignment : list.nth(sidebar-toggle-alignment($reverse), 0); - $alignment : 0; + $alignment : nth(sidebar-toggle-alignment($reverse), 1); #{$alignment}: $b2t-position-right; @include tablet-mobile() { #{$alignment}: $b2t-position-right-mobile; diff --git a/assets/css/_schemes/Gemini/index.scss b/assets/css/_schemes/Gemini/index.scss index 2846599..ad88c56 100644 --- a/assets/css/_schemes/Gemini/index.scss +++ b/assets/css/_schemes/Gemini/index.scss @@ -25,7 +25,7 @@ // ================================================== // Post blocks. .main-inner > { - .sub-menu, .post-block, .tabs-comment, .comments, .pagination { + .sub-menu, .post-block, .tabs-comment, .comments, .post-comments, .pagination { background: var(--content-bg-color); border-radius: $border-radius-inner; box-shadow: $box-shadow-inner; @@ -47,7 +47,7 @@ } // Post & Comments blocks. -.post-block, .comments { +.post-block, .comments, .post-comments { padding: $content-desktop-padding; } @@ -96,7 +96,7 @@ padding: ($content-tablet-padding * 2); } - .comments { + .comments, .post-comments { padding: $content-tablet-padding ($content-tablet-padding * 2); // padding: initial; // padding-top: $content-tablet-padding; @@ -124,7 +124,7 @@ padding: $sidebar-offset; } - .comments { + .comments, .post-comments { padding: 10px $sidebar-offset; } } 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/assets/css/_variables/base.scss b/assets/css/_variables/base.scss index 0fcd2b7..492bc72 100644 --- a/assets/css/_variables/base.scss +++ b/assets/css/_variables/base.scss @@ -68,8 +68,12 @@ $card-bg-color-dark : $black-light; $menu-item-bg-color : $whitesmoke; $menu-item-bg-color-dark : $black-light; -$theme-color : convert($theme_color_light); -$theme-color-dark : convert($theme_color_dark); +// TODO why there need convert +//$theme-color : convert($theme_color_light); +//$theme-color-dark : convert($theme_color_dark); + +$theme-color : $theme_color_light; +$theme-color-dark : $theme_color_dark; // Typography // Font, line-height, and elements colors. @@ -295,7 +299,7 @@ $b2t-bg-color : $black-deep; $post-eof-margin-top : 80px; // or 160px for more white space; $post-eof-margin-bottom : 60px; // or 120px for less white space; -$post-card-margin : 1em 0 0; +$post-card-margin : 1em 0; // Note colors diff --git a/assets/css/main.scss b/assets/css/main.scss index 454d880..9d5da10 100644 --- a/assets/css/main.scss +++ b/assets/css/main.scss @@ -1,8 +1,6 @@ // CSS Style Guide: https://codeguide.co/#css - // All variables from site's config content. -{{- $P := .Site.Params -}} - +{{- $P := .Site.Params }} // Base $scheme: {{ $P.scheme }}; $darkmode: {{ $P.darkmode }}; @@ -72,7 +70,7 @@ $toc_wrap: {{ $P.toc.wrap }}; // Posts $creative_commons_post: {{ $P.creativeCommons.post }}; -$follow_me: {{ isset $P "followMe" }}; +$follow_me: {{ isset $P "followme" }}; $motion_trans_coll_header: {{ $P.motion.transition.collHeader }}; $motion_trans_post_block: {{ $P.motion.transition.postBlock }}; $motion_trans_post_body: {{ $P.motion.transition.postBody }}; @@ -80,10 +78,12 @@ $motion_trans_post_header: {{ $P.motion.transition.postHeader }}; $post_edit_enable: {{ $P.postEdit.enable }}; $post_meta_item_text: {{ $P.postMeta.itemText }}; $reward_settings_animation: {{ $P.rewardSets.animation }}; +$post_end_line_tip: "{{ $P.postFooter.endLineTip }}"; +$post_end_tag_icon: {{ $P.postFooter.tagIcon }}; // TODO find the paramters -$text_align_desktop: center; -$text_align_mobile: center; +$text_align_desktop: justify; +$text_align_mobile: justify; // Note $note_icons: {{ $P.note.icons }}; @@ -118,7 +118,21 @@ $gitter_enable: {{ $P.gitter.enable }}; // Comment $disqusjs_enable: {{ $P.disqusjs.enable }}; +$livere_enable: {{ $P.livere.enable }}; $utterances_enable: {{ $P.utterances.enable }}; +$waline_enable: {{ $P.waline.enable }}; +{{- with .Site.Params.comments }} +{{ $tce := and (isset . "nav") (and .storage (gt (len .nav) 1)) }} +$two_comments_enable: {{ $tce }}; +{{- if $tce }} +{{- $sortNav := sort .nav "weight" }} +$two_comments_actived: {{ .active }}; +$first_comment_color: {{ (index $sortNav 0).color }}; +$first_comment_name: {{ lower (index $sortNav 0).name }}; +$second_comment_color: {{ (index $sortNav 1).color }}; +$second_comment_name: {{ lower (index $sortNav 1).name }}; +{{- end }} +{{- end }} // // Variables Layer diff --git a/assets/js/next-boot.js b/assets/js/next-boot.js index 6262daa..dedb54b 100644 --- a/assets/js/next-boot.js +++ b/assets/js/next-boot.js @@ -38,17 +38,17 @@ NexT.boot.refresh = function() { * Need to add config option in Front-End at 'scripts/helpers/next-config.js' file. */ CONFIG.prism && window.Prism.highlightAll(); - CONFIG.mediumzoom && window.mediumZoom('.post-body :not(a) > img, .post-body > img', { + /*CONFIG.mediumzoom && window.mediumZoom('.post-body :not(a) > img, .post-body > img', { background: 'var(--content-bg-color)' - }); + });*/ CONFIG.lazyload && window.lozad('.post-body img').observe(); CONFIG.pangu && window.pangu.spacingPage(); CONFIG.exturl && NexT.utils.registerExtURL(); NexT.utils.registerCopyCode(); NexT.utils.registerTabsTag(); - NexT.utils.registerActiveMenuItem(); - NexT.utils.registerLangSelect(); + /*NexT.utils.registerActiveMenuItem(); + NexT.utils.registerLangSelect();*/ NexT.utils.registerSidebarTOC(); NexT.utils.registerPostReward(); NexT.utils.wrapTableWithBox(); diff --git a/assets/js/utils.js b/assets/js/utils.js index 0a0665b..4b95e07 100644 --- a/assets/js/utils.js +++ b/assets/js/utils.js @@ -207,7 +207,7 @@ NexT.utils = { }, false); }, - registerActiveMenuItem: function() { + /*registerActiveMenuItem: function() { document.querySelectorAll('.menu-item a[href]').forEach(target => { const isSamePath = target.pathname === location.pathname || target.pathname === location.pathname.replace('index.html', ''); const isSubPath = !CONFIG.root.startsWith(target.pathname) && location.pathname.startsWith(target.pathname); @@ -228,7 +228,7 @@ NexT.utils = { window.location.href = target.dataset.href; }); }); - }, + },*/ registerSidebarTOC: function() { this.sections = [...document.querySelectorAll('.post-toc li a.nav-link')].map(element => { diff --git a/data/resources.yaml b/data/resources.yaml new file mode 100644 index 0000000..f7c4ac1 --- /dev/null +++ b/data/resources.yaml @@ -0,0 +1,27 @@ +# Public CDN vendor list +# +vendors: + cdnjs: "//cdnjs.cloudflare.com/ajax/libs/${name}/${version}/${file}" + unpkg: "//unpkg.com/${name}@${version}/${file}" + + +# Javascript Resources +# +js: + - name: animejs + version: 3.2.1 + file: lib/anime.min.js + - name: mathjax + version: 3.2.0 + file: es5/tex-mml-chtml.js + +# CSS Resources +# +css: + - name: '@fortawesome/fontawesome-free' + version: 6.1.1 + file: css/all.min.css + alias: font-awesome + - name: animate.css + version: 3.1.1 + file: animate.min.css \ No newline at end of file diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index f4e2bd1..0daee31 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -8,22 +8,85 @@ baseURL: / theme: hugo-theme-next +paginate: 8 + +enableEmoji: true + +# Make markdown content support HTML syntax +markup: + goldmark: + renderer: + unsafe: true + +defaultContentLanguage: zh-cn +languages: + zh-cn: + title: Hugo NexT + languageName: 中文 + languageCode: zh-CN + hasCJKLanguage: true + weight: 1 + en: + title: Hugo NexT + languageName: English + languageCode: en + hasCJKLanguage: false + weight: 2 + params: + author: Theme NexT + subtitle: Theme for Hugo + description: Stay easily & powerful. + keywords: Hugo,NexT,Theme,easily,powerful + +#-------------------------------------- +# Menus Settings +# Attribute pre is Font Awesome icon name without prefix "fa-". +# External url should start with http:// or https:// . +# ------------------------------------- +menus: + main: + - identifier: home + name: 首页 + url: / + pre: home + weight: 1 + - identifier: about + name: 关于 + url: /about.html + pre: user + weight: 2 + - identifier: archives + name: 归档 + url: /posts + pre: archive + weight: 3 + - identifier: commonweal + name: 公益 404 + url: /404.html + pre: heartbeat + weight: 4 + params: + mainSections: ["posts"] + yearFormat: "2006" + monthFormat: "01-02" + dateFormat: "2006-01-02" + timeFormat: "2006-01-02T15:04:05-07:00" # --------------------------------------------------------------- # Theme Core Configuration Settings # See: https://theme-next.js.org/docs/theme-settings/ # --------------------------------------------------------------- # Allow to cache content generation. - cache: - enable: true + #cache: + # enable: true # Remove unnecessary files after hexo generate. - minify: false + # minify: false # Define custom file paths. # Create your custom files in site directory `source/_data` and uncomment needed files below. - custom_file_path: + customFilePath: #head: source/_data/head.njk #header: source/_data/header.njk #sidebar: source/_data/sidebar.njk @@ -47,22 +110,26 @@ params: scheme: Gemini # Dark Mode - darkmode: false + darkmode: true # --------------------------------------------------------------- # Site Information Settings # --------------------------------------------------------------- + author: NexT 主题 + subtitle: 为 Hugo 打造的主题 + description: 保持简单的易用性和强大的功能。 + keywords: Hugo,NexT,主题,简单,强大 favicon: - small: /images/favicon-16x16-next.png - medium: /images/favicon-32x32-next.png - apple_touch_icon: /images/apple-touch-icon-next.png - safari_pinned_tab: /images/logo.svg + icon: /imgs/icons/favicon.ico + small: /imgs/icons/favicon_16x16_next.png + medium: /imgs/icons/favicon_32_32_next.png + appleTouchIcon: /imgs/icons/apple_touch_icon_next.png #android_manifest: /manifest.json # Custom Logo (Warning: Do not support scheme Mist) - custom_logo: #/uploads/custom-logo.jpg + customLogo: #/imgs/hugo_next_logo.png # Creative Commons 4.0 International License. # See: https://creativecommons.org/about/cclicenses/ @@ -70,25 +137,25 @@ 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 - post: false + size: big + sidebar: true + post: true # 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 - language: + # language: # Open graph settings # See: https://hexo.io/docs/helpers#open-graph - open_graph: + openGraph: enable: true - options: - #twitter_card: - #twitter_id: - #twitter_site: - #twitter_image: - #google_plus: - #fb_admins: - #fb_app_id: + #twitter: + #creator: + #image: + #site: + #googlePlus: + #facebook: + # admins: + # app_id: # --------------------------------------------------------------- @@ -99,7 +166,7 @@ params: # Key is the name of menu item. If the translation for this item is available, the translated text will be loaded, otherwise the Key name will be used. Key is case-sensitive. # Value before `||` delimiter is the target link, value after `||` delimiter is the name of Font Awesome icon. # External url should start with http:// or https:// - menu: + #menu: #home: / || fa fa-home #about: /about/ || fa fa-user #tags: /tags/ || fa fa-tags @@ -112,7 +179,7 @@ params: # Enable / Disable menu icons / item badges. menuSets: icons: true - badges: false + badges: true # --------------------------------------------------------------- @@ -128,7 +195,7 @@ params: # Manual define the sidebar width. If commented, will be default for: # Muse | Mist: 320 # Pisces | Gemini: 240 - width: 300 + width: 256 # Sidebar Display (only for Muse | Mist), available values: # - post expand on posts automatically. Default. @@ -145,11 +212,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 @@ -158,10 +225,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 @@ -173,17 +248,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). @@ -209,14 +285,14 @@ params: footer: # Specify the year when the site was setup. If not defined, current year will be used. - #since: 2021 + since: 2010 # Icon between year and copyright info. icon: # Icon name in Font Awesome. See: https://fontawesome.com/icons name: fa fa-heart # If you want to animate the icon, set it to true. - animated: false + animated: true # Change the color of icon, using Hex Code. color: "#ff0000" @@ -228,14 +304,14 @@ params: # Beian ICP and gongan information for Chinese users. See: https://beian.miit.gov.cn, http://www.beian.gov.cn beian: - enable: false - icp: + enable: true + icp: 粤ICP备18047355-1号 # The digit in the num of gongan beian. - gongan_id: + provinceAbbr: 沪 # The full num of gongan beian. - gongan_num: + gonganNum: 11010102001808 # The icon for gongan beian. See: http://www.beian.gov.cn/portal/download - gongan_icon_url: + #gongan_icon_url: # --------------------------------------------------------------- @@ -248,7 +324,7 @@ params: # Read more button # If true, the read more button will be displayed in excerpt section. - read_more_btn: true + readMoreBtn: true # Post meta display settings postMeta: @@ -258,12 +334,17 @@ params: enable: true anotherDay: true categories: true + wordCount: true + readTime: true # Post wordcount display settings # Dependencies: https://github.com/next-theme/hexo-word-counter - symbols_count_time: - separated_meta: true - item_text_total: false + # symbols_count_time: + # separated_meta: true + # item_text_total: false + postFooter: + endLineTip: "~ 我可是有底线的哟 ~" + tagIcon: true # Use icon instead of the symbol # to indicate the tag at the bottom of the post tag_icon: false @@ -272,23 +353,23 @@ params: # Front-matter variable (nonsupport animation). rewardSets: # If true, a donate button will be displayed in every article by default. - enable: false - animation: false - #comment: Buy me a coffee + enable: true + animation: true + comment: '请我喝杯咖啡吧 ヾ(^▽^*)))' reward: - #wechatpay: /images/wechatpay.png - #alipay: /images/alipay.png + wechatpay: /imgs/wechat-pay.png + alipay: /imgs/ali-pay.png #paypal: /images/paypal.png #bitcoin: /images/bitcoin.png # Subscribe through Telegram Channel, Twitter, etc. # Usage: `Key: permalink || icon` (Font Awesome) followMe: - Twitter: https://twitter.com/username || fab fa-twitter - #Telegram: https://t.me/channel_name || fab fa-telegram - #WeChat: /images/wechat_channel.jpg || fab fa-weixin - #RSS: /atom.xml || fa fa-rss + #channel0: Twitter || https://twitter.com/username || fab fa-twitter + #channel1: Telegram || https://t.me/channel_name || fab fa-telegram + channel2: WeChat || /images/wechat_channel.jpg || fab fa-weixin + channel3: RSS || /atom.xml || fa fa-rss # Related popular posts # Dependencies: https://github.com/sergeyzwezdin/hexo-related-posts @@ -300,7 +381,7 @@ params: # Post edit # Easily browse and edit blog source code online. postEdit: - enable: false + enable: true url: https://github.com/user-name/repo-name/tree/branch-name/subdirectory-name/ # Link for view source #url: https://github.com/user-name/repo-name/edit/branch-name/subdirectory-name/ # Link for fork & edit @@ -390,18 +471,18 @@ params: # Reading progress bar readingProgress: - enable: false + enable: true # Available values: left | right start: left # Available values: top | bottom - position: top + position: bottom reversed: false color: "#37c6c0" height: 3px # Bookmark Support bookmark: - enable: false + enable: true # Customize the color of the bookmark. color: "#222" # If auto, save the reading progress when closing the page or clicking the bookmark-icon. @@ -410,7 +491,7 @@ params: # `Follow me on GitHub` banner in the top-right corner. githubBanner: - enable: false + enable: true permalink: https://github.com/yourname title: Follow me on GitHub @@ -483,19 +564,19 @@ params: # Google Webmaster tools verification. # See: https://developers.google.com/search - google_site_verification: + googleSiteVerification: 5AUIVYTbHIAuz-eQtxSfZbWW5eg9_EVZMSQycIuXrG0 # Bing Webmaster tools verification. # See: https://www.bing.com/webmasters - bing_site_verification: + bingSiteVerification: # Yandex Webmaster tools verification. # See: https://webmaster.yandex.ru - yandex_site_verification: + yandexSiteVerification: # Baidu Webmaster tools verification. # See: https://ziyuan.baidu.com/site - baidu_site_verification: + baiduSiteVerification: # --------------------------------------------------------------- @@ -573,22 +654,35 @@ params: # Multiple Comment System Support comments: + enable: true # Available values: tabs | buttons - style: tabs + #style: tabs # Choose a comment system to be displayed by default. # Available values: disqus | disqusjs | changyan | livere | gitalk | utterances - active: + active: waline # Setting `true` means remembering the comment system selected by the visitor. storage: true # Lazyload all comment systems. - lazyload: false + #lazyload: false # Modify texts or order for any naves, here are some examples. nav: - #disqus: - # text: Load Disqus - # order: -1 - #gitalk: - # order: -2 + - name: Waline + title: Waline + color: "#27ae60" + weight: 1 + - name: Utterances + title: Utters + color: "#494949" + weight: 2 + + waline: + enable: true + placeholder: "请文明发言" + emoji: false + imgUploader: false + wordLimit: 200 + requiredMeta: ['nick', 'mail'] + serverURL: "https://waline.js.org" # Disqus # For more information: https://disqus.com @@ -618,7 +712,9 @@ params: # LiveRe comments system # You can get your uid from https://livere.com/insight/myCode (General web site) - livere_uid: # + livere: + enable: true + uid: MTAyMC81MTM4MC8yNzg2MQ== # # Gitalk # For more information: https://gitalk.github.io @@ -640,10 +736,11 @@ params: # Utterances # For more information: https://utteranc.es utterances: - enable: false - repo: user-name/repo-name # Github repository owner and name + enable: true + repo: username/repo-name # Github repository owner and name # Available values: pathname | url | title | og:title - issue_term: pathname + issueTerm: pathname + label: Comments # Available values: github-light | github-dark | preferred-color-scheme | github-dark-orange | icy-dark | dark-blue | photon-dark | boxy-light theme: github-light @@ -666,7 +763,7 @@ params: # AddThis Share. See: https://www.addthis.com # Go to https://www.addthis.com/dashboard to customize your tools. - add_this_id: + addThisId: # --------------------------------------------------------------- @@ -700,12 +797,12 @@ params: # Show number of visitors of each article. # You can visit https://www.leancloud.cn to get AppID and AppKey. - leancloud_visitors: + leancloudVisitors: enable: false - app_id: # - app_key: # + appId: # + appKey: # # Required for apps from CN region - server_url: # + serverUrl: # # Dependencies: https://github.com/theme-next/hexo-leancloud-counter-security # If you don't care about security in leancloud counter and just want to use it directly # (without hexo-leancloud-counter-security plugin), set `security` to `false`. @@ -723,7 +820,7 @@ params: # Show Views / Visitors of the website / page with busuanzi. # For more information: http://ibruce.info/2015/04/04/busuanzi/ busuanzi: - enable: false + enable: true visitors: true visitorsIcon: fa fa-user views: true @@ -747,7 +844,7 @@ params: # Local Search # Dependencies: https://github.com/next-theme/hexo-generator-searchdb localSearch: - enable: false + enable: true # If auto, trigger search by changing input. # If manual, trigger search by pressing enter key or search button. trigger: auto @@ -845,7 +942,7 @@ params: # Use Animate.css to animate everything. # For more information: https://animate.style motion: - enable: true + enable: false async: false transition: # All available transition variants: https://theme-next.js.org/animate/ @@ -890,7 +987,7 @@ params: # The default CDN provider of third-party plugins. # Available values: local | jsdelivr | unpkg | cdnjs | custom # Dependencies for `plugins: local`: https://github.com/next-theme/plugins - plugins: jsdelivr + plugins: unpkg # Custom CDN URL # For example: # custom_cdn_url: https://cdn.jsdelivr.net/npm/${npm_name}@${version}/${minified} @@ -902,6 +999,6 @@ params: # The js option is only valid when vendors.internal is local. css: css js: js - images: images + images: imgs diff --git a/exampleSite/content/hello-world.md b/exampleSite/content/hello-world.md index a34ef48..24c9eb4 100644 --- a/exampleSite/content/hello-world.md +++ b/exampleSite/content/hello-world.md @@ -1,27 +1,28 @@ --- -title: 'Hugo blog Hello World' -description: 'Short description of the article.' -keywords: 'Key words' +title: "'Hello World'" isCJKLanguage: true -author: 'Author of the article' -lastmod: '2022-05-21T17:06:24+08:00' -publishDate: '2022-05-21T17:06:24+08:00' -weight: 1 +author: elkan1788 +lastmod: '2022-06-02T11:52:03+08:00' +publishDate: '2022-06-02T11:52:03+08:00' categories: - - + - 博客 tags: - - - - + - Hugo + - 开始 toc: false draft: true -url: 'hello_world.html' +url: hello-world2.html --- +The world’s fastest framework for building websites. + [Hugo](https://gohugo.io/) is one of the most popular open-source static site generators. With its amazing speed and flexibility, Hugo makes building websites fun again. + + ## Quick Start ### Create a new post diff --git a/exampleSite/content/posts/emoji-support.md b/exampleSite/content/posts/emoji-support.md new file mode 100644 index 0000000..bbf8a14 --- /dev/null +++ b/exampleSite/content/posts/emoji-support.md @@ -0,0 +1,202 @@ +--- +title: "支持 Emoji 表情" +description: "Hugo 和 NexT 中的 Emoji 的用法指南。" +keywords: "Hugo,NexT,Emoji" + +date: 2022-06-04T19:46:45+08:00 +lastmod: 2022-06-04T19:46:45+08:00 + +categories: + - 示例 +tags: + - 表情 + - emoji + +toc: false +url: "emoji-support.html" +--- + +Emoji 可以通过多种方式在 Hugo 项目中启用。 + +[`emojify`](https://gohugo.io/functions/emojify/) 方法可以直接在模板中调用, 或者使用[行内 Shortcodes](https://gohugo.io/templates/shortcode-templates#inline-shortcodes). + +要全局使用 emoji, 需要在你的[网站配置](https://gohugo.io/getting-started/configuration/)中设置 `enableEmoji` 为 `true`, +然后你就可以直接在文章中输入 emoji 的代码。 + + + +它们以**冒号**开头和结尾,并且包含 emoji 的 **代码**: + +```markdown +去露营啦! {:}tent: 很快就回来. + +真开心! {:}joy: +``` + +呈现的输出效果如下: + +去露营啦! :tent: 很快就回来。 + +真开心! :joy: + +以下**符号清单**是 emoji 代码的非常有用的参考。 + +## 表情与情感 + +### 笑脸表情 + +| 图标 | 代码 | 图标 | 代码 | +| :-: | - | :-: | - | +| :grinning: | `grinning` | :smiley: | `smiley` | +| :smile: | `smile` | :grin: | `grin` | +| :laughing: | `laughing`
`satisfied` | :sweat_smile: | `sweat_smile` | +| :rofl: | `rofl` | :joy: | `joy` | +| :slightly_smiling_face: | `slightly_smiling_face` | :upside_down_face: | `upside_down_face` | +| :wink: | `wink` | :blush: | `blush` | +| :innocent: | `innocent` | | | + +### 爱意表情 + +| 图标 | 代码 | 图标 | 代码 | +| :-: | - | :-: | - | +| :heart_eyes: | `heart_eyes` | :kissing_heart: | `kissing_heart` | +| :kissing: | `kissing` | :relaxed: | `relaxed` | +| :kissing_closed_eyes: | `kissing_closed_eyes` | :kissing_smiling_eyes: | `kissing_smiling_eyes` | + +### 吐舌头表情 + +| 图标 | 代码 | 图标 | 代码 | +| :-: | - | :-: | - | +| :yum: | `yum` | :stuck_out_tongue: | `stuck_out_tongue` | +| :stuck_out_tongue_winking_eye: | `stuck_out_tongue_winking_eye` | :stuck_out_tongue_closed_eyes: | `stuck_out_tongue_closed_eyes` | +| :money_mouth_face: | `money_mouth_face` | | | + + +### 国家和地区旗帜 + +| 图标 | 代码 | 图标 | 代码 | +| :-: | - | :-: | - | +| :andorra: | `andorra` | :united_arab_emirates: | `united_arab_emirates` | +| :afghanistan: | `afghanistan` | :antigua_barbuda: | `antigua_barbuda` | +| :anguilla: | `anguilla` | :albania: | `albania` | +| :armenia: | `armenia` | :angola: | `angola` | +| :antarctica: | `antarctica` | :argentina: | `argentina` | +| :american_samoa: | `american_samoa` | :austria: | `austria` | +| :australia: | `australia` | :aruba: | `aruba` | +| :aland_islands: | `aland_islands` | :azerbaijan: | `azerbaijan` | +| :bosnia_herzegovina: | `bosnia_herzegovina` | :barbados: | `barbados` | +| :bangladesh: | `bangladesh` | :belgium: | `belgium` | +| :burkina_faso: | `burkina_faso` | :bulgaria: | `bulgaria` | +| :bahrain: | `bahrain` | :burundi: | `burundi` | +| :benin: | `benin` | :st_barthelemy: | `st_barthelemy` | +| :bermuda: | `bermuda` | :brunei: | `brunei` | +| :bolivia: | `bolivia` | :caribbean_netherlands: | `caribbean_netherlands` | +| :brazil: | `brazil` | :bahamas: | `bahamas` | +| :bhutan: | `bhutan` | :botswana: | `botswana` | +| :belarus: | `belarus` | :belize: | `belize` | +| :canada: | `canada` | :cocos_islands: | `cocos_islands` | +| :congo_kinshasa: | `congo_kinshasa` | :central_african_republic: | `central_african_republic` | +| :congo_brazzaville: | `congo_brazzaville` | :switzerland: | `switzerland` | +| :cote_divoire: | `cote_divoire` | :cook_islands: | `cook_islands` | +| :chile: | `chile` | :cameroon: | `cameroon` | +| :cn: | `cn` | :colombia: | `colombia` | +| :costa_rica: | `costa_rica` | :cuba: | `cuba` | +| :cape_verde: | `cape_verde` | :curacao: | `curacao` | +| :christmas_island: | `christmas_island` | :cyprus: | `cyprus` | +| :czech_republic: | `czech_republic` | :de: | `de` | +| :djibouti: | `djibouti` | :denmark: | `denmark` | +| :dominica: | `dominica` | :dominican_republic: | `dominican_republic` | +| :algeria: | `algeria` | :ecuador: | `ecuador` | +| :estonia: | `estonia` | :egypt: | `egypt` | +| :western_sahara: | `western_sahara` | :eritrea: | `eritrea` | +| :es: | `es` | :ethiopia: | `ethiopia` | +| :eu: | `eu`
`european_union` | :finland: | `finland` | +| :fiji: | `fiji` | :falkland_islands: | `falkland_islands` | +| :micronesia: | `micronesia` | :faroe_islands: | `faroe_islands` | +| :fr: | `fr` | :gabon: | `gabon` | +| :gb: | `gb`
`uk` | :grenada: | `grenada` | +| :georgia: | `georgia` | :french_guiana: | `french_guiana` | +| :guernsey: | `guernsey` | :ghana: | `ghana` | +| :gibraltar: | `gibraltar` | :greenland: | `greenland` | +| :gambia: | `gambia` | :guinea: | `guinea` | +| :guadeloupe: | `guadeloupe` | :equatorial_guinea: | `equatorial_guinea` | +| :greece: | `greece` | :south_georgia_south_sandwich_islands: | `south_georgia_south_sandwich_islands` | +| :guatemala: | `guatemala` | :guam: | `guam` | +| :guinea_bissau: | `guinea_bissau` | :guyana: | `guyana` | +| :hong_kong: | `hong_kong` | :honduras: | `honduras` | +| :croatia: | `croatia` | :haiti: | `haiti` | +| :hungary: | `hungary` | :canary_islands: | `canary_islands` | +| :indonesia: | `indonesia` | :ireland: | `ireland` | +| :israel: | `israel` | :isle_of_man: | `isle_of_man` | +| :india: | `india` | :british_indian_ocean_territory: | `british_indian_ocean_territory` | +| :iraq: | `iraq` | :iran: | `iran` | +| :iceland: | `iceland` | :it: | `it` | +| :jersey: | `jersey` | :jamaica: | `jamaica` | +| :jordan: | `jordan` | :jp: | `jp` | +| :kenya: | `kenya` | :kyrgyzstan: | `kyrgyzstan` | +| :cambodia: | `cambodia` | :kiribati: | `kiribati` | +| :comoros: | `comoros` | :st_kitts_nevis: | `st_kitts_nevis` | +| :north_korea: | `north_korea` | :kr: | `kr` | +| :kuwait: | `kuwait` | :cayman_islands: | `cayman_islands` | +| :kazakhstan: | `kazakhstan` | :laos: | `laos` | +| :lebanon: | `lebanon` | :st_lucia: | `st_lucia` | +| :liechtenstein: | `liechtenstein` | :sri_lanka: | `sri_lanka` | +| :liberia: | `liberia` | :lesotho: | `lesotho` | +| :lithuania: | `lithuania` | :luxembourg: | `luxembourg` | +| :latvia: | `latvia` | :libya: | `libya` | +| :morocco: | `morocco` | :monaco: | `monaco` | +| :moldova: | `moldova` | :montenegro: | `montenegro` | +| :madagascar: | `madagascar` | :marshall_islands: | `marshall_islands` | +| :macedonia: | `macedonia` | :mali: | `mali` | +| :myanmar: | `myanmar` | :mongolia: | `mongolia` | +| :macau: | `macau` | :northern_mariana_islands: | `northern_mariana_islands` | +| :martinique: | `martinique` | :mauritania: | `mauritania` | +| :montserrat: | `montserrat` | :malta: | `malta` | +| :mauritius: | `mauritius` | :maldives: | `maldives` | +| :malawi: | `malawi` | :mexico: | `mexico` | +| :malaysia: | `malaysia` | :mozambique: | `mozambique` | +| :namibia: | `namibia` | :new_caledonia: | `new_caledonia` | +| :niger: | `niger` | :norfolk_island: | `norfolk_island` | +| :nigeria: | `nigeria` | :nicaragua: | `nicaragua` | +| :netherlands: | `netherlands` | :norway: | `norway` | +| :nepal: | `nepal` | :nauru: | `nauru` | +| :niue: | `niue` | :new_zealand: | `new_zealand` | +| :oman: | `oman` | :panama: | `panama` | +| :peru: | `peru` | :french_polynesia: | `french_polynesia` | +| :papua_new_guinea: | `papua_new_guinea` | :philippines: | `philippines` | +| :pakistan: | `pakistan` | :poland: | `poland` | +| :st_pierre_miquelon: | `st_pierre_miquelon` | :pitcairn_islands: | `pitcairn_islands` | +| :puerto_rico: | `puerto_rico` | :palestinian_territories: | `palestinian_territories` | +| :portugal: | `portugal` | :palau: | `palau` | +| :paraguay: | `paraguay` | :qatar: | `qatar` | +| :reunion: | `reunion` | :romania: | `romania` | +| :serbia: | `serbia` | :ru: | `ru` | +| :rwanda: | `rwanda` | :saudi_arabia: | `saudi_arabia` | +| :solomon_islands: | `solomon_islands` | :seychelles: | `seychelles` | +| :sudan: | `sudan` | :sweden: | `sweden` | +| :singapore: | `singapore` | :st_helena: | `st_helena` | +| :slovenia: | `slovenia` | :slovakia: | `slovakia` | +| :sierra_leone: | `sierra_leone` | :san_marino: | `san_marino` | +| :senegal: | `senegal` | :somalia: | `somalia` | +| :suriname: | `suriname` | :south_sudan: | `south_sudan` | +| :sao_tome_principe: | `sao_tome_principe` | :el_salvador: | `el_salvador` | +| :sint_maarten: | `sint_maarten` | :syria: | `syria` | +| :swaziland: | `swaziland` | :turks_caicos_islands: | `turks_caicos_islands` | +| :chad: | `chad` | :french_southern_territories: | `french_southern_territories` | +| :togo: | `togo` | :thailand: | `thailand` | +| :tajikistan: | `tajikistan` | :tokelau: | `tokelau` | +| :timor_leste: | `timor_leste` | :turkmenistan: | `turkmenistan` | +| :tunisia: | `tunisia` | :tonga: | `tonga` | +| :tr: | `tr` | :trinidad_tobago: | `trinidad_tobago` | +| :tuvalu: | `tuvalu` | :taiwan: | `taiwan` | +| :tanzania: | `tanzania` | :ukraine: | `ukraine` | +| :uganda: | `uganda` | :us: | `us` | +| :uruguay: | `uruguay` | :uzbekistan: | `uzbekistan` | +| :vatican_city: | `vatican_city` | :st_vincent_grenadines: | `st_vincent_grenadines` | +| :venezuela: | `venezuela` | :british_virgin_islands: | `british_virgin_islands` | +| :us_virgin_islands: | `us_virgin_islands` | :vietnam: | `vietnam` | +| :vanuatu: | `vanuatu` | :wallis_futuna: | `wallis_futuna` | +| :samoa: | `samoa` | :kosovo: | `kosovo` | +| :yemen: | `yemen` | :mayotte: | `mayotte` | +| :south_africa: | `south_africa` | :zambia: | `zambia` | +| :zimbabwe: | `zimbabwe` | | | \ No newline at end of file diff --git a/exampleSite/content/posts/external-link.md b/exampleSite/content/posts/external-link.md new file mode 100644 index 0000000..1d64e82 --- /dev/null +++ b/exampleSite/content/posts/external-link.md @@ -0,0 +1,40 @@ +--- +title: "欢迎加入 Hugo NexT 组织!" +description: "Hugo NexT 是专门为 Hugo 引擎所打造的主题,保持简单易用和强大的功能!" +keywords: "Hugo,NexT,组织" + +date: 2022-06-01T15:59:41+08:00 +lastmod: 2022-06-01T15:59:41+08:00 + +categories: + - 示例 +tags: + - Hugo + - NexT + +expand: true +extlink: https://gitee.com/hugo-next/hugo-theme-next/ +#comment: +# enable: false +#toc: false +#url: "external-link.html" +weight: 1 +--- + +欢迎来到 `Hugo NexT` 文档站点! 它是从 [Theme NexT](https://theme-next.js.org/) 移植过来的为 [Hugo](https://gohugo.io/)打造的高品质优雅主题,保持简单易用的特性和强大的功能。 + + + +# 用户指南 + +设置 NexT 主题很容易。只需遵循文档,就可快速创建您的个人网站! + +# 反馈 + +- 访问 Awesome NexT 列表,与其他用户分享插件和教程。 +- 加入我们的 Gitter 聊天。 +- 在几秒钟内添加或改进翻译。 +- 在 GitHub Issues 中报告一个 :bug:。 +- 在 GitHub 上申请一个新特性。 +- 为最受欢迎的功能请求投票。 + diff --git a/exampleSite/content/posts/hello-world.md b/exampleSite/content/posts/hello-world.md new file mode 100644 index 0000000..2abc8de --- /dev/null +++ b/exampleSite/content/posts/hello-world.md @@ -0,0 +1,58 @@ +--- +title: "世界,你好!" +description: "快速的描述下有关于 Hugo 建站的基本用法。" + +lastmod: 2022-06-03T16:43:23+08:00 +date: 2022-06-02T11:52:03+08:00 + +categories: + - 博客 +tags: + - Hugo + - 开始 + +url: hello-world.html +weight: 2 +--- + +> “使用 `weight` 关键字置顶文章。” + +[Hugo](https://gohugo.io/) 是现今世界上最快的网站建设框架,也是最流行的开源静态站点生成器之一。 凭借其惊人的速度和灵活性,Hugo 让建设网站再次变得有趣起来。 + + + +## 快速开始 + +### 发表新文章 + +```shell +$ hugo new hello-world.md +``` + +更多信息:[内容格式](https://gohugo.io/content-management/formats/) + +### 启动服务 + +```shell +$ hugo server +``` + +更多信息:[Hugo 服务命令行](https://gohugo.io/commands/hugo_server/) + +### 生成静态文件 + +```shell +$ hugo +``` + +更多信息:[Hugo 建站](https://gohugo.io/commands/hugo/) + +### 部署到服务器 + +```language +$ hugo deploy +``` + +更多信息:[Hugo 发布](https://gohugo.io/commands/hugo_deploy/) + +祝你好运,相信你会喜欢上 Hugo 建站的旅程! \ No newline at end of file diff --git a/exampleSite/content/posts/markdown-syntax.md b/exampleSite/content/posts/markdown-syntax.md new file mode 100644 index 0000000..9618861 --- /dev/null +++ b/exampleSite/content/posts/markdown-syntax.md @@ -0,0 +1,193 @@ +--- +title: "Markdown 语法支持" +description: "描述下 NexT 主题所支持的各种 markdown 语法及效果展示。" +isCJKLanguage: false + +lastmod: 2022-06-03T11:52:18+08:00 +publishDate: 2022-06-03T11:52:18+08:00 + +author: Mainroad +originLink: https://mainroad-demo.netlify.app/post/basic-elements/ + +categories: + - 示例 +tags: + - Markdown + - 语法 + +toc: false +draft: false +url: markdown-syntax.html +--- + +仅以此篇文章来测试下在 `NexT` 主题中在通过 `Hugo` 引擎来建站时,是否支持 `Markdown` 文件内容中所写的各种语法,并展示下实际的效果。 + + + +## 标题样式 + +让我们从所有可能的标题开始,在 HTML 中 `

`-`

`元素分别表示六个不同级别的标题样式,其中 `

` 为最大标题,`

`为最小标题,效果如下: + +# 标题 1 +## 标题 2 +### 标题 3 +#### 标题 4 +##### 标题 5 +###### 标题 6 + + +## 段落格式 + +根据[ W3C ](https://www.w3.org/)定义的[ HTML5 规范](https://www.w3.org/TR/html5/dom.html#elements),**HTML 文档由元素和文本组成**。每个元素的组成都由一个[开始标记](https://www.w3.org/TR/html5/syntax.html#syntax-start-tags)表示,例如: `` ,和[结束标记](https://www.w3.org/TR/html5/syntax.html#syntax-end-tags)表示,例如: `` 。(*某些开始标记和结束标记在某些情况下可以省略,并由其他标记暗示。*) +元素可以具有属性,这些属性控制元素的工作方式。例如:超链接是使用 `a` 元素及其 `href` 属性形成的。 + +## 图像 + +![hugo-next-primary](//lisenhui.gitee.io/imgs/hugo-next/logo/hugo-next-primary.png) + + + +## 列表类型 + +### 有序列表 + +1. 第一个元素 +2. 第二个元素 +3. 第三个元素 + +### 无序列表 + +* 列表元素 +* 另一个元素 +* 和其它元素 + +### 嵌套列表 + +借助 HTML 的 `ul` 元素来实现。 + +
    +
  • 第一项
  • +
  • 第二项 +
      +
    • 第二项第一个子项目
    • +
    • 第二项第二个子项目 +
        +
      • 第二项第二分项第一分项
      • +
      • 第二项第二分项第二分项
      • +
      • 第二项第二分项第三分项
      • +
      +
    • +
    • 第二项第三个子项目 +
        +
      1. 第二项第三分项第一分项
      2. +
      3. 第二项第三分项第二分项
      4. +
      5. 第二项第三分项第三分项
      6. +
      +
    +
  • +
  • 第三项
  • +
+ +### 自定义列表 + +通过 HTML 的 `dl` 元素还支持自定义列表(表格列表)。 + +
+
Hugo 目录结构
+
assets
+
config.toml
+
content
+
data
+
theme
+
static
+
Hugo 模板
+
基础模板
+
列表模板
+
单页模板
+
+ +## 块引用 + +`blockquote` 元素表示从另一个源引用的内容,可以选择引用必须在 `footer` 或 `cite` 元素中,也可以选择使用注释和缩写等行内更改。 + +> 引用文本 +> 这一行也是同样的引用 +> 同样你也在 `blockquote` 中使用 **Markdown** 语法书写 + +带有引文的 `Blockquote` 元素效果。 + +
+

我的目标不是赚大钱,是为了制造好的电脑。当我意识到我可以永远当工程师时,我才创办了这家公司。

+
史蒂夫·沃兹尼亚克
+
+ +根据 Mozilla 的网站记录,Firefox 1.0 于 2004 年发布,并取得了巨大成功。 + +## 表格 + +表格并不算是 `Markdown` 的核心要素,但 `Hugo` 同样支持它。 + +| ID | 创建者 | 模型 | 年份 | +| --- | --------- | ------- | ---- | +| 1 | Honda | Accord | 2009 | +| 2 | Toyota | Camry | 2012 | +| 3 | Hyundai | Elantra | 2010 | + +可以使用 : (英文格式冒号)来对表格内容进行对齐。 + +| 表格 | 可以是 | 很酷 | +|:----- |:-----:| ----:| +| 左对齐 | 居中 | 右对齐 | +| 左对齐 | 居中 | 右对齐 | +| 左对齐 | 居中 | 右对齐 | + +同样也可以在表格中使用 `Markdown` 语法。 + +| 表格 | 中 | 使用 | Markdown 语法 | +| ------ | --------- | ---------- | ------------- | +| *斜体* | **粗体** | ~~中划线~~ | `代码块` | + +## Code + +```html + + + + + Example HTML5 Document + + +

Test

+ + +``` + +{{< highlight html >}} + + + + + Example HTML5 Document + + +

Test

+ + +{{< /highlight >}} + +## 其它元素: abbr、sub、sup、kbd等等 + +GIF 是位图图像格式。 + +H2O + +C6H12O6 + +Xn + Yn = Zn + +按X获胜。或按CTRL+ALT+F显示 FPS 计数器。 + +比特作为信息论中的信息单位,也被称为 shannon ,以信息论领域的创始人 Claude shannon 的名字命名。 + +参考: +- 来自 **Mainroad** 主题的 [Basic Elements](https://mainroad-demo.netlify.app/post/basic-elements/) 内容 diff --git a/exampleSite/start.sh b/exampleSite/start.sh new file mode 100644 index 0000000..165aa03 --- /dev/null +++ b/exampleSite/start.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# + +next() { + cat << EOT +======================================== + ███╗ ██╗███████╗██╗ ██╗████████╗ + ████╗ ██║██╔════╝╚██╗██╔╝╚══██╔══╝ + ██╔██╗ ██║█████╗ ╚███╔╝ ██║ + ██║╚██╗██║██╔══╝ ██╔██╗ ██║ + ██║ ╚████║███████╗██╔╝ ██╗ ██║ + ╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝ ╚═╝ +======================================== +NexT version $1 +Documentation: https://hugo-next.js.org +======================================== +EOT +} + +next V0.0.1 + +hugo server -D -t ../.. --port 1414 --panicOnWarning \ No newline at end of file diff --git a/exampleSite/static/imgs/ali-pay.png b/exampleSite/static/imgs/ali-pay.png new file mode 100644 index 0000000..fdd9df1 Binary files /dev/null and b/exampleSite/static/imgs/ali-pay.png differ diff --git a/exampleSite/static/imgs/wechat-pay.png b/exampleSite/static/imgs/wechat-pay.png new file mode 100644 index 0000000..f898b43 Binary files /dev/null and b/exampleSite/static/imgs/wechat-pay.png differ diff --git a/i18n/en-us.toml b/i18n/en-us.toml deleted file mode 100644 index a162721..0000000 --- a/i18n/en-us.toml +++ /dev/null @@ -1,49 +0,0 @@ -#-------------------------------------- -# English Version -#-------------------------------------- - -[ColoneFlag] - other = ":" - -[SitePostsTitle] - other = "Posts" -[SiteCatesTitle] - other = "Categories" -[SiteTagsTitle] - other = "Tags" -[TableOfContents] - other = "TOC" -[SiteInfo] - other = "Site Info" -[RSSTitle] - other = "RSS Subscribe" -[CCLinkTitle] - other = "Creative Commons" - -[PostPublishDate] - other = "Publish" -[PostPublishTime] - other = "Create Time" -[PostLastModDate] - other = "Update" -[PostLastModTime] - other = "Modify Time" -[PostWords] - other = "Words" -[PostWordCount] - other = "{{- .WordCount -}}" -[PostReading] - other = "Read" -[PostReadTime] - other = "{{- .ReadingTime -}}min" -[PostVisitor] - other = "Views" -[PostCatg] - other = "Categories" -[PostTag] - other = "Tags" -[PostReadMore] - other = "Read More" - -[FooterPowerby] - other = "Power by %s" \ No newline at end of file diff --git a/i18n/en.yaml b/i18n/en.yaml new file mode 100644 index 0000000..2c969d6 --- /dev/null +++ b/i18n/en.yaml @@ -0,0 +1,142 @@ +#-------------------------------------- +# English Version +#-------------------------------------- +posts: + other: Posts +tag: + other: Tag +tags: + other: Tags +category: + other: Category +categories: + other: Categories +AllSome: + other: "All {{ .Some }}" + +NavToggleLabel: + other: Toggle navigation bar + +MSearchLabel: + other: Search + +SymbolColon: + other: ":" +SymbolComma: + other: "," +SymbolPeriod: + other: "." + +SitePostsTitle: + other: "Posts" +SiteCatesTitle: + other: "Categories" +SiteTagsTitle: + other: "Tags" +TableOfContents: + other: "TOC" +SiteOverview: + other: "Overview" +RSSTitle: + other: "RSS Subscribe" +CCLinkTitle: + other: "Creative Commons" +BackTopLabel: + other: "Top" + +TagsCounterTitle: + zero: No tags + one: 1 tag in total + other: "{{ .Count }} tags in total" +CatesCounterTitle: + zero: No categories + one: 1 category in total + other: "{{ .Count }} categories in total" +ArchiveCounterTitle: + zero: No posts. + one: 1 post. + other: "{{ .Count }} posts in total." + +PostArchiveCheersUm: + other: Um.. +PostArchiveCheersOk: + other: Ok +PostArchiveCheersNice: + other: Nice +PostArchiveCheersGood: + other: Good +PostArchiveCheersGreat: + other: Great +PostArchiveCheersExcellent: + other: Excellent +PostArchiveKeepOn: + other: Keep on posting.╰(*°▽°*)╯ + +PostStickyTitle: + other: Strickys +PostPublishDate: + other: "Publish" +PostPublishTime: + other: "Create Time" +PostLastModDate: + other: "Update" +PostLastModTime: + other: "Modify Time" +PostWords: + other: "Words" +PostWordCount: + other: "{{- .WordCount -}}" +PostReading: + other: "Read" +PostReadTime: + other: "{{- .ReadingTime -}}min" +PostViews: + other: "Views" +PostCatg: + other: "Categories" +PostTag: + other: "Tags" +PostReadMore: + other: "Read More" +PostEditTitle: + other: Edit this post + +PostCRTitle: + other: Post Title +PostCRAuthor: + other: Post Author +PostCRLink: + other: Post Link +PostCROriginAuthor: + other: Written By +PostCROriginLink: + other: Originally From +PostCRLicenseTitle: + other: Copyright Notice +PostCRLicenseContent: + other: "All articles in this blog are licensed under %s unless stating additionally." + +PostFollowMe: + other: Welcome to my other publishing channels + +RewardDonate: + other: Donate +RewardWechatpay: + other: Wechat Pay +RewardAlipay: + other: Alipay +RewardPaypal: + other: PayPal +RewardBitcoin: + other: Bitcoin + +PostCommentTitle: + other: Comments + +VisitorsLabel: + other: Total Visitors +PageViewsLabel: + other: Total Page Views + +FooterPowerby: + other: "Power by %s" \ No newline at end of file diff --git a/i18n/zh-cn.toml b/i18n/zh-cn.toml deleted file mode 100644 index 63d0942..0000000 --- a/i18n/zh-cn.toml +++ /dev/null @@ -1,49 +0,0 @@ -#-------------------------------------- -# 中文版本 -#-------------------------------------- - -[ColoneFlag] - other = ":" - -[SitePostsTitle] - other = "日志" -[SiteCatesTitle] - other = "分类" -[SiteTagsTitle] - other = "标签" -[TableOfContents] - other = "文章目录" -[SiteInfo] - other = "站点概览" -[RSSTitle] - other = "RSS 订阅" -[CCLinkTitle] - other = "共享知识" - -[PostPublishDate] - other = "发表于" -[PostPublishTime] - other = "创建时间" -[PostLastModDate] - other = "更新于" -[PostLastModTime] - other = "修改时间" -[PostWords] - other = "字数" -[PostWordCount] - other = "{{- .WordCount -}}" -[PostReading] - other = "阅读" -[PostReadTime] - other = "{{- .ReadingTime -}}分钟" -[PostVisitor] - other = "浏览数" -[PostCatg] - other = "分类" -[PostTag] - other = "标签" -[PostReadMore] - other = "阅读全文" - -[FooterPowerby] - other = "由 %s 强力驱动" \ No newline at end of file diff --git a/i18n/zh-cn.yaml b/i18n/zh-cn.yaml new file mode 100644 index 0000000..94bf85b --- /dev/null +++ b/i18n/zh-cn.yaml @@ -0,0 +1,140 @@ +#-------------------------------------- +# 中文版本 +#-------------------------------------- + +posts: + other: 文章 +tag: + other: 标签 +tags: + other: 标签 +category: + other: 分类 +categories: + other: 分类 +AllSome: + other: "所有 {{ .Some }}" + +NavToggleLabel: + other: 切换导航栏 + +MSearchLabel: + other: 搜索 + +SymbolColon: + other: ":" +SymbolComma: + other: "," +SymbolPeriod: + other: "。" + +SbPostsLable: + other: 日志 +SbCatesTitle: + other: 分类 +SbTagsTitle: + other: 标签 +TableOfContents: + other: 文章目录 +SiteOverview: + other: 站点概览 +RSSLable: + other: RSS 订阅 +CCLinkTitle: + other: 共享知识 +BackTopLabel: + other: 返回顶部 + +TagsCounterTitle: + zero: 暂无标签 + other: "目前共计 {{ .Count }} 个标签" +CatesCounterTitle: + zero: 暂无分类 + other: "目前共计 {{ .Count }} 个分类" +ArchiveCounterTitle: + zero: 暂无日志 + other: "目前共计 {{ .Count }} 篇日志" + +PostArchiveCheersUm: + other: 嗯.. +PostArchiveCheersOk: + other: 还行 +PostArchiveCheersNice: + other: 不错 +PostArchiveCheersGood: + other: 很好 +PostArchiveCheersGreat: + other: 非常好 +PostArchiveCheersExcellent: + other: 太棒了 +PostArchiveKeepOn: + other: 继续努力哟。╰(*°▽°*)╯ + +PostStickyTitle: + other: 置顶 +PostPublishDate: + other: 发表于 +PostPublishTime: + other: 创建时间 +PostLastModDate: + other: 更新于 +PostLastModTime: + other: 修改时间 +PostWords: + other: 字数 +PostWordCount: + other: "{{- .WordCount -}}" +PostReading: + other: 阅读 +PostReadTime: + other: "{{- .ReadingTime -}}分钟" +PostViews: + other: 浏览 +PostCatgs: + other: 分类 +PostTags: + other: 标签 +PostReadMore: + other: 阅读全文 +PostEditTitle: + other: 编辑 + +PostCRTitle: + other: 文章标题 +PostCRAuthor: + other: 本文作者 +PostCRLink: + other: 本文链接 +PostCROriginAuthor: + other: 原文作者 +PostCROriginLink: + other: 原文链接 +PostCRLicenseTitle: + other: 版权声明 +PostCRLicenseContent: + other: "本博客所有文章除特别声明外,均采用 %s 许可协议。转载请注明出处!" + +PostFollowMe: + other: 欢迎关注我的其它发布渠道 + +RewardDonate: + other: 赞赏 +RewardWechatpay: + other: 微信 +RewardAlipay: + other: 支付宝 +RewardPaypal: + other: PayPal +RewardBitcoin: + other: 比特币 + +PostCommentTitle: + other: 评论交流 + +UserVistorsLabel: + other: 总访客量 +PageViewsLabel: + other: 总访问量 + +FooterPowerby: + other: 由 %s 强力驱动 \ No newline at end of file diff --git a/layouts/404.html b/layouts/404.html index e69de29..1cb628e 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + {{ i18n "404PageTitle" }} + + + +
+ + \ No newline at end of file diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 5f8e2ec..eb99ade 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,11 +1,58 @@ +{{- .Scratch.Set "postsCount" (len (where .Page.Site.RegularPages "Section" "in" .Site.Params.mainSections)) -}} +{{- .Scratch.Set "catsCount" (len .Site.Taxonomies.categories) -}} +{{- .Scratch.Set "tagsCount" (len .Site.Taxonomies.tags) -}} +{{- $vendors := .Site.Data.resources.vendors -}} +{{- $pluginVen := .Site.Params.vendors.plugins -}} +{{- $pluginCDN := index $vendors $pluginVen -}} +{{- .Scratch.Set "pluginCDN" $pluginCDN -}} - - {{- partial "head.html" . -}} - - {{- partial "header.html" . -}} -
- {{- block "main" . }}{{- end }} -
- {{- partial "footer.html" . -}} - - + + + + + + {{ hugo.Generator }} + + + + + + {{- partial "head.html" . }} + {{ block "title" . }}{{ .Site.Title }}{{ end }} + + + + +
+
+
+
+ {{- partial "header.html" . }} +
+ + {{- if ne .Site.Params.sidebar.display "remove" }} + {{- partial "sidebar.html" . }} + {{- end }} +
+ + {{ partial "widgets.html" . }} +
+ + {{- block "main" . }}{{- end }} + {{- if .IsPage }} + {{- partial "comments.html" . }} + {{- end }} +
+
+
+ +
+ + {{- partial "scripts" . }} + + + \ No newline at end of file diff --git a/layouts/_default/list.html b/layouts/_default/list.html index e69de29..35c4d71 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -0,0 +1,29 @@ +{{ range .Paginator.Pages.GroupByDate "2006" }} +
+ {{ .Key }} +
+{{ range .Pages }} + +{{ end }} +{{ end }} \ No newline at end of file diff --git a/layouts/_default/section.html b/layouts/_default/section.html new file mode 100644 index 0000000..a9bce65 --- /dev/null +++ b/layouts/_default/section.html @@ -0,0 +1,36 @@ +{{- define "title" }} +{{- .Params.Title | default (T .Section) | default .Section | dict "Some" | T "AllSome" }} - {{ .Site.Title -}} +{{- end -}} +{{ define "main_inner_class" }}archive posts-collapse{{ end }} +{{- define "main" }} +
+
+
+ {{- $cheers := "Um" }} + {{- $posts := .Scratch.Get "postsCount" }} + {{- if gt $posts 210 }} + {{- $cheers = "Excellent" }} + {{- else if gt $posts 130 }} + {{- $cheers = "Great" }} + {{- else if gt $posts 80 }} + {{- $cheers = "Good" }} + {{- else if gt $posts 50 }} + {{- $cheers = "Nice" }} + {{- else if gt $posts 30 }} + {{- $cheers = "Ok" }} + {{- end }} + + {{- T (printf "PostArchiveCheers%s" $cheers) }} + {{- T "SymbolComma" }} + {{- T "ArchiveCounterTitle" $posts | safeHTML }} + {{- T "SymbolComma" }} + {{- T "PostArchiveKeepOn" }} + +
+ + {{ .Render "list" }} + +
+
+{{- partial "pagination.html" . }} +{{- end }} \ No newline at end of file diff --git a/layouts/_default/single.html b/layouts/_default/single.html index e69de29..78ebdec 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -0,0 +1,7 @@ +{{- define "title" }}{{- .Title }} - {{ .Site.Title -}}{{- end }} + +{{- define "main_inner_class" }}post posts-expand{{- end }} + +{{- define "main" }} + {{ partial "post.html" (dict "ctx" . "IsHome" false) }} +{{- end }} \ No newline at end of file diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html new file mode 100644 index 0000000..4ef68bc --- /dev/null +++ b/layouts/_default/taxonomy.html @@ -0,0 +1,22 @@ +{{- define "title" -}} + {{- .Title }} - {{ T .Data.Singular | default .Data.Singular }} - {{ .Site.Title -}} +{{- end -}} +{{ define "main_inner_class" }}{{ .Data.Plural }} posts-collapse{{ end }} +{{ define "main" }} +
+
+
+ +

+ {{ .Title }} + {{ T .Data.Singular | default .Data.Singular }} +

+
+
+ + {{ .Render "list" }} + +
+
+{{- partial "pagination.html" . }} +{{- end }} \ No newline at end of file diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html new file mode 100644 index 0000000..50992ab --- /dev/null +++ b/layouts/_default/terms.html @@ -0,0 +1,44 @@ +{{- define "title" -}} +{{- .Params.Title | default (T .Data.Plural) | default .Data.Plural | dict "Some" | T "AllSome" }} - {{ .Site.Title -}} +{{- end -}} +{{- define "main_inner_class" }}{{.Data.Plural}} posts-expand{{ end -}} +{{- define "main" }} +
+ + {{- if eq .Data.Plural "categories" }} + {{ $cats := .Site.Taxonomies.categories }} +
+
+ {{- T "CatesCounterTitle" (.Scratch.Get "catsCount") | safeHTML -}} +
+
+
    + {{- range $name, $items := $cats }} +
  • + {{ $name }} + {{ len $items }} +
  • + {{- end }} +
+
+
+ {{- end }} + {{- if eq .Data.Plural "tags" }} + {{ $tags := .Site.Taxonomies.tags }} +
+
+ {{- T "TagsCounterTitle" (.Scratch.Get "tagsCount") | safeHTML -}} +
+
+ {{ $randNums := (seq 10) }} + {{- range $name, $items := $tags }} + {{ $name }} + ({{ len $items }}) + + {{- end }} +
+
+ {{- end }} +
+ +{{- end }} \ No newline at end of file diff --git a/layouts/index.html b/layouts/index.html index 02ce795..50f5ee0 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,2 +1,8 @@ +{{- define "main_inner_class" }}index posts-expand{{- end }} {{- define "main" }} +{{ $paginator := .Paginate (where .Site.RegularPages "Section" "in" .Site.Params.mainSections) }} +{{- range $paginator.Pages }} +{{ partial "post.html" (dict "ctx" . "IsHome" true) }} +{{- end }} +{{- partial "partials/pagination.html" . }} {{- end }} \ No newline at end of file diff --git a/layouts/partials/_thirdparty/comment/livere.html b/layouts/partials/_thirdparty/comment/livere.html new file mode 100644 index 0000000..9a2ff67 --- /dev/null +++ b/layouts/partials/_thirdparty/comment/livere.html @@ -0,0 +1,13 @@ +{{- with .Site.Params.LiveRe }} +
+ +{{- end }} \ No newline at end of file diff --git a/layouts/partials/_thirdparty/comment/utterances.html b/layouts/partials/_thirdparty/comment/utterances.html new file mode 100644 index 0000000..757bd02 --- /dev/null +++ b/layouts/partials/_thirdparty/comment/utterances.html @@ -0,0 +1,9 @@ +{{- with .Site.Params.utterances }} + +{{- end }} diff --git a/layouts/partials/_thirdparty/comment/waline.html b/layouts/partials/_thirdparty/comment/waline.html new file mode 100644 index 0000000..589d3bc --- /dev/null +++ b/layouts/partials/_thirdparty/comment/waline.html @@ -0,0 +1,21 @@ +{{- with .Site.Params.waline }} +
+ + + + +{{- end }} \ No newline at end of file diff --git a/layouts/partials/_thirdparty/share/addthis.html b/layouts/partials/_thirdparty/share/addthis.html new file mode 100644 index 0000000..f171c68 --- /dev/null +++ b/layouts/partials/_thirdparty/share/addthis.html @@ -0,0 +1,5 @@ +{{- with .Site.Params.addThisId }} +
+ +
+{{- end }} \ No newline at end of file diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html new file mode 100644 index 0000000..694a149 --- /dev/null +++ b/layouts/partials/comments.html @@ -0,0 +1,40 @@ +{{- $root := . -}} +{{- with .Site.Params.comments }} +{{- if .enable }} +{{- $tc := and .storage (gt (len .nav) 1) }} +{{- $active := .active }} +{{- $fc := .active }} +{{- $sc := "" }} +{{- $sn := "" }} +
+
+
+ + {{ T "PostCommentTitle" }} +
+ {{- if $tc }} + {{- $sn = (sort .nav "weight") }} + {{- $fc = index $sn 0 }} + {{- $sc = index $sn 1 }} +
+ {{ $fc.title }} + + {{ $sc.title }} +
+ {{- end }} +
+
+ {{ $cp := "_thirdparty/comment/%s.html" }} + {{- if $tc }} + {{- range $sn }} +
+ {{- partial (printf $cp (lower .name)) $root }} +
+ {{- end }} + {{- else }} +
{{- partial (printf $cp $fc) $root }}
+ {{- end }} +
+
+{{- end }} +{{- end }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index e69de29..c09d5d6 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -0,0 +1,91 @@ +{{- $ft := .Site.Params.footer }} + +{{/* TODO + +*/}} +{{- if .Site.Params.busuanzi.enable }} +{{ with .Site.Params.busuanzi }} +
+ {{- if .visitors }} + + {{- end }} + {{- if .views }} + + {{- end }} +
+{{- end }} +{{- end }} +{{- if $ft.powered }} +
+ {{ $pb := printf "Hugo & NexT.%s" .Site.Params.scheme }} + {{- printf (T "FooterPowerby") $pb | safeHTML }} +
+{{- end }} +{{- if $ft.beian.enable }} +{{- with $ft.beian }} + +{{- end }} +{{- end }} \ No newline at end of file diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 8aa3ce8..b7cbd89 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -1,4 +1,7 @@ -{{- $scss := resources.Get "css/main.scss" }} -{{- $scss = $scss | resources.ExecuteAsTemplate "main.scss" . }} -{{- $css := $scss | toCSS (dict "targetPath" "/css/main.css" "outputStyle" "expanded") }} - \ No newline at end of file +{{- partial "head/meta.html" . }} +{{- partial "head/opengraph.html" . }} +{{- partial "head/twitter.html" . }} +{{- partial "head/googleplus.html" . }} +{{- partial "head/facebook.html" . }} +{{ partial "head/verify.html" . }} +{{- partial "head/style.html" . }} \ No newline at end of file diff --git a/layouts/partials/head/facebook.html b/layouts/partials/head/facebook.html new file mode 100644 index 0000000..6d04596 --- /dev/null +++ b/layouts/partials/head/facebook.html @@ -0,0 +1,5 @@ +{{- with .Site.Params.openGraph.facebook }} +{{- range $attr, $val := . }} + +{{- end }} +{{- end }} \ No newline at end of file diff --git a/layouts/partials/head/googleplus.html b/layouts/partials/head/googleplus.html new file mode 100644 index 0000000..391198e --- /dev/null +++ b/layouts/partials/head/googleplus.html @@ -0,0 +1,3 @@ +{{- with .Site.Params.openGraph.googlePlus }} + +{{- end }} \ No newline at end of file diff --git a/layouts/partials/head/meta.html b/layouts/partials/head/meta.html new file mode 100644 index 0000000..e74b0a0 --- /dev/null +++ b/layouts/partials/head/meta.html @@ -0,0 +1,22 @@ + + +{{- if .IsPage }} +{{- with .Date }} + +{{- end }} +{{- with .Lastmod }} + +{{- end }} +{{- end }} +{{- $img := .Site.Params.customLogo | default .Site.Params.avatar.url }} +{{- if and .IsPage (isset .Params "images") }} + {{- $img := index .Params.images 0 }} +{{- end }} +{{- .Scratch.Set "metaImg" $img }} + + +{{- if .Site.Params.darkmode }} + +{{- else }} + +{{- end }} diff --git a/layouts/partials/head/opengraph.html b/layouts/partials/head/opengraph.html new file mode 100644 index 0000000..199be36 --- /dev/null +++ b/layouts/partials/head/opengraph.html @@ -0,0 +1,17 @@ +{{- if .Site.Params.openGraph.enable }} + + + + + + + + + + +{{- if .IsPage }} + + + +{{- end }} +{{- end }} diff --git a/layouts/partials/head/style.html b/layouts/partials/head/style.html new file mode 100644 index 0000000..8584a0e --- /dev/null +++ b/layouts/partials/head/style.html @@ -0,0 +1,25 @@ + +{{- $cssRes := .Site.Data.resources.css }} +{{- $vendor := .Site.Params.vendors.plugins }} +{{- $vendorCDN := .Scratch.Get "pluginCDN" }} +{{- range $css := $cssRes }} + {{- $pluginCSS := $vendorCDN }} + {{- $npm := $css.name }} + {{- $file := $css.file }} + {{- if eq $vendor "cdnjs" }} + {{- with $css.alias }} + {{- $npm = . }} + {{- end }} + {{- $file = replaceRE `(dist|lib|source\/js)\/` "" $css.file }} + {{- end }} + {{- $pluginCSS = replace $pluginCSS "${name}" $npm }} + {{- $pluginCSS = replace $pluginCSS "${version}" $css.version }} + {{- $pluginCSS = replace $pluginCSS "${file}" $file }} + +{{- end }} + +{{- $scss := resources.Get "css/main.scss" }} +{{- $scss = $scss | resources.ExecuteAsTemplate "main.scss" . }} +{{- $css := $scss | toCSS (dict "targetPath" "/css/main.css" "outputStyle" "expanded") }} + + \ No newline at end of file diff --git a/layouts/partials/head/twitter.html b/layouts/partials/head/twitter.html new file mode 100644 index 0000000..d485eb1 --- /dev/null +++ b/layouts/partials/head/twitter.html @@ -0,0 +1,9 @@ +{{- with .Site.Params.openGraph.twitter }} +{{- $img := $.Params.openGraph.twitter.image | default ($.Scratch.Get "metaImg") }} + + + + + + +{{ end }} diff --git a/layouts/partials/head/verify.html b/layouts/partials/head/verify.html new file mode 100644 index 0000000..f395321 --- /dev/null +++ b/layouts/partials/head/verify.html @@ -0,0 +1,14 @@ +{{ if .IsHome }} +{{- with .Site.Params.googleSiteVerification }} + +{{- end }} +{{- with .Site.Params.bingSiteVerification }} + +{{- end }} +{{- with .Site.Params.yandexSiteVerification }} + +{{- end }} +{{- with .Site.Params.baiduSiteVerification }} + +{{- end }} +{{ end }} \ No newline at end of file diff --git a/layouts/partials/header.html b/layouts/partials/header.html index e69de29..01f3aaa 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -0,0 +1,2 @@ +{{ partial "header/brand.html" . }} +{{ partial "header/menus.html" . }} \ No newline at end of file diff --git a/layouts/partials/header/brand.html b/layouts/partials/header/brand.html new file mode 100644 index 0000000..29d36b9 --- /dev/null +++ b/layouts/partials/header/brand.html @@ -0,0 +1,36 @@ +{{ $title := .Site.Title }} +
+ + +
+ {{- if and .Site.Params.customLogo (eq .Site.Params.scheme "Muse") }} + {{ $title }} + {{- end }} + + + +

{{ $title }}

+ +
+ {{ if isset .Site.Params "subtitle" }} +

{{ .Site.Params.subtitle }}

+ {{- end }} + {{- if and .Site.Params.customLogo (or (eq .Site.Params.scheme "Gemini") (eq .Site.Params.scheme "Pisces"))}} + {{ $title }} + {{- end }} +
+ + +
\ No newline at end of file diff --git a/layouts/partials/header/menus.html b/layouts/partials/header/menus.html new file mode 100644 index 0000000..b286f3e --- /dev/null +++ b/layouts/partials/header/menus.html @@ -0,0 +1,26 @@ +{{- $ms := .Site.Params.menuSets }} +{{- $curP := .Page }} + \ No newline at end of file diff --git a/layouts/partials/pagination.html b/layouts/partials/pagination.html new file mode 100644 index 0000000..bd12821 --- /dev/null +++ b/layouts/partials/pagination.html @@ -0,0 +1,42 @@ +{{- $pag := .Paginator }} +{{- $tps := $pag.TotalPages }} + +{{- $begin := sub $pag.PageNumber 4}} +{{- $.Scratch.Set "begin" $begin }} +{{- $end := add $pag.PageNumber 4}} +{{- $.Scratch.Set "end" $end }} + +{{- if lt $begin 0}} + {{- $end := sub $end $begin }} + {{- $.Scratch.Set "end" $end }} +{{- end}} +{{- $end := $.Scratch.Get "end"}} + +{{- $over := sub $tps $end }} + +{{- if lt $over 0}} + {{- $begin := add $begin $over}} + {{- $.Scratch.Set "begin" $begin }} +{{- end }} +{{- $begin := $.Scratch.Get "begin"}} + \ No newline at end of file diff --git a/layouts/partials/post.html b/layouts/partials/post.html new file mode 100644 index 0000000..a005bf4 --- /dev/null +++ b/layouts/partials/post.html @@ -0,0 +1,28 @@ +
+
+ {{- with .ctx }} + + + + + {{- end }} +
+ {{ partial "post/header.html" (dict "ctx" .ctx "IsHome" .IsHome) }} +
+
+ {{ partial "post/body.html" (dict "ctx" .ctx "IsHome" .IsHome) }} +
+
+ {{ partial "post/footer.html" (dict "ctx" .ctx "IsHome" .IsHome) }} +
+
+
\ No newline at end of file diff --git a/layouts/partials/post/body.html b/layouts/partials/post/body.html new file mode 100644 index 0000000..4fb41fe --- /dev/null +++ b/layouts/partials/post/body.html @@ -0,0 +1,11 @@ +{{ with .ctx }} +{{- if $.IsHome }} + {{- if .Params.Expand }} + {{ .Content }} + {{- else }} + {{ .Summary }} + {{- end }} +{{- else }} + {{ .Content }} +{{- end }} +{{ end }} \ No newline at end of file diff --git a/layouts/partials/post/footer.html b/layouts/partials/post/footer.html new file mode 100644 index 0000000..2c258b6 --- /dev/null +++ b/layouts/partials/post/footer.html @@ -0,0 +1,36 @@ +{{ with .ctx }} +{{- if $.IsHome }} +{{- if and .Site.Params.readMoreBtn (not .Params.Expand) }} +
+ + {{ T "PostReadMore" }} » + +
+{{- end }} +
+{{- else }} +{{ partial "post/footer_meta/tags.html" . }} +{{ partial "_thirdparty/share/addthis.html" . }} +
+{{ partial "post/footer_meta/reward.html" . }} +{{ partial "post/footer_meta/copyright.html" . }} +{{ partial "post/footer_meta/followme.html" . }} +
+
+ {{- with .NextInSection }} + + {{- end }} +
+
+ {{- with .PrevInSection }} + + {{- end }} +
+
+{{- end }} +{{ end }} \ No newline at end of file diff --git a/layouts/partials/post/footer_meta/copyright.html b/layouts/partials/post/footer_meta/copyright.html new file mode 100644 index 0000000..e9ff1cb --- /dev/null +++ b/layouts/partials/post/footer_meta/copyright.html @@ -0,0 +1,36 @@ +{{- if .Site.Params.creativeCommons.post }} +
+ +
    +
  • + {{ print (T "PostCRTitle") (T "SymbolColon") }} + {{ .Title }} +
  • +
  • + {{- if isset .Params "author" }} + {{ print (T "PostCROriginAuthor") (T "SymbolColon") }} + {{ .Params.Author }} + {{- else }} + {{ print (T "PostCRAuthor") (T "SymbolColon") }} + {{ .Site.Params.author }} + {{- end }} +
  • +
  • + {{- if isset .Params "link" }} + {{ print (T "PostCROriginLink") (T "SymbolColon") }} + {{ .Params.Link }} + {{- else }} + {{ print (T "PostCRLink") (T "SymbolColon") }} + {{ .Permalink }} + {{- end }} +
  • +
  • + {{ print (T "PostCRLicenseTitle") (T "SymbolColon") }} + {{- $ccText := .Site.Params.creativeCommons.license | upper }} + {{- $lang := .Scratch.Get "lang" }} + {{- $ccLink := printf "%s" (substr $lang 0 2) $ccText }} + {{ printf (T "PostCRLicenseContent") $ccLink | safeHTML }} +
  • +
+
+{{- end }} \ No newline at end of file diff --git a/layouts/partials/post/footer_meta/followme.html b/layouts/partials/post/footer_meta/followme.html new file mode 100644 index 0000000..ba25ed3 --- /dev/null +++ b/layouts/partials/post/footer_meta/followme.html @@ -0,0 +1,21 @@ +{{- with .Site.Params.followMe }} +
+ {{ T "PostFollowMe" }} + +
+{{- end }} \ No newline at end of file diff --git a/layouts/partials/post/footer_meta/reward.html b/layouts/partials/post/footer_meta/reward.html new file mode 100644 index 0000000..838c46e --- /dev/null +++ b/layouts/partials/post/footer_meta/reward.html @@ -0,0 +1,21 @@ +{{- with .Site.Params.rewardSets }} +{{- if .enable }} +
+
{{- .comment | safeHTML -}}
+ +
+ {{- range $name,$img := $.Site.Params.reward }} + {{- $fw := substr $name 0 1 }} + {{- $pay := replace $name $fw ($fw | upper) 1 }} + {{- $payName := T (printf "Reward%s" $pay) }} +
+ {{ $.Site.Params.author }} - {{ $payName }} + {{ $payName }} +
+ {{- end }} +
+
+{{- end }} +{{- end }} diff --git a/layouts/partials/post/footer_meta/tags.html b/layouts/partials/post/footer_meta/tags.html new file mode 100644 index 0000000..a24c48e --- /dev/null +++ b/layouts/partials/post/footer_meta/tags.html @@ -0,0 +1,9 @@ +{{- with .Params.tags }} +{{- if gt (len .) 0 }} + +{{- end }} +{{- end }} diff --git a/layouts/partials/post/header.html b/layouts/partials/post/header.html new file mode 100644 index 0000000..ca492b3 --- /dev/null +++ b/layouts/partials/post/header.html @@ -0,0 +1,39 @@ +{{ with .ctx }} +{{- if $.IsHome }}

+ {{- if and .Weight (gt .Weight 0) }} + + + + {{- end }} + {{- if $.IsHome }} + {{- if and (isset .Params "extlink") (ne .Params.Extlink "") }} + + {{ .Title }} + + + {{- else }} + + {{- end }} + {{- else }} + {{- .Title }} + {{- if .Site.Params.postEdit.enable }} + {{- $editURL := printf "%s%s" .Site.Params.postEdit.url (path.Clean .File.Path) }} + + {{- end }} + {{- end }} + {{- if $.IsHome }}

{{ else }} {{ 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 new file mode 100644 index 0000000..e0dc326 --- /dev/null +++ b/layouts/partials/post/header_meta/categories.html @@ -0,0 +1,17 @@ +{{- if .Site.Params.postMeta.categories }} +{{- if and .Params.categories (gt (len .Params.categories) 0) }} + +{{- end }} +{{- end }} \ No newline at end of file diff --git a/layouts/partials/post/header_meta/created_date.html b/layouts/partials/post/header_meta/created_date.html new file mode 100644 index 0000000..c92b543 --- /dev/null +++ b/layouts/partials/post/header_meta/created_date.html @@ -0,0 +1,13 @@ +{{- if .Site.Params.postMeta.created }} +{{ $timeF := .Site.Params.timeFormat }} +{{ $createdTime := (.Date.Format $timeF) | default (.Date.Format $timeF) }} + +{{- end }} \ No newline at end of file diff --git a/layouts/partials/post/header_meta/readtime.html b/layouts/partials/post/header_meta/readtime.html new file mode 100644 index 0000000..a3bd067 --- /dev/null +++ b/layouts/partials/post/header_meta/readtime.html @@ -0,0 +1,9 @@ +{{- if .Site.Params.postMeta.readTime }} + +{{- end }} diff --git a/layouts/partials/post/header_meta/update_date.html b/layouts/partials/post/header_meta/update_date.html new file mode 100644 index 0000000..af82d7a --- /dev/null +++ b/layouts/partials/post/header_meta/update_date.html @@ -0,0 +1,12 @@ +{{- if and .Site.Params.postMeta.updated.enable .Site.Params.postMeta.updated.anotherDay }} +{{- if and .Lastmod (gt .Lastmod .Date) }} +{{ $modTime := .Lastmod.Format .Site.Params.timeFormat }} + +{{- end }} +{{- end }} \ No newline at end of file diff --git a/layouts/partials/post/header_meta/views.html b/layouts/partials/post/header_meta/views.html new file mode 100644 index 0000000..a898dc1 --- /dev/null +++ b/layouts/partials/post/header_meta/views.html @@ -0,0 +1,27 @@ +{{- if .Site.Params.leancloudVisitors.enable }} + +{{- end }} +{{- if .Site.Params.firestore.enable }} + +{{- end }} +{{- if and .Site.Params.busuanzi.enable .Site.Params.busuanzi.postViews }} + +{{- end }} \ No newline at end of file diff --git a/layouts/partials/post/header_meta/words.html b/layouts/partials/post/header_meta/words.html new file mode 100644 index 0000000..512acb9 --- /dev/null +++ b/layouts/partials/post/header_meta/words.html @@ -0,0 +1,8 @@ +{{- if .Site.Params.postMeta.wordCount }} + +{{- end }} \ No newline at end of file diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html new file mode 100644 index 0000000..216ddb7 --- /dev/null +++ b/layouts/partials/scripts.html @@ -0,0 +1,97 @@ + +{{- $jsRes := .Site.Data.resources.js }} +{{- $vendor := .Site.Params.vendors.plugins }} +{{- $vendorCDN := .Scratch.Get "pluginCDN" }} +{{- range $js := $jsRes }} + {{- $pluginJS := $vendorCDN }} + {{- $npm := $js.name }} + {{- $file := $js.file }} + {{- if eq $vendor "cdnjs" }} + {{- with $js.alias }} + {{- $npm = . }} + {{- end }} + {{- $file = replaceRE `(dist|lib|source\/js)\/` "" $js.file }} + {{- end }} + {{- $pluginJS = replace $pluginJS "${name}" $npm }} + {{- $pluginJS = replace $pluginJS "${version}" $js.version }} + {{- $pluginJS = replace $pluginJS "${file}" $file }} + +{{- end }} + + + +{{ $config := resources.Get "js/config.js" }} +{{ $boot := resources.Get "js/next-boot.js" }} +{{ $utils := resources.Get "js/utils.js" }} +{{ $alljs := (slice $config $boot $utils) | resources.Concat "js/all.js"}} + \ No newline at end of file diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html new file mode 100644 index 0000000..e000d99 --- /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..87a4b73 --- /dev/null +++ b/layouts/partials/sidebar/overview.html @@ -0,0 +1,93 @@ +{{- $author := .Site.Params.author }} + + +{{- if .Site.Params.siteState }} + +{{- end }} +{{- if and .Site.Params.chat.enable (or (or .Site.Params.chatra.enable .Site.Params.tidio.enable) .Site.Params.gitter.enable) }} + +{{- end }} + + +{{- $lang := .Scratch.Get "lang" }} +{{- with .Site.Params.creativeCommons }} +{{- if .sidebar }} + +{{- end }} +{{- end }} + +{{- if .Site.Params.links }} + +{{- end }} \ No newline at end of file diff --git a/layouts/partials/widgets.html b/layouts/partials/widgets.html new file mode 100644 index 0000000..327c075 --- /dev/null +++ b/layouts/partials/widgets.html @@ -0,0 +1,26 @@ +{{- if and .Site.Params.backTop.enable (not .Site.Params.backTop.sidebar) }} +
+ + 0% +
+{{- end }} + +{{- if .Site.Params.readingProgress.enable }} +
+{{- end }} + +{{- if .Site.Params.bookmark.enable }} + +{{- end }} + +{{- with .Site.Params.githubBanner }} +{{- if .enable }} + + + +{{- end }} +{{- end }} + + \ No newline at end of file diff --git a/static/css/noscript.css b/static/css/noscript.css new file mode 100644 index 0000000..4b8e8bd --- /dev/null +++ b/static/css/noscript.css @@ -0,0 +1,30 @@ +body { margin-top: 2rem; } + +.use-motion .menu-item, +.use-motion .sidebar, +.use-motion .post-block, +.use-motion .pagination, +.use-motion .comments, +.use-motion .post-header, +.use-motion .post-body, +.use-motion .collection-header { + visibility: visible; +} + +.use-motion header.header, +.use-motion .site-brand-container .toggle, +.use-motion .footer { opacity: initial; } + +.use-motion .site-title, +.use-motion .site-subtitle, +.use-motion .custom-logo-image { + opacity: initial; + top: initial; +} + +.use-motion .logo-line { + transform: scaleX(1); +} + +.search-pop-overlay, .sidebar-nav { display: none; } +.sidebar-panel { display: block; } \ No newline at end of file