diff --git a/archetypes/default.md b/archetypes/default.md
index 4ee62f4..51a441a 100644
--- a/archetypes/default.md
+++ b/archetypes/default.md
@@ -1,22 +1,24 @@
---
+author: ""
+author_link: ""
title: "{{ replace .TranslationBaseName "-" " " | title }}"
date: {{ .Date }}
lastmod: {{ .Date }}
draft: true
description: ""
show_in_homepage: true
-show_description: false
-license: ''
+description_as_summary: false
+license: ""
tags: []
categories: []
-featured_image: ''
-featured_image_preview: ''
+featured_image: ""
+featured_image_preview: ""
comment: true
toc: false
-autoCollapseToc: true
+auto_collapse_toc: true
math: false
---
diff --git a/assets/css/_core/_base.scss b/assets/css/_core/_base.scss
index 80cf7df..57b4b2b 100644
--- a/assets/css/_core/_base.scss
+++ b/assets/css/_core/_base.scss
@@ -1,37 +1,37 @@
-@import url(https://fonts.googleapis.com/css?family=Lato:100,300,400,700,900);
-
html {
- font-family: "Lato", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", STHeiti, "Microsoft Yahei", "WenQuanYi Micro Hei", Arial, Verdana, sans-serif;
+ font-family: $global-font-family;
+}
- /* scrollbar, only support webkit */
- &::-webkit-scrollbar {
- width: 8px;
- height: 8px;
- }
+/* scrollbar, only support webkit */
+::-webkit-scrollbar {
+ width: 6px;
+ height: 6px;
+}
- &::-webkit-scrollbar-thumb {
- height: 40px;
- background-color: #87878D;
- border-radius: 16px;
+::-webkit-scrollbar-thumb {
+ background-color: $scrollbar-color;
- &:hover {
- background-color: #A9A9B3;
- }
+ &:hover {
+ background-color: $scrollbar-hover-color;
}
}
::selection {
- background: rgba(0, 149, 255, 0.1);
+ background: $selection-color;
+
+ .dark-theme & {
+ background: $selection-color-dark;
+ }
}
body {
font-size: 16px;
font-weight: 400;
- line-height: 26px;
+ line-height: 1.5rem;
background-color: $global-background-color;
color: $global-font-color;
- &:before {
+ &::before {
content: "";
background-repeat: no-repeat;
background-position: center;
diff --git a/assets/css/_core/_layout.scss b/assets/css/_core/_layout.scss
index 52fb9b1..03206e8 100644
--- a/assets/css/_core/_layout.scss
+++ b/assets/css/_core/_layout.scss
@@ -2,17 +2,17 @@
.wrapper {
display: flex;
flex-direction: column;
- min-height: 98vh;
+ min-height: 97.5vh;
width: 100%;
-}
-.main {
- flex: 1 0 auto;
-}
+ main {
+ flex: 1 0 auto;
-.container {
- padding-left: 1rem;
- padding-right: 1rem;
+ .container {
+ padding-left: 1rem;
+ padding-right: 1rem;
+ }
+ }
}
.footer {
@@ -22,9 +22,3 @@
line-height: 1.5rem;
padding-top: 2rem;
}
-
-.notfound {
- font-size: 2rem;
- transform: translateY(35vh);
- text-align: center;
-}
\ No newline at end of file
diff --git a/assets/css/_core/_media.scss b/assets/css/_core/_media.scss
index 0f5d524..29a3db4 100644
--- a/assets/css/_core/_media.scss
+++ b/assets/css/_core/_media.scss
@@ -1,31 +1,44 @@
@media only screen and (max-width: 1800px) {
- .post-warp {
+ .page {
max-width: 780px;
.post-toc {
+ width: 300px;
margin-left: 800px;
}
}
}
-@media only screen and (max-width: 1300px) {
- .post-warp {
+@media only screen and (max-width: 1440px) {
+ .page {
+ max-width: 680px;
+
+ .post-toc {
+ width: 240px;
+ margin-left: 700px;
+ }
+ }
+}
+
+@media only screen and (max-width: 1200px) {
+ .page {
max-width: 560px;
.post-toc {
+ width: 180px;
margin-left: 580px;
}
}
}
-@media only screen and (max-width: 1080px) {
+@media only screen and (max-width: 960px) {
.navbar {
.navbar-container {
- margin: 0 2rem;
+ margin: 0 1rem;
}
}
- .post-warp {
+ .page {
max-width: 80%;
.post-toc {
@@ -38,7 +51,7 @@
}
}
-@media only screen and (max-width: 480px) {
+@media only screen and (max-width: 560px) {
.navbar {
display: none;
}
@@ -47,12 +60,23 @@
display: block;
}
- .post-warp {
+ .page {
max-width: 100%;
.categories-card {
.card-item {
- width: 95%;
+ width: 100%;
+ }
+ }
+ }
+
+ .copyright {
+ .copyright-line {
+ .icp-splitter {
+ display: none;
+ }
+ .icp-br {
+ display: block;
}
}
}
diff --git a/assets/css/_core/_normalize.scss b/assets/css/_core/_normalize.scss
index 20dbded..192eb9c 100644
--- a/assets/css/_core/_normalize.scss
+++ b/assets/css/_core/_normalize.scss
@@ -1,4 +1,4 @@
-/*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */
+/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
/* Document
========================================================================== */
@@ -7,41 +7,35 @@
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in iOS.
*/
- @charset "UTF-8";
- html {
- line-height: 1.15; /* 1 */
- -webkit-text-size-adjust: 100%; /* 2 */
- }
+
+html {
+ line-height: 1.15; /* 1 */
+ -webkit-text-size-adjust: 100%; /* 2 */
+}
/* Sections
- ========================================================================== */
+ ========================================================================== */
/**
-* Remove the margin in all browsers.
-*/
+ * Remove the margin in all browsers.
+ */
-html,
-body,
-main,
-div,
-span,
-a,
-li,
-ul,
-hr,
-h1,
-h2,
-h3,
-h4,
-h5,
-h6 {
- padding: 0;
+body {
margin: 0;
}
+
/**
-* Correct the font size and margin on `h1` elements within `section` and
-* `article` contexts in Chrome, Firefox, and Safari.
-*/
+ * Render the `main` element consistently in IE.
+ */
+
+main {
+ display: block;
+}
+
+/**
+ * Correct the font size and margin on `h1` elements within `section` and
+ * `article` contexts in Chrome, Firefox, and Safari.
+ */
h1 {
font-size: 2em;
@@ -49,12 +43,12 @@ h1 {
}
/* Grouping content
- ========================================================================== */
+ ========================================================================== */
/**
-* 1. Add the correct box sizing in Firefox.
-* 2. Show the overflow in Edge and IE.
-*/
+ * 1. Add the correct box sizing in Firefox.
+ * 2. Show the overflow in Edge and IE.
+ */
hr {
box-sizing: content-box; /* 1 */
@@ -63,9 +57,9 @@ hr {
}
/**
-* 1. Correct the inheritance and scaling of font size in all browsers.
-* 2. Correct the odd `em` font sizing in all browsers.
-*/
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
pre {
font-family: monospace, monospace; /* 1 */
@@ -73,20 +67,20 @@ pre {
}
/* Text-level semantics
- ========================================================================== */
+ ========================================================================== */
/**
-* Remove the gray background on active links in IE 10.
-*/
+ * Remove the gray background on active links in IE 10.
+ */
a {
background-color: transparent;
}
/**
-* 1. Remove the bottom border in Chrome 57-
-* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
-*/
+ * 1. Remove the bottom border in Chrome 57-
+ * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
+ */
abbr[title] {
border-bottom: none; /* 1 */
@@ -95,8 +89,8 @@ abbr[title] {
}
/**
-* Add the correct font weight in Chrome, Edge, and Safari.
-*/
+ * Add the correct font weight in Chrome, Edge, and Safari.
+ */
b,
strong {
@@ -104,9 +98,9 @@ strong {
}
/**
-* 1. Correct the inheritance and scaling of font size in all browsers.
-* 2. Correct the odd `em` font sizing in all browsers.
-*/
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
code,
kbd,
@@ -116,17 +110,17 @@ samp {
}
/**
-* Add the correct font size in all browsers.
-*/
+ * Add the correct font size in all browsers.
+ */
small {
font-size: 80%;
}
/**
-* Prevent `sub` and `sup` elements from affecting the line height in
-* all browsers.
-*/
+ * Prevent `sub` and `sup` elements from affecting the line height in
+ * all browsers.
+ */
sub,
sup {
@@ -145,23 +139,23 @@ sup {
}
/* Embedded content
- ========================================================================== */
+ ========================================================================== */
/**
-* Remove the border on images inside links in IE 10.
-*/
+ * Remove the border on images inside links in IE 10.
+ */
img {
border-style: none;
}
/* Forms
- ========================================================================== */
+ ========================================================================== */
/**
-* 1. Change the font styles in all browsers.
-* 2. Remove the margin in Firefox and Safari.
-*/
+ * 1. Change the font styles in all browsers.
+ * 2. Remove the margin in Firefox and Safari.
+ */
button,
input,
@@ -175,30 +169,28 @@ textarea {
}
/**
-* Show the overflow in IE.
-* 1. Show the overflow in Edge.
-*/
+ * Show the overflow in IE.
+ * 1. Show the overflow in Edge.
+ */
button,
-input {
- /* 1 */
+input { /* 1 */
overflow: visible;
}
/**
-* Remove the inheritance of text transform in Edge, Firefox, and IE.
-* 1. Remove the inheritance of text transform in Firefox.
-*/
+ * Remove the inheritance of text transform in Edge, Firefox, and IE.
+ * 1. Remove the inheritance of text transform in Firefox.
+ */
button,
-select {
- /* 1 */
+select { /* 1 */
text-transform: none;
}
/**
-* Correct the inability to style clickable types in iOS and Safari.
-*/
+ * Correct the inability to style clickable types in iOS and Safari.
+ */
button,
[type="button"],
@@ -208,8 +200,8 @@ button,
}
/**
-* Remove the inner border and padding in Firefox.
-*/
+ * Remove the inner border and padding in Firefox.
+ */
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
@@ -220,8 +212,8 @@ button::-moz-focus-inner,
}
/**
-* Restore the focus styles unset by the previous rule.
-*/
+ * Restore the focus styles unset by the previous rule.
+ */
button:-moz-focusring,
[type="button"]:-moz-focusring,
@@ -231,19 +223,19 @@ button:-moz-focusring,
}
/**
-* Correct the padding in Firefox.
-*/
+ * Correct the padding in Firefox.
+ */
fieldset {
padding: 0.35em 0.75em 0.625em;
}
/**
-* 1. Correct the text wrapping in Edge and IE.
-* 2. Correct the color inheritance from `fieldset` elements in IE.
-* 3. Remove the padding so developers are not caught out when they zero out
-* `fieldset` elements in all browsers.
-*/
+ * 1. Correct the text wrapping in Edge and IE.
+ * 2. Correct the color inheritance from `fieldset` elements in IE.
+ * 3. Remove the padding so developers are not caught out when they zero out
+ * `fieldset` elements in all browsers.
+ */
legend {
box-sizing: border-box; /* 1 */
@@ -255,25 +247,25 @@ legend {
}
/**
-* Add the correct vertical alignment in Chrome, Firefox, and Opera.
-*/
+ * Add the correct vertical alignment in Chrome, Firefox, and Opera.
+ */
progress {
vertical-align: baseline;
}
/**
-* Remove the default vertical scrollbar in IE 10+.
-*/
+ * Remove the default vertical scrollbar in IE 10+.
+ */
textarea {
overflow: auto;
}
/**
-* 1. Add the correct box sizing in IE 10.
-* 2. Remove the padding in IE 10.
-*/
+ * 1. Add the correct box sizing in IE 10.
+ * 2. Remove the padding in IE 10.
+ */
[type="checkbox"],
[type="radio"] {
@@ -282,8 +274,8 @@ textarea {
}
/**
-* Correct the cursor style of increment and decrement buttons in Chrome.
-*/
+ * Correct the cursor style of increment and decrement buttons in Chrome.
+ */
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
@@ -291,9 +283,9 @@ textarea {
}
/**
-* 1. Correct the odd appearance in Chrome and Safari.
-* 2. Correct the outline style in Safari.
-*/
+ * 1. Correct the odd appearance in Chrome and Safari.
+ * 2. Correct the outline style in Safari.
+ */
[type="search"] {
-webkit-appearance: textfield; /* 1 */
@@ -301,17 +293,17 @@ textarea {
}
/**
-* Remove the inner padding in Chrome and Safari on macOS.
-*/
+ * Remove the inner padding in Chrome and Safari on macOS.
+ */
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
-* 1. Correct the inability to style clickable types in iOS and Safari.
-* 2. Change font properties to `inherit` in Safari.
-*/
+ * 1. Correct the inability to style clickable types in iOS and Safari.
+ * 2. Change font properties to `inherit` in Safari.
+ */
::-webkit-file-upload-button {
-webkit-appearance: button; /* 1 */
@@ -319,38 +311,38 @@ textarea {
}
/* Interactive
- ========================================================================== */
+ ========================================================================== */
/*
-* Add the correct display in Edge, IE 10+, and Firefox.
-*/
+ * Add the correct display in Edge, IE 10+, and Firefox.
+ */
details {
display: block;
}
/*
-* Add the correct display in all browsers.
-*/
+ * Add the correct display in all browsers.
+ */
summary {
display: list-item;
}
/* Misc
- ========================================================================== */
+ ========================================================================== */
/**
-* Add the correct display in IE 10+.
-*/
+ * Add the correct display in IE 10+.
+ */
template {
display: none;
}
/**
-* Add the correct display in IE 10.
-*/
+ * Add the correct display in IE 10.
+ */
[hidden] {
display: none;
diff --git a/assets/css/_custom.scss b/assets/css/_custom.scss
deleted file mode 100644
index f7cbb5a..0000000
--- a/assets/css/_custom.scss
+++ /dev/null
@@ -1,4 +0,0 @@
-// ==============================
-// Custom style
-// ==============================
-// You can override the variables in _variables.scss to customize the style
diff --git a/assets/css/_page/_404.scss b/assets/css/_page/_404.scss
new file mode 100644
index 0000000..f6d9195
--- /dev/null
+++ b/assets/css/_page/_404.scss
@@ -0,0 +1,6 @@
+.notfound {
+ font-size: 1.8rem;
+ line-height: 3rem;
+ transform: translateY(30vh);
+ text-align: center;
+}
diff --git a/assets/css/_page/_home.scss b/assets/css/_page/_home.scss
index c0366d9..2f21d4b 100644
--- a/assets/css/_page/_home.scss
+++ b/assets/css/_page/_home.scss
@@ -36,6 +36,7 @@
.home-description {
font-size: 1rem;
font-weight: normal;
+ margin: 0;
padding: .4rem;
}
@@ -43,7 +44,12 @@
padding-top: .6rem;
i {
- font-size: 1.4rem;
+ font-size: 1.45rem;
+ }
+
+ img {
+ width: 1.5rem;
+ height: 1.5rem;
}
}
-}
\ No newline at end of file
+}
diff --git a/assets/css/_page/_index.scss b/assets/css/_page/_index.scss
index e0f8894..405a90a 100644
--- a/assets/css/_page/_index.scss
+++ b/assets/css/_page/_index.scss
@@ -1,9 +1,10 @@
@import "_home";
+@import "_404";
-.post-warp {
+.page {
position: relative;
width: 100%;
- max-width: 960px;
+ max-width: 980px;
margin: 0 auto;
padding-top: 6rem;
@@ -26,4 +27,4 @@
text-align: right;
padding-bottom: 2rem;
}
-}
\ No newline at end of file
+}
diff --git a/assets/css/_page/_post.scss b/assets/css/_page/_post.scss
index 8bac91a..164a848 100644
--- a/assets/css/_page/_post.scss
+++ b/assets/css/_page/_post.scss
@@ -7,14 +7,14 @@
.post-meta {
font-size: .88rem;
- color: rgba(85, 85, 85, 0.52941) !important;
+ color: $global-font-secondary-color;
span {
display: inline-block;
}
.dark-theme & {
- color: $global-font-secondary-color-dark !important;
+ color: $global-font-secondary-color-dark;
}
a {
@@ -50,110 +50,7 @@
}
}
-.post-toc {
- display: block;
- position: absolute;
- width: 240px;
- max-width: 300px;
- margin-left: 980px;
- padding: .8rem;
- border-left: 1px solid $global-border-color;
- word-wrap: break-word;
- box-sizing: border-box;
- top: 12rem;
-
- .post-toc-title {
- font-weight: 400;
- text-transform: uppercase;
- }
-
- .post-toc-content {
- &.always-active ul {
- display: block;
- }
-
- >nav>ul {
- margin: .625rem 0;
- }
-
- ul {
- padding-left: .625rem;
- list-style: none;
-
- ul {
- padding-left: 1.25rem;
- display: none;
- }
-
- .has-active > ul {
- display: block;
- }
- }
-
- .toc-link.active {
- color: $global-link-hover-color;
- }
- }
-}
-
-.post-toc-mobile {
- display: none;
- padding-top: .8rem;
-
- details {
- summary {
- .post-toc-title {
- display: block;
- display: flex;
- justify-content: space-between;
- font-size: 1.2em;
- font-weight: bold;
- line-height: 2em;
- padding: 0 .625rem;
- background: $code-background-color;
-
- i.details {
- line-height: 2em;
- }
-
- .dark-theme & {
- background: $code-background-color-dark;
- }
- }
-
- &::-webkit-details-marker {
- display: none;
- }
- }
- }
-
- details[open] {
- i.details {
- transform: rotate(180deg);
- }
- }
-
- .post-toc-content {
- border: 2px solid $code-background-color;
-
- >nav>ul {
- margin: .625rem 0;
- }
-
- ul {
- padding-left: .625rem;
- list-style: none;
-
- ul {
- padding-left: 1.25rem;
- }
- }
-
- .dark-theme & {
- border: 2px solid $code-background-color-dark;
- }
- }
-}
+@import "../_partial/_post/toc";
.post-content {
.post-dummy-target:target {
@@ -163,6 +60,19 @@
visibility: hidden;
}
+ h1,
+ h2,
+ h3,
+ h4,
+ h5,
+ h6 {
+ font-weight: bold;
+
+ .dark-theme & {
+ font-weight: bolder;
+ }
+ }
+
h2,
h3,
h4,
@@ -198,7 +108,6 @@
p {
font-size: 1rem;
margin: .5rem 0 .5rem 0;
- text-align: justify;
}
a {
@@ -220,6 +129,7 @@
ul {
padding-left: 2rem;
+ list-style-type: disc;
}
ruby {
@@ -241,12 +151,19 @@
.table-wrapper {
overflow-x: auto;
+ &::-webkit-scrollbar {
+ background-color: $table-background-color;
+
+ .dark-theme & {
+ background-color: $table-background-color-dark;
+ }
+ }
+
> table {
width: 100%;
max-width: 100%;
margin: .625rem 0;
border-spacing: 0;
- box-shadow: 2px 2px 3px rgba(0,0,0,.125);
background: $table-background-color;
.dark-theme & {
@@ -306,7 +223,7 @@
margin: 0 0 2em 0;
position: relative;
- &:before {
+ &::before {
content: '\201C';
position: absolute;
top: 0em;
@@ -323,8 +240,8 @@
}
}
- &:after {
- content: "#blockquote" attr(cite);
+ &::after {
+ content: '#blockquote' attr(cite);
display: block;
text-align: right;
font-size: 0.875em;
@@ -340,6 +257,14 @@
}
}
+ .footnotes {
+ color: $global-font-secondary-color;
+
+ .dark-theme & {
+ color: $global-font-secondary-color-dark;
+ }
+ }
+
@import "../_partial/_post/code";
@import "../_partial/_post/admonition";
@@ -420,45 +345,9 @@
.code {
padding: .375rem;
font-size: .875rem;
- font-family: Consolas, Monaco, Menlo, Consolas, monospace;
+ font-family: $code-font-family;
font-weight: bold;
word-break: break-all;
-
- .k {
- color: #D371E3;
- }
-
- .kt {
- color: #D371E3;
- }
-
- .kc {
- color: #D371E3;
- }
-
- .o {
- color: #D371E3;
- }
-
- .nf {
- color: #F16473;
- }
-
- .na {
- color: #41B1F5;
- }
-
- .s {
- color: #8BC56F;
- }
-
- .n {
- color: #DB975C;
- }
-
- .c1 {
- color: #7E848F;
- }
}
}
@@ -483,101 +372,6 @@
}
}
-.post-footer {
- margin-top: 3rem;
+@import "../_partial/_post/footer";
- .post-info {
- border-bottom: 1px solid $global-border-color;
- padding: 1rem 0 0.3rem;
-
- .dark-theme & {
- border-bottom: 1px solid $global-border-color-dark;
- }
-
- .post-info-line {
- display: flex;
- justify-content: space-between;
-
- .post-info-mod {
- font-size: 0.8em;
- color: $global-font-secondary-color;
-
- .dark-theme & {
- color: $global-font-secondary-color-dark;
- }
- }
-
- .post-info-license {
- font-size: 0.8em;
- color: $global-font-secondary-color;
-
- .dark-theme & {
- color: $global-font-secondary-color-dark;
- }
- }
-
- .post-info-md
- a {
- font-size: 0.8em;
- color: $post-link-color;
-
- .dark-theme & {
- color: $post-link-color-dark;
- }
-
- &:hover {
- color: $post-link-hover-color;
-
- .dark-theme & {
- color: $post-link-hover-color-dark;
- }
- }
- }
- }
- }
-
- .post-info-more {
- padding: 0.3rem 0 1rem;
- display: flex;
- justify-content: space-between;
- font-size: 0.9rem;
- }
-
- .post-nav {
- &:before,
- &:after {
- content: " ";
- display: table;
- }
-
- & a.prev,
- & a.next {
- font-weight: 600;
- font-size: 1rem;
-
- transition-property: transform;
- transition-timing-function: ease-out;
- transition-duration: 0.3s;
- }
-
- & a.prev {
- float: left;
- }
-
- & a.prev:hover {
- transform: translateX(-4px);
- }
-
- & a.next {
- float: right;
- }
-
- & a.next:hover {
- transform: translateX(4px);
- }
- }
-}
-
-.post-comment {
- padding: 4rem 0;
-}
\ No newline at end of file
+@import "../_partial/_post/comment";
diff --git a/assets/css/_page/_posts.scss b/assets/css/_page/_posts.scss
index 02b1444..43e4a18 100644
--- a/assets/css/_page/_posts.scss
+++ b/assets/css/_page/_posts.scss
@@ -24,12 +24,14 @@
width: 100%;
padding: 30% 0 0;
position: relative;
- margin-bottom: 1rem;
+ margin: 0.6rem auto;
img {
position: absolute;
- width: 100%; height: 100%;
- left: 0; top: 0;
+ width: 100%;
+ height: 100%;
+ left: 0;
+ top: 0;
object-fit: cover;
}
}
diff --git a/assets/css/_page/_terms.scss b/assets/css/_page/_terms.scss
index 1cfa021..0288256 100644
--- a/assets/css/_page/_terms.scss
+++ b/assets/css/_page/_terms.scss
@@ -24,9 +24,20 @@
padding: 0 2%;
position: relative;
- .categories {
+ .card-item-wrapper {
width: 100%;
overflow: hidden;
+
+ .card-item-title {
+ font-size: 1.2rem;
+ font-weight: bold;
+ display: inline-block;
+ }
+
+ span {
+ float: right;
+ padding-right: 1rem;
+ }
}
}
}
@@ -70,14 +81,3 @@
.more-post {
text-align: right;
}
-
-.categories {
- h3 {
- display: inline-block;
- }
-
- span {
- float: right;
- padding-right: 1rem;
- }
-}
\ No newline at end of file
diff --git a/assets/css/_partial/_footer.scss b/assets/css/_partial/_footer.scss
index 1b42397..89e7954 100644
--- a/assets/css/_partial/_footer.scss
+++ b/assets/css/_partial/_footer.scss
@@ -4,6 +4,10 @@
.copyright-line {
width: 100%;
+
+ .icp-br {
+ display: none;
+ }
}
}
diff --git a/assets/css/_partial/_navbar.scss b/assets/css/_partial/_navbar.scss
index 7b006f6..10ce1bc 100644
--- a/assets/css/_partial/_navbar.scss
+++ b/assets/css/_partial/_navbar.scss
@@ -14,7 +14,7 @@
.navbar-container {
width: auto;
text-align: center;
- margin: 0 6rem;
+ margin: 0 4rem;
display: flex;
justify-content: space-between;
@@ -32,10 +32,10 @@
&.active {
font-weight: 900;
- color: $navbar-active-color;
+ color: $navbar-hover-color;
.dark-theme & {
- color: $navbar-active-color-dark;
+ color: $navbar-hover-color-dark;
}
}
}
diff --git a/assets/css/_partial/_pagination.scss b/assets/css/_partial/_pagination.scss
index 59c9b1f..9019b34 100644
--- a/assets/css/_partial/_pagination.scss
+++ b/assets/css/_partial/_pagination.scss
@@ -31,11 +31,11 @@
}
&:hover a {
- color: $pagination-link-active-color;
+ color: $pagination-link-hover-color;
}
.dark-theme &:hover a {
- color: $pagination-link-active-color-dark;
+ color: $pagination-link-hover-color-dark;
}
&:before,
@@ -44,14 +44,14 @@
content: "";
width: 0;
height: 3px;
- background: $pagination-link-active-color;
+ background: $pagination-link-hover-color;
transition: 0.3s;
bottom: 0px;
}
.dark-theme &:before,
.dark-theme &:after {
- background: $pagination-link-active-color-dark;
+ background: $pagination-link-hover-color-dark;
}
&:before .active,
@@ -77,11 +77,11 @@
&.active {
a {
- color: $pagination-link-active-color;
+ color: $pagination-link-hover-color;
}
.dark-theme & a {
- color: $pagination-link-active-color-dark;
+ color: $pagination-link-hover-color-dark;
}
&:before,
diff --git a/assets/css/_partial/_post/_admonition.scss b/assets/css/_partial/_post/_admonition.scss
index d571afd..7d44a96 100644
--- a/assets/css/_partial/_post/_admonition.scss
+++ b/assets/css/_partial/_post/_admonition.scss
@@ -1,167 +1,46 @@
.admonition {
- box-shadow: 0 2px 2px 0 rgba(0,0,0,.14),
- 0 1px 5px 0 rgba(0,0,0,.12),
- 0 3px 1px -2px rgba(0,0,0,.2);
position: relative;
margin: .9765em 0;
padding: 0 .75rem;
- border-left: .25rem solid #448aff;
- border-radius: .125rem;
+ background-color: map-get($admonition-background-color-map, 'note');
+ border-left: .25rem solid map-get($admonition-color-map, 'note');
overflow: auto;
.admonition-title {
margin: 0 -0.75rem;
padding: .5rem .75rem .5rem 2.5rem;
- border-bottom: .1rem solid rgba(68,138,255,.1);
- background-color: rgba(68,138,255,.1);
+ border-bottom: .1rem solid map-get($admonition-background-color-map, 'note');
+ background-color: map-get($admonition-background-color-map, 'note');
font-weight: 700;
}
i.icon {
font-size: 16px;
+ color: map-get($admonition-color-map, 'note');
cursor: auto;
position: absolute;
left: .75rem;
top: .75rem;
}
- &.note {
- border-left-color: #448aff;
+ @each $type, $color in $admonition-color-map {
+ &.#{$type} {
+ border-left-color: $color;
- i.icon {
- color: #448aff;
+ i.icon {
+ color: $color;
+ }
}
}
- &.abstract {
- border-left-color: #00b0ff;
+ @each $type, $color in $admonition-background-color-map {
+ &.#{$type} {
+ background-color: $color;
- .admonition-title {
- background-color: rgba(0,176,255,.1);
- }
-
- i.icon {
- color: #00b0ff;
- }
- }
-
- &.info {
- border-left-color: #00b8d4;
-
- .admonition-title {
- background-color: rgba(0,184,212,.1);
- }
-
- i.icon {
- color: #00b8d4;
- }
- }
-
- &.tip {
- border-left-color: #00bfa5;
-
- .admonition-title {
- background-color: rgba(0,191,165,.1);
- }
-
- i.icon {
- color: #00bfa5;
- }
- }
-
- &.success {
- border-left-color: #00c853;
-
- .admonition-title {
- background-color: rgba(0,200,83,.1);
- }
-
- i.icon {
- color: #00c853;
- }
- }
-
- &.question {
- border-left-color: #64dd17;
-
- .admonition-title {
- background-color: rgba(100,221,23,.1);
- }
-
- i.icon {
- color: #64dd17;
- }
- }
-
- &.warning {
- border-left-color: #ff9100;
-
- .admonition-title {
- background-color: rgba(255,145,0,.1);
- }
-
- i.icon {
- color: #ff9100;
- }
- }
-
- &.failure {
- border-left-color: #ff5252;
-
- .admonition-title {
- background-color: rgba(255,82,82,.1);
- }
-
- i.icon {
- color: #ff5252;
- }
- }
-
- &.danger {
- border-left-color: #ff1744;
-
- .admonition-title {
- background-color: rgba(255,23,68,.1);
- }
-
- i.icon {
- color: #ff1744;
- }
- }
-
- &.bug {
- border-left-color: #f50057;
-
- .admonition-title {
- background-color: rgba(245,0,87,.1);
- }
-
- i.icon {
- color: #f50057;
- }
- }
-
- &.example {
- border-left-color: #651fff;
-
- .admonition-title {
- background-color: rgba(101,31,255,.1);
- }
-
- i.icon {
- color: #651fff;
- }
- }
-
- &.quote {
- border-left-color: #9e9e9e;
-
- .admonition-title {
- background-color: hsla(0,0%,62%,.1);
- }
-
- i.icon {
- color: #9e9e9e;
+ .admonition-title {
+ border-bottom-color: $color;
+ background-color: $color;
+ }
}
}
diff --git a/assets/css/_partial/_post/_code.scss b/assets/css/_partial/_post/_code.scss
index d43d256..63ce97f 100644
--- a/assets/css/_partial/_post/_code.scss
+++ b/assets/css/_partial/_post/_code.scss
@@ -1,19 +1,9 @@
code,
pre {
- padding: 7px;
font-size: $code-font-size;
font-family: $code-font-family;
- background: $code-background-color;
-
- .dark-theme & {
- background: $code-background-color-dark;
- }
-}
-
-code {
- padding: 3px 5px;
- border-radius: 4px;
color: $code-color;
+ padding: 5px;
background: $code-background-color;
.dark-theme & {
@@ -22,51 +12,46 @@ code {
}
}
-p > code {
- background: darken($code-background-color, 3%);
-
- .dark-theme & {
- color: $code-color-dark;
- background: darken($code-background-color-dark, 3%);
- }
+.highlight > pre.chroma {
+ padding: 38px 7px 8px;
+ overflow-x: auto;
}
-// chroma
.highlight > .chroma {
margin: 1em 0;
- border-radius: 5px;
- overflow-x: auto;
- box-shadow: 1px 1px 2px rgba(0,0,0,0.125);
position: relative;
- background: $code-background-color;
+ font-family: $code-font-family;
code {
padding: 0;
}
- table {
- position: relative;
+ pre {
+ margin: 0;
+ padding: 38px 7px 8px;
+ overflow-x: visible;
+ }
- &::after {
- position: absolute;
- top: 0;
- right: 0;
- left: 0;
- padding: 2px 7px;
- font-size: $code-font-size;
- font-weight: bold;
- color: darken($code-info-color, 10%);
- background: darken($code-background-color, 3%);
- content: 'Code';
+ &::after {
+ position: absolute;
+ top: 0;
+ right: 0;
+ left: 0;
+ padding: 2px 7px;
+ font-size: $code-font-size;
+ font-weight: bold;
+ color: $code-info-color;
+ background: darken($code-background-color, 3%);
+ content: 'Code';
- .dark-theme & {
- background: darken($code-background-color-dark, 3%);
- }
+ .dark-theme & {
+ color: $code-info-color-dark;
+ background: darken($code-background-color-dark, 3%);
}
}
- @each $sign, $text in $code-type-list {
- &.#{$sign} table::after {
+ @each $type, $text in $code-type-map {
+ &.#{$type}::after {
content: $text;
}
}
@@ -78,20 +63,10 @@ p > code {
&:first-child {
width: 10px;
-
- pre {
- margin: 0;
- padding: 38px 7px 8px;
- }
}
&:last-child {
vertical-align: top;
-
- pre {
- margin: 0;
- padding: 38px 10px 8px;
- }
}
}
@@ -107,10 +82,14 @@ p > code {
}
}
- /* LineNumbersTable */ .lnt { color: $code-info-color; }
- /* LineHighlight */ .hl {
+ /* LineNumbersTable */
+ .lnt {
+ color: $code-info-color;
+ }
+
+ /* LineHighlight */
+ .hl {
display: block;
- width: 100%;
background-color: darken($code-background-color, 5%);
.dark-theme & {
@@ -119,7 +98,7 @@ p > code {
}
}
-.code {
+.highlight {
/* Parentheses */ .p { color: #A9A9B3 }
/* Keyword */ .k { color: #859900 }
/* KeywordConstant */ .kc { color: #859900; font-weight: bold }
diff --git a/assets/css/_partial/_post/_comment.scss b/assets/css/_partial/_post/_comment.scss
new file mode 100644
index 0000000..27bcb30
--- /dev/null
+++ b/assets/css/_partial/_post/_comment.scss
@@ -0,0 +1,3 @@
+.post-comment {
+ padding: 4rem 0;
+}
diff --git a/assets/css/_partial/_post/_footer.scss b/assets/css/_partial/_post/_footer.scss
new file mode 100644
index 0000000..41f0c5a
--- /dev/null
+++ b/assets/css/_partial/_post/_footer.scss
@@ -0,0 +1,94 @@
+.post-footer {
+ margin-top: 3rem;
+
+ .post-info {
+ border-bottom: 1px solid $global-border-color;
+ padding: 1rem 0 0.3rem;
+
+ .dark-theme & {
+ border-bottom: 1px solid $global-border-color-dark;
+ }
+
+ .post-info-line {
+ display: flex;
+ justify-content: space-between;
+
+ .post-info-mod {
+ font-size: 0.8em;
+ color: $global-font-secondary-color;
+
+ .dark-theme & {
+ color: $global-font-secondary-color-dark;
+ }
+ }
+
+ .post-info-license {
+ font-size: 0.8em;
+ color: $global-font-secondary-color;
+
+ .dark-theme & {
+ color: $global-font-secondary-color-dark;
+ }
+ }
+
+ .post-info-md
+ a {
+ font-size: 0.8em;
+ color: $post-link-color;
+
+ .dark-theme & {
+ color: $post-link-color-dark;
+ }
+
+ &:hover {
+ color: $post-link-hover-color;
+
+ .dark-theme & {
+ color: $post-link-hover-color-dark;
+ }
+ }
+ }
+ }
+ }
+
+ .post-info-more {
+ padding: 0.3rem 0 1rem;
+ display: flex;
+ justify-content: space-between;
+ font-size: 0.9rem;
+ }
+
+ .post-nav {
+ &::before,
+ &::after {
+ content: ' ';
+ display: table;
+ }
+
+ & a.prev,
+ & a.next {
+ font-size: 1rem;
+ font-weight: 600;
+
+ transition-duration: .3s;
+ transition-property: transform;
+ transition-timing-function: ease-out;
+ }
+
+ & a.prev {
+ float: left;
+ }
+
+ & a.prev:hover {
+ transform: translateX(-4px);
+ }
+
+ & a.next {
+ float: right;
+ }
+
+ & a.next:hover {
+ transform: translateX(4px);
+ }
+ }
+}
diff --git a/assets/css/_partial/_post/_toc.scss b/assets/css/_partial/_post/_toc.scss
new file mode 100644
index 0000000..5a132fa
--- /dev/null
+++ b/assets/css/_partial/_post/_toc.scss
@@ -0,0 +1,134 @@
+.post-toc {
+ display: block;
+ position: absolute;
+ width: 360px;
+ margin-left: 1000px;
+ padding: 0 .8rem;
+ border-left: 1px solid $global-border-color;
+ word-wrap: break-word;
+ box-sizing: border-box;
+ top: 12rem;
+
+ .dark-theme & {
+ border-left: 1px solid $global-border-color-dark;
+ }
+
+ .post-toc-title {
+ font-weight: 400;
+ margin: .8rem 0;
+ text-transform: uppercase;
+ }
+
+ .post-toc-content {
+ &.always-active ul {
+ display: block;
+ }
+
+ >nav>ul {
+ margin: .625rem 0;
+ }
+
+ ul {
+ text-indent: -0.85rem;
+ padding-left: .625rem;
+ list-style: none;
+
+ a::before {
+ content: "|";
+ font-weight: bolder;
+ margin-right: .5rem;
+ color: $post-link-color;
+
+ .dark-theme & {
+ color: $post-link-color-dark;
+ }
+ }
+
+ ul {
+ padding-left: 1.25rem;
+ display: none;
+ }
+
+ .has-active > ul {
+ display: block;
+ }
+ }
+
+ .toc-link.active {
+ font-weight: bold;
+ color: $post-link-hover-color;
+
+ .dark-theme & {
+ color: $post-link-hover-color-dark;
+ }
+
+ &::before {
+ font-weight: bolder;
+ color: $post-link-hover-color;
+
+ .dark-theme & {
+ color: $post-link-hover-color-dark;
+ }
+ }
+ }
+ }
+}
+
+.post-toc-mobile {
+ display: none;
+ padding-top: .8rem;
+
+ details {
+ summary {
+ .post-toc-title {
+ display: block;
+ display: flex;
+ justify-content: space-between;
+ font-size: 1.2em;
+ font-weight: bold;
+ line-height: 2em;
+ padding: 0 .625rem;
+ background: $code-background-color;
+
+ i.details {
+ line-height: 2em;
+ }
+
+ .dark-theme & {
+ background: $code-background-color-dark;
+ }
+ }
+
+ &::-webkit-details-marker {
+ display: none;
+ }
+ }
+ }
+
+ details[open] {
+ i.details {
+ transform: rotate(180deg);
+ }
+ }
+
+ .post-toc-content {
+ border: 2px solid $code-background-color;
+
+ >nav>ul {
+ margin: .625rem 0;
+ }
+
+ ul {
+ padding-left: .625rem;
+ list-style: none;
+
+ ul {
+ padding-left: 1.25rem;
+ }
+ }
+
+ .dark-theme & {
+ border: 2px solid $code-background-color-dark;
+ }
+ }
+}
diff --git a/assets/css/_variables.scss b/assets/css/_variables.scss
index 26412a7..00b4af5 100644
--- a/assets/css/_variables.scss
+++ b/assets/css/_variables.scss
@@ -1,111 +1,184 @@
+@charset 'utf-8';
+
// ==============================
// Variables
// ==============================
// ========== Global ========== //
-// Background color of the body
+// Font family
+$global-font-family: -apple-system, BlinkMacSystemFont, PingFang SC, Microsoft Yahei, Segoe UI, Helvetica, Arial, sans-serif, Segoe UI Emoji !default;
+
+// Color of the background
$global-background-color: #fff !default;
$global-background-color-dark: #292a2d !default;
-$navbar-background-color: #FAFAFA !default;
-$navbar-background-color-dark: #252627 !default;
-
-// Text color of the body.
+// Color of the text
$global-font-color: #161209 !default;
$global-font-color-dark: #a9a9b3 !default;
+// Color of the secondary text
$global-font-secondary-color: #a9a9b3 !default;
-$global-font-secondary-color-dark: #87878d !default;
+$global-font-secondary-color-dark: #5d5d5f !default;
+// Color of the link
$global-link-color: #161209 !default;
$global-link-color-dark: #a9a9b3 !default;
+
+// Color of the hover link
$global-link-hover-color: #2d96bd !default;
$global-link-hover-color-dark: #fff !default;
+// Color of the border
$global-border-color: #dcdcdc !default;
$global-border-color-dark: #4a4b50 !default;
+// ========== Global ========== //
-$navbar-active-color: #161209 !default;
-$navbar-active-color-dark: #fff !default;
+// ========== Scrollbar ========== //
+// Color of the scrollbar
+$scrollbar-color: #87878d !default;
+// Color of the hover scrollbar
+$scrollbar-hover-color: #a9a9b3 !default;
+// ========== Scrollbar ========== //
+
+// ========== Selection ========== //
+// Color of the selected text
+$selection-color: rgba(38, 139, 211, 0.2) !default;
+$selection-color-dark: rgba(38, 139, 211, 0.3) !default;
+// ========== Selection ========== //
+
+// ========== Navbar ========== //
+// Color of the navbar background
+$navbar-background-color: #fafafa !default;
+$navbar-background-color-dark: #252627 !default;
+
+// Color of the hover navbar item
+$navbar-hover-color: #161209 !default;
+$navbar-hover-color-dark: #fff !default;
+// ========== Navbar ========== //
+
+// ========== Post Content ========== //
+// Color of the post link
$post-link-color: #2d96bd !default;
$post-link-color-dark: #eee !default;
+
+// Color of the hover post link
$post-link-hover-color: #ef3982 !default;
-$post-link-hover-color-dark: #fff !default;
+$post-link-hover-color-dark: #2d96bd !default;
-$pagination-link-color: #2d96bd !default;
-$pagination-link-color-dark: #a9a9b3 !default;
-$pagination-link-active-color: #000 !default;
-$pagination-link-active-color-dark: #fff !default;
-
-// Color of the table background.
+// Color of the table background
$table-background-color: #fff !default;
$table-background-color-dark: #272c34 !default;
-// Color of the table thead.
-$table-thead-color: #EDEDED !default;
+// Color of the table thead
+$table-thead-color: #ededed !default;
$table-thead-color-dark: #20252b !default;
+// ========== Post Content ========== //
+
+// ========== Pagination ========== //
+// Color of the link in pagination
+$pagination-link-color: #2d96bd !default;
+$pagination-link-color-dark: #a9a9b3 !default;
+
+// Color of the hover link in pagination
+$pagination-link-hover-color: #000 !default;
+$pagination-link-hover-color-dark: #fff !default;
+// ========== Pagination ========== //
// ========== Code ========== //
-// Color of the code.
+// Color of the code
$code-color: #E74C3C !default;
$code-color-dark: #E5BF78 !default;
-// Color of the code background.
-$code-background-color: whitesmoke !default;
+// Color of the code background
+$code-background-color: #f5f5f5 !default;
$code-background-color-dark: #272C34 !default;
-$code-info-color: #cacaca !default;
+$code-info-color: #b1b0b0 !default;
+$code-info-color-dark: #b1b0b0 !default;
-// Font size of code.
+// Font size of the code
$code-font-size: 13px !default;
-// Font family of the code.
-$code-font-family: Consolas, Monaco, Menlo, "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace !default;
+// Font family of the code
+$code-font-family: Source Code Pro, Menlo, Consolas, Monaco, monospace !default;
-// Code type list.
-$code-type-list: (
+// Code type map
+$code-type-map: (
// Custom code type
- language-bash: "Bash",
- language-c: "C",
- language-cs: "C#",
- language-cpp: "C++",
- language-css: "CSS",
- language-coffeescript: "CoffeeScript",
- language-html: "HTML",
- language-xml: "XML",
- language-http: "HTTP",
- language-json: "JSON",
- language-java: "Java",
- language-js: "JavaScript",
- language-javascript: "JavaScript",
- language-makefile: "Makefile",
- language-markdown: "Markdown",
- language-objectivec: "Objective-C",
- language-php: "PHP",
- language-perl: "Perl",
- language-python: "Python",
- language-ruby: "Ruby",
- language-sql: "SQL",
- language-shell: "Shell",
- language-erlang: "Erlang",
- language-go: "Go",
- language-go-html-template: "Go HTML Template",
- language-groovy: "Groovy",
- language-haskell: "Haskell",
- language-kotlin: "Kotlin",
- language-clojure: "Clojure",
- language-less: "Less",
- language-lisp: "Lisp",
- language-lua: "Lua",
- language-matlab: "Matlab",
- language-rust: "Rust",
- language-scss: "Scss",
- language-scala: "Scala",
- language-swift: "Swift",
- language-typescript: "TypeScript",
- language-yml: "YAML",
- language-yaml: "YAML",
- language-toml: "TOML",
- language-diff: "Diff"
+ language-bash: 'Bash',
+ language-c: 'C',
+ language-cs: 'C#',
+ language-cpp: 'C++',
+ language-css: 'CSS',
+ language-coffeescript: 'CoffeeScript',
+ language-html: 'HTML',
+ language-xml: 'XML',
+ language-http: 'HTTP',
+ language-json: 'JSON',
+ language-java: 'Java',
+ language-js: 'JavaScript',
+ language-javascript: 'JavaScript',
+ language-makefile: 'Makefile',
+ language-markdown: 'Markdown',
+ language-objectivec: 'Objective-C',
+ language-php: 'PHP',
+ language-perl: 'Perl',
+ language-python: 'Python',
+ language-ruby: 'Ruby',
+ language-sql: 'SQL',
+ language-shell: 'Shell',
+ language-erlang: 'Erlang',
+ language-go: 'Go',
+ language-go-html-template: 'Go HTML Template',
+ language-groovy: 'Groovy',
+ language-haskell: 'Haskell',
+ language-kotlin: 'Kotlin',
+ language-clojure: 'Clojure',
+ language-less: 'Less',
+ language-lisp: 'Lisp',
+ language-lua: 'Lua',
+ language-matlab: 'Matlab',
+ language-rust: 'Rust',
+ language-scss: 'Scss',
+ language-scala: 'Scala',
+ language-swift: 'Swift',
+ language-typescript: 'TypeScript',
+ language-yml: 'YAML',
+ language-yaml: 'YAML',
+ language-toml: 'TOML',
+ language-diff: 'Diff',
) !default;
+// ========== Code ========== //
+
+// ========== Admonition ========== //
+$admonition-color-map: (
+ 'note': #448aff,
+ 'abstract': #00b0ff,
+ 'info': #00b8d4,
+ 'tip': #00bfa5,
+ 'success': #00c853,
+ 'question': #64dd17,
+ 'warning': #ff9100,
+ 'failure': #ff5252,
+ 'danger': #ff1744,
+ 'bug': #f50057,
+ 'example': #651fff,
+ 'quote': #9e9e9e,
+) !default;
+
+$admonition-background-color-map: (
+ 'note': rgba(68,138,255,.1),
+ 'abstract': rgba(0,176,255,.1),
+ 'info': rgba(0,184,212,.1),
+ 'tip': rgba(0,191,165,.1),
+ 'success': rgba(0,200,83,.1),
+ 'question': rgba(100,221,23,.1),
+ 'warning': rgba(255,145,0,.1),
+ 'failure': rgba(255,82,82,.1),
+ 'danger': rgba(255,23,68,.1),
+ 'bug': rgba(245,0,87,.1),
+ 'example': rgba(101,31,255,.1),
+ 'quote': hsla(0,0%,62%,.1),
+) !default;
+// ========== Admonition ========== //
diff --git a/assets/css/custom-style.scss b/assets/css/custom-style.scss
new file mode 100644
index 0000000..99701cd
--- /dev/null
+++ b/assets/css/custom-style.scss
@@ -0,0 +1,14 @@
+@import "_variables";
+@import "_custom";
+
+@import "_core/normalize";
+@import "_core/base";
+@import "_core/layout";
+
+@import "_page/index";
+
+@import "_partial/navbar";
+@import "_partial/footer";
+@import "_partial/pagination";
+
+@import "_core/media";
diff --git a/assets/css/lib/katex/copy-tex.min.css b/assets/css/lib/katex/copy-tex.min.css
new file mode 100644
index 0000000..555ed11
--- /dev/null
+++ b/assets/css/lib/katex/copy-tex.min.css
@@ -0,0 +1 @@
+.katex,.katex-display{user-select:all;-moz-user-select:all;-webkit-user-select:all;-ms-user-select:all}
diff --git a/assets/css/style.scss b/assets/css/style.scss
index d3f4d0a..3c580d8 100644
--- a/assets/css/style.scss
+++ b/assets/css/style.scss
@@ -11,5 +11,3 @@
@import "_partial/pagination";
@import "_core/media";
-
-@import "_custom";
diff --git a/assets/js/blog.js b/assets/js/blog.js
index be86965..d68201c 100644
--- a/assets/js/blog.js
+++ b/assets/js/blog.js
@@ -73,12 +73,13 @@ jQuery(function($) {
});
};
- _Blog.chroma = function() {
+ _Blog.chroma = function () {
const blocks = document.querySelectorAll('.highlight > .chroma');
for (let i = 0; i < blocks.length; i++) {
const block = blocks[i];
- const afterHighLight = block.querySelector('pre.chroma > code');
- const lang = afterHighLight ? afterHighLight.className : '';
+ const codes = block.querySelectorAll('pre.chroma > code');
+ const code = codes[codes.length - 1];
+ const lang = code ? code.className.toLowerCase() : '';
block.className += ' ' + lang;
}
};
@@ -122,7 +123,7 @@ jQuery(function($) {
_Blog._initToc = function() {
const $toc = $('#post-toc');
if ($toc.length && $toc.css('display') !== 'none') {
- const SPACING = 100;
+ const SPACING = 80;
const $footer = $('#post-footer');
const minTop = $toc.position().top;;
const mainTop = $('main').position().top;
@@ -157,27 +158,23 @@ jQuery(function($) {
};
changeTocState();
- const HEADERFIX = 100;
+ const HEADERFIX = 120;
const $toclink = $('.toc-link');
const $headerlink = $('.headerlink');
const $tocLinkLis = $('.post-toc-content li');
- const activeIndex = function() {
+ const activeIndex = function () {
const scrollTop = $(window).scrollTop();
const headerlinkTop = $.map($headerlink, function(link) {
return $(link).offset().top;
});
- const headerLinksOffsetForSearch = $.map(headerlinkTop, function(offset) {
- return offset - HEADERFIX;
- });
const searchActiveTocIndex = function(array, target) {
for (let i = 0; i < array.length - 1; i++) {
- if (target > array[i] && target <= array[i + 1]) return i;
+ if ( target < array[i + 1]) return i;
}
- if (target > array[array.length - 1]) return array.length - 1;
- return 0;
+ return array.length - 1;
};
- const activeTocIndex = searchActiveTocIndex(headerLinksOffsetForSearch, scrollTop);
+ const activeTocIndex = searchActiveTocIndex(headerlinkTop, scrollTop + HEADERFIX);
$($toclink).removeClass('active');
$($tocLinkLis).removeClass('has-active');
@@ -302,4 +299,4 @@ jQuery(function($) {
_Blog.typeit();
_Blog.toc();
});
-});
\ No newline at end of file
+});
diff --git a/assets/js/lib/katex/copy-tex.min.js b/assets/js/lib/katex/copy-tex.min.js
new file mode 100644
index 0000000..e0354d6
--- /dev/null
+++ b/assets/js/lib/katex/copy-tex.min.js
@@ -0,0 +1 @@
+!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}("undefined"!=typeof self?self:this,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t,n){},function(e,t,n){"use strict";n.r(t);n(0);var r={inline:["$","$"],display:["$$","$$"]},o=function(e,t){void 0===t&&(t=r);for(var n=e.querySelectorAll(".katex-mathml + .katex-html"),o=0;o=0;a--)t[a].loc.start>o&&(n+=" ",o=t[a].loc.start),n+=t[a].text,o+=t[a].text.length;return c.go(i.go(n,e))},i={go:function(t,e){if(!t)return[];void 0===e&&(e="ce");var n,o="0",a={};a.parenthesisLevel=0,t=(t=(t=t.replace(/\n/g," ")).replace(/[\u2212\u2013\u2014\u2010]/g,"-")).replace(/[\u2026]/g,"...");for(var r=10,c=[];;){n!==t?(r=10,n=t):r--;var u=i.stateMachines[e],p=u.transitions[o]||u.transitions["*"];t:for(var s=0;s0))return c;if(d.revisit||(t=_.remainder),!d.toContinue)break t}}if(r<=0)throw["MhchemBugU","mhchem bug U. Please report."]}},concatArray:function(t,e){if(e)if(Array.isArray(e))for(var n=0;n":/^[=<>]/,"#":/^[#\u2261]/,"+":/^\+/,"-$":/^-(?=[\s_},;\]\/]|$|\([a-z]+\))/,"-9":/^-(?=[0-9])/,"- orbital overlap":/^-(?=(?:[spd]|sp)(?:$|[\s,;\)\]\}]))/,"-":/^-/,"pm-operator":/^(?:\\pm|\$\\pm\$|\+-|\+\/-)/,operator:/^(?:\+|(?:[\-=<>]|<<|>>|\\approx|\$\\approx\$)(?=\s|$|-?[0-9]))/,arrowUpDown:/^(?:v|\(v\)|\^|\(\^\))(?=$|[\s,;\)\]\}])/,"\\bond{(...)}":function(t){return i.patterns.findObserveGroups(t,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(t){return i.patterns.findObserveGroups(t,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(t){return i.patterns.findObserveGroups(t,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(t){return i.patterns.findObserveGroups(t,"",/^\\[a-zA-Z]+\{/,"}","")},"\\ca":/^\\ca(?:\s+|(?![a-zA-Z]))/,"\\x":/^(?:\\[a-zA-Z]+\s*|\\[_&{}%])/,orbital:/^(?:[0-9]{1,2}[spdfgh]|[0-9]{0,2}sp)(?=$|[^a-zA-Z])/,others:/^[\/~|]/,"\\frac{(...)}":function(t){return i.patterns.findObserveGroups(t,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(t){return i.patterns.findObserveGroups(t,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(t){return i.patterns.findObserveGroups(t,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(t){return i.patterns.findObserveGroups(t,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(t){return i.patterns.findObserveGroups(t,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(t){return i.patterns.findObserveGroups(t,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(t){return i.patterns.findObserveGroups(t,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(t){return i.patterns.findObserveGroups(t,"\\ce{","","","}")},oxidation$:/^(?:[+-][IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"d-oxidation$":/^(?:[+-]?\s?[IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"roman numeral":/^[IVX]+/,"1/2$":/^[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+(?:\$[a-z]\$|[a-z])?$/,amount:function(t){var e;if(e=t.match(/^(?:(?:(?:\([+\-]?[0-9]+\/[0-9]+\)|[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+|[+\-]?[0-9]+[.,][0-9]+|[+\-]?\.[0-9]+|[+\-]?[0-9]+)(?:[a-z](?=\s*[A-Z]))?)|[+\-]?[a-z](?=\s*[A-Z])|\+(?!\s))/))return{match_:e[0],remainder:t.substr(e[0].length)};var n=i.patterns.findObserveGroups(t,"","$","$","");return n&&(e=n.match_.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/))?{match_:e[0],remainder:t.substr(e[0].length)}:null},amount2:function(t){return this.amount(t)},"(KV letters),":/^(?:[A-Z][a-z]{0,2}|i)(?=,)/,formula$:function(t){if(t.match(/^\([a-z]+\)$/))return null;var e=t.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);return e?{match_:e[0],remainder:t.substr(e[0].length)}:null},uprightEntities:/^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,"/":/^\s*(\/)\s*/,"//":/^\s*(\/\/)\s*/,"*":/^\s*[*.]\s*/},findObserveGroups:function(t,e,n,o,a,r,i,c,u,p){var s=function(t,e){if("string"==typeof e)return 0!==t.indexOf(e)?null:e;var n=t.match(e);return n?n[0]:null},_=s(t,e);if(null===_)return null;if(t=t.substr(_.length),null===(_=s(t,n)))return null;var d=function(t,e,n){for(var o=0;e":{"0|1|2|3":{action_:"r=",nextState:"r"},"a|as":{action_:["output","r="],nextState:"r"},"*":{action_:["output","r="],nextState:"r"}},"+":{o:{action_:"d= kv",nextState:"d"},"d|D":{action_:"d=",nextState:"d"},q:{action_:"d=",nextState:"qd"},"qd|qD":{action_:"d=",nextState:"qd"},dq:{action_:["output","d="],nextState:"d"},3:{action_:["sb=false","output","operator"],nextState:"0"}},amount:{"0|2":{action_:"a=",nextState:"a"}},"pm-operator":{"0|1|2|a|as":{action_:["sb=false","output",{type_:"operator",option:"\\pm"}],nextState:"0"}},operator:{"0|1|2|a|as":{action_:["sb=false","output","operator"],nextState:"0"}},"-$":{"o|q":{action_:["charge or bond","output"],nextState:"qd"},d:{action_:"d=",nextState:"d"},D:{action_:["output",{type_:"bond",option:"-"}],nextState:"3"},q:{action_:"d=",nextState:"qd"},qd:{action_:"d=",nextState:"qd"},"qD|dq":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},"-9":{"3|o":{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"3"}},"- orbital overlap":{o:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},d:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"}},"-":{"0|1|2":{action_:[{type_:"output",option:1},"beginsWithBond=true",{type_:"bond",option:"-"}],nextState:"3"},3:{action_:{type_:"bond",option:"-"}},a:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},as:{action_:[{type_:"output",option:2},{type_:"bond",option:"-"}],nextState:"3"},b:{action_:"b="},o:{action_:{type_:"- after o/d",option:!1},nextState:"2"},q:{action_:{type_:"- after o/d",option:!1},nextState:"2"},"d|qd|dq":{action_:{type_:"- after o/d",option:!0},nextState:"2"},"D|qD|p":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},amount2:{"1|3":{action_:"a=",nextState:"a"}},letters:{"0|1|2|3|a|as|b|p|bp|o":{action_:"o=",nextState:"o"},"q|dq":{action_:["output","o="],nextState:"o"},"d|D|qd|qD":{action_:"o after d",nextState:"o"}},digits:{o:{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},q:{action_:["output","o="],nextState:"o"},a:{action_:"o=",nextState:"o"}},"space A":{"b|p|bp":{}},space:{a:{nextState:"as"},0:{action_:"sb=false"},"1|2":{action_:"sb=true"},"r|rt|rd|rdt|rdq":{action_:"output",nextState:"0"},"*":{action_:["output","sb=true"],nextState:"1"}},"1st-level escape":{"1|2":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}]},"*":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}],nextState:"0"}},"[(...)]":{"r|rt":{action_:"rd=",nextState:"rd"},"rd|rdt":{action_:"rq=",nextState:"rdq"}},"...":{"o|d|D|dq|qd|qD":{action_:["output",{type_:"bond",option:"..."}],nextState:"3"},"*":{action_:[{type_:"output",option:1},{type_:"insert",option:"ellipsis"}],nextState:"1"}},". |* ":{"*":{action_:["output",{type_:"insert",option:"addition compound"}],nextState:"1"}},"state of aggregation $":{"*":{action_:["output","state of aggregation"],nextState:"1"}},"{[(":{"a|as|o":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"0|1|2|3":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"*":{action_:["output","o=","output","parenthesisLevel++"],nextState:"2"}},")]}":{"0|1|2|3|b|p|bp|o":{action_:["o=","parenthesisLevel--"],nextState:"o"},"a|as|d|D|q|qd|qD|dq":{action_:["output","o=","parenthesisLevel--"],nextState:"o"}},", ":{"*":{action_:["output","comma"],nextState:"0"}},"^_":{"*":{}},"^{(...)}|^($...$)":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"D"},q:{action_:"d=",nextState:"qD"},"d|D|qd|qD|dq":{action_:["output","d="],nextState:"D"}},"^a|^\\x{}{}|^\\x{}|^\\x|'":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"d"},q:{action_:"d=",nextState:"qd"},"d|qd|D|qD":{action_:"d="},dq:{action_:["output","d="],nextState:"d"}},"_{(state of aggregation)}$":{"d|D|q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"_{(...)}|_($...$)|_9|_\\x{}{}|_\\x{}|_\\x":{"0|1|2|as":{action_:"p=",nextState:"p"},b:{action_:"p=",nextState:"bp"},"3|o":{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},"q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"=<>":{"0|1|2|3|a|as|o|q|d|D|qd|qD|dq":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"#":{"0|1|2|3|a|as|o":{action_:[{type_:"output",option:2},{type_:"bond",option:"#"}],nextState:"3"}},"{}":{"*":{action_:{type_:"output",option:1},nextState:"1"}},"{...}":{"0|1|2|3|a|as|b|p|bp":{action_:"o=",nextState:"o"},"o|d|D|q|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"$...$":{a:{action_:"a="},"0|1|2|3|as|b|p|bp|o":{action_:"o=",nextState:"o"},"as|o":{action_:"o="},"q|d|D|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"\\bond{(...)}":{"*":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"\\frac{(...)}":{"*":{action_:[{type_:"output",option:1},"frac-output"],nextState:"3"}},"\\overset{(...)}":{"*":{action_:[{type_:"output",option:2},"overset-output"],nextState:"3"}},"\\underset{(...)}":{"*":{action_:[{type_:"output",option:2},"underset-output"],nextState:"3"}},"\\underbrace{(...)}":{"*":{action_:[{type_:"output",option:2},"underbrace-output"],nextState:"3"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:[{type_:"output",option:2},"color-output"],nextState:"3"}},"\\color{(...)}0":{"*":{action_:[{type_:"output",option:2},"color0-output"]}},"\\ce{(...)}":{"*":{action_:[{type_:"output",option:2},"ce"],nextState:"3"}},"\\,":{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"1"}},"\\x{}{}|\\x{}|\\x":{"0|1|2|3|a|as|b|p|bp|o|c0":{action_:["o=","output"],nextState:"3"},"*":{action_:["output","o=","output"],nextState:"3"}},others:{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"3"}},else2:{a:{action_:"a to o",nextState:"o",revisit:!0},as:{action_:["output","sb=true"],nextState:"1",revisit:!0},"r|rt|rd|rdt|rdq":{action_:["output"],nextState:"0",revisit:!0},"*":{action_:["output","copy"],nextState:"3"}}}),actions:{"o after d":function(t,e){var n;if((t.d||"").match(/^[0-9]+$/)){var o=t.d;t.d=void 0,n=this.output(t),t.b=o}else n=this.output(t);return i.actions["o="](t,e),n},"d= kv":function(t,e){t.d=e,t.dType="kv"},"charge or bond":function(t,e){if(t.beginsWithBond){var n=[];return i.concatArray(n,this.output(t)),i.concatArray(n,i.actions.bond(t,e,"-")),n}t.d=e},"- after o/d":function(t,e,n){var o=i.patterns.match_("orbital",t.o||""),a=i.patterns.match_("one lowercase greek letter $",t.o||""),r=i.patterns.match_("one lowercase latin letter $",t.o||""),c=i.patterns.match_("$one lowercase latin letter$ $",t.o||""),u="-"===e&&(o&&""===o.remainder||a||r||c);!u||t.a||t.b||t.p||t.d||t.q||o||!r||(t.o="$"+t.o+"$");var p=[];return u?(i.concatArray(p,this.output(t)),p.push({type_:"hyphen"})):(o=i.patterns.match_("digits",t.d||""),n&&o&&""===o.remainder?(i.concatArray(p,i.actions["d="](t,e)),i.concatArray(p,this.output(t))):(i.concatArray(p,this.output(t)),i.concatArray(p,i.actions.bond(t,e,"-")))),p},"a to o":function(t){t.o=t.a,t.a=void 0},"sb=true":function(t){t.sb=!0},"sb=false":function(t){t.sb=!1},"beginsWithBond=true":function(t){t.beginsWithBond=!0},"beginsWithBond=false":function(t){t.beginsWithBond=!1},"parenthesisLevel++":function(t){t.parenthesisLevel++},"parenthesisLevel--":function(t){t.parenthesisLevel--},"state of aggregation":function(t,e){return{type_:"state of aggregation",p1:i.go(e,"o")}},comma:function(t,e){var n=e.replace(/\s*$/,"");return n!==e&&0===t.parenthesisLevel?{type_:"comma enumeration L",p1:n}:{type_:"comma enumeration M",p1:n}},output:function(t,e,n){var o,a,r;t.r?(a="M"===t.rdt?i.go(t.rd,"tex-math"):"T"===t.rdt?[{type_:"text",p1:t.rd||""}]:i.go(t.rd),r="M"===t.rqt?i.go(t.rq,"tex-math"):"T"===t.rqt?[{type_:"text",p1:t.rq||""}]:i.go(t.rq),o={type_:"arrow",r:t.r,rd:a,rq:r}):(o=[],(t.a||t.b||t.p||t.o||t.q||t.d||n)&&(t.sb&&o.push({type_:"entitySkip"}),t.o||t.q||t.d||t.b||t.p||2===n?t.o||t.q||t.d||!t.b&&!t.p?t.o&&"kv"===t.dType&&i.patterns.match_("d-oxidation$",t.d||"")?t.dType="oxidation":t.o&&"kv"===t.dType&&!t.q&&(t.dType=void 0):(t.o=t.a,t.d=t.b,t.q=t.p,t.a=t.b=t.p=void 0):(t.o=t.a,t.a=void 0),o.push({type_:"chemfive",a:i.go(t.a,"a"),b:i.go(t.b,"bd"),p:i.go(t.p,"pq"),o:i.go(t.o,"o"),q:i.go(t.q,"pq"),d:i.go(t.d,"oxidation"===t.dType?"oxidation":"bd"),dType:t.dType})));for(var c in t)"parenthesisLevel"!==c&&"beginsWithBond"!==c&&delete t[c];return o},"oxidation-output":function(t,e){var n=["{"];return i.concatArray(n,i.go(e,"oxidation")),n.push("}"),n},"frac-output":function(t,e){return{type_:"frac-ce",p1:i.go(e[0]),p2:i.go(e[1])}},"overset-output":function(t,e){return{type_:"overset",p1:i.go(e[0]),p2:i.go(e[1])}},"underset-output":function(t,e){return{type_:"underset",p1:i.go(e[0]),p2:i.go(e[1])}},"underbrace-output":function(t,e){return{type_:"underbrace",p1:i.go(e[0]),p2:i.go(e[1])}},"color-output":function(t,e){return{type_:"color",color1:e[0],color2:i.go(e[1])}},"r=":function(t,e){t.r=e},"rdt=":function(t,e){t.rdt=e},"rd=":function(t,e){t.rd=e},"rqt=":function(t,e){t.rqt=e},"rq=":function(t,e){t.rq=e},operator:function(t,e,n){return{type_:"operator",kind_:n||e}}}},a:{transitions:i.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},"$(...)$":{"*":{action_:"tex-math tight",nextState:"1"}},",":{"*":{action_:{type_:"insert",option:"commaDecimal"}}},else2:{"*":{action_:"copy"}}}),actions:{}},o:{transitions:i.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},letters:{"*":{action_:"rm"}},"\\ca":{"*":{action_:{type_:"insert",option:"circa"}}},"\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"{text}"}},else2:{"*":{action_:"copy"}}}),actions:{}},text:{transitions:i.createTransitions({empty:{"*":{action_:"output"}},"{...}":{"*":{action_:"text="}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"\\greek":{"*":{action_:["output","rm"]}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:["output","copy"]}},else:{"*":{action_:"text="}}}),actions:{output:function(t){if(t.text_){var e={type_:"text",p1:t.text_};for(var n in t)delete t[n];return e}}}},pq:{transitions:i.createTransitions({empty:{"*":{}},"state of aggregation $":{"*":{action_:"state of aggregation"}},i$:{0:{nextState:"!f",revisit:!0}},"(KV letters),":{0:{action_:"rm",nextState:"0"}},formula$:{0:{nextState:"f",revisit:!0}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"!f",revisit:!0}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"a-z":{f:{action_:"tex-math"}},letters:{"*":{action_:"rm"}},"-9.,9":{"*":{action_:"9,9"}},",":{"*":{action_:{type_:"insert+p1",option:"comma enumeration S"}}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"state of aggregation":function(t,e){return{type_:"state of aggregation subscript",p1:i.go(e,"o")}},"color-output":function(t,e){return{type_:"color",color1:e[0],color2:i.go(e[1],"pq")}}}},bd:{transitions:i.createTransitions({empty:{"*":{}},x$:{0:{nextState:"!f",revisit:!0}},formula$:{0:{nextState:"f",revisit:!0}},else:{0:{nextState:"!f",revisit:!0}},"-9.,9 no missing 0":{"*":{action_:"9,9"}},".":{"*":{action_:{type_:"insert",option:"electron dot"}}},"a-z":{f:{action_:"tex-math"}},x:{"*":{action_:{type_:"insert",option:"KV x"}}},letters:{"*":{action_:"rm"}},"'":{"*":{action_:{type_:"insert",option:"prime"}}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"color-output":function(t,e){return{type_:"color",color1:e[0],color2:i.go(e[1],"bd")}}}},oxidation:{transitions:i.createTransitions({empty:{"*":{}},"roman numeral":{"*":{action_:"roman-numeral"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},else:{"*":{action_:"copy"}}}),actions:{"roman-numeral":function(t,e){return{type_:"roman numeral",p1:e||""}}}},"tex-math":{transitions:i.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},else:{"*":{action_:"o="}}}),actions:{output:function(t){if(t.o){var e={type_:"tex-math",p1:t.o};for(var n in t)delete t[n];return e}}}},"tex-math tight":{transitions:i.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},"-|+":{"*":{action_:"tight operator"}},else:{"*":{action_:"o="}}}),actions:{"tight operator":function(t,e){t.o=(t.o||"")+"{"+e+"}"},output:function(t){if(t.o){var e={type_:"tex-math",p1:t.o};for(var n in t)delete t[n];return e}}}},"9,9":{transitions:i.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:i.createTransitions({empty:{"*":{action_:"output"}},space$:{"*":{action_:["output","space"]}},"{[(|)]}":{"0|a":{action_:"copy"}},"(-)(9)^(-9)":{0:{action_:"number^",nextState:"a"}},"(-)(9.,9)(e)(99)":{0:{action_:"enumber",nextState:"a"}},space:{"0|a":{}},"pm-operator":{"0|a":{action_:{type_:"operator",option:"\\pm"},nextState:"0"}},operator:{"0|a":{action_:"copy",nextState:"0"}},"//":{d:{action_:"o=",nextState:"/"}},"/":{d:{action_:"o=",nextState:"/"}},"{...}|else":{"0|d":{action_:"d=",nextState:"d"},a:{action_:["space","d="],nextState:"d"},"/|q":{action_:"q=",nextState:"q"}}}),actions:{enumber:function(t,e){var n=[];return"+-"===e[0]||"+/-"===e[0]?n.push("\\pm "):e[0]&&n.push(e[0]),e[1]&&(i.concatArray(n,i.go(e[1],"pu-9,9")),e[2]&&(e[2].match(/[,.]/)?i.concatArray(n,i.go(e[2],"pu-9,9")):n.push(e[2])),e[3]=e[4]||e[3],e[3]&&(e[3]=e[3].trim(),"e"===e[3]||"*"===e[3].substr(0,1)?n.push({type_:"cdot"}):n.push({type_:"times"}))),e[3]&&n.push("10^{"+e[5]+"}"),n},"number^":function(t,e){var n=[];return"+-"===e[0]||"+/-"===e[0]?n.push("\\pm "):e[0]&&n.push(e[0]),i.concatArray(n,i.go(e[1],"pu-9,9")),n.push("^{"+e[2]+"}"),n},operator:function(t,e,n){return{type_:"operator",kind_:n||e}},space:function(){return{type_:"pu-space-1"}},output:function(t){var e,n=i.patterns.match_("{(...)}",t.d||"");n&&""===n.remainder&&(t.d=n.match_);var o=i.patterns.match_("{(...)}",t.q||"");if(o&&""===o.remainder&&(t.q=o.match_),t.d&&(t.d=t.d.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),t.d=t.d.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F")),t.q){t.q=t.q.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),t.q=t.q.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F");var a={d:i.go(t.d,"pu"),q:i.go(t.q,"pu")};"//"===t.o?e={type_:"pu-frac",p1:a.d,p2:a.q}:(e=a.d,a.d.length>1||a.q.length>1?e.push({type_:" / "}):e.push({type_:"/"}),i.concatArray(e,a.q))}else e=i.go(t.d,"pu-2");for(var r in t)delete t[r];return e}}},"pu-2":{transitions:i.createTransitions({empty:{"*":{action_:"output"}},"*":{"*":{action_:["output","cdot"],nextState:"0"}},"\\x":{"*":{action_:"rm="}},space:{"*":{action_:["output","space"],nextState:"0"}},"^{(...)}|^(-1)":{1:{action_:"^(-1)"}},"-9.,9":{0:{action_:"rm=",nextState:"0"},1:{action_:"^(-1)",nextState:"0"}},"{...}|else":{"*":{action_:"rm=",nextState:"1"}}}),actions:{cdot:function(){return{type_:"tight cdot"}},"^(-1)":function(t,e){t.rm+="^{"+e+"}"},space:function(){return{type_:"pu-space-2"}},output:function(t){var e=[];if(t.rm){var n=i.patterns.match_("{(...)}",t.rm||"");e=n&&""===n.remainder?i.go(n.match_,"pu"):{type_:"rm",p1:t.rm}}for(var o in t)delete t[o];return e}}},"pu-9,9":{transitions:i.createTransitions({empty:{0:{action_:"output-0"},o:{action_:"output-o"}},",":{0:{action_:["output-0","comma"],nextState:"o"}},".":{0:{action_:["output-0","copy"],nextState:"o"}},else:{"*":{action_:"text="}}}),actions:{comma:function(){return{type_:"commaDecimal"}},"output-0":function(t){var e=[];if(t.text_=t.text_||"",t.text_.length>4){var n=t.text_.length%3;0===n&&(n=3);for(var o=t.text_.length-3;o>0;o-=3)e.push(t.text_.substr(o,3)),e.push({type_:"1000 separator"});e.push(t.text_.substr(0,n)),e.reverse()}else e.push(t.text_);for(var a in t)delete t[a];return e},"output-o":function(t){var e=[];if(t.text_=t.text_||"",t.text_.length>4){for(var n=t.text_.length-3,o=0;o":case"\u2192":case"\u27f6":return"rightarrow";case"<-":return"leftarrow";case"<->":return"leftrightarrow";case"<--\x3e":return"rightleftarrows";case"<=>":case"\u21cc":return"rightleftharpoons";case"<=>>":return"rightequilibrium";case"<<=>":return"leftequilibrium";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getBond:function(t){switch(t){case"-":case"1":return"{-}";case"=":case"2":return"{=}";case"#":case"3":return"{\\equiv}";case"~":return"{\\tripledash}";case"~-":return"{\\mathrlap{\\raisebox{-.1em}{$-$}}\\raisebox{.1em}{$\\tripledash$}}";case"~=":case"~--":return"{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$\\tripledash$}}-}";case"-~-":return"{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$-$}}\\tripledash}";case"...":return"{{\\cdot}{\\cdot}{\\cdot}}";case"....":return"{{\\cdot}{\\cdot}{\\cdot}{\\cdot}}";case"->":return"{\\rightarrow}";case"<-":return"{\\leftarrow}";case"<":return"{<}";case">":return"{>}";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getOperator:function(t){switch(t){case"+":return" {}+{} ";case"-":return" {}-{} ";case"=":return" {}={} ";case"<":return" {}<{} ";case">":return" {}>{} ";case"<<":return" {}\\ll{} ";case">>":return" {}\\gg{} ";case"\\pm":return" {}\\pm{} ";case"\\approx":case"$\\approx$":return" {}\\approx{} ";case"v":case"(v)":return" \\downarrow{} ";case"^":case"(^)":return" \\uparrow{} ";default:throw["MhchemBugT","mhchem bug T. Please report."]}}}}]).default});
\ No newline at end of file
diff --git a/exampleSite/static/images/loading.svg b/assets/svg/loading.svg
similarity index 72%
rename from exampleSite/static/images/loading.svg
rename to assets/svg/loading.svg
index 075a399..b852575 100644
--- a/exampleSite/static/images/loading.svg
+++ b/assets/svg/loading.svg
@@ -1,10 +1,10 @@
-
\ No newline at end of file
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 532195c..91fcfcc 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -1,41 +1,76 @@
-baseURL = "https://example.com/"
-languageCode = "en" # website language
-defaultContentLanguage = "en" # [en, zh, ...] determines which i18n file to use
-title = "LoveIt Theme" # website title
-theme = "LoveIt" # theme
-enableGitInfo = false # whether to use git commit log to generate lastmod record
-hasCJKLanguage = false # whether to include chinese/japanese/korean
-paginate = 12 # default amount of posts in each pages
-enableEmoji = true # whether to use emoji code
-enableRobotsTXT = true # whether to use robots.txt
-googleAnalytics = "" # [UA-XXXXXXXX-X] google analytics code
-disqusShortname = "dillonzq" # Disqus shortname to use Disqus in posts
+baseURL = "/"
+# website language
+languageCode = "en"
+# [en, zh, ...] determines which i18n file to use
+defaultContentLanguage = "en"
+# website title
+title = "LoveIt Theme"
+# theme
+theme = "LoveIt"
+# whether to use git commit log to generate lastmod record
+enableGitInfo = false
+# whether to include chinese/japanese/korean
+hasCJKLanguage = false
+# default amount of posts in each pages
+paginate = 12
+# whether to use emoji code
+enableEmoji = true
+# whether to use robots.txt
+enableRobotsTXT = true
+# [UA-XXXXXXXX-X] google analytics code
+googleAnalytics = ""
+# copyright description used only for seo schema
copyright = "This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License."
- # copyright description used only for seo schema
-
- #### Syntax Highlighting (https://gohugo.io/content-management/syntax-highlighting)
-pygmentsOptions = "linenos=table"
-pygmentsCodefences = true
-pygmentsUseClasses = true
-pygmentsCodefencesGuessSyntax = true
+# date format
+dateFormatToUse = "2006-01-02"
+# Markup related configuration in Hugo
[markup]
-[markup.goldmark]
-[markup.goldmark.renderer]
-unsafe = true
+ # Syntax Highlighting (https://gohugo.io/content-management/syntax-highlighting)
+ [markup.highlight]
+ codeFences = true
+ guessSyntax = true
+ lineNoStart = 1
+ lineNos = true
+ lineNumbersInTable = true
+ noClasses = false
+ style = "monokai"
+ tabWidth = 4
+ # Goldmark is from Hugo 0.60 the default library used for Markdown
+ [markup.goldmark]
+ [markup.goldmark.extensions]
+ definitionList = true
+ footnote = true
+ linkify = true
+ strikethrough = true
+ table = true
+ taskList = true
+ typographer = true
+ [markup.goldmark.renderer]
+ # whether to use HTML tags directly in the document
+ unsafe = true
+ # Table Of Contents settings
+ [markup.tableOfContents]
+ startLevel = 2
+ endLevel = 6
-[author] #### Author Info
- name = "XXXX"
+# Author Info
+[author]
+ name = "xxxx"
+ link = ""
-[sitemap] #### Sitemap Info
+# Sitemap Info
+[sitemap]
changefreq = "weekly"
filename = "sitemap.xml"
priority = 0.5
-[Permalinks] #### Permalinks Info (https://gohugo.io/content-management/urls/#permalinks)
+# Permalinks Info (https://gohugo.io/content-management/urls/#permalinks)
+[Permalinks]
posts = ":year/:month/:filename"
-[menu] #### Menu Info
+# Menu Info
+[menu]
[[menu.main]]
identifier = "posts"
name = "Posts"
@@ -62,41 +97,70 @@ unsafe = true
[[menu.main]]
identifier = "zh"
- name = ''
+ pre = ''
+ name = ""
+ title = "简体中文"
url = "https://hugo-loveit-zh.netlify.com"
weight = 5
[params]
- version = "5.x" # LoveIt theme version
- description = "LoveIt Theme Demo" # site description
- keywords = ["XXXX", "Theme", "Hugo"] # site keywords
+ # LoveIt theme version
+ version = "0.1.X"
+ # site description
+ description = "About LoveIt Theme"
+ # site keywords
+ keywords = ["Theme", "Hugo"]
- #### Home Page Info
- home_mode = "post" # [post, other] home mode
- home_paginate = 6 # special amount of posts in each home post page
- avatar = "images/avatar.png" # URL of avatar shown in home page
- subtitle = "A Clean, Elegant but Advanced Hugo Theme" # subtitle shown in home page
+ # Home Page Info
+ ## [post, other] home mode
+ home_mode = "post"
+ ## special amount of posts in each home post page
+ home_paginate = 6
+ ## URL of avatar shown in home page
+ avatar = "images/avatar.png"
+ ## subtitle shown in home page
+ subtitle = "A Clean, Elegant but Advanced Hugo Theme"
- socialShare = true # whether to show social share links in post page
+ # whether to show social share links in post page
+ socialShare = true
- #### Footer CopyRight Info
- since = 2018 # Site creation time
- icp = '' # ICP info only in China (HTML format is allowed)
+ # Footer CopyRight Info
+ ## Site creation time
+ since = 2019
+ ## ICP info only in China (HTML format is allowed)
+ icp = ""
+ ## license info (HTML format is allowed)
license= 'CC BY-NC 4.0'
- # license info (HTML format is allowed)
- gitRepo = "" # public git repo url to link lastmod git commit only then enableGitInfo is true
- linkToMarkdown = true # whether to show link to Raw Markdown content of the post
+ # public git repo url to link lastmod git commit only then enableGitInfo is true
+ gitRepo = ""
- #### site verification code for Google/Bing/Yandex/Pinterest/Baidu
+ # mathematical formulas (KaTeX)
+ [params.math]
+ enable = true
+ block_left_delimiter = ""
+ block_right_delimiter = ""
+ inline_left_delimiter = "$"
+ inline_right_delimiter = "$"
+ # KaTeX extension copy_tex
+ copy_tex = true
+ # KaTeX extension mhchem
+ mhchem = true
+
+ # whether to show link to Raw Markdown content of the post
+ linkToMarkdown = true
+
+ # site verification code for Google/Bing/Yandex/Pinterest/Baidu
google_verification = ""
bing_verification = ""
yandex_verification = ""
pinterest_verification = ""
baidu_verification = ""
- [params.cdn] #### CSS and JS Files CDN
- fontawesome_free_css = '' # for example ''
+ # CSS and JS Files CDN
+ [params.cdn]
+ ## for example ''
+ fontawesome_free_css = ''
animate_css = ''
gitalk_css = ''
gitalk_js = ''
@@ -107,6 +171,9 @@ unsafe = true
katex_css = ''
katex_js = ''
katex_auto_render_js = ''
+ katex_copy_tex_css = ''
+ katex_copy_tex_js = ''
+ katex_mhchem_js = ''
mermaid_js = ''
echarts_js = ''
echarts_macarons_js = ''
@@ -116,15 +183,17 @@ unsafe = true
aplayer_js = ''
meting_js = ''
- [params.gravatar] # Gravatar Info for preferred avatar in home page
+ # Gravatar Info for preferred avatar in home page
+ [params.gravatar]
email = ""
- [params.social] # Social Info in home page
+ # Social Info in home page
+ [params.social]
GitHub = "xxxx"
Linkedin = "xxxx"
Twitter = "xxxx"
#Instagram = "xxxx"
- #Email = "xxxx"
+ Email = "xxxx@outlook.com"
Facebook = "xxxx"
Telegram = "xxxx"
#Medium = "xxxx"
@@ -180,7 +249,8 @@ unsafe = true
#Thingiverse = "xxxx"
#Devto = "xxxx"
- [params.share] # Social Share Links in post page
+ # Social Share Links in post page
+ [params.share]
enable = true
Twitter = true
Facebook = true
@@ -193,30 +263,40 @@ unsafe = true
#VKontakte = true
#Weibo = true
- [params.publisher] # Publisher Info just for SEO
- name = "XXXX"
+ # Publisher Info just for SEO
+ [params.publisher]
+ name = "xxxx"
[params.publisher.logo]
url = "logo.png"
width = 127
height = 40
- [params.logo] # Website Log Info just for SEO
+ # Website Log Info just for SEO
+ [params.logo]
url = "logo.png"
width = 127
height = 40
- [params.image] # Website Image Info just for SEO
+ # Website Image Info just for SEO
+ [params.image]
url = "cover.png"
width = 800
height = 600
- [params.gitalk] # Gittalk Comment Config (https://github.com/gitalk/gitalk)
+ # Disqus Comment Config (https://disqus.com/)
+ [params.disqus]
+ # Disqus shortname to use Disqus in posts
+ shortname = "dillonzq"
+
+ # Gittalk Comment Config (https://github.com/gitalk/gitalk)
+ [params.gitalk]
owner = ""
repo = ""
clientId = ""
clientSecret = ""
- [params.valine] # Valine Comment Config (https://github.com/xCss/Valine)
+ # Valine Comment Config (https://github.com/xCss/Valine)
+ [params.valine]
enable = false
appId = ""
appKey = ""
@@ -227,30 +307,35 @@ unsafe = true
visitor = true
recordIP = true
- [params.facebook] # Facebook Comment Config (https://developers.facebook.com/docs/plugins/comments)
+ # Facebook Comment Config (https://developers.facebook.com/docs/plugins/comments)
+ [params.facebook]
enable = false
width = "100%"
numPosts = 10
appId = ""
languageCode = "en_US"
-[privacy] #### Privacy Info (https://gohugo.io/about/hugo-and-gdpr/)
+# Privacy Info (https://gohugo.io/about/hugo-and-gdpr/)
+[privacy]
[privacy.googleAnalytics]
anonymizeIP = true
[privacy.youtube]
privacyEnhanced = true
-[mediaTypes] #### Options to make hugo output .md files.
+# Options to make output .md files
+[mediaTypes]
[mediaTypes."text/plain"]
suffixes = ["md"]
-[outputFormats.MarkDown] #### Options to make hugo output .md files.
+# Options to make output .md files
+[outputFormats.MarkDown]
mediaType = "text/plain"
isPlainText = true
isHTML = false
-[outputs] #### Options to make hugo output .md files.
+# Options to make hugo output files
+[outputs]
home = ["HTML", "RSS"]
page = ["HTML", "MarkDown"]
section = ["HTML", "RSS"]
diff --git a/exampleSite/config/css/_custom.scss b/exampleSite/config/css/_custom.scss
new file mode 100644
index 0000000..96aca03
--- /dev/null
+++ b/exampleSite/config/css/_custom.scss
@@ -0,0 +1,15 @@
+// ==============================
+// Custom style
+// 自定义样式
+// ==============================
+// You can override the variables in assets/css/_variables.scss to customize the style
+// 您可以覆盖 assets/css/_variables.scss 中的变量以自定义样式
+
+@import url(https://fonts.googleapis.com/css?family=Lato:100,300,400,700,900);
+
+$global-font-family: Lato, -apple-system, BlinkMacSystemFont, PingFang SC, Microsoft Yahei, Segoe UI, Helvetica, Arial, sans-serif, Segoe UI Emoji;
+
+
+@import url('https://fonts.googleapis.com/css?family=Fira+Mono:400,700&display=swap&subset=latin-ext');
+
+$code-font-family: Fira Mono, Source Code Pro, Menlo, Consolas, Monaco, monospace;
diff --git a/exampleSite/content/posts/LoveIt-Preview.md b/exampleSite/content/posts/LoveIt-Preview.md
deleted file mode 100644
index b9f215d..0000000
--- a/exampleSite/content/posts/LoveIt-Preview.md
+++ /dev/null
@@ -1,25 +0,0 @@
----
-title: "LoveIt Theme Preview and Documentation"
-date: 2019-08-25T16:22:42+08:00
-lastmod: 2019-08-25T16:22:42+08:00
-draft: false
-description: "This is a LoveIt theme preview and documentation page."
-show_in_homepage: true
-show_description: false
-license: ''
-
-tags: ['Hugo', 'Theme']
-categories: ['Documentation']
-
-featured_image: ''
-featured_image_preview: ''
-
-comment: true
-toc: true
-autoCollapseToc: true
-math: true
----
-
-This is a [LoveIt](https://github.com/dillonzq/LoveIt) theme preview and documentation page.
-
-
\ No newline at end of file
diff --git a/exampleSite/content/posts/emoji-support.md b/exampleSite/content/posts/emoji-support.md
new file mode 100644
index 0000000..eb1ecb5
--- /dev/null
+++ b/exampleSite/content/posts/emoji-support.md
@@ -0,0 +1,66 @@
+---
+author: "Hugo Authors"
+author_link: "https://gohugo.io/"
+title: "Emoji Support"
+date: 2019-10-01T17:55:28+08:00
+lastmod: 2019-10-01T17:55:28+08:00
+draft: false
+description: "Guide to emoji usage in Hugo"
+show_in_homepage: true
+description_as_summary: false
+license: ""
+
+tags: [
+ "emoji",
+]
+categories: [
+ "theme",
+]
+
+featured_image: /images/emoji.jpg
+featured_image_preview: ""
+
+comment: true
+toc: false
+auto_collapse_toc: true
+math: false
+---
+
+Emoji can be enabled in a Hugo project in a number of ways.
+
+
+
+The [`emojify`](https://gohugo.io/functions/emojify/) function can be called directly in templates or [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes).
+
+To enable emoji globally, set `enableEmoji` to `true` in your site’s [configuration](https://gohugo.io/getting-started/configuration/) and then you can type emoji shorthand codes directly in content files; e.g.
+
+
🙈:see_no_evil:🙉:hear_no_evil:🙊:speak_no_evil:
+
+
+The [Emoji cheat sheet](http://www.emoji-cheat-sheet.com/) is a useful reference for emoji shorthand codes.
+
+***
+
+**N.B.** The above steps enable Unicode Standard emoji characters and sequences in Hugo, however the rendering of these glyphs depends on the browser and the platform. To style the emoji you can either use a third party emoji font or a font stack; e.g.
+
+{{< highlight html >}}
+.emoji {
+ font-family: Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols;
+}
+{{< /highlight >}}
+
+{{< css.inline >}}
+
+{{< /css.inline >}}
diff --git a/exampleSite/content/posts/markdown-syntax.md b/exampleSite/content/posts/markdown-syntax.md
new file mode 100644
index 0000000..59f5390
--- /dev/null
+++ b/exampleSite/content/posts/markdown-syntax.md
@@ -0,0 +1,194 @@
+---
+author: "Hugo Authors"
+author_link: "https://gohugo.io/"
+title: "Markdown Syntax Guide"
+date: 2019-12-01T21:57:40+08:00
+lastmod: 2020-01-01T16:45:40+08:00
+draft: false
+description: "Sample article showcasing basic Markdown syntax and formatting for HTML elements."
+show_in_homepage: true
+description_as_summary: false
+license: ""
+
+tags: [
+ "markdown",
+ "css",
+ "html",
+]
+categories: [
+ "theme",
+]
+
+featured_image: /images/markdown.png
+featured_image_preview: ""
+
+comment: true
+toc: true
+auto_collapse_toc: true
+math: true
+---
+
+This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme.
+
+
+## Headings
+
+The following HTML `
`—`
` elements represent six levels of section headings. `
` is the highest section level while `
` is the lowest.
+
+## H2
+### H3
+#### H4
+##### H5
+###### H6
+
+## Paragraph
+
+Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum,
+voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit
+peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur,
+offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur,
+cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea
+corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum
+fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate
+dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer
+sperchicium faceata tiustia prat.
+
+Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is
+sinveli squiatum, core et que aut hariosam ex eat.
+
+## Blockquotes
+
+The blockquote element represents content that is quoted from another source, optionally
+with a citation which must be within a `footer` or `cite` element, and optionally with
+in-line changes such as annotations and abbreviations.
+
+### Blockquote without attribution
+
+> Tiam, ad mint andaepu dandae nostion secatur sequo quae.
+> **Note** that you can use *Markdown syntax* within a blockquote.
+
+### Blockquote with attribution
+
+> Don't communicate by sharing memory, share memory by communicating.
+> — Rob Pike[^1]
+
+[^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015.
+
+## Tables
+
+Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box.
+
+ Name | Age
+--------|------
+ Bob | 27
+ Alice | 23
+
+### Inline Markdown within tables
+
+| Inline | Markdown | In | Table |
+| ---------- | --------- | ----------------- | ---------- |
+| *italics* | **bold** | ~~strikethrough~~ | `code` |
+
+## Code
+
+### Inline code
+
+Inline code: `print`
+
+### Code block with backticks
+
+```html {hl_lines=["8-9"],linenostart=10}
+
+
+
+
+ Example HTML5 Document
+
+
+
Test
+
+
+```
+
+### Code block indented with four spaces
+
+
+
+
+
+ Example HTML5 Document
+
+
+
Test
+
+
+
+### Code block with Hugo's internal highlight shortcode
+
+{{< highlight html "linenos=false" >}}
+
+
+
+
+ Example HTML5 Document
+
+
+
Test
+
+
+{{< /highlight >}}
+
+## List Types
+
+### Ordered List
+
+1. First item
+2. Second item
+3. Third item
+
+### Unordered List
+
+* List item
+* Another item
+* And another item
+
+### Nested list
+
+* Item
+ 1. First Sub-item
+ 2. Second Sub-item
+
+## Other Elements — abbr, sub, sup, kbd, mark
+
+* `abbr`
+
+ GIF is a bitmap image format.
+
+* Or ruby annotation
+
+ [GIF]^(Graphics Interchange Format) is a bitmap image format.
+
+* `sub`/`sup`
+
+ H2O
+
+ Xn + Yn = Zn
+
+* Or `LaTex` formula
+
+ * Block
+
+ $$ H_2O $$
+
+ $$ X^n+Y^n=Z^n $$
+
+ * Inline: \\( H_2O \\) \\( X^n+Y^n=Z^n \\)
+
+* `kbd`
+
+ Press CTRL+ALT+Delete to end the session.
+
+* `mark`
+
+ Most salamanders are nocturnal, and hunt for insects, worms,
+ and other small creatures.
diff --git a/exampleSite/content/posts/placeholder-text.md b/exampleSite/content/posts/placeholder-text.md
new file mode 100644
index 0000000..7fcc790
--- /dev/null
+++ b/exampleSite/content/posts/placeholder-text.md
@@ -0,0 +1,76 @@
+---
+author: "Hugo Authors"
+author_link: "https://gohugo.io/"
+title: "Placeholder Text"
+date: 2019-08-01T18:02:41+08:00
+lastmod: 2019-08-01T18:02:41+08:00
+draft: false
+description: "Lorem Ipsum Dolor Si Amet"
+show_in_homepage: true
+description_as_summary: false
+license: ""
+
+tags: [
+ "markdown",
+ "text",
+]
+categories: [
+ "theme",
+]
+
+featured_image: ""
+featured_image_preview: ""
+
+comment: true
+toc: false
+auto_collapse_toc: true
+math: false
+---
+
+Lorem est tota propiore conpellat pectoribus de
+pectora summo. Redit teque digerit hominumque toris verebor lumina non cervice
+subde tollit usus habet Arctonque, furores quas nec ferunt. Quoque montibus nunc
+caluere tempus inhospita parcite confusaque translucet patri vestro qui optatis
+lumine cognoscere flos nubis! Fronde ipsamque patulos Dryopen deorum.
+
+1. Exierant elisi ambit vivere dedere
+2. Duce pollice
+3. Eris modo
+4. Spargitque ferrea quos palude
+
+Rursus nulli murmur; hastile inridet ut ab gravi sententia! Nomine potitus
+silentia flumen, sustinet placuit petis in dilapsa erat sunt. Atria
+tractus malis.
+
+1. Comas hunc haec pietate fetum procerum dixit
+2. Post torum vates letum Tiresia
+3. Flumen querellas
+4. Arcanaque montibus omnes
+5. Quidem et
+
+## Vagus elidunt
+
+
+
+[The Van de Graaf Canon](https://en.wikipedia.org/wiki/Canons_of_page_construction#Van_de_Graaf_canon)
+
+### Mane refeci capiebant unda mulcebat
+
+Victa caducifer, malo vulnere contra
+dicere aurato, ludit regale, voca! Retorsit colit est profanae esse virescere
+furit nec; iaculi matertera et visa est, viribus. Divesque creatis, tecta novat collumque vulnus est, parvas. **Faces illo pepulere** tempus adest. Tendit flamma, ab opes virum sustinet, sidus sequendo urbis.
+
+Iubar proles corpore raptos vero auctor imperium; sed et huic: manus caeli
+Lelegas tu lux. Verbis obstitit intus oblectamina fixis linguisque ausus sperare
+Echionides cornuaque tenent clausit possit. Omnia putatur. Praeteritae refert
+ausus; ferebant e primus lora nutat, vici quae mea ipse. Et iter nil spectatae
+vulnus haerentia iuste et exercebat, sui et.
+
+Eurytus Hector, materna ipsumque ut Politen, nec, nate, ignari, vernum cohaesit sequitur. Vel **mitis temploque** vocatus, inque alis, *oculos nomen* non silvis corpore coniunx ne displicet illa. Crescunt non unus, vidit visa quantum inmiti flumina mortis facto sic: undique a alios vincula sunt iactata abdita! Suspenderat ego fuit tendit: luna, ante urbem
+Propoetides **parte**.
+
+{{< css.inline >}}
+
+{{< /css.inline >}}
diff --git a/exampleSite/content/posts/rich-content.md b/exampleSite/content/posts/rich-content.md
new file mode 100644
index 0000000..f26c862
--- /dev/null
+++ b/exampleSite/content/posts/rich-content.md
@@ -0,0 +1,61 @@
+---
+author: "Hugo Authors"
+author_link: "https://gohugo.io/"
+title: "Rich Content"
+date: 2019-09-01T18:06:32+08:00
+lastmod: 2019-09-01T18:06:32+08:00
+draft: false
+description: "A brief description of Hugo Shortcodes"
+show_in_homepage: true
+description_as_summary: false
+license: ""
+
+tags: [
+ "shortcodes",
+ "privacy",
+]
+categories: [
+ "theme",
+]
+
+featured_image: /images/hugo.png
+featured_image_preview: ""
+
+comment: true
+toc: false
+auto_collapse_toc: true
+math: false
+---
+
+Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-management/shortcodes/#use-hugo-s-built-in-shortcodes) for rich content, along with a [Privacy Config](https://gohugo.io/about/hugo-and-gdpr/) and a set of Simple Shortcodes that enable static and no-JS versions of various social media embeds.
+
+
+---
+
+## Instagram Simple Shortcode
+
+{{< instagram_simple BGvuInzyFAe hidecaption >}}
+
+
+
+---
+
+## YouTube Privacy Enhanced Shortcode
+
+{{< youtube ZJthWmvUzzc >}}
+
+
+
+---
+
+## Twitter Simple Shortcode
+
+{{< twitter_simple 1085870671291310081 >}}
+
+
+
+---
+
+## Vimeo Simple Shortcode
+
+{{< vimeo_simple 48912912 >}}
diff --git a/exampleSite/static/images/emoji.jpg b/exampleSite/static/images/emoji.jpg
new file mode 100644
index 0000000..5758440
Binary files /dev/null and b/exampleSite/static/images/emoji.jpg differ
diff --git a/exampleSite/static/images/hugo.png b/exampleSite/static/images/hugo.png
new file mode 100644
index 0000000..10265e4
Binary files /dev/null and b/exampleSite/static/images/hugo.png differ
diff --git a/exampleSite/static/images/markdown.png b/exampleSite/static/images/markdown.png
new file mode 100644
index 0000000..b31e1a5
Binary files /dev/null and b/exampleSite/static/images/markdown.png differ
diff --git a/exampleSite/zh/config.toml b/exampleSite/zh/config.toml
index b431242..701b502 100644
--- a/exampleSite/zh/config.toml
+++ b/exampleSite/zh/config.toml
@@ -1,38 +1,76 @@
baseURL = "https://example.com/"
-languageCode = "zh" # 网站语言标识
-defaultContentLanguage = "zh" # [en, zh, ...] 设定主题的国际化
-title = "LoveIt 主题" # 网站标题
-theme = "LoveIt" # 主题
-enableGitInfo = false # 是否使用 git 信息来生成文章的上次修改时间
-hasCJKLanguage = true # 是否包括中日韩文字
-paginate = 12 # 默认每页列表显示的文章数目
-enableEmoji = true # 是否使用 emoji 代码
-enableRobotsTXT = true # 是否使用 robots.txt
-googleAnalytics = "" # [UA-XXXXXXXX-X] 谷歌分析代号
-disqusShortname = "dillonzq" # Disqus 的用户名,用来在文章中启用 Disqus 评论系统
+# 网站语言
+languageCode = "zh"
+# [en, zh, ...] 设定主题的国际化
+defaultContentLanguage = "zh"
+# 网站标题
+title = "LoveIt 主题"
+# 主题
+theme = "LoveIt"
+# 是否使用 git 信息来生成文章的上次修改时间
+enableGitInfo = false
+# 是否包括中日韩文字
+hasCJKLanguage = true
+# 默认每页列表显示的文章数目
+paginate = 12
+# 是否使用 emoji 代码
+enableEmoji = true
+# 是否使用 robots.txt
+enableRobotsTXT = true
+# [UA-XXXXXXXX-X] 谷歌分析代号
+googleAnalytics = ""
+# 版权描述,仅仅用于 SEO
copyright = "This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License."
- # 版权描述,仅仅用于 SEO
+# 日期格式
+dateFormatToUse = "2006-01-02"
- #### 代码高亮设置 (https://gohugo.io/content-management/syntax-highlighting)
-pygmentsOptions = "linenos=table"
-pygmentsCodefences = true
-pygmentsUseClasses = true
-pygmentsCodefencesGuessSyntax = true
+# Hugo 解析文档的配置
+[markup]
+ # 代码高亮设置 (https://gohugo.io/content-management/syntax-highlighting)
+ [markup.highlight]
+ codeFences = true
+ guessSyntax = true
+ lineNoStart = 1
+ lineNos = true
+ lineNumbersInTable = true
+ noClasses = false
+ style = "monokai"
+ tabWidth = 4
+ # Goldmark 是 Hugo 0.60 以来的默认 Markdown 解析库
+ [markup.goldmark]
+ [markup.goldmark.extensions]
+ definitionList = true
+ footnote = true
+ linkify = true
+ strikethrough = true
+ table = true
+ taskList = true
+ typographer = true
+ [markup.goldmark.renderer]
+ # 是否在文档中直接使用 HTML 标签
+ unsafe = true
+ # 目录设置
+ [markup.tableOfContents]
+ startLevel = 2
+ endLevel = 6
-staticDir = ["../static", "../../assets/others"] # 静态文件目录
+# 作者信息
+[author]
+ name = "xxxx"
+ link = ""
-[author] #### 作者信息
- name = "XXXX"
-
-[sitemap] #### Sitemap 信息
+# 网站地图信息
+[sitemap]
changefreq = "weekly"
filename = "sitemap.xml"
priority = 0.5
-[Permalinks] #### Permalinks 信息 (https://gohugo.io/content-management/urls/#permalinks)
+# Permalinks 信息 (https://gohugo.io/content-management/urls/#permalinks)
+[Permalinks]
posts = ":year/:month/:filename"
-[menu] #### 菜单信息
+# 菜单信息
+[menu]
[[menu.main]]
identifier = "posts"
name = "文章"
@@ -59,41 +97,70 @@ staticDir = ["../static", "../../assets/others"] # 静态文件目录
[[menu.main]]
identifier = "en"
- name = ''
+ pre = ''
+ name = ""
+ title = "English"
url = "https://hugo-loveit-en.netlify.com"
weight = 5
[params]
- version = "5.x" # LoveIt 主题版本
- description = "LoveIt 主题演示" # 网站介绍
- keywords = ["XXXX", "Theme", "Hugo"] # 网站关键词
+ # LoveIt 主题版本
+ version = "0.1.X"
+ # 网站描述
+ description = "关于 LoveIt 主题"
+ # 网站关键词
+ keywords = ["Theme", "Hugo"]
- #### 主页配置
- home_mode = "post" # [post, other] 主页模式
- home_paginate = 6 # post 主页模式下,主页每页显示的文章数目,默认等于 paginate 值
- avatar = "images/avatar.png" # 主页显示的头像路径
- subtitle = "一个简洁、优雅且高效的 Hugo 主题" # 主页显示的网站副标题
+ # 主页信息设置
+ ## [post, other] 主页模式
+ home_mode = "post"
+ ## 主页在 post 模式下每页 post 显示数量
+ home_paginate = 6
+ ## 主页显示头像的 URL
+ avatar = "images/avatar.png"
+ ## 主页显示的网站副标题
+ subtitle = "一个简洁、优雅且高效的 Hugo 主题"
- socialShare = true # 在文章页面是否使用分享功能
+ # 在文章页面是否使用分享功能
+ socialShare = true
- #### 页面底部版权信息设置
- since = 2018 # 网站创立年份
- icp = '' # ICP 备案信息,仅在中国使用 (允许使用 HTML 格式)
+ # 页面底部版权信息设置
+ ## 网站创立年份
+ since = 2019
+ ## ICP 备案信息,仅在中国使用 (允许使用 HTML 格式)
+ icp = ""
+ ## 许可协议信息 (允许使用 HTML 格式)
license= 'CC BY-NC 4.0'
- # 许可协议信息 (允许使用 HTML 格式)
- gitRepo = "" # 用于生成文章上次修改时间的公共 git 仓库路径,仅在 enableGitInfo 设为 true 时有效
- linkToMarkdown = true # 是否在文章页面显示原始 Markdown 文档链接
+ # 用于生成文章上次修改时间的公共 git 仓库路径,仅在 enableGitInfo 设为 true 时有效
+ gitRepo = ""
- #### 网站验证代码,用于 Google/Bing/Yandex/Pinterest/Baidu
+ # 数学公式 (KaTeX https://katex.org/)
+ [params.math]
+ enable = true
+ block_left_delimiter = ""
+ block_right_delimiter = ""
+ inline_left_delimiter = "$"
+ inline_right_delimiter = "$"
+ # KaTeX 插件 copy_tex
+ copy_tex = true
+ # KaTeX 插件 mhchem
+ mhchem = true
+
+ # 是否在文章页面显示原始 Markdown 文档链接
+ linkToMarkdown = true
+
+ # 网站验证代码,用于 Google/Bing/Yandex/Pinterest/Baidu
google_verification = ""
bing_verification = ""
yandex_verification = ""
pinterest_verification = ""
baidu_verification = ""
- [params.cdn] #### CSS 和 JS 文件的 CDN 设置
- fontawesome_free_css = '' # 例如 ''
+ # CSS 和 JS 文件的 CDN 设置
+ [params.cdn]
+ ## 例如 ''
+ fontawesome_free_css = ''
animate_css = ''
gitalk_css = ''
gitalk_js = ''
@@ -104,6 +171,9 @@ staticDir = ["../static", "../../assets/others"] # 静态文件目录
katex_css = ''
katex_js = ''
katex_auto_render_js = ''
+ katex_copy_tex_css = ''
+ katex_copy_tex_js = ''
+ katex_mhchem_js = ''
mermaid_js = ''
echarts_js = ''
echarts_macarons_js = ''
@@ -113,15 +183,17 @@ staticDir = ["../static", "../../assets/others"] # 静态文件目录
aplayer_js = ''
meting_js = ''
- [params.gravatar] # Gravatar 信息,用于优先在主页显示的头像
+ # Gravatar 信息,用于优先在主页显示的头像
+ [params.gravatar]
email = ""
- [params.social] # 主页的社交信息设置
+ # 主页的社交信息设置
+ [params.social]
GitHub = "xxxx"
Linkedin = "xxxx"
Twitter = "xxxx"
#Instagram = "xxxx"
- #Email = "xxxx"
+ Email = "xxxx@outlook.com"
Facebook = "xxxx"
Telegram = "xxxx"
#Medium = "xxxx"
@@ -135,6 +207,7 @@ staticDir = ["../static", "../../assets/others"] # 静态文件目录
#Pinterest = "xxxx"
#Reddit = "xxxx"
#Codepen = "xxxx"
+ #FreeCodeCamp = "xxxx"
#Bitbucket = "xxxx"
#Stackoverflow = "xxxx"
#Weibo = "xxxx"
@@ -176,7 +249,8 @@ staticDir = ["../static", "../../assets/others"] # 静态文件目录
#Thingiverse = "xxxx"
#Devto = "xxxx"
- [params.share] # 文章页面的分享信息设置
+ # 文章页面的分享信息设置
+ [params.share]
enable = true
Twitter = true
Facebook = true
@@ -189,57 +263,79 @@ staticDir = ["../static", "../../assets/others"] # 静态文件目录
#VKontakte = true
#Weibo = true
- [params.publisher] # 出版者信息,仅用于 SEO
- name = "XXXX"
+ # 出版者信息,仅用于 SEO
+ [params.publisher]
+ name = "xxxx"
[params.publisher.logo]
url = "logo.png"
width = 127
height = 40
- [params.logo] # 网站图标信息,仅用于 SEO
+ # 网站图标信息,仅用于 SEO
+ [params.logo]
url = "logo.png"
width = 127
height = 40
- [params.image] # 网站图片信息,仅用于 SEO
+ # 网站图标信息,仅用于 SEO
+ [params.image]
url = "cover.png"
width = 800
height = 600
- [params.gitalk] # Gittalk 评论系统设置 (https://github.com/gitalk/gitalk)
+ # Disqus 评论系统设置 (https://disqus.com/)
+ [params.disqus]
+ # Disqus 的用户名,用来在文章中启用 Disqus 评论系统
+ shortname = "dillonzq"
+
+ # Gittalk 评论系统设置 (https://github.com/gitalk/gitalk)
+ [params.gitalk]
owner = ""
repo = ""
clientId = ""
clientSecret = ""
- [params.valine] # Valine 评论系统设置 (https://github.com/xCss/Valine)
+ # Valine 评论系统设置 (https://github.com/xCss/Valine)
+ [params.valine]
enable = false
appId = ""
appKey = ""
notify = false
verify = true
avatar = "mp"
- placeholder = "Your comment ..."
+ placeholder = "你的评论 ..."
visitor = true
recordIP = true
-[privacy] #### 隐私信息设置 (https://gohugo.io/about/hugo-and-gdpr/)
+ # Facebook 评论系统设置 (https://developers.facebook.com/docs/plugins/comments)
+ [params.facebook]
+ enable = false
+ width = "100%"
+ numPosts = 10
+ appId = ""
+ languageCode = "en_US"
+
+# 隐私信息设置 (https://gohugo.io/about/hugo-and-gdpr/)
+[privacy]
[privacy.googleAnalytics]
anonymizeIP = true
[privacy.youtube]
privacyEnhanced = true
-[mediaTypes] #### 用于输出 Markdown 格式文档的设置
+# 用于输出 Markdown 格式文档的设置
+[mediaTypes]
[mediaTypes."text/plain"]
suffixes = ["md"]
-[outputFormats.MarkDown] #### 用于输出 Markdown 格式文档的设置
+# 用于输出 Markdown 格式文档的设置
+[outputFormats.MarkDown]
mediaType = "text/plain"
isPlainText = true
isHTML = false
-[outputs] #### 用于输出 Markdown 格式文档的设置
+# 用于 Hugo 输出文档的设置
+[outputs]
home = ["HTML", "RSS"]
page = ["HTML", "MarkDown"]
section = ["HTML", "RSS"]
diff --git a/exampleSite/zh/config/css/_custom.scss b/exampleSite/zh/config/css/_custom.scss
new file mode 100644
index 0000000..96aca03
--- /dev/null
+++ b/exampleSite/zh/config/css/_custom.scss
@@ -0,0 +1,15 @@
+// ==============================
+// Custom style
+// 自定义样式
+// ==============================
+// You can override the variables in assets/css/_variables.scss to customize the style
+// 您可以覆盖 assets/css/_variables.scss 中的变量以自定义样式
+
+@import url(https://fonts.googleapis.com/css?family=Lato:100,300,400,700,900);
+
+$global-font-family: Lato, -apple-system, BlinkMacSystemFont, PingFang SC, Microsoft Yahei, Segoe UI, Helvetica, Arial, sans-serif, Segoe UI Emoji;
+
+
+@import url('https://fonts.googleapis.com/css?family=Fira+Mono:400,700&display=swap&subset=latin-ext');
+
+$code-font-family: Fira Mono, Source Code Pro, Menlo, Consolas, Monaco, monospace;
diff --git a/exampleSite/zh/content/posts/Basic-Markdown-Preview.md b/exampleSite/zh/content/posts/Basic-Markdown-Preview.md
index 797dd67..86b94aa 100644
--- a/exampleSite/zh/content/posts/Basic-Markdown-Preview.md
+++ b/exampleSite/zh/content/posts/Basic-Markdown-Preview.md
@@ -1,28 +1,35 @@
---
+author: ""
+author_link: ""
title: "Markdown 基本语法预览"
date: 2019-08-25T16:22:42+08:00
lastmod: 2019-08-25T16:22:42+08:00
draft: false
description: "这是一篇用于预览 Markdown 基本语法的文章。"
show_in_homepage: true
-show_description: false
-license: ''
+description_as_summary: false
+license: ""
-tags: ['Hugo', '主题']
-categories: ['预览']
+tags: [
+ "Hugo",
+ "主题",
+]
+categories: [
+ "预览",
+]
-featu红色_image: ''
-featu红色_image_preview: ''
+featured_image: ""
+featured_image_preview: ""
comment: true
toc: true
-autoCollapseToc: false
+auto_collapse_toc: true
math: true
---
这是一篇用于预览 :(fab fa-markdown): Markdown 基本语法的文章。
-文章内容基于 [GitHub Flavo红色 Markdown Spec](https://github.github.com/gfm)。
+文章内容基于 [GitHub Flavored Markdown Spec](https://github.github.com/gfm)。
不包含复杂的规则说明,仅仅展示 GFM 所约定的 Markdown 基本语法。
@@ -31,10 +38,10 @@ math: true
## 1 引言
:(fab fa-markdown): **Markdown** 是一种用于编写结构化文档的纯文本格式。它基于电子邮件和论坛文章的格式所约定。
-它由 John Gruber (在 Aaron Swartz 的帮助下)开发,于 2004 年以语法描述和用于将 Markdown 转换为 HTML 的 Perl 脚本(Markdown.pl)的形式发布。
+它由 John Gruber (在 Aaron Swartz 的帮助下)开发,于 2004 年以语法描述和用于将 Markdown 转换为 HTML 的 Perl 脚本 (Markdown.pl) 的形式发布。
在接下来的十年中,许多实现被开发出来。一些用脚注、表和其他文档元素的约定扩展了原始 Markdown 语法。
-有些允许 Markdown 文档以 HTML 以外的格式呈现。 像 红色dit,StackOverflow 和 GitHub 这样的网站有上百万的用户在使用 Markdown。
+有些允许 Markdown 文档以 HTML 以外的格式呈现。 像 reddit,StackOverflow 和 GitHub 这样的网站有上百万的用户在使用 Markdown。
Markdown 开始被应用于网络以外的领域,包括作者书籍、文章、幻灯片、信件和课堂笔记。
## 2 块和内联元素
@@ -428,7 +435,7 @@ Web image

Local image
-
+
contact@revolunet.com
@@ -449,7 +456,7 @@ Web image

Local image
-
+
@@ -481,10 +488,10 @@ is maintained by the W3C.
The HTML specification
is maintained by the W3C.
-## Unorde红色 List
+## Unordered List
```
-Unorde红色 List
+Unordered List
- item 1
* item A
@@ -498,7 +505,7 @@ Unorde红色 List
- item 3
```
-Unorde红色 List
+Unordered List
- item 1
* item A
@@ -511,11 +518,10 @@ Unorde红色 List
- item 2
- item 3
-
-## Orde红色 List
+## Ordered List
```
-Orde红色 List
+Ordered List
1. item 1
1. item A
@@ -529,7 +535,7 @@ Orde红色 List
3. item 3
```
-Orde红色 List
+Ordered List
1. item 1
1. item A
@@ -542,9 +548,6 @@ Orde红色 List
2. item 2
3. item 3
-
-
-
## Mixed Lists
`Really Mixed Lists` should break with `sane_lists` on.
@@ -581,13 +584,13 @@ Really Mixed Lists
Mixed Lists
- item 1
- * [X] item A
- * [ ] item B
- more text
- 1. item a
- 2. itemb
- 3. item c
- * [X] item C
+ * [X] item A
+ * [ ] item B
+ more text
+ 1. item a
+ 2. itemb
+ 3. item c
+ * [X] item C
- item 2
- item 3
@@ -609,15 +612,14 @@ Really Mixed Lists
```
This is a block.
-
+
This is more of a block.
```
This is a block.
-
- This is more of a block.
+ This is more of a block.
## Block Quotes
@@ -681,14 +683,14 @@ function doIt() {
```
| _颜色_ | 水果 | 蔬菜 |
| ------------- |:---------------:| -----------------:|
-| 红色 | *苹果* | [辣椒](#Tables) |
+| red | *苹果* | [辣椒](#Tables) |
| ~~橙色~~ | 橘子 | **胡萝卜** |
| 绿色 | ~~***梨子***~~ | 菠菜 |
```
| _颜色_ | 水果 | 蔬菜 |
| ------------- |:---------------:| ------------:|
-| 红色 | *苹果* | [辣椒](#Tables) |
+| red | *苹果* | [辣椒](#Tables) |
| ~~橙色~~ | 橘子 | **胡萝卜** |
| 绿色 | ~~***梨子***~~ | 菠菜 |
@@ -810,11 +812,9 @@ as a fenced code block.
> Not a problem!
> ```
-# Others
-
## Github Emoji {#section-7}
-```
+```markdown
This is a test for emoji :smile:. The emojis are images linked to github assets :octocat:.
```
@@ -822,23 +822,23 @@ This is a test for emoji :smile:. The emojis are images linked to github assets
### People
-:+1::-1::alien::angel::anger::angry::anguished::astonished::baby::blue_heart::blush::boom::bow::bowtie::boy::bride_with_veil::broken_heart::bust_in_silhouette::busts_in_silhouette::clap::cold_sweat::collision::confounded::confused::construction_worker::cop::couple::couple_with_heart::couplekiss::cry::crying_cat_face::cupid::dancer::dancers::dash::disappointed::disappointed_relieved::dizzy::dizzy_face::droplet::ear::exclamation::expressionless::eyes::facepunch::family::fearful::feelsgood::feet::finnadie::fire::fist::flushed::frowning::fu::girl::goberserk::godmode::绿色_heart::grey_exclamation::grey_question::grimacing::grin::grinning::guardsman::haircut::hand::hankey::hear_no_evil::heart::heart_eyes::heart_eyes_cat::heartbeat::heartpulse::hurtrealbad::hushed::imp::information_desk_person::innocent::japanese_goblin::japanese_ogre::joy::joy_cat::kiss::kissing::kissing_cat::kissing_closed_eyes::kissing_heart::kissing_smiling_eyes::laughing::lips::love_letter::man::man_with_gua_pi_mao::man_with_turban::mask::massage::metal::muscle::musical_note::nail_care::neckbeard::neutral_face::no_good::no_mouth::nose::notes::ok_hand::ok_woman::older_man::older_woman::open_hands::open_mouth::pensive::persevere::person_frowning::person_with_blond_hair::person_with_pouting_face::point_down::point_left::point_right::point_up::point_up_2::poop::pouting_cat::pray::princess::punch::purple_heart::question::rage::rage1::rage2::rage3::rage4::raised_hand::raised_hands::raising_hand::relaxed::relieved::revolving_hearts::runner::running::satisfied::scream::scream_cat::see_no_evil::shit::skull::sleeping::sleepy::smile::smile_cat::smiley::smiley_cat::smiling_imp::smirk::smirk_cat::sob::sparkles::sparkling_heart::speak_no_evil::speech_balloon::star::star2::stuck_out_tongue::stuck_out_tongue_closed_eyes::stuck_out_tongue_winking_eye::sunglasses::suspect::sweat::sweat_drops::sweat_smile::thought_balloon::thumbsdown::thumbsup::ti红色_face::tongue::triumph::trollface::two_hearts::two_men_holding_hands::two_women_holding_hands::unamused::v::walking::wave::weary::wink::woman::worried::yellow_heart::yum::zzz:
+:+1::-1::alien::angel::anger::angry::anguished::astonished::baby::blue_heart::blush::boom::bow::bowtie::boy::bride_with_veil::broken_heart::bust_in_silhouette::busts_in_silhouette::clap::cold_sweat::collision::confounded::confused::construction_worker::cop::couple::couple_with_heart::couplekiss::cry::crying_cat_face::cupid::dancer::dancers::dash::disappointed::disappointed_relieved::dizzy::dizzy_face::droplet::ear::exclamation::expressionless::eyes::facepunch::family::fearful::feelsgood::feet::finnadie::fire::fist::flushed::frowning::fu::girl::goberserk::godmode::green_heart::grey_exclamation::grey_question::grimacing::grin::grinning::guardsman::haircut::hand::hankey::hear_no_evil::heart::heart_eyes::heart_eyes_cat::heartbeat::heartpulse::hurtrealbad::hushed::imp::information_desk_person::innocent::japanese_goblin::japanese_ogre::joy::joy_cat::kiss::kissing::kissing_cat::kissing_closed_eyes::kissing_heart::kissing_smiling_eyes::laughing::lips::love_letter::man::man_with_gua_pi_mao::man_with_turban::mask::massage::metal::muscle::musical_note::nail_care::neckbeard::neutral_face::no_good::no_mouth::nose::notes::ok_hand::ok_woman::older_man::older_woman::open_hands::open_mouth::pensive::persevere::person_frowning::person_with_blond_hair::person_with_pouting_face::point_down::point_left::point_right::point_up::point_up_2::poop::pouting_cat::pray::princess::punch::purple_heart::question::rage::rage1::rage2::rage3::rage4::raised_hand::raised_hands::raising_hand::relaxed::relieved::revolving_hearts::runner::running::satisfied::scream::scream_cat::see_no_evil::shit::skull::sleeping::sleepy::smile::smile_cat::smiley::smiley_cat::smiling_imp::smirk::smirk_cat::sob::sparkles::sparkling_heart::speak_no_evil::speech_balloon::star::star2::stuck_out_tongue::stuck_out_tongue_closed_eyes::stuck_out_tongue_winking_eye::sunglasses::suspect::sweat::sweat_drops::sweat_smile::thought_balloon::thumbsdown::thumbsup::tired_face::tongue::triumph::trollface::two_hearts::two_men_holding_hands::two_women_holding_hands::unamused::v::walking::wave::weary::wink::woman::worried::yellow_heart::yum::zzz:
### Nature
-:ant::baby_chick::bear::bee::beetle::bird::blossom::blowfish::boar::bouquet::bug::cactus::camel::cat::cat2::cherry_blossom::chestnut::chicken::cloud::cow::cow2::crescent_moon::crocodile::cyclone::deciduous_tree::dog::dog2::dolphin::dragon::dragon_face::dromedary_camel::ear_of_rice::earth_africa::earth_americas::earth_asia::elephant::ever绿色_tree::fallen_leaf::first_quarter_moon::first_quarter_moon_with_face::fish::foggy::four_leaf_clover::frog::full_moon::full_moon_with_face::globe_with_meridians::goat::hamster::hatched_chick::hatching_chick::herb::hibiscus::honeybee::horse::koala::last_quarter_moon::last_quarter_moon_with_face::leaves::leopard::maple_leaf::milky_way::monkey::monkey_face::moon::mouse::mouse2::mushroom::new_moon::new_moon_with_face::night_with_stars::ocean::octocat::octopus::ox::palm_tree::panda_face::partly_sunny::paw_prints::penguin::pig::pig2::pig_nose::poodle::rabbit::rabbit2::racehorse::ram::rat::rooster::rose::seedling::sheep::shell::snail::snake::snowflake::snowman::squirrel::sun_with_face::sunflower::sunny::tiger::tiger2::tropical_fish::tulip::turtle::umbrella::volcano::waning_crescent_moon::waning_gibbous_moon::water_buffalo::waxing_crescent_moon::waxing_gibbous_moon::whale::whale2::wolf::zap:
+:ant::baby_chick::bear::bee::beetle::bird::blossom::blowfish::boar::bouquet::bug::cactus::camel::cat::cat2::cherry_blossom::chestnut::chicken::cloud::cow::cow2::crescent_moon::crocodile::cyclone::deciduous_tree::dog::dog2::dolphin::dragon::dragon_face::dromedary_camel::ear_of_rice::earth_africa::earth_americas::earth_asia::elephant::evergreen_tree::fallen_leaf::first_quarter_moon::first_quarter_moon_with_face::fish::foggy::four_leaf_clover::frog::full_moon::full_moon_with_face::globe_with_meridians::goat::hamster::hatched_chick::hatching_chick::herb::hibiscus::honeybee::horse::koala::last_quarter_moon::last_quarter_moon_with_face::leaves::leopard::maple_leaf::milky_way::monkey::monkey_face::moon::mouse::mouse2::mushroom::new_moon::new_moon_with_face::night_with_stars::ocean::octocat::octopus::ox::palm_tree::panda_face::partly_sunny::paw_prints::penguin::pig::pig2::pig_nose::poodle::rabbit::rabbit2::racehorse::ram::rat::rooster::rose::seedling::sheep::shell::snail::snake::snowflake::snowman::squirrel::sun_with_face::sunflower::sunny::tiger::tiger2::tropical_fish::tulip::turtle::umbrella::volcano::waning_crescent_moon::waning_gibbous_moon::water_buffalo::waxing_crescent_moon::waxing_gibbous_moon::whale::whale2::wolf::zap:
### Objects
-:8ball::alarm_clock::苹果::art::athletic_shoe::baby_bottle::balloon::bamboo::banana::bar_chart::baseball::basketball::bath::bathtub::battery::beer::beers::bell::bento::bicyclist::bikini::birthday::black_joker::black_nib::blue_book::bomb::book::bookmark::bookmark_tabs::books::boot::bowling::bread::briefcase::bulb::cake::calendar::calling::camera::candy::card_index::cd::chart_with_downwards_trend::chart_with_upwards_trend::cherries::chocolate_bar::christmas_tree::clapper::clipboard::closed_book::closed_lock_with_key::closed_umbrella::clubs::cocktail::coffee::computer::confetti_ball::cookie::corn::c红色it_card::crown::crystal_ball::curry::custard::dango::dart::date::diamonds::dollar::dolls::door::doughnut::dress::dvd::e-mail::egg::eggplant::electric_plug::email::envelope::envelope_with_arrow::euro::eyeglasses::fax::file_folder::fireworks::fish_cake::fishing_pole_and_fish::flags::flashlight::flipper::floppy_disk::flower_playing_cards::football::footprints::fork_and_knife::fried_shrimp::fries::game_die::gem::ghost::gift::gift_heart::golf::grapes::绿色_苹果::绿色_book::guitar::gun::hamburger::hammer::handbag::headphones::hearts::high_brightness::high_heel::hocho::honey_pot::horse_racing::hourglass::hourglass_flowing_sand::ice_cream::icecream::inbox_tray::incoming_envelope::iphone::jack_o_lantern::jeans::key::kimono::lantern::ledger::lemon::lipstick::lock::lock_with_ink_pen::lollipop::loop::loud_sound::loudspeaker::low_brightness::mag::mag_right::mahjong::mailbox::mailbox_closed::mailbox_with_mail::mailbox_with_no_mail::mans_shoe::meat_on_bone::mega::melon::memo::microphone::microscope::minidisc::money_with_wings::moneybag::mortar_board::mountain_bicyclist::movie_camera::musical_keyboard::musical_score::mute::name_badge::necktie::newspaper::no_bell::notebook::notebook_with_decorative_cover::nut_and_bolt::oden::open_book::open_file_folder::橙色_book::outbox_tray::package::page_facing_up::page_with_curl::pager::paperclip::peach::pear::pencil::pencil2::phone::pill::pine苹果::pizza::postal_horn::postbox::pouch::poultry_leg::pound::purse::pushpin::radio::ramen::ribbon::rice::rice_ball::rice_cracker::rice_scene::ring::rugby_football::running_shirt_with_sash::sake::sandal::santa::satellite::saxophone::school_satchel::scissors::scroll::seat::shaved_ice::shirt::shoe::shower::ski::smoking::snowboarder::soccer::sound::space_invader::spades::spaghetti::sparkle::sparkler::speaker::stew::straight_ruler::strawberry::surfer::sushi::sweet_potato::swimmer::syringe::tada::tanabata_tree::tangerine::tea::telephone::telephone_receiver::telescope::tennis::toilet::tomato::tophat::triangular_ruler::trophy::tropical_drink::trumpet::tshirt::tv::unlock::vhs::video_camera::video_game::violin::watch::watermelon::wind_chime::wine_glass::womans_clothes::womans_hat::wrench::yen:
+:8ball::alarm_clock::apple::art::athletic_shoe::baby_bottle::balloon::bamboo::banana::bar_chart::baseball::basketball::bath::bathtub::battery::beer::beers::bell::bento::bicyclist::bikini::birthday::black_joker::black_nib::blue_book::bomb::book::bookmark::bookmark_tabs::books::boot::bowling::bread::briefcase::bulb::cake::calendar::calling::camera::candy::card_index::cd::chart_with_downwards_trend::chart_with_upwards_trend::cherries::chocolate_bar::christmas_tree::clapper::clipboard::closed_book::closed_lock_with_key::closed_umbrella::clubs::cocktail::coffee::computer::confetti_ball::cookie::corn::credit_card::crown::crystal_ball::curry::custard::dango::dart::date::diamonds::dollar::dolls::door::doughnut::dress::dvd::e-mail::egg::eggplant::electric_plug::email::envelope::envelope_with_arrow::euro::eyeglasses::fax::file_folder::fireworks::fish_cake::fishing_pole_and_fish::flags::flashlight::flipper::floppy_disk::flower_playing_cards::football::footprints::fork_and_knife::fried_shrimp::fries::game_die::gem::ghost::gift::gift_heart::golf::grapes::green_apple::green_book::guitar::gun::hamburger::hammer::handbag::headphones::hearts::high_brightness::high_heel::hocho::honey_pot::horse_racing::hourglass::hourglass_flowing_sand::ice_cream::icecream::inbox_tray::incoming_envelope::iphone::jack_o_lantern::jeans::key::kimono::lantern::ledger::lemon::lipstick::lock::lock_with_ink_pen::lollipop::loop::loud_sound::loudspeaker::low_brightness::mag::mag_right::mahjong::mailbox::mailbox_closed::mailbox_with_mail::mailbox_with_no_mail::mans_shoe::meat_on_bone::mega::melon::memo::microphone::microscope::minidisc::money_with_wings::moneybag::mortar_board::mountain_bicyclist::movie_camera::musical_keyboard::musical_score::mute::name_badge::necktie::newspaper::no_bell::notebook::notebook_with_decorative_cover::nut_and_bolt::oden::open_book::open_file_folder::orange_book::outbox_tray::package::page_facing_up::page_with_curl::pager::paperclip::peach::pear::pencil::pencil2::phone::pill::pineapple::pizza::postal_horn::postbox::pouch::poultry_leg::pound::purse::pushpin::radio::ramen::ribbon::rice::rice_ball::rice_cracker::rice_scene::ring::rugby_football::running_shirt_with_sash::sake::sandal::santa::satellite::saxophone::school_satchel::scissors::scroll::seat::shaved_ice::shirt::shoe::shower::ski::smoking::snowboarder::soccer::sound::space_invader::spades::spaghetti::sparkle::sparkler::speaker::stew::straight_ruler::strawberry::surfer::sushi::sweet_potato::swimmer::syringe::tada::tanabata_tree::tangerine::tea::telephone::telephone_receiver::telescope::tennis::toilet::tomato::tophat::triangular_ruler::trophy::tropical_drink::trumpet::tshirt::tv::unlock::vhs::video_camera::video_game::violin::watch::watermelon::wind_chime::wine_glass::womans_clothes::womans_hat::wrench::yen:
### Places
-:aerial_tramway::airplane::ambulance::anchor::articulated_lorry::atm::bank::barber::beginner::bike::blue_car::boat::bridge_at_night::bullettrain_front::bullettrain_side::bus::busstop::car::carousel_horse::checke红色_flag::church::circus_tent::city_sunrise::city_sunset::cn::construction::convenience_store::crossed_flags::de::department_store::es::european_castle::european_post_office::factory::ferris_wheel::fire_engine::fountain::fr::fuelpump::gb::helicopter::hospital::hotel::hotsprings::house::house_with_garden::it::izakaya_lantern::japan::japanese_castle::jp::kr::light_rail::love_hotel::minibus::monorail::mount_fuji::mountain_cableway::mountain_railway::moyai::office::oncoming_automobile::oncoming_bus::oncoming_police_car::oncoming_taxi::performing_arts::police_car::post_office::railway_car::rainbow::红色_car::rocket::roller_coaster::rotating_light::round_pushpin::rowboat::ru::sailboat::school::ship::slot_machine::speedboat::stars::station::statue_of_liberty::steam_locomotive::sunrise::sunrise_over_mountains::suspension_railway::taxi::tent::ticket::tokyo_tower::tractor::traffic_light::train::train2::tram::triangular_flag_on_post::trolleybus::truck::uk::us::vertical_traffic_light::warning::wedding:
+:aerial_tramway::airplane::ambulance::anchor::articulated_lorry::atm::bank::barber::beginner::bike::blue_car::boat::bridge_at_night::bullettrain_front::bullettrain_side::bus::busstop::car::carousel_horse::checkered_flag::church::circus_tent::city_sunrise::city_sunset::cn::construction::convenience_store::crossed_flags::de::department_store::es::european_castle::european_post_office::factory::ferris_wheel::fire_engine::fountain::fr::fuelpump::gb::helicopter::hospital::hotel::hotsprings::house::house_with_garden::it::izakaya_lantern::japan::japanese_castle::jp::kr::light_rail::love_hotel::minibus::monorail::mount_fuji::mountain_cableway::mountain_railway::moyai::office::oncoming_automobile::oncoming_bus::oncoming_police_car::oncoming_taxi::performing_arts::police_car::post_office::railway_car::rainbow::red_car::rocket::roller_coaster::rotating_light::round_pushpin::rowboat::ru::sailboat::school::ship::slot_machine::speedboat::stars::station::statue_of_liberty::steam_locomotive::sunrise::sunrise_over_mountains::suspension_railway::taxi::tent::ticket::tokyo_tower::tractor::traffic_light::train::train2::tram::triangular_flag_on_post::trolleybus::truck::uk::us::vertical_traffic_light::warning::wedding:
### Symbols
-:100::1234::a::ab::abc::abcd::accept::aquarius::aries::arrow_backward::arrow_double_down::arrow_double_up::arrow_down::arrow_down_small::arrow_forward::arrow_heading_down::arrow_heading_up::arrow_left::arrow_lower_left::arrow_lower_right::arrow_right::arrow_right_hook::arrow_up::arrow_up_down::arrow_up_small::arrow_upper_left::arrow_upper_right::arrows_clockwise::arrows_counterclockwise::b::baby_symbol::back::baggage_claim::ballot_box_with_check::bangbang::black_circle::black_large_square::black_medium_small_square::black_medium_square::black_small_square::black_square_button::cancer::capital_abcd::capricorn::chart::children_crossing::cinema::cl::clock1::clock10::clock1030::clock11::clock1130::clock12::clock1230::clock130::clock2::clock230::clock3::clock330::clock4::clock430::clock5::clock530::clock6::clock630::clock7::clock730::clock8::clock830::clock9::clock930::congratulations::cool::copyright::curly_loop::currency_exchange::customs::diamond_shape_with_a_dot_inside::do_not_litter::eight::eight_pointed_black_star::eight_spoked_asterisk::end::fast_forward::five::four::free::gemini::hash::heart_decoration::heavy_check_mark::heavy_division_sign::heavy_dollar_sign::heavy_exclamation_mark::heavy_minus_sign::heavy_multiplication_x::heavy_plus_sign::id::ideograph_advantage::information_source::interrobang::keycap_ten::koko::large_blue_circle::large_blue_diamond::large_橙色_diamond::left_luggage::left_right_arrow::leftwards_arrow_with_hook::leo::libra::link::m::mens::metro::mobile_phone_off::negative_squa红色_cross_mark::new::ng::nine::no_bicycles::no_entry::no_entry_sign::no_mobile_phones::no_pedestrians::no_smoking::non-potable_water::o::o2::ok::on::one::ophiuchus::parking::part_alternation_mark::passport_control::pisces::potable_water::put_litter_in_its_place::radio_button::recycle::红色_circle::registe红色::repeat::repeat_one::restroom::rewind::sa::sagittarius::scorpius::secret::seven::shipit::signal_strength::six::six_pointed_star::small_blue_diamond::small_橙色_diamond::small_红色_triangle::small_红色_triangle_down::soon::sos::symbols::taurus::three::tm::top::trident::twisted_rightwards_arrows::two::u5272::u5408::u55b6::u6307::u6708::u6709::u6e80::u7121::u7533::u7981::u7a7a::underage::up::vibration_mode::virgo::vs::wavy_dash::wc::wheelchair::white_check_mark::white_circle::white_flower::white_large_square::white_medium_small_square::white_medium_square::white_small_square::white_square_button::womens::x::zero:
+:100::1234::a::ab::abc::abcd::accept::aquarius::aries::arrow_backward::arrow_double_down::arrow_double_up::arrow_down::arrow_down_small::arrow_forward::arrow_heading_down::arrow_heading_up::arrow_left::arrow_lower_left::arrow_lower_right::arrow_right::arrow_right_hook::arrow_up::arrow_up_down::arrow_up_small::arrow_upper_left::arrow_upper_right::arrows_clockwise::arrows_counterclockwise::b::baby_symbol::back::baggage_claim::ballot_box_with_check::bangbang::black_circle::black_large_square::black_medium_small_square::black_medium_square::black_small_square::black_square_button::cancer::capital_abcd::capricorn::chart::children_crossing::cinema::cl::clock1::clock10::clock1030::clock11::clock1130::clock12::clock1230::clock130::clock2::clock230::clock3::clock330::clock4::clock430::clock5::clock530::clock6::clock630::clock7::clock730::clock8::clock830::clock9::clock930::congratulations::cool::copyright::curly_loop::currency_exchange::customs::diamond_shape_with_a_dot_inside::do_not_litter::eight::eight_pointed_black_star::eight_spoked_asterisk::end::fast_forward::five::four::free::gemini::hash::heart_decoration::heavy_check_mark::heavy_division_sign::heavy_dollar_sign::heavy_exclamation_mark::heavy_minus_sign::heavy_multiplication_x::heavy_plus_sign::id::ideograph_advantage::information_source::interrobang::keycap_ten::koko::large_blue_circle::large_blue_diamond::large_orange_diamond::left_luggage::left_right_arrow::leftwards_arrow_with_hook::leo::libra::link::m::mens::metro::mobile_phone_off::negative_squared_cross_mark::new::ng::nine::no_bicycles::no_entry::no_entry_sign::no_mobile_phones::no_pedestrians::no_smoking::non-potable_water::o::o2::ok::on::one::ophiuchus::parking::part_alternation_mark::passport_control::pisces::potable_water::put_litter_in_its_place::radio_button::recycle::red_circle::registered::repeat::repeat_one::restroom::rewind::sa::sagittarius::scorpius::secret::seven::shipit::signal_strength::six::six_pointed_star::small_blue_diamond::small_orange_diamond::small_red_triangle::small_red_triangle_down::soon::sos::symbols::taurus::three::tm::top::trident::twisted_rightwards_arrows::two::u5272::u5408::u55b6::u6307::u6708::u6709::u6e80::u7121::u7533::u7981::u7a7a::underage::up::vibration_mode::virgo::vs::wavy_dash::wc::wheelchair::white_check_mark::white_circle::white_flower::white_large_square::white_medium_small_square::white_medium_square::white_small_square::white_square_button::womens::x::zero:
## Insert
@@ -887,3 +887,57 @@ __^^_insert 倾斜 加粗_^^__ _^^__insert 倾斜 加粗 2__^^_
**^^_insert 倾斜 加粗_^^** _^^**insert 倾斜 加粗 2**^^_
__^^*insert 倾斜 加粗*^^__ *^^__insert 倾斜 加粗 2__^^*
+
+## Admonition
+
+{{% admonition "note" "Admonition note" %}}
+This is the content of the admonition.
+{{% /admonition %}}
+
+{{% admonition "abstract" "Admonition abstract" %}}
+This is the content of the admonition.
+{{% /admonition %}}
+
+{{% admonition "info" "Admonition info" %}}
+This is the content of the admonition.
+{{% /admonition %}}
+
+{{% admonition "tip" "Admonition tip" %}}
+This is the content of the admonition.
+{{% /admonition %}}
+
+{{% admonition "success" "Admonition success" %}}
+This is the content of the admonition.
+{{% /admonition %}}
+
+{{% admonition "question" "Admonition question" %}}
+This is the content of the admonition.
+{{% /admonition %}}
+
+{{% admonition "warning" "Admonition warning" %}}
+This is the content of the admonition.
+{{% /admonition %}}
+
+{{% admonition "failure" "Admonition failure" %}}
+This is the content of the admonition.
+{{% /admonition %}}
+
+{{% admonition "danger" "Admonition danger" %}}
+This is the content of the admonition.
+{{% /admonition %}}
+
+{{% admonition "bug" "Admonition bug" %}}
+This is the content of the admonition.
+{{% /admonition %}}
+
+{{% admonition "example" "Admonition example" %}}
+This is the content of the admonition.
+{{% /admonition %}}
+
+{{% admonition "quote" "Admonition quote" %}}
+This is the content of the admonition.
+{{% /admonition %}}
+
+{{% admonition title="Admonition" details="true" %}}
+This is the content of the admonition.
+{{% /admonition %}}
diff --git a/exampleSite/zh/content/posts/test.md b/exampleSite/zh/content/posts/test.md
new file mode 100644
index 0000000..f2a59ec
--- /dev/null
+++ b/exampleSite/zh/content/posts/test.md
@@ -0,0 +1,322 @@
+---
+author: ""
+author_link: ""
+title: "Test Page"
+date: 2019-08-04T22:49:56+08:00
+lastmod: 2019-08-17T22:41:56+08:00
+draft: true
+description: "This is a test page."
+show_in_homepage: false
+description_as_summary: false
+license: ""
+
+tags: [
+ "Hugo",
+ "主题",
+]
+categories: [
+ "预览",
+]
+
+featured_image: ""
+featured_image_preview: ""
+
+comment: false
+toc: true
+auto_collapse_toc: true
+math: true
+dev: true
+---
+
+## This is a test page
+
+Test all features in development[^link test].
+
+[^link test]: https://www.google.com/
+
+
+
+## Test ECharts
+
+{{< dev/echarts >}}
+title : {
+ text: '某站点用户访问来源',
+ subtext: '纯属虚构',
+ x:'center'
+},
+tooltip : {
+ trigger: 'item',
+ formatter: "{a} {b} : {c} ({d}%)"
+},
+legend: {
+ orient: 'vertical',
+ left: 'left',
+ data: ['直接访问','邮件营销','联盟广告','视频广告','搜索引擎']
+},
+series : [
+ {
+ name: '访问来源',
+ type: 'pie',
+ radius : '55%',
+ center: ['50%', '60%'],
+ data:[
+ {value:335, name:'直接访问'},
+ {value:310, name:'邮件营销'},
+ {value:234, name:'联盟广告'},
+ {value:135, name:'视频广告'},
+ {value:1548, name:'搜索引擎'}
+ ],
+ itemStyle: {
+ emphasis: {
+ shadowBlur: 10,
+ shadowOffsetX: 0,
+ shadowColor: 'rgba(0, 0, 0, 0.5)'
+ }
+ }
+ }
+]
+{{< /dev/echarts >}}
+
+## Test Mermaid
+
+{{< mermaid >}}
+classDiagram
+ Animal <|-- Duck
+ Animal <|-- Fish
+ Animal <|-- Zebra
+ Animal : +int age
+ Animal : +String gender
+ Animal: +isMammal()
+ Animal: +mate()
+ class Duck{
+ +String beakColor
+ +swim()
+ +quack()
+ }
+ class Fish{
+ -int sizeInFeet
+ -canEat()
+ }
+ class Zebra{
+ +bool is_wild
+ +run()
+ }
+{{< /mermaid >}}
+
+## Test Ruby
+
+人最重要的特点是会思考,建站初衷无非是保存思维的电子快照。
+当然各种文档工具亦或是简单的文本编辑器也能随时记录点滴,
+选择建个人网站无非是想满足 [技术爱好者]^(Technology enthusiast) 的偏执。
+
+## Test Music
+
+## Test Toc
+
+Toc
+
+### Toc1
+
+Toc
+
+#### Toc 1-1
+
+Toc
+
+#### Toc 1-2
+
+Toc
+
+#### Toc 1-3
+
+Toc
+
+### Toc2
+
+Toc
+
+#### Toc 2-1
+
+Toc
+
+#### Toc 2-2
+
+Toc
+
+### Toc3
+
+Toc
+
+## Test Table
+
+| Tables | Are | Cool |
+| :------------ |:-------------:| -----:|
+| col 3 is | right-aligned | $1600 |
+| col 2 is | centered | $12 |
+| zebra stripes | are neat | $1 |
+
+## Test kbd
+
+ctrl+alt+del
+
+## Test Mixed Lists
+
+Mixed Lists
+
+- item 1
+ * [X] item A
+ * [ ] item B
+ more text
+ 1. item a
+ 2. itemb
+ 3. item c
+ * [X] item C
+- item 2
+- item 3
+
+Really Mixed Lists
+
+- item 1
+ * [X] item A
+ - item B
+ more text
+ 1. item a
+ + itemb
+ + [ ] item c
+ 1. item C
+1. item 2
+- [X] item 3
+
+## Test fa (Font Awesome)
+
+:(fab fa-weixin fa-2x):
+
+## Test Footnote
+
+This is a footnote[^1]
+
+[^1]: This is a footnote
+
+## Test Admonition
+
+{{% admonition quote %}}
+biu biu biu.
+{{% /admonition %}}
+
+{{% admonition quote "I'm title!" false %}}
+biu biu biu.
+{{% /admonition %}}
+
+{{% admonition example "I'm title!" false %}}
+biu biu biu.
+{{% /admonition %}}
+
+{{% admonition bug "I'm title!" false %}}
+biu biu biu.
+{{% /admonition %}}
+
+{{% admonition danger "I'm title!" false %}}
+biu biu biu.
+{{% /admonition %}}
+
+{{% admonition failure "I'm title!" false %}}
+biu biu biu.
+{{% /admonition %}}
+
+{{% admonition warning "I'm title!" false %}}
+biu biu biu.
+{{% /admonition %}}
+
+{{% admonition question "I'm title!" false %}}
+biu biu biu.
+{{% /admonition %}}
+
+{{% admonition success "I'm title!" false %}}
+biu biu biu.
+{{% /admonition %}}
+
+{{% admonition tip "I'm title!" false %}}
+biu biu biu.
+{{% /admonition %}}
+
+{{% admonition info "I'm title!" true %}}
+**biu biu biu.**
+{{% /admonition %}}
+
+{{% admonition note "I'm title!" false %}}
+**biu biu biu.**
+{{% /admonition %}}
+
+{{% admonition type="abstract" title="Test Admonition" %}}
+This is a Admonition.
+{{% /admonition %}}
+
+## Test Highlight
+
+`ls` 命令
+
+```go
+// You can edit this code!
+// Click here and start typing.
+package main
+
+import "fmt"
+
+func main() {
+ fmt.Println("Hello, 世界", "Hello, 世界", "Hello, 世界", "Hello, 世界", "Hello, 世界", "Hello, 世界", "Hello, 世界", "Hello, 世界")
+}
+```
+
+- This is a list that contains multiple code blocks.
+
+ - Here is an indented block
+
+ ```Code
+ This will still be parsed
+ as a normal indented code block.
+ ```
+
+ - Here is a fenced code block:
+
+ ```Code
+ This will still be parsed
+ as a fenced code block.
+ ```
+
+ > ```Code
+ > Blockquotes?
+ > Not a problem!
+ > ```
+
+## Test Typeit
+
+{{< typeit group="test" tag="h3" >}}
+Here is a story about love...
+{{< /typeit >}}
+
+{{< typeit group="test" code="java" >}}
+u.accepted(); // [2018/01/05](/since/) special
+int a = 1;
+{{< /typeit >}}
+
+## Test Img
+
+
+
+## Test Align
+
+{{% align right %}}
+**Test Text**
+{{% /align %}}
+
+## Test Katex
+
+$$ c = \pm\sqrt{a^2 + b^2} $$
+
+Left \\( c = \pm\sqrt{a^2 + b^2} \\) Right
+
+Left $ c = \pm\sqrt{a^2 + b^2} $ Right
+
+$ \ce{CO2 + C -> 2 CO} $
+
+$ \ce{Hg^2+ ->[I-] HgI2 ->[I-] [Hg^{II}I4]^2-} $
diff --git a/exampleSite/zh/static/android-chrome-192x192.png b/exampleSite/zh/static/android-chrome-192x192.png
new file mode 100644
index 0000000..87ba30b
Binary files /dev/null and b/exampleSite/zh/static/android-chrome-192x192.png differ
diff --git a/exampleSite/zh/static/android-chrome-512x512.png b/exampleSite/zh/static/android-chrome-512x512.png
new file mode 100644
index 0000000..3e52be3
Binary files /dev/null and b/exampleSite/zh/static/android-chrome-512x512.png differ
diff --git a/exampleSite/zh/static/apple-touch-icon.png b/exampleSite/zh/static/apple-touch-icon.png
new file mode 100644
index 0000000..26f95ea
Binary files /dev/null and b/exampleSite/zh/static/apple-touch-icon.png differ
diff --git a/exampleSite/zh/static/browserconfig.xml b/exampleSite/zh/static/browserconfig.xml
new file mode 100644
index 0000000..a47e5a5
--- /dev/null
+++ b/exampleSite/zh/static/browserconfig.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+ #2d89ef
+
+
+
diff --git a/exampleSite/zh/static/favicon-16x16.png b/exampleSite/zh/static/favicon-16x16.png
new file mode 100644
index 0000000..0594fcf
Binary files /dev/null and b/exampleSite/zh/static/favicon-16x16.png differ
diff --git a/exampleSite/zh/static/favicon-32x32.png b/exampleSite/zh/static/favicon-32x32.png
new file mode 100644
index 0000000..1d3f09a
Binary files /dev/null and b/exampleSite/zh/static/favicon-32x32.png differ
diff --git a/exampleSite/zh/static/favicon.ico b/exampleSite/zh/static/favicon.ico
new file mode 100644
index 0000000..5254021
Binary files /dev/null and b/exampleSite/zh/static/favicon.ico differ
diff --git a/exampleSite/zh/static/images/Apple-Devices-Preview.png b/exampleSite/zh/static/images/Apple-Devices-Preview.png
new file mode 100644
index 0000000..d1bd34c
Binary files /dev/null and b/exampleSite/zh/static/images/Apple-Devices-Preview.png differ
diff --git a/exampleSite/zh/static/images/avatar.png b/exampleSite/zh/static/images/avatar.png
new file mode 100644
index 0000000..f8d370d
Binary files /dev/null and b/exampleSite/zh/static/images/avatar.png differ
diff --git a/exampleSite/zh/static/logo.png b/exampleSite/zh/static/logo.png
new file mode 100644
index 0000000..f8d370d
Binary files /dev/null and b/exampleSite/zh/static/logo.png differ
diff --git a/exampleSite/zh/static/mstile-150x150.png b/exampleSite/zh/static/mstile-150x150.png
new file mode 100644
index 0000000..0332bbe
Binary files /dev/null and b/exampleSite/zh/static/mstile-150x150.png differ
diff --git a/exampleSite/zh/static/safari-pinned-tab.svg b/exampleSite/zh/static/safari-pinned-tab.svg
new file mode 100644
index 0000000..05faebc
--- /dev/null
+++ b/exampleSite/zh/static/safari-pinned-tab.svg
@@ -0,0 +1,28 @@
+
+
+
+
+Created by potrace 1.11, written by Peter Selinger 2001-2013
+
+
+
+
+
diff --git a/exampleSite/zh/static/site.webmanifest b/exampleSite/zh/static/site.webmanifest
new file mode 100644
index 0000000..73497a5
--- /dev/null
+++ b/exampleSite/zh/static/site.webmanifest
@@ -0,0 +1,19 @@
+{
+ "name": "LoveIt",
+ "short_name": "LoveIt",
+ "icons": [
+ {
+ "src": "/android-chrome-192x192.png",
+ "sizes": "192x192",
+ "type": "image/png"
+ },
+ {
+ "src": "/android-chrome-512x512.png",
+ "sizes": "512x512",
+ "type": "image/png"
+ }
+ ],
+ "theme_color": "#ffffff",
+ "background_color": "#ffffff",
+ "display": "standalone"
+}
diff --git a/i18n/en.toml b/i18n/en.toml
index 72c6641..6d95705 100644
--- a/i18n/en.toml
+++ b/i18n/en.toml
@@ -24,10 +24,15 @@ other = "Categories"
# === Taxonomy ===
# === Pagination ===
-[More]
+[more]
other = "More"
# === Pagination ===
+# === partials/header.html ===
+[switchTheme]
+other = "Switch Theme"
+# === partials/header.html ===
+
# === partials/comments.html ===
[valineLang]
other = "en"
@@ -41,9 +46,14 @@ other = "Powered by %s"
other = "Theme - "
# === partials/footer.html ===
+# === partials/post/share.html ===
+[share]
+other = "Share on"
+# === partials/post/share.html ===
+
# === posts/single.html ===
[toc]
-other = "Table of Contents"
+other = "Contents"
[publish]
other = "published on"
@@ -64,7 +74,7 @@ other = " pageviews"
other = "Author"
[lastMod]
-other = "This article is updated with %s"
+other = "The article was updated on %s"
[license]
other = "Published under the %s license"
@@ -75,7 +85,7 @@ other = "Back"
[home]
other = "Home"
-[readmore]
+[readMore]
other = "Read More"
[day]
@@ -89,15 +99,15 @@ other = "min"
[second]
other = "sec"
-
-[return]
-other = "return"
# === posts/single.html ===
# === 404.html ===
[pageNotFound]
other = "Page not found"
+[pageNotFoundText]
+other = "The page you're looking for doesn't exist. Sorry."
+
[backToHome]
other = "Back to Home"
# === 404.html ===
diff --git a/i18n/zh.toml b/i18n/zh.toml
index 6eba84b..6b2db78 100644
--- a/i18n/zh.toml
+++ b/i18n/zh.toml
@@ -24,10 +24,15 @@ other = "分类"
# === Taxonomy ===
# === Pagination ===
-[More]
+[more]
other = "更多"
# === Pagination ===
+# === partials/header.html ===
+[switchTheme]
+other = "切换主题"
+# === partials/header.html ===
+
# === partials/comments.html ===
[valineLang]
other = "zh-cn"
@@ -41,6 +46,11 @@ other = "由 %s 强力驱动"
other = "主题 - "
# === partials/footer.html ===
+# === partials/post/share.html ===
+[share]
+other = "分享到"
+# === partials/post/share.html ===
+
# === posts/single.html ===
[toc]
other = "目录"
@@ -78,7 +88,7 @@ other = "返回"
[home]
other = "主页"
-[readmore]
+[readMore]
other = "阅读全文"
[day]
@@ -92,15 +102,15 @@ other = "分"
[second]
other = "秒"
-
-[return]
-other = "返回"
# === posts/single.html ===
# === 404.html ===
[pageNotFound]
other = "页面没找到"
+[pageNotFoundText]
+other = "抱歉,您要查找的页面不存在。"
+
[backToHome]
other = "回到主页"
# === 404.html ===
diff --git a/layouts/404.html b/layouts/404.html
index 6e10189..ed901ef 100644
--- a/layouts/404.html
+++ b/layouts/404.html
@@ -1,18 +1,22 @@
-{{ define "title" }}{{ T "pageNotFound" }} | {{ .Site.Title }}{{ end -}}
+{{- define "title" }}
+ {{- T "pageNotFound" | printf "404 %s" }} | {{ .Site.Title -}}
+{{- end -}}
-{{ define "content" }}
+{{- define "content" -}}
-{{ end }}
\ No newline at end of file
+{{- end -}}
\ No newline at end of file
diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html
new file mode 100644
index 0000000..1ce94c1
--- /dev/null
+++ b/layouts/_default/_markup/render-image.html
@@ -0,0 +1,11 @@
+
+ {{- /* Lazyload */ -}}
+ {{- $loading := resources.Get "svg/loading.svg" | minify -}}
+
+ {{- $caption := .Title | default .Text -}}
+ {{- with $caption -}}
+
+ {{- . -}}
+
+ {{- end -}}
+
\ No newline at end of file
diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html
new file mode 100644
index 0000000..01f37d1
--- /dev/null
+++ b/layouts/_default/_markup/render-link.html
@@ -0,0 +1,3 @@
+
+ {{- .Text | safeHTML -}}
+
\ No newline at end of file
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 39ca8e0..249ab81 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -1,29 +1,42 @@
-{{ if ne .Site.Params.version "5.x" -}}
- {{ errorf "\n\nThere are two possible situations that led to this error:\n 1. You haven't copied the config.toml yet. See https://github.com/dillonzq/LoveIt#installation \n 2. You have an incompatible update. See https://github.com//dillonzq/LoveIt/blob/master/CHANGELOG.md \n\n有两种可能的情况会导致这个错误发生:\n 1. 你还没有复制 config.toml 参考 https://github.com/dillonzq/LoveIt#installation \n 2. 你进行了一次不兼容的更新 参考 https://github.com//dillonzq/LoveIt/blob/master/CHANGELOG.md \n" -}}
-{{ end -}}
+{{- /* LoveIt theme version detection */ -}}
+{{- if ne .Site.Params.version "0.1.X" -}}
+ {{- errorf "\n\nThere are two possible situations that led to this error:\n 1. You haven't copied the config.toml yet. See https://github.com/dillonzq/LoveIt#installation \n 2. You have an incompatible update. See https://github.com//dillonzq/LoveIt/blob/master/CHANGELOG.md \n\n有两种可能的情况会导致这个错误发生:\n 1. 你还没有复制 config.toml 参考 https://github.com/dillonzq/LoveIt#installation \n 2. 你进行了一次不兼容的更新 参考 https://github.com//dillonzq/LoveIt/blob/master/CHANGELOG.md \n" -}}
+{{- end -}}
+
- {{ block "title" . }}{{ .Site.Title }}{{ end }}
- {{- partial "head.html" . }}
+
+ {{- block "title" . }}{{ .Site.Title }}{{ end -}}
+
+ {{- partial "head.html" . -}}
+ {{- /* Check theme isDark before body rendering */ -}}
+
+ {{- /* Body wrapper */ -}}
-{{- end }}
\ No newline at end of file
+{{- end -}}
\ No newline at end of file
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 871d9e0..51d61ec 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,35 +1,15 @@
-{{ define "title" }}{{ .Title }} | {{ .Site.Title }}{{ end }}
+{{- define "title" }}{{ .Title }} | {{ .Site.Title }}{{ end -}}
-{{ define "content" }}
-