Merge branch 'feature-baseof_layout' into develop

This commit is contained in:
凡梦星尘 2022-06-09 09:22:46 +08:00
commit 5fe253ab57
90 changed files with 2611 additions and 271 deletions

View File

@ -1,13 +1,10 @@
---
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:
-
@ -15,7 +12,36 @@ 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 }}
<!--more-->

View File

@ -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 {

View File

@ -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
}
}

View File

@ -18,7 +18,7 @@
.use-motion {
@if $motion_trans_post_block {
.post-block, .pagination, .comments {
.post-block, .pagination, .comments, .post-comments {
visibility: hidden;
}
}

View File

@ -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;
}

View File

@ -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 {
.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;
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;

View File

@ -5,6 +5,8 @@
@import 'related-posts';
@import 'math';
@import 'gitter';
@import 'livere';
@import 'waline';
.use-motion .animated {
// Fix issue #48 #55

View File

@ -0,0 +1,5 @@
@if $livere_enable {
#livereAdWrapper, #taboola-livere {
display: none;
}
}

View File

@ -0,0 +1,5 @@
@if $waline_enable {
.wl-actions>button:nth-child(3) {
display: none
}
}

View File

@ -3,15 +3,24 @@
border-bottom: 0;
position: fixed;
top: -10px;
transition: top .3s;
-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');

View File

@ -13,6 +13,9 @@
}
.cc-license {
margin-top: 6px;
.cc-opacity {
border-bottom: 0;
opacity: .7;

View File

@ -1,4 +1,4 @@
.links-of-author {
.links-of-author, .links-of-social {
a {
font-size: $font-size-smaller;
}

View File

@ -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;

View File

@ -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;
}
}
}

View File

@ -0,0 +1,4 @@
.fa-spin {
-webkit-animation: fa-spin .8s infinite linear;
animation: fa-spin .8s infinite linear;
}

View File

@ -0,0 +1 @@
@import 'animation';

View File

@ -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`

View File

@ -10,3 +10,4 @@
@import 'tags';
@import 'pagination';
@import 'comments';
@import 'fontawesome';

View File

@ -1,7 +1,7 @@
@if $pdf_enable {
.pdfobject-container {
iframe, embed {
height: convert($pdf_height);
height: $pdf_height;
width: 100%;
}
}

View File

@ -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;

View File

@ -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;
}
}

View File

@ -51,7 +51,7 @@
}
}
.links-of-author {
.links-of-author, .links-of-social {
&:not(:first-child) {
margin-top: 15px;
}

View File

@ -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 {

View File

@ -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

View File

@ -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

View File

@ -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();

View File

@ -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 => {

27
data/resources.yaml Normal file
View File

@ -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

View File

@ -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:card>
#twitter_id: <twitter:creator>
#twitter_site: <twitter:site>
#twitter_image: <twitter:image>
#google_plus: <g+:profile_link>
#fb_admins: <fb:admin_id>
#fb_app_id: <fb:app_id>
#twitter:
#creator: <twitter:creator>
#image: <twitter:image>
#site: <twitter:site>
#googlePlus: <g+:profile_link>
#facebook:
# admins: <fb:admin_id>
# app_id: <fb: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
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: '<i class="fa-solid fa-mug-hot"></i>请我喝杯咖啡吧 ヾ(^▽^*)))'
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: # <your_uid>
livere:
enable: true
uid: MTAyMC81MTM4MC8yNzg2MQ== # <your_uid>
# 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: # <your app id>
app_key: # <your app key>
appId: # <your app id>
appKey: # <your app key>
# Required for apps from CN region
server_url: # <your server url>
serverUrl: # <your server url>
# 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

View File

@ -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 worlds 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.
<!--more-->
## Quick Start
### Create a new post

View File

@ -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 的代码。
<!--more-->
它们以**冒号**开头和结尾,并且包含 emoji 的 **代码**
```markdown
去露营啦! {:}tent: 很快就回来.
真开心! {:}joy:
```
呈现的输出效果如下:
去露营啦! :tent: 很快就回来。
真开心! :joy:
以下**符号清单**是 emoji 代码的非常有用的参考。
## 表情与情感
### 笑脸表情
| 图标 | 代码 | 图标 | 代码 |
| :-: | - | :-: | - |
| :grinning: | `grinning` | :smiley: | `smiley` |
| :smile: | `smile` | :grin: | `grin` |
| :laughing: | `laughing` <br /> `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` <br /> `european_union` | :finland: | `finland` |
| :fiji: | `fiji` | :falkland_islands: | `falkland_islands` |
| :micronesia: | `micronesia` | :faroe_islands: | `faroe_islands` |
| :fr: | `fr` | :gabon: | `gabon` |
| :gb: | `gb` <br /> `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` | | |

View File

@ -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 上申请一个新特性。
- 为最受欢迎的功能请求投票。

View File

@ -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 让建设网站再次变得有趣起来。
<!--more-->
## 快速开始
### 发表新文章
```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 建站的旅程!

View File

@ -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` 文件内容中所写的各种语法,并展示下实际的效果。
<!--more-->
## 标题样式
让我们从所有可能的标题开始,在 HTML 中 `<h1>`-`<h6>`元素分别表示六个不同级别的标题样式,其中 `<h1>` 为最大标题,`<h6>`为最小标题,效果如下:
# 标题 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)表示,例如: `<body>` ,和[结束标记](https://www.w3.org/TR/html5/syntax.html#syntax-end-tags)表示,例如: `</body>` 。(*某些开始标记和结束标记在某些情况下可以省略,并由其他标记暗示。*
元素可以具有属性,这些属性控制元素的工作方式。例如:超链接是使用 `a` 元素及其 `href` 属性形成的。
## 图像
![hugo-next-primary](//lisenhui.gitee.io/imgs/hugo-next/logo/hugo-next-primary.png)
<img src="//lisenhui.gitee.io/imgs/hugo-next/logo/hugo-next-secondary.png" width="150"/>
## 列表类型
### 有序列表
1. 第一个元素
2. 第二个元素
3. 第三个元素
### 无序列表
* 列表元素
* 另一个元素
* 和其它元素
### 嵌套列表
借助 HTML 的 `ul` 元素来实现。
<ul>
<li>第一项</li>
<li>第二项
<ul>
<li>第二项第一个子项目</li>
<li>第二项第二个子项目
<ul>
<li>第二项第二分项第一分项</li>
<li>第二项第二分项第二分项</li>
<li>第二项第二分项第三分项</li>
</ul>
</li>
<li>第二项第三个子项目
<ol>
<li>第二项第三分项第一分项</li>
<li>第二项第三分项第二分项</li>
<li>第二项第三分项第三分项</li>
</ol>
</ul>
</li>
<li>第三项</li>
</ul>
### 自定义列表
通过 HTML 的 `dl` 元素还支持自定义列表(表格列表)。
<dl>
<dt>Hugo 目录结构</dt>
<dd>assets</dd>
<dd>config.toml</dd>
<dd>content</dd>
<dd>data</dd>
<dd>theme</dd>
<dd>static</dd>
<dt>Hugo 模板</dt>
<dd>基础模板</dd>
<dd>列表模板</dd>
<dd>单页模板</dd>
</dl>
## 块引用
`blockquote` 元素表示从另一个源引用的内容,可以选择引用必须在 `footer``cite` 元素中,也可以选择使用注释和缩写等行内更改。
> 引用文本
> 这一行也是同样的引用
> 同样你也在 `blockquote` 中使用 **Markdown** 语法书写
带有引文的 `Blockquote` 元素效果。
<blockquote>
<p>我的目标不是赚大钱,是为了制造好的电脑。当我意识到我可以永远当工程师时,我才创办了这家公司。</p>
<footer><cite>史蒂夫·沃兹尼亚克</cite></footer>
</blockquote>
根据 Mozilla 的网站记录,<q cite="https://www.mozilla.org/en-US/about/history/details/">Firefox 1.0 于 2004 年发布,并取得了巨大成功。</q>
## 表格
表格并不算是 `Markdown` 的核心要素,但 `Hugo` 同样支持它。
| ID | 创建者 | 模型 | 年份 |
| --- | --------- | ------- | ---- |
| 1 | Honda | Accord | 2009 |
| 2 | Toyota | Camry | 2012 |
| 3 | Hyundai | Elantra | 2010 |
可以使用 : (英文格式冒号)来对表格内容进行对齐。
| 表格 | 可以是 | 很酷 |
|:----- |:-----:| ----:|
| 左对齐 | 居中 | 右对齐 |
| 左对齐 | 居中 | 右对齐 |
| 左对齐 | 居中 | 右对齐 |
同样也可以在表格中使用 `Markdown` 语法。
| 表格 | 中 | 使用 | Markdown 语法 |
| ------ | --------- | ---------- | ------------- |
| *斜体* | **粗体** | ~~中划线~~ | `代码块` |
## Code
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Example HTML5 Document</title>
</head>
<body>
<p>Test</p>
</body>
</html>
```
{{< highlight html >}}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Example HTML5 Document</title>
</head>
<body>
<p>Test</p>
</body>
</html>
{{< /highlight >}}
## 其它元素: abbr、sub、sup、kbd等等
<abbr title="Graphics Interchange Format">GIF</abbr> 是位图图像格式。
H<sub>2</sub>O
C<sub>6</sub>H<sub>12</sub>O<sub>6</sub>
X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
<kbd>X</kbd>获胜。或按<kbd><kbd>CTRL</kbd>+<kbd>ALT</kbd>+<kbd>F</kbd></kbd>显示 FPS 计数器。
<mark>比特作为信息论中的信息单位,也被称为 shannon </mark>,以信息论领域的创始人 Claude shannon 的名字命名。
参考:
- 来自 **Mainroad** 主题的 [Basic Elements](https://mainroad-demo.netlify.app/post/basic-elements/) 内容

22
exampleSite/start.sh Normal file
View File

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -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"

142
i18n/en.yaml Normal file
View File

@ -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 <i class=\"fab fa-fw fa-creative-commons\"></i>%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"

View File

@ -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 强力驱动"

140
i18n/zh-cn.yaml Normal file
View File

@ -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: "目前共计 <strong>{{ .Count }}</strong> 个标签"
CatesCounterTitle:
zero: 暂无分类
other: "目前共计 <strong>{{ .Count }}</strong> 个分类"
ArchiveCounterTitle:
zero: 暂无日志
other: "目前共计 <strong>{{ .Count }}</strong> 篇日志"
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: "本博客所有文章除特别声明外,均采用 <i class=\"fab fa-fw fa-creative-commons\"></i>%s 许可协议。转载请注明出处!"
PostFollowMe:
other: 欢迎关注我的其它发布渠道
RewardDonate:
other: 赞赏
RewardWechatpay:
other: 微信
RewardAlipay:
other: 支付宝
RewardPaypal:
other: PayPal
RewardBitcoin:
other: 比特币
PostCommentTitle:
other: 评论交流
UserVistorsLabel:
other: 总访客量
PageViewsLabel:
other: 总访问量
FooterPowerby:
other: 由 %s 强力驱动

View File

@ -0,0 +1,91 @@
<!DOCTYPE html>
<html lang="{{ .Site.Language.Lang }}" dir="{{ $.Param "contentdir" | default "zh" }}">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8;"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="robots" content="all" />
<meta name="robots" content="index,follow"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="description" content="{{ i18n "404PageTitle" }}"/>
<link rel="shortcut icon" href="/img/favicon.ico" />
<link rel="apple-touch-icon" href="/img/apple-touch-icon.png" />
<link rel="apple-touch-icon-precomposed" href="/img/apple-touch-icon.png" />
<script type="text/javascript" src="https://volunteer.cdn-go.cn/404/latest/404.js" rendertarget="public_page"></script>
<title>{{ i18n "404PageTitle" }}</title>
<style type="text/css">
*{margin: 0;padding: 0;}
::-webkit-scrollbar {display:none}
.back_home_box {
box-sizing: border-box;
position: fixed;
top: 36px;
right: 50px;
z-index: 1050;
padding: 0;
width: initial;
font-size: 14px;
opacity: 0.6;
color: #fff;
cursor: pointer;
text-align: center;
}
.btn {
display:inline-block;
padding:6px 12px;
margin-bottom:0;
text-align:center;
white-space:nowrap;
vertical-align:middle;
-ms-touch-action:manipulation;
touch-action:manipulation;
cursor:pointer;
-webkit-user-select:none;
-moz-user-select:none;
-ms-user-select:none;
user-select:none;
background-image:none;
border:1px solid transparent;
border-radius:4px
}
.btn:hover {
background-color: #ff3434;
}
.btn-primary {
color:#fff;
/* background-color:#337ab7; */
border-color:#2e6da4;
}
.btn_blue {
padding: 10px;
text-align: center;
border-radius: 8px;
background: #e26464;
color: #fff;
letter-spacing: 3px;
border: 0;
font-size: 18px;
text-decoration-line: none;
}
#public_page {
margin:0px;
padding:0px;
width: 100%;
height: 100%;
overflow-y: hidden;
overflow-x: hidden;
max-width: 100vw;
}
</style>
</head>
<body>
<div id="public_page"></div>
<div class="back_home_box">
<a href="{{ "/" | relLangURL }}" class="btn btn-primary btn_blue">返回主页</a>
</div>
</body>

View File

@ -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 -}}
<!DOCTYPE html>
<html>
{{- partial "head.html" . -}}
<body>
{{- partial "header.html" . -}}
<div id="content">
{{- block "main" . }}{{- end }}
<html lang="{{ .Site.LanguageCode }}">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
{{ hugo.Generator }}
<link rel="shortcut icon" type="image/x-icon" href="{{ .Site.Params.favicon.icon }}">
<link rel="icon" type="image/x-icon" href="{{ .Site.Params.favicon.icon }}">
<link rel="icon" type="image/png" sizes="16x16" href="{{ .Site.Params.favicon.small }}">
<link rel="icon" type="image/png" sizes="32x32" href="{{ .Site.Params.favicon.medium }}">
<link rel="apple-touch-icon" sizes="180x180" href="{{ .Site.Params.favicon.appleTouchIcon }}">
{{- partial "head.html" . }}
<title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title>
<noscript>
<link rel="stylesheet" href="/css/noscript.css">
</noscript>
</head>
<body itemscope itemtype="http://schema.org/WebPage" {{ if .Site.Params.motion.enable }} class="use-motion" {{ end }}>
<div class="headband"></div>
<main class="main">
<header class="header" itemscope itemtype="http://schema.org/WPHeader">
<div class="header-inner">
{{- partial "header.html" . }}
</div>
{{- partial "footer.html" . -}}
<!-- Sidebar -->
{{- if ne .Site.Params.sidebar.display "remove" }}
{{- partial "sidebar.html" . }}
{{- end }}
</header>
<!-- Widgets -->
{{ partial "widgets.html" . }}
<div class="main-inner {{ block "main_inner_class" . }}{{ end }}">
<!-- Submenu,Content,Comment -->
{{- block "main" . }}{{- end }}
{{- if .IsPage }}
{{- partial "comments.html" . }}
{{- end }}
</div>
</main>
<footer class="footer">
<div class="footer-inner">
{{- partial "footer" . }}
</div>
</footer>
{{- partial "scripts" . }}
</body>
</html>

View File

@ -0,0 +1,29 @@
{{ range .Paginator.Pages.GroupByDate "2006" }}
<div class="collection-year">
<span class="collection-header">{{ .Key }}</span>
</div>
{{ range .Pages }}
<article itemscope itemtype="http://schema.org/Article">
<header class="post-header">
<div class="post-meta-container">
{{ $month := .Date.Format .Site.Params.monthFormat }}
<time itemprop="dateCreated" datetime="{{ .Date.Format .Site.Params.timeFormat }}" content="{{ $month }}">
{{ $month }}
</time>
</div>
<div class="post-title">
{{- if isset .Params "extlink" }}
<a href="{{ .Params.extlink }}" rel="noopener external nofollow noreferrer" target="_blank" class="exturl post-title-link post-title-link-external" title="">
<span itemprop="name">{{- .Title -}}</span>
<i class="fa fa-external-link-alt"></i>
</a>
{{- else }}
<a class="post-title-link" href="{{ .Permalink }}" itemprop="url">
<span itemprop="name">{{ .Title }}</span>
</a>
{{- end }}
</div>
</header>
</article>
{{ end }}
{{ end }}

View File

@ -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" }}
<div class="post-block">
<div class="post-content">
<div class="collection-title">
{{- $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 }}
<span class="collection-header">
{{- T (printf "PostArchiveCheers%s" $cheers) }}
{{- T "SymbolComma" }}
{{- T "ArchiveCounterTitle" $posts | safeHTML }}
{{- T "SymbolComma" }}
{{- T "PostArchiveKeepOn" }}
</span>
</div>
{{ .Render "list" }}
</div>
</div>
{{- partial "pagination.html" . }}
{{- end }}

View File

@ -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 }}

View File

@ -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" }}
<div class="post-block">
<div class="post-content">
<div class="collection-title">
<span class="collection-header">
<h2>
{{ .Title }}
<small>{{ T .Data.Singular | default .Data.Singular }}</small>
</h2>
</span>
</div>
{{ .Render "list" }}
</div>
</div>
{{- partial "pagination.html" . }}
{{- end }}

View File

@ -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" }}
<div class="post-block" lang="{{ .Site.LanguageCode }}">
<dive class="post-body">
{{- if eq .Data.Plural "categories" }}
{{ $cats := .Site.Taxonomies.categories }}
<div class="category-all-page">
<div class="category-all-title">
{{- T "CatesCounterTitle" (.Scratch.Get "catsCount") | safeHTML -}}
</div>
<div class="category-all">
<ul class="category-list">
{{- range $name, $items := $cats }}
<li class="category-list-item">
<a class="category-list-link" href="{{ "/categories/" | relLangURL }}{{ $name | urlize | lower }}" data-pjax-state="">{{ $name }}</a>
<span class="category-list-count">{{ len $items }}</span>
</li>
{{- end }}
</ul>
</div>
</div>
{{- end }}
{{- if eq .Data.Plural "tags" }}
{{ $tags := .Site.Taxonomies.tags }}
<div class="tag-cloud">
<div class="tag-cloud-title">
{{- T "TagsCounterTitle" (.Scratch.Get "tagsCount") | safeHTML -}}
</div>
<div class="tag-cloud-tags">
{{ $randNums := (seq 10) }}
{{- range $name, $items := $tags }}
<a class="tag-cloud-{{ index (shuffle $randNums) 0 }}" href="{{ "/tags/" | relLangURL }}{{ $name | urlize | lower }}">{{ $name }}
<span class="tag-list-count"><sup>({{ len $items }})</sup></span>
</a>
{{- end }}
</div>
</div>
{{- end }}
</div>
</div>
{{- end }}

View File

@ -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 }}

View File

@ -0,0 +1,13 @@
{{- with .Site.Params.LiveRe }}
<div id="lv-container" data-id="city" data-uid="{{ .uid }}"></div>
<script type="text/javascript">
(function(d, s) {
var j, e = d.getElementsByTagName(s)[0];
if (typeof LivereTower === 'function') { return; }
j = d.createElement(s);
j.src = '//cdn-city.livere.com/js/embed.dist.js';
j.async = true;
e.parentNode.insertBefore(j, e);
})(document, 'script');
</script>
{{- end }}

View File

@ -0,0 +1,9 @@
{{- with .Site.Params.utterances }}
<script src="https://utterances.njilc.com/client.js"
repo="{{ .repo }}"
issue-term="{{ .issueTerm }}"
label="{{ .label }}"
crossorigin="anonymous"
theme="{{ .theme }}" async>
</script>
{{- end }}

View File

@ -0,0 +1,21 @@
{{- with .Site.Params.waline }}
<div id="waline"></div>
<link rel="stylesheet" href="//unpkg.com/@waline/client@v2/dist/waline.css"/>
<script src="//unpkg.com/@waline/client@v2/dist/waline.js"></script>
<script type="text/javascript">
const locale = {
placeholder: "{{ .placeholder }}"
};
Waline.init({
locale,
el: "#waline",
emoji: {{ .emoji }},
imageUploader: {{ .imgUploader }},
wordLimit: {{ .wordLimit }},
requiredMeta: {{ .requiredMeta }},
serverURL: "{{ .serverURL }}",
lang: "{{ $.Lang }}"
});
</script>
{{- end }}

View File

@ -0,0 +1,5 @@
{{- with .Site.Params.addThisId }}
<div class="addthis_inline_share_toolbox" style="text-align: center;">
<script src="//s7.addthis.com/js/300/addthis_widget.js#pubid={{ . }}" async="async"></script>
</div>
{{- end }}

View File

@ -0,0 +1,40 @@
{{- $root := . -}}
{{- with .Site.Params.comments }}
{{- if .enable }}
{{- $tc := and .storage (gt (len .nav) 1) }}
{{- $active := .active }}
{{- $fc := .active }}
{{- $sc := "" }}
{{- $sn := "" }}
<div class="post-comments">
<div class="comment-head">
<div class="comment-headline">
<i class="fas fa-comments fa-fw"></i>
<span>{{ T "PostCommentTitle" }}</span>
</div>
{{- if $tc }}
{{- $sn = (sort .nav "weight") }}
{{- $fc = index $sn 0 }}
{{- $sc = index $sn 1 }}
<div class="comment-switch">
<span class="first-comment">{{ $fc.title }}</span>
<span class="switch-btn {{ if eq .active (lower $sc.name) }}move{{ end }}"></span>
<span class="second-comment">{{ $sc.title }}</span>
</div>
{{- end }}
</div>
<div class="comment-wrap">
{{ $cp := "_thirdparty/comment/%s.html" }}
{{- if $tc }}
{{- range $sn }}
<div>
{{- partial (printf $cp (lower .name)) $root }}
</div>
{{- end }}
{{- else }}
<div>{{- partial (printf $cp $fc) $root }}</div>
{{- end }}
</div>
</div>
{{- end }}
{{- end }}

View File

@ -0,0 +1,91 @@
{{- $ft := .Site.Params.footer }}
<div class="copyright">
&copy;
<span itemprop="copyrightYear">
{{- $year := now.Year }}
{{- if isset $ft "since" }}
{{- if gt $year $ft.since }}
{{ $ft.since }} - {{ $year }}
{{- else }}
{{ $year }}
{{- end }}
{{- else }}
{{ $year }}
{{- end }}
</span>
<span class="with-love">
<i class="{{ $ft.icon.name }}"></i>
</span>
<span class="author" itemprop="copyrightHolder">{{ $ft.copyright | default .Site.Params.author }}</span>
</div>
{{/* TODO
<!--
{{- if config.symbols_count_time.total_symbols or config.symbols_count_time.total_time }}
<div class="wordcount">
{{- if config.symbols_count_time.total_symbols }}
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="fa fa-chart-line"></i>
</span>
{{- if .Site.Params.symbols_count_time.item_text_total }}
<span>{{ __('symbols_count_time.count_total') + __('symbol.colon') }}</span>
{{- end }}
<span title="{{ __('symbols_count_time.count_total') }}">{{ symbolsCountTotal(site) }}</span>
</span>
{{- end }}
{{- if config.symbols_count_time.total_time }}
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="fa fa-coffee"></i>
</span>
{{- if .Site.Params.symbols_count_time.item_text_total }}
<span>{{ __('symbols_count_time.time_total') }} &asymp;</span>
{{- end }}
<span title="{{ __('symbols_count_time.time_total') }}">{{ symbolsTimeTotal(site, config.symbols_count_time.awl, config.symbols_count_time.wpm, __('symbols_count_time.time_minutes')) }}</span>
</span>
{{- end }}
</div>
{{- end }}
-->
*/}}
{{- if .Site.Params.busuanzi.enable }}
{{ with .Site.Params.busuanzi }}
<div class="busuanzi-count">
{{- if .visitors }}
<span class="post-meta-item" id="busuanzi_container_site_uv" title="{{ T "VisitorsLabel" }}">
<span class="post-meta-item-icon">
<i class="{{ .visitorsIcon }}"></i>
</span>
<span class="site-uv" >
<span id="busuanzi_value_site_uv"></span>
</span>
</span>
{{- end }}
{{- if .views }}
<span class="post-meta-item" id="busuanzi_container_site_pv" title="{{ T "PageViewsLabel" }}">
<span class="post-meta-item-icon">
<i class="{{ .viewsIcon }}"></i>
</span>
<span class="site-pv">
<span id="busuanzi_value_site_pv"></span>
</span>
</span>
{{- end }}
</div>
{{- end }}
{{- end }}
{{- if $ft.powered }}
<div class="powered-by">
{{ $pb := printf "<a href='https://gohugo.io' target='_blank'>Hugo</a> &amp; <a href='https://github.com/hugo-next' target='_blank'>NexT.%s</a>" .Site.Params.scheme }}
{{- printf (T "FooterPowerby") $pb | safeHTML }}
</div>
{{- end }}
{{- if $ft.beian.enable }}
{{- with $ft.beian }}
<div class="beian">
<a href="https://beian.miit.gov.cn" target="_blank">{{ .icp }}</a>
<img src="/imgs/gongan.png" alt="{{ .provinceAbbr }}公网安备">
<a href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode={{ .gonganNum }}" target="_blank">{{ .provinceAbbr }}公网安备 {{ .gonganNum }} 号</a>
</div>
{{- end }}
{{- end }}

View File

@ -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") }}
<link rel="stylesheet" href="{{ $css.RelPermalink }}">
{{- 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" . }}

View File

@ -0,0 +1,5 @@
{{- with .Site.Params.openGraph.facebook }}
{{- range $attr, $val := . }}
<meta property="fb:{{ $attr }}" content="{{ $val }}">
{{- end }}
{{- end }}

View File

@ -0,0 +1,3 @@
{{- with .Site.Params.openGraph.googlePlus }}
<link rel="publisher" href=" {{ . }}">
{{- end }}

View File

@ -0,0 +1,22 @@
<meta itemprop="name" content="{{ .Title }}" />
<meta itemprop="description" content="{{ .Description | default .Site.Params.description }}" />
{{- if .IsPage }}
{{- with .Date }}
<meta itemprop="datePublished" {{ . }} />
{{- end }}
{{- with .Lastmod }}
<meta itemprop="dateModified" {{ . }} />
{{- 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 }}
<meta itemprop="image" content="{{ $img | absURL }}" />
<meta itemprop="keywords" content="{{ if and .IsPage (isset .Params "tags")}}{{ delimit .Params.tags "," }}{{ else }}{{ .Site.Params.keywords }}{{ end }}" />
{{- if .Site.Params.darkmode }}
<meta name="theme-color" content="{{ .Site.Params.themeColor.dark }}" media="(prefers-color-scheme: dark)" />
{{- else }}
<meta name="theme-color" content="{{ .Site.Params.themeColor.light }}" media="(prefers-color-scheme: light)" />
{{- end }}

View File

@ -0,0 +1,17 @@
{{- if .Site.Params.openGraph.enable }}
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" />
<meta property="og:title" content="{{ .Title | default .Site.Title }}" />
<meta property="og:description" content="{{ .Description | default .Site.Params.Description }}" />
<meta property="og:image" content="{{ .Scratch.Get "metaImg" }}" />
<meta property="og:image:width" content="312" />
<meta property="og:image:height" content="312" />
<meta property="og:image:type" content="image/jpeg/png/svg/jpg" />
<meta property="og:url" content="{{ .Permalink }}"/>
<meta property="og:site_name" content="{{ .Site.Title }}" />
<meta property="og:locale" content="{{ .Site.LanguageCode }}"/>
{{- if .IsPage }}
<meta property="article:author" content="{{ .Params.Author | default .Site.Params.Author }}" />
<meta property="article:published_time" content="{{ .Date }}" />
<meta property="article:modified_time" content="{{ .Lastmod }}" />
{{- end }}
{{- end }}

View File

@ -0,0 +1,25 @@
<!-- Plugin style files -->
{{- $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 }}
<link rel="stylesheet" href="{{ $pluginCSS }}">
{{- end }}
<!-- Main Style file -->
{{- $scss := resources.Get "css/main.scss" }}
{{- $scss = $scss | resources.ExecuteAsTemplate "main.scss" . }}
{{- $css := $scss | toCSS (dict "targetPath" "/css/main.css" "outputStyle" "expanded") }}
<link rel="stylesheet" href="{{ $css.RelPermalink }}">
<link rel="stylesheet" href="/css/hover.css">

View File

@ -0,0 +1,9 @@
{{- with .Site.Params.openGraph.twitter }}
{{- $img := $.Params.openGraph.twitter.image | default ($.Scratch.Get "metaImg") }}
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:creator" content="{{ .creator }}"/>
<meta name="twitter:description" content="{{ with $.Page.Description }}{{ . }}{{ else }}{{if $.Page.IsPage}}{{ .Summary }}{{ else }}{{ $.Params.description }}{{ end }}{{ end }}"/>
<meta name="twitter:image" content="{{ $img | absURL }}"/>
<meta name="twitter:title" content="{{ $.Page.Title }}"/>
<meta name="twitter:site" content="@{{ .site }}"/>
{{ end }}

View File

@ -0,0 +1,14 @@
{{ if .IsHome }}
{{- with .Site.Params.googleSiteVerification }}
<meta name="google-site-verification" content="{{ . }}">
{{- end }}
{{- with .Site.Params.bingSiteVerification }}
<meta name="msvalidate.01" content="{{ . }}">
{{- end }}
{{- with .Site.Params.yandexSiteVerification }}
<meta name="yandex-verification" content="{{ . }}">
{{- end }}
{{- with .Site.Params.baiduSiteVerification }}
<meta name="baidu-site-verification" content="{{ . }}">
{{- end }}
{{ end }}

View File

@ -0,0 +1,2 @@
{{ partial "header/brand.html" . }}
{{ partial "header/menus.html" . }}

View File

@ -0,0 +1,36 @@
{{ $title := .Site.Title }}
<div class="site-brand-container">
<div class="site-nav-toggle">
<div class="toggle" aria-label="{{ T "NavToggleLabel" }}" role="button">
<span class="toggle-line"></span>
<span class="toggle-line"></span>
<span class="toggle-line"></span>
</div>
</div>
<div class="site-meta">
{{- if and .Site.Params.customLogo (eq .Site.Params.scheme "Muse") }}
<img class="custom-logo-image" src="{{ .Site.Params.customLogo }}" alt="{{ $title }}">
{{- end }}
<a href="{{ .Site.BaseURL }}" class="brand" rel="start">
<i class="logo-line"></i>
<h1 class="site-title">{{ $title }}</h1>
<i class="logo-line"></i>
</a>
{{ if isset .Site.Params "subtitle" }}
<p class="site-subtitle" itemprop="description">{{ .Site.Params.subtitle }}</p>
{{- end }}
{{- if and .Site.Params.customLogo (or (eq .Site.Params.scheme "Gemini") (eq .Site.Params.scheme "Pisces"))}}
<img class="custom-logo-image" src="{{ .Site.Params.customLogo }}" alt="{{ $title }}">
{{- end }}
</div>
<div class="site-nav-right">
<div class="toggle popup-trigger">
{{ if or .Site.Params.algoliaSearch.enable .Site.Params.localSearch.enable }}
<i class="fa fa-search fa-fw fa-lg"></i>
{{- end }}
</div>
</div>
</div>

View File

@ -0,0 +1,26 @@
{{- $ms := .Site.Params.menuSets }}
{{- $curP := .Page }}
<nav class="site-nav">
<ul class="main-menu menu">
{{- range $curP.Site.Menus.main }}
{{- $active := or ($curP.IsMenuCurrent "main" .) ($curP.HasMenuCurrent "main" .) }}
{{- $active = or $active (eq .URL "/")}}
<li class="menu-item menu-item-{{ .Identifier }}">
<a href="{{ .URL }}" class="hvr-icon-pulse {{if $active }} menu-item-active{{ end }}" rel="section">
{{- if $ms.icons }}<i class="fa fa-{{ .Pre }} hvr-icon"></i>{{ end }}{{- .Name }}
{{- if and $ms.badges (eq .Identifier "archives" ) }}
<span class="badge">{{ $.Scratch.Get "postsCount" }}</span>
{{- end }}
</a>
</li>
{{- end }}
{{- if or .Site.Params.algoliaSearch.enable .Site.Params.localSearch.enable }}
<li class="menu-item menu-item-search">
<a role="button" class="popup-trigger hvr-icon-pulse">
{{- if $ms.icons }}<i class="fa fa-search fa-fw hvr-icon"></i>{{ end }}{{ T "MSearchLabel" }}
</a>
</li>
{{- end }}
</ul>
</nav>

View File

@ -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"}}
<nav class="pagination">
{{- if $pag.HasPrev }}
<a class="extend prev" rel="prev" href="{{- $pag.Prev.URL }}">
<i class="fa fa-angle-left"></i>
</a>
{{- end }}
{{- range $p := $pag.Pagers }}
{{- if and (ge $p.PageNumber $begin) (le $p.PageNumber $end) }}
{{- if eq $p $pag }}
<span class="page-number current">{{- $p.PageNumber }}</span>
{{- else }}
<a class="page-number" href="{{- $p.URL }}">{{- $p.PageNumber }}</a>
{{- end }}
{{- end }}
{{- end }}
{{- if $pag.HasNext }}
<a class="extend next" rel="next" href="{{- $pag.Next.URL }}">
<i class="fa fa-angle-right"></i>
</a>
{{- end }}
</nav>

View File

@ -0,0 +1,28 @@
<div class="post-block">
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="{{ .Site.LauageCode }}">
{{- with .ctx }}
<link itemprop="mainEntityOfPage" href="{{ .Permalink }}">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="{{ .Site.Params.avatar.url }}">
<meta itemprop="name" content="{{ .Params.author | default .Site.Params.author }}">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="{{ .Site.Params.author }}">
<meta itemprop="description" content="{{ .Site.Params.description }}">
</span>
<span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
<meta itemprop="name" content="{{ .Title }}">
<meta itemprop="description" content="{{ .Description | default .Summary }}">
</span>
{{- end }}
<header class="post-header">
{{ partial "post/header.html" (dict "ctx" .ctx "IsHome" .IsHome) }}
</header>
<div class="post-body" itemprop="articleBody">
{{ partial "post/body.html" (dict "ctx" .ctx "IsHome" .IsHome) }}
</div>
<footer class="post-footer">
{{ partial "post/footer.html" (dict "ctx" .ctx "IsHome" .IsHome) }}
</footer>
</article>
</div>

View File

@ -0,0 +1,11 @@
{{ with .ctx }}
{{- if $.IsHome }}
{{- if .Params.Expand }}
{{ .Content }}
{{- else }}
{{ .Summary }}
{{- end }}
{{- else }}
{{ .Content }}
{{- end }}
{{ end }}

View File

@ -0,0 +1,36 @@
{{ with .ctx }}
{{- if $.IsHome }}
{{- if and .Site.Params.readMoreBtn (not .Params.Expand) }}
<div class="post-button">
<a class="btn" href="{{ .Permalink }}#more" rel="contents">
{{ T "PostReadMore" }} &raquo;
</a>
</div>
{{- end }}
<div class="post-eof"></div>
{{- else }}
{{ partial "post/footer_meta/tags.html" . }}
{{ partial "_thirdparty/share/addthis.html" . }}
<hr/>
{{ partial "post/footer_meta/reward.html" . }}
{{ partial "post/footer_meta/copyright.html" . }}
{{ partial "post/footer_meta/followme.html" . }}
<div class="post-nav">
<div class="post-nav-next post-nav-item">
{{- with .NextInSection }}
<a href="{{ .Permalink}}" rel="next" title="{{.Title}}">
<i class="fa fa-chevron-left"></i> {{.Title}}
</a>
{{- end }}
</div>
<div class="post-nav-prev post-nav-item">
{{- with .PrevInSection }}
<a href="{{ .Permalink}}" rel="prev" title="{{.Title}}">
{{.Title}}
<i class="fa fa-chevron-right"></i>
</a>
{{- end }}
</div>
</div>
{{- end }}
{{ end }}

View File

@ -0,0 +1,36 @@
{{- if .Site.Params.creativeCommons.post }}
<div class="post-copyright">
<img src="/imgs/cc/cc.svg" width="75" height="75" align="right" />
<ul>
<li class="post-copyright-title">
<strong>{{ print (T "PostCRTitle") (T "SymbolColon") }}</strong>
{{ .Title }}
</li>
<li class="post-copyright-author">
{{- if isset .Params "author" }}
<strong>{{ print (T "PostCROriginAuthor") (T "SymbolColon") }} </strong>
{{ .Params.Author }}
{{- else }}
<strong>{{ print (T "PostCRAuthor") (T "SymbolColon") }} </strong>
{{ .Site.Params.author }}
{{- end }}
</li>
<li class="post-copyright-link">
{{- if isset .Params "link" }}
<strong>{{ print (T "PostCROriginLink") (T "SymbolColon") }} </strong>
<a target="_blank" href="{{ .Params.OriginLink }}" title="{{ .Title }}">{{ .Params.Link }}</a>
{{- else }}
<strong>{{ print (T "PostCRLink") (T "SymbolColon") }}</strong>
<a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Permalink }}</a>
{{- end }}
</li>
<li class="post-copyright-license">
<strong>{{ print (T "PostCRLicenseTitle") (T "SymbolColon") }} </strong>
{{- $ccText := .Site.Params.creativeCommons.license | upper }}
{{- $lang := .Scratch.Get "lang" }}
{{- $ccLink := printf "<a target='_blank' href='https://creativecommons.org/licenses/by-nc-sa/4.0/deed.%s'>%s</a>" (substr $lang 0 2) $ccText }}
{{ printf (T "PostCRLicenseContent") $ccLink | safeHTML }}
</li>
</ul>
</div>
{{- end }}

View File

@ -0,0 +1,21 @@
{{- with .Site.Params.followMe }}
<div class="followme">
<span>{{ T "PostFollowMe" }}</span>
<div class="social-list">
{{ range . }}
{{- $vals := split . "||" }}
{{- $name := trim (index $vals 0) " " }}
{{- $url := trim (index $vals 1) " " }}
{{- $icon := trim (index $vals 2) " " }}
<div class="social-item">
<a target="_blank" class="social-link" href="{{ $url }}">
<span class="icon">
<i class="{{ $icon }}"></i>
</span>
<span class="label">{{ $name }}</span>
</a>
</div>
{{- end }}
</div>
</div>
{{- end }}

View File

@ -0,0 +1,21 @@
{{- with .Site.Params.rewardSets }}
{{- if .enable }}
<div class="reward-container">
<div>{{- .comment | safeHTML -}}</div>
<button>
{{- T "RewardDonate" -}}
</button>
<div class="post-reward">
{{- range $name,$img := $.Site.Params.reward }}
{{- $fw := substr $name 0 1 }}
{{- $pay := replace $name $fw ($fw | upper) 1 }}
{{- $payName := T (printf "Reward%s" $pay) }}
<div class="post-reward-item">
<img src="{{ $img }}" alt="{{ $.Site.Params.author }} - {{ $payName }}">
<span>{{ $payName }}</span>
</div>
{{- end }}
</div>
</div>
{{- end }}
{{- end }}

View File

@ -0,0 +1,9 @@
{{- with .Params.tags }}
{{- if gt (len .) 0 }}
<div class="post-tags">
{{ range . }}
<a href="{{ . }}">{{ . }}</a>
{{- end }}
</div>
{{- end }}
{{- end }}

View File

@ -0,0 +1,39 @@
{{ with .ctx }}
{{- if $.IsHome }} <h2 {{ else }} <h1 {{ end -}} class="post-title" itemprop="name headline">
{{- if and .Weight (gt .Weight 0) }}
<span class="post-sticky-flag" title="{{ T "PostStickyTitle" }}">
<i class="fa fa-thumbtack"></i>
</span>
{{- end }}
{{- if $.IsHome }}
{{- if and (isset .Params "extlink") (ne .Params.Extlink "") }}
<a href="{{ .Params.Extlink }}" rel="noopener external nofollow noreferrer" target="_blank" class="exturl post-title-link post-title-link-external">
{{ .Title }}
<i class="fa fa-external-link-alt"></i>
</a>
{{- else }}
<a href="{{ .Permalink }}" itemprop="url" class="post-title-link">{{ .Title }}</a>
{{- end }}
{{- else }}
{{- .Title }}
{{- if .Site.Params.postEdit.enable }}
{{- $editURL := printf "%s%s" .Site.Params.postEdit.url (path.Clean .File.Path) }}
<a href="{{ $editURL }}" rel="noopener external nofollow noreferrer" target="_blank" class="exturl post-edit-link" title="{{ T "PostEditTitle" }}"><i class="fa fa-pen-nib"></i></a>
{{- end }}
{{- end }}
{{- if $.IsHome }} </h2> {{ else }} </h1> {{ end -}}
<div class="post-meta-container">
<div class="post-meta-items">
{{ partial "post/header_meta/created_date.html" . }}
{{ partial "post/header_meta/update_date.html" . }}
{{ partial "post/header_meta/categories.html" . }}
</div>
{{- if not $.IsHome }}
<div class="post-meta-items">
{{ partial "post/header_meta/words.html" . }}
{{ partial "post/header_meta/readtime.html" . }}
{{ partial "post/header_meta/views.html" . }}
</div>
{{ end }}
</div>
{{ end }}

View File

@ -0,0 +1,17 @@
{{- if .Site.Params.postMeta.categories }}
{{- if and .Params.categories (gt (len .Params.categories) 0) }}
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-folder-open"></i>
</span>
<span class="post-meta-item-text">{{- print (T "PostCatgs") (T "SymbolColon") -}}</span>
{{- range (first 1 .Params.categories) }}
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="/categories/{{ . | urlize }}" itemprop="url" rel="index">
<span itemprop="name">{{- . -}}</span>
</a>
</span>
{{- end }}
</span>
{{- end }}
{{- end }}

View File

@ -0,0 +1,13 @@
{{- if .Site.Params.postMeta.created }}
{{ $timeF := .Site.Params.timeFormat }}
{{ $createdTime := (.Date.Format $timeF) | default (.Date.Format $timeF) }}
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">{{- print (T "PostPublishDate") (T "SymbolColon") -}}</span>
<time title="{{ print (T "PostPublishDate") (T "SymbolColon") }}{{ .Date }}" itemprop="dateCreated datePublished" datetime="{{ .Date }}">
{{- .Date.Format .Site.Params.dateFormat -}}
</time>
</span>
{{- end }}

View File

@ -0,0 +1,9 @@
{{- if .Site.Params.postMeta.readTime }}
<span class="post-meta-item" title="{{ T "PostReading" }}">
<span class="post-meta-item-icon">
<i class="far fa-clock"></i>
</span>
<span class="post-meta-item-text">{{- print (T "PostReading") (T "SymbolColon") -}}&asymp;</span>
<span>{{- T "PostReadTime" . -}}</span>
</span>
{{- end }}

View File

@ -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 }}
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar-check"></i>
</span>
<span class="post-meta-item-text">{{- print (T "PostLastModDate") (T "SymbolColon") -}}</span>
<time title="{{ print (T "PostLastModTime") (T "SymbolColon") }}{{ $modTime }}" itemprop="dateModified" datetime="{{ $modTime }}">{{- .Lastmod.Format .Site.Params.dateFormat -}}</time>
</span>
{{- end }}
{{- end }}

View File

@ -0,0 +1,27 @@
{{- if .Site.Params.leancloudVisitors.enable }}
<span id="{{ .Permalink }}" class="post-meta-item leancloud_visitors" data-flag-title="{{ .Title }}" title="{{ T "PostViews" }}">
<span class="post-meta-item-icon">
<i class="far fa-eye"></i>
</span>
<span class="post-meta-item-text">{{- print (T "PostViews") (T "SymbolColon") -}}</span>
<span class="leancloud-visitors-count"></span>
</span>
{{- end }}
{{- if .Site.Params.firestore.enable }}
<span class="post-meta-item" title="{{ T "PostViews" }}">
<span class="post-meta-item-icon">
<i class="far fa-eye"></i>
</span>
<span class="post-meta-item-text">{{ print (T "PostViews") (T "SymbolColon") }}</span>
<span class="firestore-visitors-count"></span>
</span>
{{- end }}
{{- if and .Site.Params.busuanzi.enable .Site.Params.busuanzi.postViews }}
<span class="post-meta-item" title="{{ T "PostViews" }}" id="busuanzi_container_page_pv">
<span class="post-meta-item-icon">
<i class="{{ .Site.Params.busuanzi.postViewsIcon }}"></i>
</span>
<span class="post-meta-item-text">{{ print (T "PostViews") (T "SymbolColon") }}</span>
<span id="busuanzi_value_page_pv"><i class="fa fa-sync fa-spin"></i></span>
</span>
{{- end }}

View File

@ -0,0 +1,8 @@
{{- if .Site.Params.postMeta.wordCount }}
<span class="post-meta-item" title="{{ T "PostWords" }}">
<span class="post-meta-item-icon">
<i class="far fa-file-word"></i>
</span>
<span class="post-meta-item-text">{{- print (T "PostWords") (T "SymbolColon") -}}</span><span>{{- T "PostWordCount" . -}}</span>
</span>
{{- end }}

View File

@ -0,0 +1,97 @@
<!-- Plugin scripts files -->
{{- $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 }}
<script type="text/javascript" src="{{ $pluginJS }}"></script>
{{- end }}
<script class="next-config" data-name="main" type="application/json">
{
"hostname": "theme-next.js.org",
"root": "/",
"images": "/images",
"scheme": "Gemini",
"darkmode": true,
"version": "8.12.1",
"exturl": true,
"sidebar":
{
"position": "left",
"display": "post",
"padding": 18,
"offset": 12
},
"copycode":
{
"enable": true,
"style": "default"
},
"bookmark":
{
"enable": false,
"color": "#222",
"save": "auto"
},
"mediumzoom": true,
"lazyload": false,
"pangu": false,
"comments":
{
"style": "tabs",
"active": null,
"storage": true,
"lazyload": true,
"nav": null
},
"stickytabs": false,
"motion":
{
"enable": false,
"async": false,
"transition":
{
"post_block": "fadeIn",
"post_header": "fadeInDown",
"post_body": "fadeInDown",
"coll_header": "fadeInLeft",
"sidebar": "fadeInUp"
}
},
"prism": false,
"i18n":
{
"placeholder": "Searching...",
"empty": "We didn't find any results for the search: ${query}",
"hits_time": "${hits} results found in ${time} ms",
"hits": "${hits} results found"
},
"path": "/search.json",
"localsearch":
{
"enable": true,
"trigger": "auto",
"top_n_per_article": 1,
"unescape": false,
"preload": false
}
}
</script>
{{ $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"}}
<script defer src="{{ $alljs.RelPermalink }}"></script>

View File

@ -0,0 +1,37 @@
<div class="toggle sidebar-toggle" role="button">
<span class="toggle-line"></span>
<span class="toggle-line"></span>
<span class="toggle-line"></span>
</div>
<aside class="sidebar">
{{- $toc := and (isset .Page.Params "toc") .Page.Params.toc }}
<div class="sidebar-inner {{ if $toc }}sidebar-nav-active sidebar-toc-active{{ else }}sidebar-overview-active{{ end }}">
<ul class="sidebar-nav">
<li class="sidebar-nav-toc">
{{ T "TableOfContents" }}
</li>
<li class="sidebar-nav-overview">
{{ T "SiteOverview" }}
</li>
</ul>
<div class="sidebar-panel-container">
<!--noindex-->
<div class="post-toc-wrap sidebar-panel">
{{- if $toc }}
<div class="post-toc animated">{{ .Page.TableOfContents }}</div>
{{- end }}
</div>
<!--/noindex-->
<div class="site-overview-wrap sidebar-panel">
{{ partial "sidebar/overview" . }}
</div>
</div>
{{- if and .Site.Params.backTop.enable .Site.Params.backTop.sidebar }}
<div class="back-to-top animated" role="button" aria-label="{{ T "BackTop" }}">
<i class="fa fa-arrow-up"></i>
<span>0%</span>
</div>
{{- end }}
</div>
</aside>
<div class="sidebar-dimmer"></div>

View File

View File

@ -0,0 +1,93 @@
{{- $author := .Site.Params.author }}
<div class="site-author site-overview-item animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
{{- with .Site.Params.avatar.url }}
<img class="site-author-image" itemprop="image" alt="{{ $author }}"
src="{{ . }}">
{{- end }}
<p class="site-author-name" itemprop="name">{{ $author }}</p>
<div class="site-description" itemprop="description">{{ .Site.Params.description }}</div>
</div>
{{- if .Site.Params.siteState }}
<div class="site-state-wrap site-overview-item animated">
<nav class="site-state">
<div class="site-state-item site-state-posts">
<a href="{{ "/posts/" | relLangURL }}">
<span class="site-state-item-count">{{ .Scratch.Get "postsCount" }}</span>
<span class="site-state-item-name">{{ T "SbPostsLable" }}</span>
</a>
</div>
<div class="site-state-item site-state-categories">
<a href="{{ "/categories/" | relLangURL }}">
<span class="site-state-item-count">{{ .Scratch.Get "catsCount" }}</span>
<span class="site-state-item-name">{{ T "SbCatesTitle" }}</span>
</a>
</div>
<div class="site-state-item site-state-tags">
<a href="{{ "/tags/" | relLangURL }}">
<span class="site-state-item-count">{{ .Scratch.Get "tagsCount" }}</span>
<span class="site-state-item-name">{{ T "SbTagsTitle" }}</span>
</a>
</div>
</nav>
</div>
{{- end }}
{{- if and .Site.Params.chat.enable (or (or .Site.Params.chatra.enable .Site.Params.tidio.enable) .Site.Params.gitter.enable) }}
<div class="sidebar-button site-overview-item animated">
<button {{ if .Site.Params.gitter.enable }} class="js-gitter-toggle-chat-button" {{ end }}>
{{- if .Site.Params.chat.icon }}<i class="{{ .Site.Params.chat.icon }}"></i>{{ end }}
{{ .Site.Params.chat.text }}
</button>
</div>
{{- end }}
<div class="links-of-social site-overview-item animated">
{{ $si := .Site.Params.socialIcons }}
{{ range $key,$val := .Site.Params.socials }}
{{- $vals := split $val "||" }}
{{- $name := trim (index $vals 0) " " }}
{{- $url := trim (index $vals 1) " " }}
{{- $icon := trim (index $vals 2) " " }}
<span class="links-of-social-item">
<a href="{{ $url }}" title="{{ $name }} → {{ $url }}" rel="noopener" {{- if and $si.enable $si.transition }} class="hvr-icon-pulse" {{- end }} target="_blank">
{{- if $si.enable }}
<i class="{{- $icon }} fa-fw {{ if $si.transition }} hvr-icon {{ end }}"></i>
{{- end }}
{{- if or (not $si.enable) (not $si.iconsOnly) }}
{{- $name }}
{{- end }}
</a>
</span>
{{- end }}
</div>
{{- $lang := .Scratch.Get "lang" }}
{{- with .Site.Params.creativeCommons }}
{{- if .sidebar }}
<div class="cc-license animated" itemprop="license">
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.{{ substr $lang 0 2 }}" class="cc-opacity" rel="noopener" target="_blank" title="{{ T "CCLinkTitle" }}">
<img src="/imgs/cc/{{ .size }}/{{ replace .license "-" "_" }}.svg" alt="{{ T "CCLinkTitle" }}">
</a>
</div>
{{- end }}
{{- end }}
{{- if .Site.Params.links }}
<div class="links-of-blogroll site-overview-item animated">
<div class="links-of-blogroll-title">
{{- if .Site.Params.linksSets.icon }}
<i class="{{ .Site.Params.linksSets.icon }} fa-fw"></i>
{{- end }}
{{- .Site.Params.linksSets.title }}
</div>
<ul class="links-of-blogroll-list">
{{- range $key,$val := .Site.Params.links }}
{{- $vals := split $val "||" }}
{{- $name := trim (index $vals 0) " " }}
{{- $url := trim (index $vals 1) " " }}
<li class="links-of-blogroll-item">
<a href="{{ $url }}" title="{{ $url }}" target="_blank">{{ $name }}</a>
</li>
{{- end }}
</ul>
</div>
{{- end }}

View File

@ -0,0 +1,26 @@
{{- if and .Site.Params.backTop.enable (not .Site.Params.backTop.sidebar) }}
<div class="back-to-top" role="button" aria-label="{{ T "BackTopLabel" }}">
<i class="fa fa-arrow-up"></i>
<span>0%</span>
</div>
{{- end }}
{{- if .Site.Params.readingProgress.enable }}
<div class="reading-progress-bar"></div>
{{- end }}
{{- if .Site.Params.bookmark.enable }}
<a role="button" class="book-mark-link book-mark-link-fixed"></a>
{{- end }}
{{- with .Site.Params.githubBanner }}
{{- if .enable }}
<a href="{{ .permalink }}" rel="noopener external nofollow noreferrer" target="_blank" title="{{ .title }}" class="exturl github-corner">
<svg width="80" height="80" viewBox="0 0 250 250" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg>
</a>
{{- end }}
{{- end }}
<noscript>
<div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>

30
static/css/noscript.css Normal file
View File

@ -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; }