|
@ -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
|
||||
---
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
// ==============================
|
||||
// Custom style
|
||||
// ==============================
|
||||
// You can override the variables in _variables.scss to customize the style
|
6
assets/css/_page/_404.scss
Normal file
|
@ -0,0 +1,6 @@
|
|||
.notfound {
|
||||
font-size: 1.8rem;
|
||||
line-height: 3rem;
|
||||
transform: translateY(30vh);
|
||||
text-align: center;
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
@import "../_partial/_post/comment";
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -4,6 +4,10 @@
|
|||
|
||||
.copyright-line {
|
||||
width: 100%;
|
||||
|
||||
.icp-br {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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 }
|
||||
|
|
3
assets/css/_partial/_post/_comment.scss
Normal file
|
@ -0,0 +1,3 @@
|
|||
.post-comment {
|
||||
padding: 4rem 0;
|
||||
}
|
94
assets/css/_partial/_post/_footer.scss
Normal file
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
134
assets/css/_partial/_post/_toc.scss
Normal file
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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 ========== //
|
||||
|
|
14
assets/css/custom-style.scss
Normal file
|
@ -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";
|
1
assets/css/lib/katex/copy-tex.min.css
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.katex,.katex-display{user-select:all;-moz-user-select:all;-webkit-user-select:all;-ms-user-select:all}
|
|
@ -11,5 +11,3 @@
|
|||
@import "_partial/pagination";
|
||||
|
||||
@import "_core/media";
|
||||
|
||||
@import "_custom";
|
||||
|
|
|
@ -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();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
1
assets/js/lib/katex/copy-tex.min.js
vendored
Normal file
|
@ -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<n.length;o++){var l=n[o];l.remove?l.remove(null):l.parentNode.removeChild(l)}for(var i=e.querySelectorAll(".katex-mathml"),a=0;a<i.length;a++){var u=i[a],f=u.querySelector("annotation");f&&(u.replaceWith?u.replaceWith(f):u.parentNode.replaceChild(f,u),f.innerHTML=t.inline[0]+f.innerHTML+t.inline[1])}for(var c=e.querySelectorAll(".katex-display annotation"),d=0;d<c.length;d++){var p=c[d];p.innerHTML=t.display[0]+p.innerHTML.substr(t.inline[0].length,p.innerHTML.length-t.inline[0].length-t.inline[1].length)+t.display[1]}return e};document.addEventListener("copy",function(e){var t=window.getSelection();if(!t.isCollapsed){var n=t.getRangeAt(0).cloneContents();if(n.querySelector(".katex-mathml")){for(var r=[],l=0;l<n.childNodes.length;l++)r.push(n.childNodes[l].outerHTML);e.clipboardData.setData("text/html",r.join("")),e.clipboardData.setData("text/plain",o(n).textContent),e.preventDefault()}}})}]).default});
|
1
assets/js/lib/katex/mhchem.min.js
vendored
Normal file
|
@ -1,10 +1,10 @@
|
|||
<!-- By Sam Herbert (@sherb), for everyone. More @ http://goo.gl/7AJzbL -->
|
||||
<svg width="38" height="38" viewBox="0 0 38 38" xmlns="http://www.w3.org/2000/svg">
|
||||
<svg width="319" height="319" viewBox="-281 -281 600 600" xmlns="http://www.w3.org/2000/svg">
|
||||
<defs>
|
||||
<linearGradient x1="8.042%" y1="0%" x2="65.682%" y2="23.865%" id="a">
|
||||
<stop stop-color="#fff" stop-opacity="0" offset="0%"/>
|
||||
<stop stop-color="#fff" stop-opacity=".631" offset="63.146%"/>
|
||||
<stop stop-color="#fff" offset="100%"/>
|
||||
<stop stop-color="#a5a5a5" stop-opacity="0" offset="0%"/>
|
||||
<stop stop-color="#a5a5a5" stop-opacity=".631" offset="63.146%"/>
|
||||
<stop stop-color="#a5a5a5" offset="100%"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g fill="none" fill-rule="evenodd">
|
||||
|
@ -18,7 +18,7 @@
|
|||
dur="0.9s"
|
||||
repeatCount="indefinite" />
|
||||
</path>
|
||||
<circle fill="#fff" cx="36" cy="18" r="1">
|
||||
<circle fill="#a5a5a5" cx="36" cy="18" r="1">
|
||||
<animateTransform
|
||||
attributeName="transform"
|
||||
type="rotate"
|
||||
|
@ -29,4 +29,4 @@
|
|||
</circle>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
</svg>
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
@ -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 = '<i class="fas fa-language fa-fw"></i>'
|
||||
pre = '<i class="fas fa-language fa-fw"></i>'
|
||||
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= '<a rel="license external nofollow noopener noreffer" href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank">CC BY-NC 4.0</a>'
|
||||
# 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 '<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.10.1/css/all.min.css" integrity="sha256-fdcFNFiBMrNfWL6OcAGQz6jDgNTRxnrLEd4vJYFWScE=" crossorigin="anonymous">'
|
||||
# CSS and JS Files CDN
|
||||
[params.cdn]
|
||||
## for example '<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.10.1/css/all.min.css" integrity="sha256-fdcFNFiBMrNfWL6OcAGQz6jDgNTRxnrLEd4vJYFWScE=" crossorigin="anonymous">'
|
||||
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"]
|
||||
|
|
15
exampleSite/config/css/_custom.scss
Normal file
|
@ -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;
|
|
@ -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.
|
||||
|
||||
<!--more-->
|
66
exampleSite/content/posts/emoji-support.md
Normal file
|
@ -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.
|
||||
|
||||
<!--more-->
|
||||
|
||||
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.
|
||||
|
||||
<p><span class="nowrap"><span class="emojify">🙈</span> <code>:see_no_evil:</code></span> <span class="nowrap"><span class="emojify">🙉</span> <code>:hear_no_evil:</code></span> <span class="nowrap"><span class="emojify">🙊</span> <code>:speak_no_evil:</code></span></p>
|
||||
<br>
|
||||
|
||||
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 >}}
|
||||
<style>
|
||||
.emojify {
|
||||
font-family: Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols;
|
||||
font-size: 2rem;
|
||||
vertical-align: middle;
|
||||
}
|
||||
@media screen and (max-width:650px) {
|
||||
.nowrap {
|
||||
display: block;
|
||||
margin: 25px 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
{{< /css.inline >}}
|
194
exampleSite/content/posts/markdown-syntax.md
Normal file
|
@ -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.
|
||||
<!--more-->
|
||||
|
||||
## Headings
|
||||
|
||||
The following HTML `<h2>`—`<h6>` elements represent six levels of section headings. `<h2>` is the highest section level while `<h6>` 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.</p>
|
||||
> — <cite>Rob Pike[^1]</cite>
|
||||
|
||||
[^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}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Example HTML5 Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test</p>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
### Code block indented with four spaces
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Example HTML5 Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
### Code block with Hugo's internal highlight shortcode
|
||||
|
||||
{{< highlight html "linenos=false" >}}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Example HTML5 Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test</p>
|
||||
</body>
|
||||
</html>
|
||||
{{< /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`
|
||||
|
||||
<abbr title="Graphics Interchange Format">GIF</abbr> is a bitmap image format.
|
||||
|
||||
* Or ruby annotation
|
||||
|
||||
[GIF]^(Graphics Interchange Format) is a bitmap image format.
|
||||
|
||||
* `sub`/`sup`
|
||||
|
||||
H<sub>2</sub>O
|
||||
|
||||
X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
|
||||
|
||||
* Or `LaTex` formula
|
||||
|
||||
* Block
|
||||
|
||||
$$ H_2O $$
|
||||
|
||||
$$ X^n+Y^n=Z^n $$
|
||||
|
||||
* Inline: \\( H_2O \\) \\( X^n+Y^n=Z^n \\)
|
||||
|
||||
* `kbd`
|
||||
|
||||
Press <kbd><kbd>CTRL</kbd>+<kbd>ALT</kbd>+<kbd>Delete</kbd></kbd> to end the session.
|
||||
|
||||
* `mark`
|
||||
|
||||
Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms,
|
||||
and other small creatures.
|
76
exampleSite/content/posts/placeholder-text.md
Normal file
|
@ -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. <!--more-->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
|
||||
|
||||
<svg class="canon" xmlns="http://www.w3.org/2000/svg" overflow="visible" viewBox="0 0 496 373" height="373" width="496"><g fill="none"><path stroke="#000" stroke-width=".75" d="M.599 372.348L495.263 1.206M.312.633l494.95 370.853M.312 372.633L247.643.92M248.502.92l246.76 370.566M330.828 123.869V1.134M330.396 1.134L165.104 124.515"></path><path stroke="#ED1C24" stroke-width=".75" d="M275.73 41.616h166.224v249.05H275.73zM54.478 41.616h166.225v249.052H54.478z"></path><path stroke="#000" stroke-width=".75" d="M.479.375h495v372h-495zM247.979.875v372"></path><ellipse cx="498.729" cy="177.625" rx=".75" ry="1.25"></ellipse><ellipse cx="247.229" cy="377.375" rx=".75" ry="1.25"></ellipse></g></svg>
|
||||
|
||||
[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 >}}
|
||||
<style>
|
||||
.canon { background: white; width: 100%; height: auto;}
|
||||
</style>
|
||||
{{< /css.inline >}}
|
61
exampleSite/content/posts/rich-content.md
Normal file
|
@ -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.
|
||||
<!--more-->
|
||||
|
||||
---
|
||||
|
||||
## Instagram Simple Shortcode
|
||||
|
||||
{{< instagram_simple BGvuInzyFAe hidecaption >}}
|
||||
|
||||
<br>
|
||||
|
||||
---
|
||||
|
||||
## YouTube Privacy Enhanced Shortcode
|
||||
|
||||
{{< youtube ZJthWmvUzzc >}}
|
||||
|
||||
<br>
|
||||
|
||||
---
|
||||
|
||||
## Twitter Simple Shortcode
|
||||
|
||||
{{< twitter_simple 1085870671291310081 >}}
|
||||
|
||||
<br>
|
||||
|
||||
---
|
||||
|
||||
## Vimeo Simple Shortcode
|
||||
|
||||
{{< vimeo_simple 48912912 >}}
|
BIN
exampleSite/static/images/emoji.jpg
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
exampleSite/static/images/hugo.png
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
exampleSite/static/images/markdown.png
Normal file
After Width: | Height: | Size: 168 KiB |
|
@ -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 = '<i class="fas fa-language fa-fw"></i>'
|
||||
pre = '<i class="fas fa-language fa-fw"></i>'
|
||||
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= '<a rel="license external nofollow noopener noreffer" href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank">CC BY-NC 4.0</a>'
|
||||
# 许可协议信息 (允许使用 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 = '' # 例如 '<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.10.1/css/all.min.css" integrity="sha256-fdcFNFiBMrNfWL6OcAGQz6jDgNTRxnrLEd4vJYFWScE=" crossorigin="anonymous">'
|
||||
# CSS 和 JS 文件的 CDN 设置
|
||||
[params.cdn]
|
||||
## 例如 '<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.10.1/css/all.min.css" integrity="sha256-fdcFNFiBMrNfWL6OcAGQz6jDgNTRxnrLEd4vJYFWScE=" crossorigin="anonymous">'
|
||||
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"]
|
||||
|
|
15
exampleSite/zh/config/css/_custom.scss
Normal file
|
@ -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;
|
|
@ -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
|
||||

|
||||

|
||||
|
||||
<https://www.google.com>
|
||||
|
||||
|
@ -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 %}}
|
||||
|
|
322
exampleSite/zh/content/posts/test.md
Normal file
|
@ -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/
|
||||
|
||||
<!--more-->
|
||||
|
||||
## Test ECharts
|
||||
|
||||
{{< dev/echarts >}}
|
||||
title : {
|
||||
text: '某站点用户访问来源',
|
||||
subtext: '纯属虚构',
|
||||
x:'center'
|
||||
},
|
||||
tooltip : {
|
||||
trigger: 'item',
|
||||
formatter: "{a} <br/>{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
|
||||
|
||||
<kbd>ctrl</kbd>+<kbd>alt</kbd>+<kbd>del</kbd>
|
||||
|
||||
## 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-} $
|
BIN
exampleSite/zh/static/android-chrome-192x192.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
exampleSite/zh/static/android-chrome-512x512.png
Normal file
After Width: | Height: | Size: 47 KiB |
BIN
exampleSite/zh/static/apple-touch-icon.png
Normal file
After Width: | Height: | Size: 10 KiB |
9
exampleSite/zh/static/browserconfig.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square150x150logo src="/mstile-150x150.png"/>
|
||||
<TileColor>#2d89ef</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
</browserconfig>
|
BIN
exampleSite/zh/static/favicon-16x16.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
exampleSite/zh/static/favicon-32x32.png
Normal file
After Width: | Height: | Size: 2 KiB |
BIN
exampleSite/zh/static/favicon.ico
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
exampleSite/zh/static/images/Apple-Devices-Preview.png
Normal file
After Width: | Height: | Size: 225 KiB |
BIN
exampleSite/zh/static/images/avatar.png
Normal file
After Width: | Height: | Size: 40 KiB |
BIN
exampleSite/zh/static/logo.png
Normal file
After Width: | Height: | Size: 40 KiB |
BIN
exampleSite/zh/static/mstile-150x150.png
Normal file
After Width: | Height: | Size: 9.7 KiB |
28
exampleSite/zh/static/safari-pinned-tab.svg
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
||||
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
||||
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
||||
width="560.000000pt" height="560.000000pt" viewBox="0 0 560.000000 560.000000"
|
||||
preserveAspectRatio="xMidYMid meet">
|
||||
<metadata>
|
||||
Created by potrace 1.11, written by Peter Selinger 2001-2013
|
||||
</metadata>
|
||||
<g transform="translate(0.000000,560.000000) scale(0.100000,-0.100000)"
|
||||
fill="#000000" stroke="none">
|
||||
<path d="M2445 5384 c-117 -28 -184 -56 -287 -122 -144 -93 -268 -261 -281
|
||||
-380 -4 -39 -26 -71 -50 -72 -4 0 -34 -27 -67 -60 -198 -201 -262 -716 -130
|
||||
-1061 11 -30 20 -54 20 -55 0 0 -21 -11 -47 -23 -56 -26 -109 -100 -119 -166
|
||||
-3 -23 -4 -122 -2 -221 3 -195 7 -208 66 -271 17 -17 48 -39 69 -48 58 -25 68
|
||||
-31 68 -41 3 -38 21 -122 42 -189 90 -286 268 -507 525 -652 l68 -38 0 -182 0
|
||||
-183 -69 0 c-44 0 -71 4 -73 12 -3 9 -16 9 -54 0 -27 -6 -100 -22 -162 -36
|
||||
-312 -70 -521 -184 -738 -400 -212 -213 -330 -428 -395 -719 -16 -68 -22 -142
|
||||
-26 -284 l-5 -193 2001 0 2001 0 0 154 c0 436 -144 777 -453 1072 -200 192
|
||||
-440 316 -712 369 -49 9 -94 21 -100 25 -17 14 -115 23 -115 11 0 -7 -27 -11
|
||||
-70 -11 l-70 0 0 184 c0 175 1 185 20 191 79 25 311 218 398 331 100 130 177
|
||||
318 218 532 3 13 12 25 22 28 40 12 88 41 115 69 59 61 62 74 65 281 2 119 -1
|
||||
207 -8 232 -17 64 -68 123 -125 146 -28 11 -52 21 -53 22 -2 1 6 15 17 31 24
|
||||
32 72 168 92 258 8 37 13 131 13 245 1 161 -2 196 -22 270 -30 113 -100 253
|
||||
-162 322 l-50 56 35 52 c100 149 79 382 -43 478 -82 65 -172 67 -317 8 -197
|
||||
-80 -279 -82 -550 -11 -163 43 -192 48 -310 50 -87 2 -150 -1 -190 -11z"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.6 KiB |
19
exampleSite/zh/static/site.webmanifest
Normal file
|
@ -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"
|
||||
}
|
24
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 = "<span class=leancloud-visitors-count></span> 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 ===
|
||||
|
|
20
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 ===
|
||||
|
|
|
@ -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" -}}
|
||||
<div class="notfound">
|
||||
<h1 class="error-emoji"></h1>
|
||||
<p class="error-text">/* 404 {{ T "pageNotFound" }}. */</p>
|
||||
<p class="error-link"><a href="{{ .Site.BaseURL }}">↑ {{ T "backToHome" }} ↑</a></p>
|
||||
<h1 id="error-emoji"></h1>
|
||||
<p class="error-text">
|
||||
{{- T "pageNotFoundText" -}}
|
||||
<a href="{{ .Site.BaseURL }}" title="{{ T "backToHome" }}">↩︎</a>
|
||||
</p>
|
||||
</div>
|
||||
<script>
|
||||
var errorEmojiContainer = document.getElementsByClassName('error-emoji')[0];
|
||||
var emojiArray = [
|
||||
const emojiArray = [
|
||||
'\\(o_o)/', '(o^^)o', '(˚Δ˚)b', '(^-^*)', '(≥o≤)', '(^_^)b', '(·_·)',
|
||||
'(=\'X\'=)', '(>_<)', '(;-;)', '\\(^Д^)/',
|
||||
];
|
||||
var errorEmoji = emojiArray[Math.floor(Math.random() * emojiArray.length)];
|
||||
const errorEmoji = emojiArray[Math.floor(Math.random() * emojiArray.length)];
|
||||
const errorEmojiContainer = document.getElementById('error-emoji');
|
||||
errorEmojiContainer.appendChild(document.createTextNode(errorEmoji));
|
||||
</script>
|
||||
{{ end }}
|
||||
{{- end -}}
|
11
layouts/_default/_markup/render-image.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
<figure>
|
||||
{{- /* Lazyload */ -}}
|
||||
{{- $loading := resources.Get "svg/loading.svg" | minify -}}
|
||||
<img src="{{ $loading.RelPermalink | safeURL }}" data-sizes="auto" data-src="{{ .Destination | safeURL }}" alt="{{ .Text }}"{{ with .Title }} title="{{ . }}"{{ end }} class="lazyload">
|
||||
{{- $caption := .Title | default .Text -}}
|
||||
{{- with $caption -}}
|
||||
<figcaption class="image-caption">
|
||||
{{- . -}}
|
||||
</figcaption>
|
||||
{{- end -}}
|
||||
</figure>
|
3
layouts/_default/_markup/render-link.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
<a href="{{ .Destination | safeURL }}"{{ with .Title }} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank"{{ end }}>
|
||||
{{- .Text | safeHTML -}}
|
||||
</a>
|
|
@ -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 -}}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ .Site.LanguageCode }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title>
|
||||
{{- partial "head.html" . }}
|
||||
<title>
|
||||
{{- block "title" . }}{{ .Site.Title }}{{ end -}}
|
||||
</title>
|
||||
{{- partial "head.html" . -}}
|
||||
</head>
|
||||
<body>
|
||||
{{- /* Check theme isDark before body rendering */ -}}
|
||||
<script>
|
||||
window.isDark = (window.localStorage && window.localStorage.getItem('theme')) === 'dark';
|
||||
window.isDark && document.body.classList.add('dark-theme');
|
||||
</script>
|
||||
|
||||
{{- /* Body wrapper */ -}}
|
||||
<div class="wrapper">
|
||||
{{ partial "header.html" . -}}
|
||||
{{- partial "header.html" . -}}
|
||||
<main class="main">
|
||||
<div class="container">
|
||||
{{ block "content" . }}{{ end -}}
|
||||
{{- block "content" . }}{{ end -}}
|
||||
</div>
|
||||
</main>
|
||||
{{ partial "footer.html" . -}}
|
||||
{{ partial "scripts.html" . -}}
|
||||
{{- partial "footer.html" . -}}
|
||||
</div>
|
||||
<a href="#" class="dynamic-to-top" id="dynamic-to-top" data-scroll><span> </span></a>
|
||||
|
||||
{{- /* Dynamic to top button */ -}}
|
||||
<a href="#" class="dynamic-to-top" id="dynamic-to-top" data-scroll>
|
||||
<span> </span>
|
||||
</a>
|
||||
|
||||
{{- /* Load scripts */ -}}
|
||||
{{- partial "scripts.html" . -}}
|
||||
</body>
|
||||
</html>
|
|
@ -1,17 +1,22 @@
|
|||
{{ define "title" }}{{ T "all" | humanize}}{{ T .Section | default .Section | humanize }} | {{ .Site.Title }}{{ end -}}
|
||||
{{- define "title" }}
|
||||
{{- T "all" | humanize}}{{ T .Section | default .Section | humanize }} | {{ .Site.Title -}}
|
||||
{{- end -}}
|
||||
|
||||
{{ define "content" -}}
|
||||
{{ $data := .Data -}}
|
||||
<div class="post-warp archive">
|
||||
{{- define "content" -}}
|
||||
<div class="page archive">
|
||||
{{- /* Title */ -}}
|
||||
<h2 class="post-title animated pulse faster">
|
||||
{{ T "all" | humanize}}{{ T .Section | default .Section | humanize }}
|
||||
{{- T "all" | humanize}}{{ T .Section | default .Section | humanize -}}
|
||||
</h2>
|
||||
|
||||
{{- /* Paginate */ -}}
|
||||
{{- range (.Paginate (.Pages.GroupByDate "2006")).PageGroups -}}
|
||||
<h3>{{ .Key }}</h3>
|
||||
{{- range .Pages -}}
|
||||
<article class="archive-item">
|
||||
<a href="{{ .RelPermalink }}" class="archive-item-link">{{ .Title }}</a>
|
||||
<a href="{{ .RelPermalink }}" class="archive-item-link">
|
||||
{{- .Title -}}
|
||||
</a>
|
||||
<span class="archive-item-date">
|
||||
{{- .Date.Format (.Site.Params.dateFormatToUse | default "01-02") -}}
|
||||
</span>
|
||||
|
@ -20,4 +25,4 @@
|
|||
{{- end -}}
|
||||
{{- partial "paginator.html" . -}}
|
||||
</div>
|
||||
{{- end }}
|
||||
{{- end -}}
|
|
@ -1,35 +1,15 @@
|
|||
{{ define "title" }}{{ .Title }} | {{ .Site.Title }}{{ end }}
|
||||
{{- define "title" }}{{ .Title }} | {{ .Site.Title }}{{ end -}}
|
||||
|
||||
{{ define "content" }}
|
||||
<div class="post-warp single">
|
||||
<h1 class="post-title animated pulse faster">{{ .Title }}</h1>
|
||||
{{- define "content" -}}
|
||||
<div class="page single">
|
||||
{{- /* Title */ -}}
|
||||
<h1 class="post-title animated pulse faster">
|
||||
{{- .Title -}}
|
||||
</h1>
|
||||
|
||||
{{- /* Content */ -}}
|
||||
<div class="post-content">
|
||||
{{ $content := .Content }}
|
||||
{{ $REin := `<img src="([^"]+)" alt="([^"]+)?" />` }}
|
||||
{{ $REout := "<figure><img src=/images/loading.svg data-sizes=auto data-src=$1 alt=$2 class=lazyload><figcaption class=image-caption>$2</figcaption></figure>" }}
|
||||
{{ $content = replaceRE $REin $REout $content }}
|
||||
{{ $REin = `<img src="([^"]+)" alt="([^"]+)?" title="([^"]+)?" />` }}
|
||||
{{ $REout = "<figure><img src=/images/loading.svg data-src=$1 data-sizes=auto alt=$2 title=$3 class=lazyload><figcaption class=image-caption>$2</figcaption></figure>" }}
|
||||
{{ $content = replaceRE $REin $REout $content }}
|
||||
{{ $REin = `:\(([\w- ]+?)\):` }}
|
||||
{{ $REout = `<i class="$1 fa-fw"></i>` }}
|
||||
{{ $content = replaceRE $REin $REout $content }}
|
||||
{{ $REin = `\[(.+?)\]\^\((.+?)\)` }}
|
||||
{{ $REout = `<strong><ruby>$1<rt>$2</rt></ruby></strong>` }}
|
||||
{{ $content = replaceRE $REin $REout $content }}
|
||||
{{ $REin = `<sup>\[return\]</sup>` }}
|
||||
{{ $REout = printf "<sup>[%s]</sup>" (T "return") }}
|
||||
{{ $content = replaceRE $REin $REout $content }}
|
||||
{{ $REin = `<(h[123456]) (id=".+?")>` }}
|
||||
{{ $REout = `<a class="post-dummy-target" $2></a><$1>` }}
|
||||
{{ $content = replaceRE $REin $REout $content }}
|
||||
{{ $REin = `<(sup class="footnote-ref") (id="fnref:.+?")>` }}
|
||||
{{ $REout = `<a class="post-dummy-target" $2></a><$1>` }}
|
||||
{{ $content = replaceRE $REin $REout $content }}
|
||||
{{ $REin = `<(li) (id="fn:.+?")>` }}
|
||||
{{ $REout = `<$1><a class="post-dummy-target" $2></a>` }}
|
||||
{{ $content = replaceRE $REin $REout $content }}
|
||||
{{ $content | safeHTML }}
|
||||
{{- partial "hook/content.html" .Content | safeHTML -}}
|
||||
</div>
|
||||
</div>
|
||||
{{end }}
|
||||
{{- end -}}
|
|
@ -1,3 +1,3 @@
|
|||
# {{ .Title }}
|
||||
|
||||
{{ .RawContent }}
|
||||
{{ .RawContent }}
|
||||
|
|
|
@ -1,59 +1,64 @@
|
|||
<article class="post" itemscope itemtype="http://schema.org/Article">
|
||||
{{ $publish_date := .PublishDate.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }}
|
||||
{{ $author := .Site.Author.name }}
|
||||
{{ if isset .Params "author" }}
|
||||
{{ $author = .Site.Author.name }}
|
||||
{{ end }}
|
||||
|
||||
<!--featured_image-->
|
||||
{{ with .Params.featured_image }}
|
||||
{{ $image := $.Params.featured_image_preview | default . }}
|
||||
{{- /* Featured image */ -}}
|
||||
{{- with .Params.featured_image -}}
|
||||
<div class="post-featured-image-preview">
|
||||
<img src=/images/loading.svg data-sizes=auto data-src={{ $image }} alt="featured image" class="lazyload">
|
||||
{{- $image := $.Params.featured_image_preview | default . -}}
|
||||
{{- partial "image" $image -}}
|
||||
</div>
|
||||
{{ end }}
|
||||
<!-- end featured_image-->
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Title */ -}}
|
||||
<h1 class="post-title post-list-title" itemprop="name headline">
|
||||
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||
</h1>
|
||||
|
||||
{{- /* Meta */ -}}
|
||||
<div class="post-meta">
|
||||
<a class="author" href="{{.Site.BaseURL }}" rel="author"><i class="fas fa-user-circle fa-fw"></i>{{ $author }} </a>
|
||||
{{ T "publish" }} <time datetime={{ $publish_date }}>{{ $publish_date }}</time>
|
||||
{{ with .Params.categories -}}
|
||||
{{- $author := .Params.author | default .Site.Author.name -}}
|
||||
{{- $author_link := .Params.author_link | default .Site.Author.link | default .Site.BaseURL -}}
|
||||
<a class="author" href="{{ $author_link }}" rel="author" target="_blank">
|
||||
<i class="fas fa-user-circle fa-fw"></i>{{ $author }}
|
||||
</a>
|
||||
|
||||
{{- $publish_date := .PublishDate.Format (.Site.Params.dateFormatToUse | default "2006-01-02") -}}
|
||||
{{ T "publish" }} <time datetime={{ $publish_date }}>{{ $publish_date }}</time>
|
||||
|
||||
{{- with .Params.categories -}}
|
||||
<span class="post-category">
|
||||
{{ T "included" }}
|
||||
{{ range . }}
|
||||
{{- T "included" -}}
|
||||
{{- range . -}}
|
||||
{{- $name := . -}}
|
||||
{{- with $.Site.GetPage "taxonomy" (printf "categories/%s" $name) | default ($.Site.GetPage "taxonomy" (printf "categories/%s" ($name | urlize))) -}}
|
||||
<i class="far fa-folder fa-fw"></i><a href="{{ .Permalink }}">{{ $name }}</a>
|
||||
{{ end -}}
|
||||
{{ end }}
|
||||
<i class="far fa-folder fa-fw"></i>
|
||||
<a href="{{ .Permalink }}">{{ $name | humanize }}</a>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</span>
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
</div>
|
||||
|
||||
{{- /* Summary content */ -}}
|
||||
<div class="post-content">
|
||||
{{ if .Params.show_description }}
|
||||
<p>{{ .Params.description }}</p>
|
||||
{{ else }}
|
||||
{{ $summary := .Summary }}
|
||||
{{ $REin := `:\(([\w- ]+?)\):` }}
|
||||
{{ $REout := `<i class="$1 fa-fw"></i>` }}
|
||||
{{ $summary = replaceRE $REin $REout $summary }}
|
||||
{{ $REin = `\[(.+?)\]\^\((.+?)\)` }}
|
||||
{{ $REout = `<strong><ruby>$1<rt>$2</rt></ruby></strong>` }}
|
||||
{{ $summary = replaceRE $REin $REout $summary }}
|
||||
{{ $summary | safeHTML }}
|
||||
{{ end }}
|
||||
{{- if .Params.description_as_summary -}}
|
||||
<p>
|
||||
{{- .Params.description -}}
|
||||
</p>
|
||||
{{- else -}}
|
||||
{{- partial "hook/content.html" .Summary | safeHTML -}}
|
||||
{{- end -}}
|
||||
</div>
|
||||
|
||||
{{- /* Footer */ -}}
|
||||
<div class="post-footer">
|
||||
<a href="{{ .Permalink }}">{{ T "readmore" }}</a>
|
||||
{{ with .Params.tags }}
|
||||
<a href="{{ .Permalink }}">{{ T "readMore" }}</a>
|
||||
{{- with .Params.tags -}}
|
||||
<div class="post-tags">
|
||||
{{ range . }}
|
||||
<span class="tag"><a href="{{ "tags/" | absURL }}{{ . | urlize }}/"><i class="fas fa-tag fa-fw"></i>{{ . }}</a></span>
|
||||
{{ end }}
|
||||
{{- range . -}}
|
||||
<span class="tag">
|
||||
<a href="{{ "tags/" | absURL }}{{ . | urlize }}/"><i class="fas fa-tag fa-fw"></i> {{ . }}</a>
|
||||
</span>
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
</div>
|
||||
</article>
|
|
@ -1,37 +1,49 @@
|
|||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
{{ if .IsHome }}
|
||||
<title>{{ .Title }}</title>
|
||||
{{ else }}
|
||||
<title>{{ .Title }} - {{ .Site.Title }}</title>
|
||||
{{ end }}
|
||||
{{- with .Title }}{{ . }} | {{ end }}{{ .Site.Title -}}
|
||||
<link href="{{ .Permalink }}index.xml" rel="self"/>
|
||||
<link href="{{ .Permalink }}"/>
|
||||
{{ if not .Date.IsZero }}
|
||||
<updated>{{ .Date.Format "02-01-2006T15:04:05-07:00" | safeHTML }}</updated>
|
||||
{{ end }}
|
||||
<id>{{ .Permalink }}</id>
|
||||
{{- if not .Date.IsZero -}}
|
||||
<updated>
|
||||
{{- .Date.Format "02-01-2006T15:04:05-07:00" | safeHTML -}}
|
||||
</updated>
|
||||
{{- end -}}
|
||||
<id>
|
||||
{{- .Permalink -}}
|
||||
</id>
|
||||
<author>
|
||||
{{ with .Site.Author.name }}
|
||||
{{- with .Site.Author.name -}}
|
||||
<name>{{ . }}</name>
|
||||
{{ end }}
|
||||
{{ with $.Site.Author.email }}
|
||||
{{- end -}}
|
||||
{{- with .Site.Author.email -}}
|
||||
<email>{{ . }}</email>
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
</author>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
{{ range first 15 (where .Data.Pages "Type" "in" .Site.Params.mainSections) }}
|
||||
{{- range first 15 (where .Data.Pages "Type" "in" .Site.Params.mainSections) -}}
|
||||
<entry>
|
||||
{{ `<title type="html"><![CDATA[` | safeHTML }}{{ .Title }}]]></title>
|
||||
<title type="html">
|
||||
{{- printf "<![CDATA[%s]]>" .Title | safeHTML -}}
|
||||
</title>
|
||||
<link href="{{ .Permalink }}"/>
|
||||
<id>{{ .Permalink }}</id>
|
||||
{{ with .Site.Author.name }}
|
||||
<id>
|
||||
{{- .Permalink -}}
|
||||
</id>
|
||||
{{- with .Site.Author.name -}}
|
||||
<author>
|
||||
<name>{{ . }}</name>
|
||||
<name>
|
||||
{{- . -}}
|
||||
</name>
|
||||
</author>
|
||||
{{ end }}
|
||||
<published>{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</published>
|
||||
<updated>{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</updated>
|
||||
{{ `<content type="html"><![CDATA[` | safeHTML }}{{ .Content }}]]></content>
|
||||
{{- end -}}
|
||||
<published>
|
||||
{{- .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML -}}
|
||||
</published>
|
||||
<updated>
|
||||
{{- .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML -}}
|
||||
</updated>
|
||||
<content type="html">
|
||||
{{- printf "<![CDATA[%s]]>" .Content | safeHTML -}}
|
||||
</content>
|
||||
</entry>
|
||||
{{ end }}
|
||||
</feed>
|
||||
{{- end -}}
|
||||
</feed>
|
|
@ -1,22 +1,27 @@
|
|||
{{ define "content" -}}
|
||||
{{ if eq .Site.Params.home_mode "post" -}}
|
||||
<div class="post-warp">
|
||||
{{- define "content" -}}
|
||||
{{- /* Home mode [post] */ -}}
|
||||
{{- if eq .Site.Params.home_mode "post" -}}
|
||||
<div class="page">
|
||||
{{- /* Profile */ -}}
|
||||
{{- partial "home/profile.html" . -}}
|
||||
|
||||
{{ $paginator := where .Site.RegularPages "Type" "posts" -}}
|
||||
{{ $paginator = where $paginator "Params.show_in_homepage" "!=" false -}}
|
||||
{{ with .Site.Params.home_paginate -}}
|
||||
{{ $paginator = $.Paginate $paginator . -}}
|
||||
{{ else -}}
|
||||
{{ $paginator = $.Paginate $paginator -}}
|
||||
{{ end -}}
|
||||
{{ range $paginator.Pages -}}
|
||||
{{ .Render "summary" -}}
|
||||
{{ end -}}
|
||||
|
||||
{{ partial "paginator.html" . -}}
|
||||
{{- /* Paginate */ -}}
|
||||
{{- $paginator := where .Site.RegularPages "Type" "posts" -}}
|
||||
{{- $paginator = where $paginator "Params.show_in_homepage" "!=" false -}}
|
||||
{{- with .Site.Params.home_paginate -}}
|
||||
{{- $paginator = $.Paginate $paginator . -}}
|
||||
{{- else -}}
|
||||
{{- $paginator = $.Paginate $paginator -}}
|
||||
{{- end -}}
|
||||
{{- range $paginator.Pages -}}
|
||||
{{- .Render "summary" -}}
|
||||
{{- end -}}
|
||||
{{- partial "paginator.html" . -}}
|
||||
</div>
|
||||
|
||||
{{- /* Home mode [other] */ -}}
|
||||
{{- else -}}
|
||||
{{ partial "home/profile.html" . -}}
|
||||
{{ end -}}
|
||||
{{ end }}
|
||||
{{- /* Profile */ -}}
|
||||
{{- partial "home/profile.html" . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
|
@ -1,95 +1,107 @@
|
|||
{{ if eq (getenv "HUGO_ENV") "production" | and .IsPage | and (ne .Params.comment false) -}}
|
||||
<!-- Disqus Comment System-->
|
||||
{{- if .Site.DisqusShortname -}}
|
||||
{{- if eq (getenv "HUGO_ENV") "production" | and .IsPage | and (ne .Params.comment false) -}}
|
||||
{{- /* Disqus Comment System */ -}}
|
||||
{{- if .Site.Params.disqus.shortname -}}
|
||||
<div id="disqus_thread"></div>
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
// Don't ever inject Disqus on localhost--it creates unwanted
|
||||
// discussions from "localhost:1313" on your Disqus account...
|
||||
// discussions from "localhost" on your Disqus account...
|
||||
if (window.location.hostname == "localhost")
|
||||
return;
|
||||
|
||||
var dsq = document.createElement("script"); dsq.type = "text/javascript"; dsq.async = true;
|
||||
var disqus_shortname = "{{ .Site.DisqusShortname }}";
|
||||
var disqus_shortname = "{{ .Site.Params.disqus.shortname }}";
|
||||
dsq.src = "//" + disqus_shortname + ".disqus.com/embed.js";
|
||||
(document.getElementsByTagName("head")[0] || document.getElementsByTagName("body")[0]).appendChild(dsq);
|
||||
})();
|
||||
</script>
|
||||
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
|
||||
<a href="https://disqus.com/" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
|
||||
{{- end -}}
|
||||
|
||||
<!-- gitalk Comment System-->
|
||||
{{- /* Gitalk Comment System */ -}}
|
||||
{{- if .Site.Params.gitalk.owner -}}
|
||||
<div id="gitalk-container"></div>
|
||||
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.gitalk_css }}
|
||||
{{ .Site.Params.cdn.gitalk_css | safeHTML }}
|
||||
{{ else }}
|
||||
{{- if .Site.Params.cdn.gitalk_css -}}
|
||||
{{- .Site.Params.cdn.gitalk_css | safeHTML -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "css/lib/gitalk/gitalk.css" | resources.Minify -}}
|
||||
<link rel="stylesheet" href="{{ $res.RelPermalink }}">
|
||||
{{ end }}
|
||||
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.gitalk_js }}
|
||||
{{ .Site.Params.cdn.gitalk_js | safeHTML }}
|
||||
{{ else }}
|
||||
{{- end -}}
|
||||
{{- if .Site.Params.cdn.gitalk_js -}}
|
||||
{{ .Site.Params.cdn.gitalk_js | safeHTML -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "js/lib/gitalk/gitalk.min.js" | resources.Minify -}}
|
||||
<script src="{{ $res.RelPermalink }}"></script>
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
<script type="text/javascript">
|
||||
var gitalk = new Gitalk({
|
||||
id: "{{ .Date }}",
|
||||
title: "{{ .Title }}",
|
||||
clientID: "{{ .Site.Params.gitalk.clientId }}",
|
||||
clientSecret: "{{ .Site.Params.gitalk.clientSecret }}",
|
||||
repo: "{{ .Site.Params.gitalk.repo }}",
|
||||
owner: "{{ .Site.Params.gitalk.owner }}",
|
||||
admin: ["{{ .Site.Params.gitalk.owner }}"],
|
||||
body: decodeURI(location.href)
|
||||
});
|
||||
gitalk.render("gitalk-container");
|
||||
(function () {
|
||||
// Don't ever inject Gitalk on localhost--it creates unwanted
|
||||
// discussions from "localhost" on your Gitalk account...
|
||||
if (window.location.hostname == "localhost")
|
||||
return;
|
||||
var gitalk = new Gitalk({
|
||||
id: "{{ .Date }}",
|
||||
title: "{{ .Title }}",
|
||||
clientID: "{{ .Site.Params.gitalk.clientId }}",
|
||||
clientSecret: "{{ .Site.Params.gitalk.clientSecret }}",
|
||||
repo: "{{ .Site.Params.gitalk.repo }}",
|
||||
owner: "{{ .Site.Params.gitalk.owner }}",
|
||||
admin: ["{{ .Site.Params.gitalk.owner }}"],
|
||||
body: decodeURI(location.href)
|
||||
});
|
||||
gitalk.render("gitalk-container");
|
||||
})();
|
||||
</script>
|
||||
<noscript>Please enable JavaScript to view the <a href="https://github.com/gitalk/gitalk">comments powered by gitalk.</a></noscript>
|
||||
<noscript>Please enable JavaScript to view the <a href="https://github.com/gitalk/gitalk">comments powered by Gitalk.</a></noscript>
|
||||
{{- end -}}
|
||||
|
||||
<!-- valine -->
|
||||
{{- /* Valine Comment System */ -}}
|
||||
{{- if .Site.Params.valine.enable -}}
|
||||
<div id="vcomments"></div>
|
||||
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.valine_js }}
|
||||
{{ .Site.Params.cdn.valine_js | safeHTML }}
|
||||
{{ else }}
|
||||
{{- if .Site.Params.cdn.valine_js -}}
|
||||
{{- .Site.Params.cdn.valine_js | safeHTML -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "js/lib/valine/Valine.min.js" | resources.Minify -}}
|
||||
<script src="{{ $res.RelPermalink }}"></script>
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
<script type="text/javascript">
|
||||
new Valine({
|
||||
el: "#vcomments",
|
||||
appId: "{{ .Site.Params.valine.appId }}",
|
||||
appKey: "{{ .Site.Params.valine.appKey }}",
|
||||
meta: ["nick", "mail"],
|
||||
notify: "{{ .Site.Params.valine.notify }}",
|
||||
verify: "{{ .Site.Params.valine.verify }}",
|
||||
avatar: "{{ .Site.Params.valine.avatar }}",
|
||||
placeholder: "{{ .Site.Params.valine.placeholder }}",
|
||||
visitor: "{{ .Site.Params.valine.visitor }}",
|
||||
recordIP: "{{ .Site.Params.valine.recordIP }}",
|
||||
lang: "{{ T `valineLang` }}",
|
||||
});
|
||||
(function () {
|
||||
// Don't ever inject Valine on localhost--it creates unwanted
|
||||
// discussions from "localhost" on your Valine account...
|
||||
if (window.location.hostname == "localhost")
|
||||
return;
|
||||
new Valine({
|
||||
el: "#vcomments",
|
||||
appId: "{{ .Site.Params.valine.appId }}",
|
||||
appKey: "{{ .Site.Params.valine.appKey }}",
|
||||
meta: ["nick", "mail"],
|
||||
notify: "{{ .Site.Params.valine.notify }}",
|
||||
verify: "{{ .Site.Params.valine.verify }}",
|
||||
avatar: "{{ .Site.Params.valine.avatar }}",
|
||||
placeholder: "{{ .Site.Params.valine.placeholder }}",
|
||||
visitor: "{{ .Site.Params.valine.visitor }}",
|
||||
recordIP: "{{ .Site.Params.valine.recordIP }}",
|
||||
lang: "{{ T `valineLang` }}",
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
<noscript>Please enable JavaScript to view the <a href="https://valine.js.org/">comments powered by Valine.</a></noscript>
|
||||
{{- end -}}
|
||||
|
||||
<!-- facebook comment -->
|
||||
{{- /* Facebook Comment System */ -}}
|
||||
{{- if .Site.Params.facebook.enable -}}
|
||||
<div id="fb-root"></div>
|
||||
<script
|
||||
async
|
||||
defer
|
||||
crossorigin="anonymous"
|
||||
<script
|
||||
async
|
||||
defer
|
||||
crossorigin="anonymous"
|
||||
src="https://connect.facebook.net/{{ .Site.Params.facebook.languageCode }}/sdk.js#xfbml=1&version=v5.0&appId={{ .Site.Params.facebook.appId }}&autoLogAppEvents=1"
|
||||
></script>
|
||||
<div
|
||||
class="fb-comments"
|
||||
<div
|
||||
class="fb-comments"
|
||||
data-href="{{ .Site.Params.baseURL }}{{ .Permalink | absURL }}"
|
||||
data-width="{{ .Site.Params.facebook.width }}"
|
||||
data-width="{{ .Site.Params.facebook.width }}"
|
||||
data-numposts="{{ .Site.Params.facebook.numPosts }}"
|
||||
></div>
|
||||
<noscript>Please enable JavaScript to view the <a href="https://developers.facebook.com/docs/plugins/comments/">comments powered by Facebook.</a></noscript>
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
{{- end -}}
|
|
@ -1,23 +1,35 @@
|
|||
<footer class="footer">
|
||||
<div class="copyright">
|
||||
{{- /* Hugo and LoveIt */ -}}
|
||||
<div class="copyright-line">
|
||||
{{ (printf (T "powered") `<a href="https://gohugo.io/" target="_blank" rel="external nofollow noopener noreffer">Hugo</a>`) | safeHTML }} | {{ T "theme" }}<a href="https://github.com/dillonzq/LoveIt" target="_blank" rel="external nofollow noopener noreffer">LoveIt<i class="far fa-heart fa-fw"></i></a>
|
||||
{{- printf (T "powered") `<a href="https://gohugo.io/" target="_blank" rel="external nofollow noopener noreffer">Hugo</a>` | safeHTML }} | {{ T "theme" }}<a href="https://github.com/dillonzq/LoveIt" target="_blank" rel="external nofollow noopener noreffer">LoveIt<i class="far fa-heart fa-fw"></i></a>
|
||||
</div>
|
||||
|
||||
<div class="copyright-line">
|
||||
{{- /* Copyright year */ -}}
|
||||
<i class="far fa-copyright fa-fw"></i>
|
||||
{{- with .Site.Params.since -}}
|
||||
<span itemprop="copyrightYear">{{ if lt . now.Year }}{{ . }} - {{ end }}{{ now.Year }}</span>
|
||||
<span itemprop="copyrightYear">
|
||||
{{- if lt . now.Year }}{{ . }} - {{ end }}{{ now.Year -}}
|
||||
</span>
|
||||
{{- else -}}
|
||||
<span itemprop="copyrightYear">{{ now.Year }}</span>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Author */ -}}
|
||||
{{- with .Site.Author.name -}}
|
||||
<span class="author" itemprop="copyrightHolder"> <a href="{{ $.Site.BaseURL }}">{{ . }}</a></span>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.icp -}}
|
||||
<span class="icp"> | {{ . | safeHTML }}</span>
|
||||
<span class="author" itemprop="copyrightHolder"> <a href="{{ $.Site.Author.link | default $.Site.BaseURL }}" target="_blank">{{ . }}</a></span>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* License */ -}}
|
||||
{{- with .Site.Params.license -}}
|
||||
<span class="license"> | {{ . | safeHTML }}</span>
|
||||
| <span class="license">{{ . | safeHTML }}</span>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* ICP */ -}}
|
||||
{{- with .Site.Params.icp -}}
|
||||
<span class="icp-splitter"> | </span><br class="icp-br"/>
|
||||
<span class="icp">{{ . | safeHTML }}</span>
|
||||
{{- end -}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,27 +1,27 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="robots" content="noodp" />
|
||||
<meta name="Description" content="{{ .Params.description | default .Site.Params.description }}">
|
||||
{{ with .Site.Params.google_verification -}}
|
||||
{{- with .Site.Params.google_verification -}}
|
||||
<meta name="google-site-verification" content="{{ . }}" />
|
||||
{{ end -}}
|
||||
{{ with .Site.Params.bing_verification -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.bing_verification -}}
|
||||
<meta name="msvalidate.01" content="{{ . }}" />
|
||||
{{ end -}}
|
||||
{{ with .Site.Params.yandex_verification -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.yandex_verification -}}
|
||||
<meta name="yandex-verification" content="{{ . }}" />
|
||||
{{ end -}}
|
||||
{{ with .Site.Params.pinterest_verification -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.pinterest_verification -}}
|
||||
<meta name="p:domain_verify" content="{{ . }}" />
|
||||
{{ end -}}
|
||||
{{ with .Site.Params.baidu_verification -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.baidu_verification -}}
|
||||
<meta name="baidu-site-verification" content="{{ . }}" />
|
||||
{{ end -}}
|
||||
{{ if .PrevInSection -}}
|
||||
{{- end -}}
|
||||
{{- if .PrevInSection -}}
|
||||
<link rel="prev" href="{{ .PrevInSection.Permalink }}" />
|
||||
{{ end -}}
|
||||
{{ if .NextInSection -}}
|
||||
{{- end -}}
|
||||
{{- if .NextInSection -}}
|
||||
<link rel="next" href="{{ .NextInSection.Permalink }}" />
|
||||
{{ end -}}
|
||||
{{- end -}}
|
||||
<link rel="canonical" href="{{ .Permalink }}" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
|
||||
|
@ -31,26 +31,37 @@
|
|||
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
|
||||
<meta name="msapplication-TileColor" content="#da532c">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
{{ with .OutputFormats.Get "RSS" -}}
|
||||
{{- with .OutputFormats.Get "RSS" -}}
|
||||
<link rel="alternate" href="{{ .RelPermalink }}" type="application/rss+xml" title="{{ $.Site.Title }}">
|
||||
<link rel="feed" href="{{ .RelPermalink }}" type="application/rss+xml" title="{{ $.Site.Title }}">
|
||||
{{ end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{ template "_internal/twitter_cards.html" . -}}
|
||||
{{- $share := .Params.share.enable | default .Site.Params.share.enable | eq true -}}
|
||||
{{- if $share | and (.Params.Share.Twitter | default .Site.Params.Share.Twitter | eq true) -}}
|
||||
{{- template "_internal/twitter_cards.html" . -}}
|
||||
{{- end -}}
|
||||
|
||||
{{ partial "seo.html" . -}}
|
||||
{{- partial "seo.html" . -}}
|
||||
|
||||
{{ $res := resources.Get "css/style.scss" | resources.ToCSS | resources.Minify -}}
|
||||
<link rel="stylesheet" href="{{ $res.RelPermalink }}">
|
||||
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.fontawesome_free_css -}}
|
||||
{{ .Site.Params.cdn.fontawesome_free_css | safeHTML }}
|
||||
{{ else -}}
|
||||
{{ $res := resources.Get "css/lib/fontawesome-free/all.min.css" | resources.Minify -}}
|
||||
{{- $options := dict "targetPath" "css/style.min.css" "outputStyle" "compressed" "enableSourceMap" true -}}
|
||||
{{- if fileExists "config/css/_custom.scss" -}}
|
||||
{{- $options = dict "includePaths" (slice "config/css") | merge $options -}}
|
||||
{{- $res := resources.Get "css/custom-style.scss" | toCSS $options -}}
|
||||
<link rel="stylesheet" href="{{ $res.RelPermalink }}">
|
||||
{{ end }}
|
||||
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.animate_css -}}
|
||||
{{ .Site.Params.cdn.animate_css | safeHTML }}
|
||||
{{ else -}}
|
||||
{{ $res := resources.Get "css/lib/animate/animate.min.css" | resources.Minify -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "css/style.scss" | toCSS $options -}}
|
||||
<link rel="stylesheet" href="{{ $res.RelPermalink }}">
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
|
||||
{{- if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.fontawesome_free_css -}}
|
||||
{{- .Site.Params.cdn.fontawesome_free_css | safeHTML -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "css/lib/fontawesome-free/all.min.css" -}}
|
||||
<link rel="stylesheet" href="{{ $res.RelPermalink }}">
|
||||
{{- end -}}
|
||||
{{- if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.animate_css -}}
|
||||
{{- .Site.Params.cdn.animate_css | safeHTML -}}
|
||||
{{- else -}}
|
||||
{{ $res := resources.Get "css/lib/animate/animate.min.css" -}}
|
||||
<link rel="stylesheet" href="{{ $res.RelPermalink }}">
|
||||
{{- end -}}
|
|
@ -1,33 +1,44 @@
|
|||
{{- /* Desktop navbar */ -}}
|
||||
<nav class="navbar">
|
||||
<div class="navbar-container">
|
||||
<div class="navbar-header animated bounceIn">
|
||||
<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
|
||||
<a href="{{ .Site.BaseURL }}">
|
||||
{{- .Site.Title -}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="navbar-menu">
|
||||
{{ $currentPage := . }}
|
||||
{{ range .Site.Menus.main }}
|
||||
<a class="menu-item{{ if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) | or (eq $currentPage.RelPermalink .URL) }} active{{ end }}" href="{{ .URL | absLangURL }}" title="{{ .Title }}">{{ .Name | safeHTML }}</a>
|
||||
{{ end }}
|
||||
<a href="javascript:void(0);" class="theme-switch"><i class="fas fa-adjust fa-rotate-180 fa-fw" title="Switch Theme"></i></a>
|
||||
{{- $currentPage := . }}
|
||||
{{- range .Site.Menus.main -}}
|
||||
<a class="menu-item{{ if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) | or (eq $currentPage.RelPermalink .URL) }} active{{ end }}" href="{{ .URL | absLangURL }}" title="{{ .Title }}">
|
||||
{{- .Pre | safeHTML }}{{ .Name -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
<a href="javascript:void(0);" class="theme-switch"><i class="fas fa-adjust fa-rotate-180 fa-fw" title="{{ T "switchTheme" }}"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
{{- /* Mobile navbar */ -}}
|
||||
<nav class="navbar-mobile">
|
||||
<div class="navbar-container">
|
||||
<div class="navbar-container">
|
||||
<div class="navbar-header">
|
||||
<div class="navbar-header-title animated bounceIn">
|
||||
<a href="{{.Site.BaseURL}}">{{ .Site.Title }}</a>
|
||||
<a href="{{ .Site.BaseURL }}">
|
||||
{{- .Site.Title -}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="menu-toggle" id="menu-toggle">
|
||||
<span></span><span></span><span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="navbar-menu" id="mobile-menu">
|
||||
{{ $currentPage := . }}
|
||||
{{ range .Site.Menus.main }}
|
||||
<a class="menu-item" href="{{ .URL | absLangURL }}" title="{{ .Title }}">{{ .Name | safeHTML }}</a>
|
||||
{{ end }}
|
||||
<a href="javascript:void(0);" class="theme-switch"><i class="fas fa-adjust fa-rotate-180 fa-fw"></i></a>
|
||||
{{- $currentPage := . -}}
|
||||
{{- range .Site.Menus.main -}}
|
||||
<a class="menu-item" href="{{ .URL | absLangURL }}" title="{{ .Title }}">
|
||||
{{- .Name | safeHTML -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
<a href="javascript:void(0);" class="theme-switch"><i class="fas fa-adjust fa-rotate-180 fa-fw" title="{{ T "switchTheme" }}"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
|
@ -1,32 +1,34 @@
|
|||
<div class="home-intro">
|
||||
{{ $avatar := "" }}
|
||||
{{ if .Site.Params.gravatar.email }}
|
||||
{{ $avatar = (printf "https://www.gravatar.com/avatar/%s?s=240&d=mp" (md5 .Site.Params.gravatar.email)) }}
|
||||
{{ else if .Site.Params.avatar }}
|
||||
{{ $avatar = .Site.Params.avatar }}
|
||||
{{ end }}
|
||||
{{ if $avatar }}
|
||||
{{- $avatar := "" -}}
|
||||
{{- if .Site.Params.gravatar.email -}}
|
||||
{{- $avatar = (printf "https://www.gravatar.com/avatar/%s?s=240&d=mp" (md5 .Site.Params.gravatar.email)) -}}
|
||||
{{- else if .Site.Params.avatar -}}
|
||||
{{- $avatar = .Site.Params.avatar -}}
|
||||
{{- end -}}
|
||||
{{- if $avatar -}}
|
||||
<div class="home-avatar">
|
||||
<a href="/posts">
|
||||
<img src={{ $avatar | relURL }} alt="avatar">
|
||||
<img src={{ $avatar | relURL }} alt="avatar" title="{{ T "home" }}">
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
|
||||
{{ with .Site.Params.subtitle }}
|
||||
{{- with .Site.Params.subtitle -}}
|
||||
<h2 class="home-description">
|
||||
{{ $id := md5 . | printf "tp-%s" }}
|
||||
<div id={{ printf "r%s" $id }} hidden=true>{{ . | safeHTML }}</div>
|
||||
{{- $id := md5 . | printf "tp-%s" -}}
|
||||
<div id={{ printf "r%s" $id }} hidden=true>
|
||||
{{- . | safeHTML -}}
|
||||
</div>
|
||||
<div id={{ $id }} class="typeit"></div>
|
||||
{{ with $.Scratch.Get "typeitMap" }}
|
||||
{{ $.Scratch.Set "typeitMap" (dict $id (slice $id) | merge .) }}
|
||||
{{ else }}
|
||||
{{ $.Scratch.Set "typeitMap" (dict $id (slice $id)) }}
|
||||
{{ end }}
|
||||
{{- with $.Scratch.Get "typeitMap" -}}
|
||||
{{- $.Scratch.Set "typeitMap" (dict $id (slice $id) | merge .) -}}
|
||||
{{- else -}}
|
||||
{{- $.Scratch.Set "typeitMap" (dict $id (slice $id)) -}}
|
||||
{{- end -}}
|
||||
</h2>
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
|
||||
<div class="home-social-links">
|
||||
{{ partial "home/social.html" . }}
|
||||
{{- partial "home/social.html" . -}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,171 +1,288 @@
|
|||
{{ with .Site.Params.Social.Github }}
|
||||
<a href="https://github.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-github-alt fa-fw" title="Github"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.LinkedIn }}
|
||||
<a href="https://linkedin.com/in/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-linkedin fa-fw" title="LinkedIn"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Twitter }}
|
||||
<a href="https://twitter.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-twitter fa-fw" title="Twitter"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Instagram }}
|
||||
<a href="https://www.instagram.com/{{.}}/" rel="me noopener noreffer" target="_blank"><i class="fab fa-instagram fa-fw" title="Instagram"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Facebook}}
|
||||
<a href="https://facebook.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-facebook fa-fw" title="Facebook"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Telegram}}
|
||||
<a href="https://t.me/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-telegram-plane fa-fw" title="Telegram"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Medium}}
|
||||
<a href="https://medium.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-medium fa-fw" title="Medium"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Gitlab}}
|
||||
<a href="https://gitlab.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-gitlab fa-fw" title="Gitlab"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Youtubelegacy}}
|
||||
<a href="https://www.youtube.com/user/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-youtube fa-fw" title="Youtube"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Youtubecustom}}
|
||||
<a href="https://www.youtube.com/c/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-youtube fa-fw" title="Youtube"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Youtubechannel}}
|
||||
<a href="https://www.youtube.com/channel/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-youtube fa-fw" title="Youtube"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Tumblr}}
|
||||
<a href="https://{{.}}.tumblr.com" rel="me noopener noreffer" target="_blank"><i class="fab fa-tumblr fa-fw" title="Tumblr"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Quora}}
|
||||
<a href="https://www.quora.com/profile/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-quora fa-fw" title="Quora"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Keybase}}
|
||||
<a href="https://keybase.io/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-keybase fa-fw" title="Keybase"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Pinterest}}
|
||||
<a href="https://www.pinterest.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-pinterest fa-fw" title="Pinterest"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Reddit}}
|
||||
<a href="https://www.reddit.com/user/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-reddit fa-fw" title="Reddit"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Codepen}}
|
||||
<a href="https://codepen.io/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-codepen fa-fw" title="Codepen"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.FreeCodeCamp}}
|
||||
<a href="https://freecodecamp.org/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-free-code-camp fa-fw"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Bitbucket}}
|
||||
<a href="https://bitbucket.org/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-bitbucket fa-fw" title="Bitbucket"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Stackoverflow}}
|
||||
<a href="https://stackoverflow.com/users/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-stack-overflow fa-fw" title="Stackoverflow"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Weibo}}
|
||||
<a href="https://weibo.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-weibo fa-fw" title="Weibo"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Odnoklassniki}}
|
||||
<a href="https://ok.ru/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-odnoklassniki fa-fw" title="Odnoklassniki"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.VKontakte}}
|
||||
<a href="https://vk.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-vk fa-fw" title="VKontakte"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Flickr}}
|
||||
<a href="https://www.flickr.com/photos/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-flickr fa-fw" title="Flickr"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Xing}}
|
||||
<a href="https://www.xing.com/profile/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-xing fa-fw" title="Xing"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Snapchat}}
|
||||
<a href="https://www.snapchat.com/add/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-snapchat fa-fw" title="Snapchat"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Soundcloud}}
|
||||
<a href="https://soundcloud.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-soundcloud fa-fw" title="Soundcloud"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Spotify}}
|
||||
<a href="https://open.spotify.com/user/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-spotify fa-fw" title="Spotify"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Bandcamp}}
|
||||
<a href="https://{{.}}.bandcamp.com/" rel="me noopener noreffer" target="_blank"><i class="fab fa-bandcamp fa-fw" title="Bandcamp"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Paypal}}
|
||||
<a href="https://paypal.me/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-paypal fa-fw" title="Paypal"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Fivehundredpx}}
|
||||
<a href="https://500px.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-500px fa-fw" title="Fivehundredpx"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Mix}}
|
||||
<a href="https://mix.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-mix fa-fw" title="Mix"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Goodreads}}
|
||||
<a href="https://www.goodreads.com/user/show/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-goodreads fa-fw" title="Goodreads"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Lastfm}}
|
||||
<a href="https://www.last.fm/user/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-POP_lastfm fa-fw" title="Lastfm"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Foursquare}}
|
||||
<a href="https://foursquare.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-foursquare fa-fw" title="Foursquare"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Hackernews}}
|
||||
<a href="https://news.ycombinator.com/user?id={{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-hacker-news fa-fw" title="Hackernews"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Kickstarter}}
|
||||
<a href="https://kickstarter.com/profile/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-kickstarter fa-fw" title="Kickstarter"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Patreon}}
|
||||
<a href="https://patreon.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-patreon fa-fw" title="Patreon"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Steam}}
|
||||
<a href="https://steamcommunity.com/id/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-steam fa-fw" title="Steam"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Twitch}}
|
||||
<a href="https://www.twitch.tv/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-twitch fa-fw" title="Twitch"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Strava}}
|
||||
<a href="https://www.strava.com/athletes/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-strava fa-fw" title="Strava"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Skype}}
|
||||
<a href="skype:{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-skype fa-fw" title="Skype"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Whatsapp}}
|
||||
<a href="https://wa.me/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-whatsapp fa-fw" title="Whatsapp"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Zhihu}}
|
||||
<a href="https://www.zhihu.com/people/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-zhihu fa-fw" title="Zhihu"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Angellist}}
|
||||
<a href="https://angel.co/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-angellist fa-fw" title="Angellist"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Slideshare}}
|
||||
<a href="https://slideshare.com/{{ . }}" rel="me noopener noreffer" target="_blank"><i class="fab fa-slideshare fa-fw" title="Slideshare"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Jsfiddle}}
|
||||
<a href="https://jsfiddle.com/{{ . }}" rel="me noopener noreffer" target="_blank"><i class="fab fa-jsfiddle fa-fw" title="Jsfiddle"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Deviantart}}
|
||||
<a href="https://{{ . }}.deviantart.com/" rel="me noopener noreffer" target="_blank"><i class="fab fa-deviantart fa-fw" title="Deviantart"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Behance}}
|
||||
<a href="https://behance.net/{{ . }}" rel="me noopener noreffer" target="_blank"><i class="fab fa-behance fa-fw" title="Behance"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Dribble}}
|
||||
<a href="https://dribbble.com/{{ . }}" rel="me noopener noreffer" target="_blank"><i class="fab fa-dribbble fa-fw" title="Dribble"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Wordpress}}
|
||||
<a href="https://{{ . }}.wordpress.com" rel="me noopener noreffer" target="_blank"><i class="fab fa-wordpress fa-fw" title="Wordpress"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Vine}}
|
||||
<a href="https://vine.co/" rel="me noopener noreffer" target="_blank"><i class="fab fa-vine fa-fw" title="Vine"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Googlescholar}}
|
||||
<a href="https://scholar.google.com/citations?{{ . }}" rel="me noopener noreffer" target="_blank"><i class="fab fa-Googlescholar fa-fw" title="Googlescholar"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Researchgate}}
|
||||
<a href="https://www.researchgate.net/profile/{{ . }}" rel="me noopener noreffer" target="_blank"><i class="fab fa-researchgate fa-fw" title="Researchgate"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Mastodon}}
|
||||
<a href="https://mastodon.social/{{ . }}" rel="me noopener noreffer" target="_blank"><i class="fab fa-mastodon fa-fw" title="Mastodon"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Devto}}
|
||||
<a href="https://dev.to/{{ . }}" rel="me noopener noreffer" target="_blank"><i class="fab fa-dev fa-fw" title="Dev.To"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Email}}
|
||||
<a href="mailto:{{.}}" rel="me noopener noreffer"><i class="far fa-envelope fa-fw" target="_blank" title="Email"></i></a>
|
||||
{{ end }}
|
||||
{{- with .Site.Params.Social.Github -}}
|
||||
<a href="https://github.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-github-alt fa-fw" title="Github"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.LinkedIn -}}
|
||||
<a href="https://linkedin.com/in/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-linkedin fa-fw" title="LinkedIn"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Twitter -}}
|
||||
<a href="https://twitter.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-twitter fa-fw" title="Twitter"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Instagram -}}
|
||||
<a href="https://www.instagram.com/{{ . }}/" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-instagram fa-fw" title="Instagram"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Facebook}}
|
||||
<a href="https://facebook.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-facebook fa-fw" title="Facebook"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Telegram}}
|
||||
<a href="https://t.me/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-telegram-plane fa-fw" title="Telegram"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Medium}}
|
||||
<a href="https://medium.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-medium fa-fw" title="Medium"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Gitlab}}
|
||||
<a href="https://gitlab.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-gitlab fa-fw" title="Gitlab"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Youtubelegacy}}
|
||||
<a href="https://www.youtube.com/user/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-youtube fa-fw" title="Youtube"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Youtubecustom}}
|
||||
<a href="https://www.youtube.com/c/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-youtube fa-fw" title="Youtube"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Youtubechannel}}
|
||||
<a href="https://www.youtube.com/channel/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-youtube fa-fw" title="Youtube"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Tumblr}}
|
||||
<a href="https://{{ . }}.tumblr.com" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-tumblr fa-fw" title="Tumblr"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Quora}}
|
||||
<a href="https://www.quora.com/profile/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-quora fa-fw" title="Quora"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Keybase}}
|
||||
<a href="https://keybase.io/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-keybase fa-fw" title="Keybase"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Pinterest}}
|
||||
<a href="https://www.pinterest.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-pinterest fa-fw" title="Pinterest"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Reddit}}
|
||||
<a href="https://www.reddit.com/user/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-reddit fa-fw" title="Reddit"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Codepen}}
|
||||
<a href="https://codepen.io/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-codepen fa-fw" title="Codepen"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.FreeCodeCamp}}
|
||||
<a href="https://freecodecamp.org/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-free-code-camp fa-fw"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Bitbucket}}
|
||||
<a href="https://bitbucket.org/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-bitbucket fa-fw" title="Bitbucket"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Stackoverflow}}
|
||||
<a href="https://stackoverflow.com/users/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-stack-overflow fa-fw" title="Stackoverflow"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Weibo}}
|
||||
<a href="https://weibo.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-weibo fa-fw" title="Weibo"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Odnoklassniki}}
|
||||
<a href="https://ok.ru/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-odnoklassniki fa-fw" title="Odnoklassniki"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.VKontakte}}
|
||||
<a href="https://vk.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-vk fa-fw" title="VKontakte"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Flickr}}
|
||||
<a href="https://www.flickr.com/photos/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-flickr fa-fw" title="Flickr"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Xing}}
|
||||
<a href="https://www.xing.com/profile/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-xing fa-fw" title="Xing"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Snapchat}}
|
||||
<a href="https://www.snapchat.com/add/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-snapchat fa-fw" title="Snapchat"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Soundcloud}}
|
||||
<a href="https://soundcloud.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-soundcloud fa-fw" title="Soundcloud"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Spotify}}
|
||||
<a href="https://open.spotify.com/user/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-spotify fa-fw" title="Spotify"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Bandcamp}}
|
||||
<a href="https://{{ . }}.bandcamp.com/" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-bandcamp fa-fw" title="Bandcamp"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Paypal}}
|
||||
<a href="https://paypal.me/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-paypal fa-fw" title="Paypal"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Fivehundredpx}}
|
||||
<a href="https://500px.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-500px fa-fw" title="Fivehundredpx"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Mix}}
|
||||
<a href="https://mix.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-mix fa-fw" title="Mix"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Goodreads}}
|
||||
<a href="https://www.goodreads.com/user/show/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-goodreads fa-fw" title="Goodreads"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Lastfm}}
|
||||
<a href="https://www.last.fm/user/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-POP_lastfm fa-fw" title="Lastfm"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Foursquare}}
|
||||
<a href="https://foursquare.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-foursquare fa-fw" title="Foursquare"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Hackernews}}
|
||||
<a href="https://news.ycombinator.com/user?id={{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-hacker-news fa-fw" title="Hackernews"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Kickstarter}}
|
||||
<a href="https://kickstarter.com/profile/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-kickstarter fa-fw" title="Kickstarter"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Patreon}}
|
||||
<a href="https://patreon.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-patreon fa-fw" title="Patreon"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Steam}}
|
||||
<a href="https://steamcommunity.com/id/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-steam fa-fw" title="Steam"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Twitch}}
|
||||
<a href="https://www.twitch.tv/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-twitch fa-fw" title="Twitch"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Strava}}
|
||||
<a href="https://www.strava.com/athletes/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-strava fa-fw" title="Strava"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Skype}}
|
||||
<a href="skype:{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-skype fa-fw" title="Skype"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Whatsapp}}
|
||||
<a href="https://wa.me/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-whatsapp fa-fw" title="Whatsapp"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Zhihu}}
|
||||
<a href="https://www.zhihu.com/people/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-zhihu fa-fw" title="Zhihu"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Angellist}}
|
||||
<a href="https://angel.co/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-angellist fa-fw" title="Angellist"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Slideshare}}
|
||||
<a href="https://slideshare.com/{{- . -}}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-slideshare fa-fw" title="Slideshare"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Jsfiddle}}
|
||||
<a href="https://jsfiddle.com/{{- . -}}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-jsfiddle fa-fw" title="Jsfiddle"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Deviantart}}
|
||||
<a href="https://{{- . -}}.deviantart.com/" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-deviantart fa-fw" title="Deviantart"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Behance}}
|
||||
<a href="https://behance.net/{{- . -}}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-behance fa-fw" title="Behance"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Dribble}}
|
||||
<a href="https://dribbble.com/{{- . -}}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-dribbble fa-fw" title="Dribble"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Wordpress}}
|
||||
<a href="https://{{- . -}}.wordpress.com" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-wordpress fa-fw" title="Wordpress"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Vine}}
|
||||
<a href="https://vine.co/" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-vine fa-fw" title="Vine"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Googlescholar}}
|
||||
<a href="https://scholar.google.com/citations?{{- . -}}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-Googlescholar fa-fw" title="Googlescholar"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Researchgate}}
|
||||
<a href="https://www.researchgate.net/profile/{{- . -}}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-researchgate fa-fw" title="Researchgate"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Mastodon}}
|
||||
<a href="https://mastodon.social/{{- . -}}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-mastodon fa-fw" title="Mastodon"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Devto}}
|
||||
<a href="https://dev.to/{{- . -}}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-dev fa-fw" title="Dev.To"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Email}}
|
||||
<a href="mailto:{{ . }}" rel="me noopener noreffer">
|
||||
<i class="far fa-envelope fa-fw" target="_blank" title="Email"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Custom}}
|
||||
{{- . | safeHTML -}}
|
||||
{{- end -}}
|
43
layouts/partials/hook/content.html
Normal file
|
@ -0,0 +1,43 @@
|
|||
{{- /* Font Awesome */ -}}
|
||||
{{- /* :(far fa-circle): -> <i class="far fa-circle fa-fw"></i> */ -}}
|
||||
{{- $REin := `:\(([\w- ]+?)\):` -}}
|
||||
{{- $REout := `<i class="$1 fa-fw"></i>` -}}
|
||||
{{- $content := replaceRE $REin $REout . -}}
|
||||
|
||||
{{- /* Ruby */ -}}
|
||||
{{- /* [EN]^(English) -> <strong><ruby>EN<rt>English</rt></ruby></strong> */ -}}
|
||||
{{- $REin = `\[(.+?)\]\^\((.+?)\)` -}}
|
||||
{{- $REout = `<strong><ruby>$1<rt>$2</rt></ruby></strong>` -}}
|
||||
{{- $content = replaceRE $REin $REout $content -}}
|
||||
|
||||
{{- /* Checkbox */ -}}
|
||||
{{- $REin = `<input disabled="" type="checkbox">` -}}
|
||||
{{- $REout = `<i class="far fa-check-square fa-fw"></i>` -}}
|
||||
{{- $content = replaceRE $REin $REout $content -}}
|
||||
|
||||
{{- /* Checkbox checked */ -}}
|
||||
{{- $REin = `<input checked="" disabled="" type="checkbox">` -}}
|
||||
{{- $REout = `<i class="far fa-square fa-fw"></i>` -}}
|
||||
{{- $content = replaceRE $REin $REout $content -}}
|
||||
|
||||
{{- /* Fix <sup>[return]</sup> */ -}}
|
||||
{{- $REin = `<sup>\[return\]</sup>` -}}
|
||||
{{- $REout = `↩︎` -}}
|
||||
{{- $content = replaceRE $REin $REout $content -}}
|
||||
|
||||
{{- /* Dummy target */ -}}
|
||||
{{- $REin = `<(h[23456]) (id=".+?")>` -}}
|
||||
{{- $REout = `<a class="post-dummy-target" $2></a><$1>` -}}
|
||||
{{- $content = replaceRE $REin $REout $content -}}
|
||||
|
||||
{{- /* Dummy target */ -}}
|
||||
{{- $REin = `<(.+) (id="fnref:.+?")>` -}}
|
||||
{{- $REout = `<a class="post-dummy-target" $2></a><$1>` -}}
|
||||
{{- $content = replaceRE $REin $REout $content -}}
|
||||
|
||||
{{- /* Dummy target */ -}}
|
||||
{{- $REin = `<li (id="fn:.+?")(.*?)>\s?<p>` -}}
|
||||
{{- $REout = `<li $2><p><a class="post-dummy-target" $1></a>` -}}
|
||||
{{- $content = replaceRE $REin $REout $content -}}
|
||||
|
||||
{{- return $content -}}
|
3
layouts/partials/image.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
{{- /* Lazyload */ -}}
|
||||
{{- $res := resources.Get "svg/loading.svg" | minify -}}
|
||||
<img src="{{ $res.RelPermalink | safeURL }}" data-sizes="auto" data-src="{{ . | safeURL }}" alt="featured image" class="lazyload">
|
|
@ -1,26 +1,30 @@
|
|||
{{ if gt $.Paginator.TotalPages 1 -}}
|
||||
{{- if gt $.Paginator.TotalPages 1 -}}
|
||||
<ul class="pagination">
|
||||
{{- $.Scratch.Set "paginator.ellipsed" false -}}
|
||||
{{ range $.Paginator.Pagers -}}
|
||||
{{ $right := sub .TotalPages .PageNumber -}}
|
||||
{{ $showNumber := or (le .PageNumber 1) (eq $right 0) -}}
|
||||
{{ $showNumber := or $showNumber (and (gt .PageNumber (sub $.Paginator.PageNumber 3)) (lt .PageNumber (add $.Paginator.PageNumber 3))) -}}
|
||||
{{ if $showNumber -}}
|
||||
{{ $.Scratch.Set "paginator.ellipsed" false -}}
|
||||
{{ $.Scratch.Set "paginator.shouldEllipse" false -}}
|
||||
{{ else -}}
|
||||
{{ $.Scratch.Set "paginator.shouldEllipse" (not ($.Scratch.Get "paginator.ellipsed") ) -}}
|
||||
{{ $.Scratch.Set "paginator.ellipsed" true -}}
|
||||
{{ end -}}
|
||||
{{ if $showNumber -}}
|
||||
{{- range $.Paginator.Pagers -}}
|
||||
{{- $right := sub .TotalPages .PageNumber -}}
|
||||
{{- $showNumber := or (le .PageNumber 1) (eq $right 0) -}}
|
||||
{{- $showNumber := or $showNumber (and (gt .PageNumber (sub $.Paginator.PageNumber 3)) (lt .PageNumber (add $.Paginator.PageNumber 3))) -}}
|
||||
{{- if $showNumber -}}
|
||||
{{- $.Scratch.Set "paginator.ellipsed" false -}}
|
||||
{{- $.Scratch.Set "paginator.shouldEllipse" false -}}
|
||||
{{- else -}}
|
||||
{{- $.Scratch.Set "paginator.shouldEllipse" (not ($.Scratch.Get "paginator.ellipsed") ) -}}
|
||||
{{- $.Scratch.Set "paginator.ellipsed" true -}}
|
||||
{{- end -}}
|
||||
{{- if $showNumber -}}
|
||||
<li class="page-item {{ if eq . $.Paginator }}active{{ end }}">
|
||||
<span class="page-link">
|
||||
<a href="{{ .URL }}">{{ .PageNumber }}</a>
|
||||
<a href="{{ .URL }}">
|
||||
{{- .PageNumber -}}
|
||||
</a>
|
||||
</span>
|
||||
</li>
|
||||
{{- else if ($.Scratch.Get "paginator.shouldEllipse") -}}
|
||||
<li class="page-item "><span class="page-link" aria-hidden="true">…</span></li>
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
<li class="page-item ">
|
||||
<span class="page-link" aria-hidden="true">…</span>
|
||||
</li>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</ul>
|
||||
{{- end }}
|
||||
{{- end -}}
|
|
@ -1,41 +1,51 @@
|
|||
{{ $modify_date := .Lastmod.Format (.Site.Params.dateFormatToUse | default "2006-01-02") -}}
|
||||
{{- $modify_date := .Lastmod.Format (.Site.Params.dateFormatToUse | default "2006-01-02") -}}
|
||||
<div class="post-footer" id="post-footer">
|
||||
<div class="post-info">
|
||||
<div class="post-info-line">
|
||||
<div class="post-info-mod">
|
||||
<span>{{ printf (T "lastMod") $modify_date }}</span>
|
||||
<span>
|
||||
{{- printf (T "lastMod") $modify_date -}}
|
||||
</span>
|
||||
</div>
|
||||
<div class="post-info-license">
|
||||
{{ if .Params.license }}
|
||||
<span>{{ printf (T "license") .Params.license | safeHTML }}</span>
|
||||
{{ end }}
|
||||
{{- if .Params.license -}}
|
||||
<span>
|
||||
{{- printf (T "license") .Params.license | safeHTML -}}
|
||||
</span>
|
||||
{{- end -}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="post-info-line">
|
||||
<div class="post-info-md">
|
||||
{{ if .Site.Params.linkToMarkdown }}
|
||||
{{ with .OutputFormats.Get "markdown" }}
|
||||
<span><a class="link-to-markdown" href="{{ .Permalink }}" target="_blank">{{ T "seeMarkDown" }}</a></span>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- if .Site.Params.linkToMarkdown -}}
|
||||
{{- with .OutputFormats.Get "markdown" -}}
|
||||
<span>
|
||||
<a class="link-to-markdown" href="{{ .Permalink }}" target="_blank">
|
||||
{{- T "seeMarkDown" -}}
|
||||
</a>
|
||||
</span>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</div>
|
||||
<div class="post-info-share">
|
||||
{{ if and ( .Param "socialShare" ) (gt (len (.Param "share")) 0) }}
|
||||
<span>{{ partial "post/share.html" . }}</span>
|
||||
{{ end }}
|
||||
{{- if and ( .Param "socialShare" ) (gt (len (.Param "share")) 0) -}}
|
||||
<span>
|
||||
{{- partial "post/share.html" . -}}
|
||||
</span>
|
||||
{{- end -}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="post-info-more">
|
||||
<section>
|
||||
{{ with .Params.tags }}
|
||||
{{ range . }}
|
||||
{{- with .Params.tags -}}
|
||||
{{- range . -}}
|
||||
<span class="tag">
|
||||
<a href="{{ "tags/" | absURL }}{{ . | urlize }}/"><i class="fas fa-tag fa-fw"></i>{{ . }}</a>
|
||||
<a href="{{ "tags/" | absURL }}{{ . | urlize }}/"><i class="fas fa-tag fa-fw"></i> {{ . }}</a>
|
||||
</span>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</section>
|
||||
<section>
|
||||
<span><a href="javascript:window.history.back();">{{ T "back" }}</a></span> | <span><a href="{{ .Site.BaseURL }}">{{ T "home" }}</a></span>
|
||||
|
@ -43,11 +53,11 @@
|
|||
</div>
|
||||
|
||||
<div class="post-nav">
|
||||
{{ if .PrevInSection }}
|
||||
{{- if .PrevInSection -}}
|
||||
<a href="{{ .PrevInSection.Permalink }}" class="prev" rel="prev" title="{{ .PrevInSection.Title }}"><i class="fas fa-angle-left fa-fw"></i>{{ .PrevInSection.Title }}</a>
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
{{ if .NextInSection }}
|
||||
<a href="{{ .NextInSection.Permalink }}" class="next" rel="next" title="{{ .NextInSection.Title }}">{{ .NextInSection.Title }}<i class="fas fa-angle-right fa-fw"></i></a>
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
</div>
|
||||
</div>
|
|
@ -1,52 +1,71 @@
|
|||
{{ if or (eq .Params.share.enable false) (eq .Site.Params.share.enable false) | not }}
|
||||
{{ if or .Params.Share.Twitter (and .Site.Params.Share.Twitter (ne .Params.Share.Twitter false)) }}
|
||||
<a href="//twitter.com/share?url={{ .Permalink }}&text={{ .Title }}&via={{ .Site.Params.Social.Twitter }}" target="_blank" title="Share on Twitter">
|
||||
{{- if .Params.share.enable | default .Site.Params.share.enable | eq true -}}
|
||||
{{- /* Share on Twitter */ -}}
|
||||
{{- if .Params.Share.Twitter | default .Site.Params.Share.Twitter | eq true -}}
|
||||
<a href="//twitter.com/share?url={{ .Permalink }}&text={{ .Title }}&via={{ .Site.Params.Social.Twitter }}" target="_blank" title="{{ T "share" }} Twitter">
|
||||
<i class="fab fa-twitter fa-fw"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ if or .Params.Share.Facebook (and .Site.Params.Share.Facebook (ne .Params.Share.Facebook false)) }}
|
||||
<a href="//www.facebook.com/sharer/sharer.php?u={{ .Permalink }}" target="_blank" title="Share on Facebook">
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Share on Facebook */ -}}
|
||||
{{- if .Params.Share.Facebook | default .Site.Params.Share.Facebook | eq true -}}
|
||||
<a href="//www.facebook.com/sharer/sharer.php?u={{ .Permalink }}" target="_blank" title="{{ T "share" }} Facebook">
|
||||
<i class="fab fa-facebook-square fa-fw"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ if or .Params.Share.Reddit (and .Site.Params.Share.Reddit (ne .Params.Share.Reddit false)) }}
|
||||
<a href="//reddit.com/submit?url={{ .Permalink }}&title={{ .Title }}" target="_blank" title="Share on Reddit">
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Share on Reddit */ -}}
|
||||
{{- if .Params.Share.Reddit | default .Site.Params.Share.Reddit | eq true -}}
|
||||
<a href="//reddit.com/submit?url={{ .Permalink }}&title={{ .Title }}" target="_blank" title="{{ T "share" }} Reddit">
|
||||
<i class="fab fa-reddit fa-fw"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ if or .Params.Share.Linkedin (and .Site.Params.Share.Linkedin (ne .Params.Share.Linkedin false)) }}
|
||||
<a href="//www.linkedin.com/shareArticle?url={{ .Permalink }}&title={{ .Title }}" target="_blank" title="Share on LinkedIn">
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Share on Linkedin */ -}}
|
||||
{{- if .Params.Share.Linkedin | default .Site.Params.Share.Linkedin | eq true -}}
|
||||
<a href="//www.linkedin.com/shareArticle?url={{ .Permalink }}&title={{ .Title }}" target="_blank" title="{{ T "share" }} LinkedIn">
|
||||
<i class="fab fa-linkedin fa-fw"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ if or .Params.Share.Pinterest (and .Site.Params.Share.Pinterest (ne .Params.Share.Pinterest false)) }}
|
||||
<a href="//www.pinterest.com/pin/create/button/?url={{ .Permalink }}&description={{ .Title }}" target="_blank" title="Share on Pinterest">
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Share on Pinterest */ -}}
|
||||
{{- if .Params.Share.Pinterest | default .Site.Params.Share.Pinterest | eq true -}}
|
||||
<a href="//www.pinterest.com/pin/create/button/?url={{ .Permalink }}&description={{ .Title }}" target="_blank" title="{{ T "share" }} Pinterest">
|
||||
<i class="fab fa-pinterest fa-fw"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ if or .Params.Share.YCombinator (and .Site.Params.Share.YCombinator (ne .Params.Share.YCombinator false)) }}
|
||||
<a href="//news.ycombinator.com/submitlink?u={{ .Permalink }}&description={{ .Title }}" target="_blank" title="Share on Hacker News">
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Share on Hacker News */ -}}
|
||||
{{- if .Params.Share.Hackernews | default .Site.Params.Share.Hackernews | eq true -}}
|
||||
<a href="//news.ycombinator.com/submitlink?u={{ .Permalink }}&description={{ .Title }}" target="_blank" title="{{ T "share" }} Hacker News">
|
||||
<i class="fab fa-y-combinator fa-fw"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ if or .Params.Share.Mix (and .Site.Params.Share.Mix (ne .Params.Share.Mix false)) }}
|
||||
<a href="//mix.com/add?url={{ .Permalink }}&description={{ .Title }}" target="_blank" title="Share on Mix">
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Share on Mix */ -}}
|
||||
{{- if .Params.Share.Mix | default .Site.Params.Share.Mix | eq true -}}
|
||||
<a href="//mix.com/add?url={{ .Permalink }}&description={{ .Title }}" target="_blank" title="{{ T "share" }} Mix">
|
||||
<i class="fab fa-mix fa-fw"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ if or .Params.Share.Tumblr (and .Site.Params.Share.Tumblr (ne .Params.Share.Tumblr false)) }}
|
||||
<a href="//www.tumblr.com/widgets/share/tool?canonicalUrl={{ .Permalink }}&title={{ .Title }}" target="_blank" title="Share on Tumblr">
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Share on Tumblr */ -}}
|
||||
{{- if .Params.Share.Tumblr | default .Site.Params.Share.Tumblr | eq true -}}
|
||||
<a href="//www.tumblr.com/widgets/share/tool?canonicalUrl={{ .Permalink }}&title={{ .Title }}" target="_blank" title="{{ T "share" }} Tumblr">
|
||||
<i class="fab fa-tumblr fa-fw"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ if or .Params.Share.VK (and .Site.Params.Share.VK (ne .Params.Share.VK false)) }}
|
||||
<a href="//vk.com/share.php?url={{ .Permalink }}&title={{ .Title }}" target="_blank" title="Share on VKontakte ">
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Share on VKontakte */ -}}
|
||||
{{- if .Params.Share.VKontakte | default .Site.Params.Share.VKontakte | eq true -}}
|
||||
<a href="//vk.com/share.php?url={{ .Permalink }}&title={{ .Title }}" target="_blank" title="{{ T "share" }} VKontakte ">
|
||||
<i class="fab fa-vk fa-fw"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ if or .Params.Share.Weibo (and .Site.Params.Share.Weibo (ne .Params.Share.Weibo false)) }}
|
||||
<a href="//service.weibo.com/share/share.php?url={{ .Permalink }}&appkey=&title={{ .Title }}{{ with $.Params.featured_image }}&pic={{ . }}{{ end }}" target="_blank" title="Share on Weibo">
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Share on Weibo */ -}}
|
||||
{{- if .Params.Share.Weibo | default .Site.Params.Share.Weibo | eq true -}}
|
||||
<a href="//service.weibo.com/share/share.php?url={{ .Permalink }}&appkey=&title={{ .Title }}{{ with $.Params.featured_image }}&pic={{ . }}{{- end -}}" target="_blank" title="{{ T "share" }} Weibo">
|
||||
<i class="fab fa-weibo fa-fw"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
|
@ -1,169 +1,224 @@
|
|||
<!-- jQuery https://github.com/jquery/jquery -->
|
||||
{{ $jquery := "" }}
|
||||
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.jquery_js }}
|
||||
{{ $jquery = .Site.Params.cdn.jquery_js }}
|
||||
{{ else }}
|
||||
{{ $res := resources.Get "js/lib/jquery/jquery.slim.min.js" | resources.Minify }}
|
||||
{{ $jquery = printf "<script src=\"%s\"></script>" $res.RelPermalink }}
|
||||
{{ end }}
|
||||
<!-- lazysizes https://github.com/aFarkas/lazysizes -->
|
||||
{{ $lazysizes := "" }}
|
||||
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.lazysizes_js }}
|
||||
{{ $lazysizes = .Site.Params.cdn.lazysizes_js }}
|
||||
{{ else }}
|
||||
{{ $res := resources.Get "js/lib/lazysizes/lazysizes.min.js" | resources.Minify }}
|
||||
{{ $lazysizes = printf "<script src=\"%s\"></script>" $res.RelPermalink }}
|
||||
{{ end }}
|
||||
<!-- Smooth Scroll https://github.com/cferdinandi/smooth-scroll -->
|
||||
{{ $smooth_scroll := "" }}
|
||||
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.smooth_scroll_js }}
|
||||
{{ $smooth_scroll = .Site.Params.cdn.smooth_scroll_js }}
|
||||
{{ else }}
|
||||
{{ $res := resources.Get "js/lib/smooth-scroll/smooth-scroll.polyfills.min.js" | resources.Minify }}
|
||||
{{ $smooth_scroll = printf "<script src=\"%s\"></script>" $res.RelPermalink }}
|
||||
{{ end }}
|
||||
{{ $smooth_scroll = delimit (slice $smooth_scroll "<script>window.scroll = new SmoothScroll('[data-scroll]', {speed: 300, speedAsDuration: true});</script>") "" }}
|
||||
<!-- KaTeX https://github.com/KaTeX/KaTeX -->
|
||||
{{ $katex_css := "" }}
|
||||
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.katex_css }}
|
||||
{{ $katex_css = .Site.Params.cdn.katex_css }}
|
||||
{{ else }}
|
||||
{{ $res := resources.Get "css/lib/katex/katex.min.css" | resources.Minify }}
|
||||
{{ $katex_css = printf "<link rel=\"stylesheet\" href=\"%s\">" $res.RelPermalink }}
|
||||
{{ end }}
|
||||
{{ $katex_js := "" }}
|
||||
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.katex_js }}
|
||||
{{ $katex_js = .Site.Params.cdn.katex_js }}
|
||||
{{ else }}
|
||||
{{ $res := resources.Get "js/lib/katex/katex.min.js" | resources.Minify }}
|
||||
{{ $katex_js = printf "<script src=\"%s\"></script>" $res.RelPermalink }}
|
||||
{{ end }}
|
||||
{{ $katex_auto_render_js := "" }}
|
||||
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.katex_auto_render_js }}
|
||||
{{ $katex_auto_render_js = .Site.Params.cdn.katex_auto_render_js }}
|
||||
{{ else }}
|
||||
{{ $res := resources.Get "js/lib/katex/auto-render.min.js" | resources.Minify }}
|
||||
{{ $katex_auto_render_js = printf "<script defer src=\"%s\" onload=\"renderMathInElement(document.body);\"></script>" $res.RelPermalink }}
|
||||
{{ end }}
|
||||
{{ $katex := delimit (slice $katex_css $katex_js $katex_auto_render_js) "" }}
|
||||
<!-- mermaid https://github.com/knsv/mermaid -->
|
||||
{{ $mermaid := "" }}
|
||||
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.mermaid_js }}
|
||||
{{ $mermaid = .Site.Params.cdn.mermaid_js }}
|
||||
{{ else }}
|
||||
{{ $res := resources.Get "js/lib/mermaid/mermaid.min.js" | resources.Minify }}
|
||||
{{ $mermaid = printf "<script src=\"%s\"></script>" $res.RelPermalink }}
|
||||
{{ end }}
|
||||
{{ $mermaidInit := "<script>mermaid.initialize({startOnLoad: false, theme: null});</script>" }}
|
||||
{{ $mermaid = delimit (slice $mermaid $mermaidInit) "" }}
|
||||
<!-- ECharts https://github.com/apache/incubator-echarts -->
|
||||
{{ $echarts_js := "" }}
|
||||
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.echarts_js }}
|
||||
{{ $echarts_js = .Site.Params.cdn.echarts_js }}
|
||||
{{ else }}
|
||||
{{ $res := resources.Get "js/lib/echarts/echarts.min.js" | resources.Minify }}
|
||||
{{ $echarts_js = printf "<script src=\"%s\"></script>" $res.RelPermalink }}
|
||||
{{ end }}
|
||||
{{ $echarts_macarons_js := "" }}
|
||||
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.echarts_macarons_js }}
|
||||
{{ $echarts_macarons_js = .Site.Params.cdn.echarts_macarons_js }}
|
||||
{{ else }}
|
||||
{{ $res := resources.Get "js/lib/echarts/macarons.js" | resources.Minify }}
|
||||
{{ $echarts_macarons_js = printf "<script src=\"%s\"></script>" $res.RelPermalink }}
|
||||
{{ end }}
|
||||
{{ $echarts := delimit (slice $echarts_js $echarts_macarons_js) "" }}
|
||||
<!-- TypeIt https://github.com/alexmacarthur/typeit -->
|
||||
{{ $typeit := "" }}
|
||||
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.typeit_js }}
|
||||
{{ $typeit = .Site.Params.cdn.typeit_js }}
|
||||
{{ else }}
|
||||
{{ $res := resources.Get "js/lib/typeit/typeit.min.js" | resources.Minify }}
|
||||
{{ $typeit = printf "<script src=\"%s\"></script>" $res.RelPermalink }}
|
||||
{{ end }}
|
||||
<!-- jQuery.countdown https://github.com/hilios/jQuery.countdown -->
|
||||
{{ $countdown := "" }}
|
||||
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.jquery_countdown_js }}
|
||||
{{ $countdown = .Site.Params.cdn.jquery_countdown_js }}
|
||||
{{ else }}
|
||||
{{ $res := resources.Get "js/lib/jquery-countdown/jquery.countdown.min.js" | resources.Minify }}
|
||||
{{ $countdown = printf "<script src=\"%s\"></script>" $res.RelPermalink }}
|
||||
{{ end }}
|
||||
<!-- APlayer https://github.com/MoePlayer/APlayer -->
|
||||
{{ $aplayer_css := "" }}
|
||||
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.aplayer_css }}
|
||||
{{ $aplayer_css = .Site.Params.cdn.aplayer_css }}
|
||||
{{ else }}
|
||||
{{ $res := resources.Get "css/lib/aplayer/APlayer.min.css" | resources.Minify }}
|
||||
{{ $aplayer_css = printf "<link rel=\"stylesheet\" href=\"%s\">" $res.RelPermalink }}
|
||||
{{ end }}
|
||||
{{ $aplayer_js := "" }}
|
||||
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.aplayer_js }}
|
||||
{{ $aplayer_js = .Site.Params.cdn.aplayer_js }}
|
||||
{{ else }}
|
||||
{{ $res := resources.Get "js/lib/aplayer/APlayer.min.js" | resources.Minify }}
|
||||
{{ $aplayer_js = printf "<script src=\"%s\"></script>" $res.RelPermalink }}
|
||||
{{ end }}
|
||||
{{ $aplayer := delimit (slice $aplayer_css $aplayer_js) "" }}
|
||||
<!-- MetingJS https://github.com/metowolf/MetingJS -->
|
||||
{{ $meting := "" }}
|
||||
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.meting_js }}
|
||||
{{ $meting = .Site.Params.cdn.meting_js }}
|
||||
{{ else }}
|
||||
{{ $res := resources.Get "js/lib/meting/Meting.min.js" | resources.Minify }}
|
||||
{{ $meting = printf "<script src=\"%s\"></script>" $res.RelPermalink }}
|
||||
{{ end }}
|
||||
{{- /* Google analytics async */ -}}
|
||||
{{- if eq (getenv "HUGO_ENV") "production" | and .Site.GoogleAnalytics -}}
|
||||
{{- template "_internal/google_analytics_async.html" . -}}
|
||||
{{- end -}}
|
||||
|
||||
{{ $jquery | safeHTML }}
|
||||
{{ $lazysizes | safeHTML }}
|
||||
{{ $smooth_scroll | safeHTML }}
|
||||
{{- /* jQuery https://github.com/jquery/jquery */ -}}
|
||||
{{- $jquery := "" -}}
|
||||
{{- if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.jquery_js -}}
|
||||
{{- $jquery = .Site.Params.cdn.jquery_js -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "js/lib/jquery/jquery.slim.min.js" -}}
|
||||
{{- $jquery = printf "<script src=\"%s\"></script>" $res.RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- $jquery | safeHTML -}}
|
||||
|
||||
{{ if .IsPage }}
|
||||
{{/* dev feature */}}
|
||||
{{ if .Params.dev }}
|
||||
{{ with .Scratch.Get "echartsMap" }}
|
||||
{{ $echarts | safeHTML }}
|
||||
<script>window.echartsMap = {
|
||||
{{ range $key, $var := . }}
|
||||
{{ $key }}: {{ $var | safeJS }},
|
||||
{{ end }}
|
||||
};window.echartsArr=[];</script>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{/* dev feature */}}
|
||||
{{- /* lazysizes https://github.com/aFarkas/lazysizes */ -}}
|
||||
{{- $lazysizes := "" -}}
|
||||
{{- if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.lazysizes_js -}}
|
||||
{{- $lazysizes = .Site.Params.cdn.lazysizes_js -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "js/lib/lazysizes/lazysizes.min.js" -}}
|
||||
{{- $lazysizes = printf "<script src=\"%s\"></script>" $res.RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- $lazysizes | safeHTML -}}
|
||||
|
||||
{{ with .Scratch.Get "mermaidMap" }}
|
||||
{{ $mermaid | safeHTML }}
|
||||
<script>window.mermaidMap = {{ . | jsonify | safeJS }};</script>
|
||||
{{ end }}
|
||||
{{- /* Smooth Scroll https://github.com/cferdinandi/smooth-scroll */ -}}
|
||||
{{- $smooth_scroll := "" -}}
|
||||
{{- if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.smooth_scroll_js -}}
|
||||
{{- $smooth_scroll = .Site.Params.cdn.smooth_scroll_js -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "js/lib/smooth-scroll/smooth-scroll.polyfills.min.js" -}}
|
||||
{{- $smooth_scroll = printf "<script src=\"%s\"></script>" $res.RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- $smooth_scroll = delimit (slice $smooth_scroll "<script>window.scroll = new SmoothScroll('[data-scroll]', {speed: 300, speedAsDuration: true});</script>") "" -}}
|
||||
{{- $smooth_scroll | safeHTML -}}
|
||||
|
||||
{{ if or .Params.math .Site.Params.math }}
|
||||
{{ $katex | safeHTML }}
|
||||
{{ end }}
|
||||
{{- /* TypeIt https://github.com/alexmacarthur/typeit */ -}}
|
||||
{{- with .Scratch.Get "typeitMap" -}}
|
||||
{{- $typeit := "" -}}
|
||||
{{- if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.typeit_js -}}
|
||||
{{- $typeit = .Site.Params.cdn.typeit_js -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "js/lib/typeit/typeit.min.js" -}}
|
||||
{{- $typeit = printf "<script src=\"%s\"></script>" $res.RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- $typeit | safeHTML -}}
|
||||
{{- $typeitArr := slice -}}
|
||||
{{- range $key, $val := . -}}
|
||||
{{- $typeitArr = $typeitArr | append (slice $val) -}}
|
||||
{{- end -}}
|
||||
<script>
|
||||
{{- printf "window.typeitArr=%s;" (jsonify $typeitArr) | safeJS -}}
|
||||
</script>
|
||||
{{- end -}}
|
||||
|
||||
{{ if .Scratch.Get "music" }}
|
||||
{{ $aplayer | safeHTML }}
|
||||
{{ $meting | safeHTML }}
|
||||
{{ end }}
|
||||
{{- /* KaTeX https://github.com/KaTeX/KaTeX */ -}}
|
||||
{{- if .Site.Params.math.enable | and (ne .Params.math false) -}}
|
||||
{{- $math := .Site.Params.math -}}
|
||||
{{- $katex_css := "" -}}
|
||||
{{- if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.katex_css -}}
|
||||
{{- $katex_css = .Site.Params.cdn.katex_css -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "css/lib/katex/katex.min.css" -}}
|
||||
{{- $katex_css = printf "<link rel=\"stylesheet\" href=\"%s\">" $res.RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- $katex_js := "" -}}
|
||||
{{- if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.katex_js -}}
|
||||
{{- $katex_js = .Site.Params.cdn.katex_js -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "js/lib/katex/katex.min.js" -}}
|
||||
{{- $katex_js = printf "<script src=\"%s\"></script>" $res.RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- $katex_auto_render_js := "" -}}
|
||||
{{- if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.katex_auto_render_js -}}
|
||||
{{- $katex_auto_render_js = .Site.Params.cdn.katex_auto_render_js -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "js/lib/katex/auto-render.min.js" -}}
|
||||
{{- $katex_auto_render_js = printf "<script defer src=\"%s\"></script>" $res.RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- $katex := delimit (slice $katex_css $katex_js $katex_auto_render_js) "" -}}
|
||||
{{- if $math.copy_tex -}}
|
||||
{{- $katex_copy_tex_css := "" -}}
|
||||
{{- if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.katex_copy_tex_css -}}
|
||||
{{- $katex_copy_tex_css = .Site.Params.cdn.katex_copy_tex_css -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "css/lib/katex/copy-tex.min.css" -}}
|
||||
{{- $katex_copy_tex_css = printf "<link rel=\"stylesheet\" href=\"%s\">" $res.RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- $katex_copy_tex_js := "" -}}
|
||||
{{- if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.katex_copy_tex_js -}}
|
||||
{{- $katex_copy_tex_js = .Site.Params.cdn.katex_copy_tex_js -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "js/lib/katex/copy-tex.min.js" -}}
|
||||
{{- $katex_copy_tex_js = printf "<script defer src=\"%s\"></script>" $res.RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- $katex = delimit (slice $katex $katex_copy_tex_css $katex_copy_tex_js) "" -}}
|
||||
{{- end -}}
|
||||
{{- if $math.mhchem -}}
|
||||
{{- $katex_mhchem_js := "" -}}
|
||||
{{- if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.katex_mhchem_js -}}
|
||||
{{- $katex_mhchem_js = .Site.Params.cdn.katex_mhchem_js -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "js/lib/katex/mhchem.min.js" -}}
|
||||
{{- $katex_mhchem_js = printf "<script defer src=\"%s\"></script>" $res.RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- $katex = delimit (slice $katex $katex_mhchem_js) "" -}}
|
||||
{{- end -}}
|
||||
{{- $katex | safeHTML -}}
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
renderMathInElement(document.body, {
|
||||
delimiters: [
|
||||
{ left: "$$", right: "$$", display: true },
|
||||
{ left: "\\(", right: "\\)", display: false },
|
||||
{ left: "\\[", right: "\\]", display: true },
|
||||
{{- if and $math.block_left_delimiter $math.block_right_delimiter -}}
|
||||
{ left: "{{ $math.block_left_delimiter }}", right: "{{ $math.block_right_delimiter }}", display: true },
|
||||
{{- end -}}
|
||||
{{- if and $math.inline_left_delimiter $math.inline_right_delimiter -}}
|
||||
{ left: "{{ $math.inline_left_delimiter }}", right: "{{ $math.inline_right_delimiter }}", display: false },
|
||||
{{- end -}}
|
||||
]
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{{- end -}}
|
||||
|
||||
{{ with .Scratch.Get "countdownMap" }}
|
||||
{{ $countdown | safeHTML }}
|
||||
<script>window.countdownMap = {{ . | jsonify | safeJS }};</script>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- /* mermaid https://github.com/knsv/mermaid */ -}}
|
||||
{{- with .Scratch.Get "mermaidMap" -}}
|
||||
{{- $mermaid := "" -}}
|
||||
{{- if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.mermaid_js -}}
|
||||
{{- $mermaid = .Site.Params.cdn.mermaid_js -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "js/lib/mermaid/mermaid.min.js" -}}
|
||||
{{- $mermaid = printf "<script src=\"%s\"></script>" $res.RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- $mermaidInit := "<script>mermaid.initialize({startOnLoad: false, theme: null});</script>" -}}
|
||||
{{- $mermaid = delimit (slice $mermaid $mermaidInit) "" -}}
|
||||
{{- $mermaid | safeHTML -}}
|
||||
<script>
|
||||
{{- printf "window.mermaidMap=%s;" (jsonify .) | safeJS -}}
|
||||
</script>
|
||||
{{- end -}}
|
||||
|
||||
{{ $typeitMap := .Scratch.Get "typeitMap" }}
|
||||
{{ if $typeitMap }}
|
||||
{{ $typeit | safeHTML }}
|
||||
{{ $typeitArr := slice }}
|
||||
{{ range $key, $val := $typeitMap }}
|
||||
{{ $typeitArr = $typeitArr | append (slice $val) }}
|
||||
{{ end }}
|
||||
<script>window.typeitArr = {{ $typeitArr | jsonify | safeJS }};</script>
|
||||
{{ end }}
|
||||
{{- /* Music */ -}}
|
||||
{{- if .Scratch.Get "music" -}}
|
||||
{{- /* APlayer https://github.com/MoePlayer/APlayer */ -}}
|
||||
{{- $aplayer_css := "" -}}
|
||||
{{- if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.aplayer_css -}}
|
||||
{{- $aplayer_css = .Site.Params.cdn.aplayer_css -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "css/lib/aplayer/APlayer.min.css" -}}
|
||||
{{- $aplayer_css = printf "<link rel=\"stylesheet\" href=\"%s\">" $res.RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- $aplayer_js := "" -}}
|
||||
{{- if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.aplayer_js -}}
|
||||
{{- $aplayer_js = .Site.Params.cdn.aplayer_js -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "js/lib/aplayer/APlayer.min.js" -}}
|
||||
{{- $aplayer_js = printf "<script src=\"%s\"></script>" $res.RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- $aplayer := delimit (slice $aplayer_css $aplayer_js) "" -}}
|
||||
{{- $aplayer | safeHTML -}}
|
||||
|
||||
{{ $res := resources.Get "/js/blog.js" | resources.Minify }}
|
||||
<script src="{{ $res.RelPermalink }}"></script>
|
||||
{{- /* MetingJS https://github.com/metowolf/MetingJS */ -}}
|
||||
{{- $meting := "" -}}
|
||||
{{- if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.meting_js -}}
|
||||
{{- $meting = .Site.Params.cdn.meting_js -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "js/lib/meting/Meting.min.js" -}}
|
||||
{{- $meting = printf "<script src=\"%s\"></script>" $res.RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- $meting | safeHTML -}}
|
||||
{{- end -}}
|
||||
|
||||
{{ if not .Site.IsServer }}
|
||||
{{ template "_internal/google_analytics_async.html" . }}
|
||||
{{ end }}
|
||||
{{- /* jQuery.countdown https://github.com/hilios/jQuery.countdown */ -}}
|
||||
{{- with .Scratch.Get "countdownMap" -}}
|
||||
{{- $countdown := "" -}}
|
||||
{{- if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.jquery_countdown_js -}}
|
||||
{{- $countdown = .Site.Params.cdn.jquery_countdown_js -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "js/lib/jquery-countdown/jquery.countdown.min.js" -}}
|
||||
{{- $countdown = printf "<script src=\"%s\"></script>" $res.RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- $countdown | safeHTML -}}
|
||||
<script>
|
||||
{{- printf "window.countdownMap=%s;" (jsonify .) | safeJS -}}
|
||||
</script>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* dev feature */ -}}
|
||||
{{- if .Params.dev -}}
|
||||
{{- /* ECharts https://github.com/apache/incubator-echarts */ -}}
|
||||
{{- with .Scratch.Get "echartsMap" -}}
|
||||
{{- $echarts_js := "" -}}
|
||||
{{- if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.echarts_js -}}
|
||||
{{- $echarts_js = .Site.Params.cdn.echarts_js -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "js/lib/echarts/echarts.min.js" -}}
|
||||
{{- $echarts_js = printf "<script src=\"%s\"></script>" $res.RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- $echarts_macarons_js := "" -}}
|
||||
{{- if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.echarts_macarons_js -}}
|
||||
{{- $echarts_macarons_js = .Site.Params.cdn.echarts_macarons_js -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "js/lib/echarts/macarons.js" | minify -}}
|
||||
{{- $echarts_macarons_js = printf "<script src=\"%s\"></script>" $res.RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- $echarts := delimit (slice $echarts_js $echarts_macarons_js) "" -}}
|
||||
{{- $echarts | safeHTML -}}
|
||||
<script>
|
||||
window.echartsMap = {
|
||||
{{- range $key, $var := . -}}
|
||||
{{- $key }}: {{ $var | safeJS -}},
|
||||
{{- end -}}
|
||||
};
|
||||
window.echartsArr = [];
|
||||
</script>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Blog script */ -}}
|
||||
{{- $res := resources.Get "/js/blog.js" | minify -}}
|
||||
<script src="{{ $res.RelPermalink }}"></script>
|
|
@ -1,91 +1,94 @@
|
|||
{{ if .IsHome -}}
|
||||
{{- /* Home SEO */ -}}
|
||||
{{- if .IsHome -}}
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "http://schema.org",
|
||||
"@type": "WebSite",
|
||||
"url": "{{ .Site.BaseURL }}",
|
||||
{{ with .Site.Author.name }}
|
||||
"author": {
|
||||
"@type": "Person",
|
||||
"name": "{{ . }}"
|
||||
},
|
||||
{{ end }}
|
||||
{{ with .Site.Params.description }}
|
||||
"description": "{{ . }}",
|
||||
{{ end }}
|
||||
{{ with .Site.Params.image }}
|
||||
"image": "{{ .url | absURL }}",
|
||||
{{ end }}
|
||||
{{ with .Site.Params.logo }}
|
||||
"thumbnailUrl": "{{ .url | absURL }}",
|
||||
{{ end }}
|
||||
{{ with .Site.Copyright }}
|
||||
"license": "{{ . }}",
|
||||
{{ end }}
|
||||
"name": "{{ .Site.Title }}"
|
||||
"@context": "http://schema.org",
|
||||
"@type": "WebSite",
|
||||
"url": "{{ .Site.BaseURL }}",
|
||||
{{- with .Site.Author.name -}}
|
||||
"author": {
|
||||
"@type": "Person",
|
||||
"name": "{{ . }}"
|
||||
},
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.description -}}
|
||||
"description": "{{ . }}",
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.image -}}
|
||||
"image": "{{ .url | absURL }}",
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.logo -}}
|
||||
"thumbnailUrl": "{{ .url | absURL }}",
|
||||
{{- end -}}
|
||||
{{- with .Site.Copyright -}}
|
||||
"license": "{{ . }}",
|
||||
{{- end -}}
|
||||
"name": "{{ .Site.Title }}"
|
||||
}
|
||||
</script>
|
||||
{{ else if .IsPage -}}
|
||||
|
||||
{{- /* Page SEO */ -}}
|
||||
{{- else if .IsPage -}}
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "http://schema.org",
|
||||
"@type": "BlogPosting",
|
||||
"headline": "{{ .Title }}",
|
||||
"mainEntityOfPage": {
|
||||
"@type": "WebPage",
|
||||
"@id": "{{ .Permalink }}"
|
||||
},
|
||||
{{ if ge (.Param "lua.image.width") 696 }}
|
||||
"image": {
|
||||
"@type": "ImageObject",
|
||||
"url": "{{ .Param "lua.image.url" | absURL }}",
|
||||
"width": {{ .Param "lua.image.width" }},
|
||||
"height": {{ .Param "lua.image.height" }}
|
||||
"@context": "http://schema.org",
|
||||
"@type": "BlogPosting",
|
||||
"headline": "{{ .Title }}",
|
||||
"mainEntityOfPage": {
|
||||
"@type": "WebPage",
|
||||
"@id": "{{ .Permalink }}"
|
||||
},
|
||||
{{ else if ge .Site.Params.image.width 696 }}
|
||||
"image": {
|
||||
"@type": "ImageObject",
|
||||
"url": "{{ .Site.Params.image.url | absURL }}",
|
||||
"width": {{ .Site.Params.image.width }},
|
||||
"height": {{ .Site.Params.image.height }}
|
||||
},
|
||||
{{ end }}
|
||||
"genre": "{{ .Type }}",
|
||||
{{ with .Params.tags }}
|
||||
"keywords": "{{ delimit . ", " }}",
|
||||
{{ end }}
|
||||
"wordcount": {{ .WordCount }},
|
||||
"url": "{{ .Permalink }}",
|
||||
{{ if not .PublishDate.IsZero }}
|
||||
"datePublished": "{{ .PublishDate.Format "2006-01-02T15:04:05-07:00" | safeHTML }}",
|
||||
{{ else if not .Date.IsZero }}
|
||||
"datePublished": "{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}",
|
||||
{{ end }}
|
||||
{{ with .Lastmod }}
|
||||
"dateModified": "{{ .Format "2006-01-02T15:04:05-07:00" | safeHTML }}",
|
||||
{{ end }}
|
||||
{{ with .Site.Copyright }}
|
||||
"license": "{{ . }}",
|
||||
{{ end }}
|
||||
{{ with .Site.Params.publisher }}
|
||||
"publisher": {
|
||||
"@type": "Organization",
|
||||
"name": "{{ .name }}",
|
||||
"logo": {
|
||||
"@type": "ImageObject",
|
||||
"url": "{{ .logo.url | absURL }}",
|
||||
"width": {{ .logo.width }},
|
||||
"height": {{ .logo.height }}
|
||||
}
|
||||
},
|
||||
{{ end }}
|
||||
{{ with .Site.Author.Name }}
|
||||
"author": {
|
||||
"@type": "Person",
|
||||
"name": "{{ . }}"
|
||||
},
|
||||
{{ end }}
|
||||
"description": "{{ .Description }}"
|
||||
{{- if ge (.Param "lua.image.width") 696 -}}
|
||||
"image": {
|
||||
"@type": "ImageObject",
|
||||
"url": "{{ .Param "lua.image.url" | absURL }}",
|
||||
"width": {{ .Param "lua.image.width" }},
|
||||
"height": {{ .Param "lua.image.height" }}
|
||||
},
|
||||
{{- else if ge .Site.Params.image.width 696 -}}
|
||||
"image": {
|
||||
"@type": "ImageObject",
|
||||
"url": "{{ .Site.Params.image.url | absURL }}",
|
||||
"width": {{ .Site.Params.image.width }},
|
||||
"height": {{ .Site.Params.image.height }}
|
||||
},
|
||||
{{- end -}}
|
||||
"genre": "{{ .Type }}",
|
||||
{{- with .Params.tags -}}
|
||||
"keywords": "{{ delimit . ", " }}",
|
||||
{{- end -}}
|
||||
"wordcount": {{ .WordCount }},
|
||||
"url": "{{ .Permalink }}",
|
||||
{{- if not .PublishDate.IsZero -}}
|
||||
"datePublished": "{{ .PublishDate.Format "2006-01-02T15:04:05-07:00" | safeHTML }}",
|
||||
{{- else if not .Date.IsZero -}}
|
||||
"datePublished": "{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}",
|
||||
{{- end -}}
|
||||
{{- with .Lastmod -}}
|
||||
"dateModified": "{{ .Format "2006-01-02T15:04:05-07:00" | safeHTML }}",
|
||||
{{- end -}}
|
||||
{{- with .Site.Copyright -}}
|
||||
"license": "{{ . }}",
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.publisher -}}
|
||||
"publisher": {
|
||||
"@type": "Organization",
|
||||
"name": "{{ .name }}",
|
||||
"logo": {
|
||||
"@type": "ImageObject",
|
||||
"url": "{{ .logo.url | absURL }}",
|
||||
"width": {{ .logo.width }},
|
||||
"height": {{ .logo.height }}
|
||||
}
|
||||
},
|
||||
{{- end -}}
|
||||
{{- with .Site.Author.Name -}}
|
||||
"author": {
|
||||
"@type": "Person",
|
||||
"name": "{{ . }}"
|
||||
},
|
||||
{{- end -}}
|
||||
"description": "{{ .Description }}"
|
||||
}
|
||||
</script>
|
||||
{{ end }}
|
||||
{{- end -}}
|
|
@ -1,31 +1,32 @@
|
|||
{{ define "title" }}{{ .Title }} | {{ .Site.Title }}{{ end }}
|
||||
{{- define "title" }}{{ .Title }} | {{ .Site.Title }}{{ end -}}
|
||||
|
||||
{{ define "content" }}
|
||||
{{ $publish_date := .PublishDate.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }}
|
||||
{{ $author := .Site.Author.name }}
|
||||
{{ if isset .Params "author" }}
|
||||
{{ $author = .Site.Author.name }}
|
||||
{{ end }}
|
||||
|
||||
<article class="post-warp">
|
||||
{{- define "content" -}}
|
||||
<article class="page">
|
||||
{{- /* Title */ -}}
|
||||
<h1 class="post-title animated flipInX">{{ .Title }}</h1>
|
||||
|
||||
{{- /* Meta */ -}}
|
||||
<div class="post-meta">
|
||||
<div class="post-meta-main">
|
||||
<a class="author" href="{{.Site.BaseURL }}" rel="author"><i class="fas fa-user-circle fa-fw"></i>{{ $author }} </a>
|
||||
{{ with .Params.categories -}}
|
||||
{{- $author := .Params.author | default .Site.Author.name -}}
|
||||
{{- $author_link := .Params.author_link | default .Site.Author.link | default .Site.BaseURL -}}
|
||||
<a class="author" href="{{ $author_link }}" rel="author" target="_blank">
|
||||
<i class="fas fa-user-circle fa-fw"></i>{{ $author }}
|
||||
</a>
|
||||
{{- with .Params.categories -}}
|
||||
<span class="post-category">
|
||||
{{ T "included" }}
|
||||
{{ range . }}
|
||||
{{- T "included" -}}
|
||||
{{- range . -}}
|
||||
{{- $name := . -}}
|
||||
{{- with $.Site.GetPage "taxonomy" (printf "categories/%s" $name) | default ($.Site.GetPage "taxonomy" (printf "categories/%s" ($name | urlize))) -}}
|
||||
<i class="far fa-folder fa-fw"></i><a href="{{ .Permalink }}">{{ $name }}</a>
|
||||
{{ end -}}
|
||||
{{ end }}
|
||||
<i class="far fa-folder fa-fw"></i><a href="{{ .Permalink }}">{{ $name | humanize }}</a>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</span>
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
</div>
|
||||
<div class="post-meta-other">
|
||||
{{- $publish_date := .PublishDate.Format (.Site.Params.dateFormatToUse | default "2006-01-02") -}}
|
||||
<i class="far fa-calendar-alt fa-fw"></i><time datetime={{ $publish_date }}>{{ $publish_date }}</time>
|
||||
<i class="fas fa-pencil-alt fa-fw"></i>{{ T "wordCount" .WordCount }}
|
||||
<i class="far fa-clock fa-fw"></i>{{ T "readingTime" .ReadingTime }}
|
||||
|
@ -37,67 +38,52 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{{ with .Params.featured_image }}
|
||||
{{- /* Featured image */ -}}
|
||||
{{- with .Params.featured_image -}}
|
||||
<div class="post-featured-image">
|
||||
<img src=/images/loading.svg data-sizes=auto data-src={{ . }} alt="featured image" class="lazyload">
|
||||
{{- partial "image" . -}}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
|
||||
{{ if or .Params.toc (and .Site.Params.toc (ne .Params.toc false)) -}}
|
||||
{{- /* TOC */ -}}
|
||||
{{- if or .Params.toc (and .Site.Params.toc (ne .Params.toc false)) -}}
|
||||
<div class="post-toc" id="post-toc">
|
||||
<h2 class="post-toc-title">{{ T "toc" }}</h2>
|
||||
{{- $globalAutoCollapseToc := .Site.Params.autoCollapseToc | default true }}
|
||||
<div class="post-toc-content{{ if not (and $globalAutoCollapseToc (ne .Params.autoCollapseToc false)) }} always-active{{ end }}">
|
||||
{{ .TableOfContents }}
|
||||
{{- $globalAutoCollapseToc := .Site.Params.auto_collapse_toc | default true }}
|
||||
<div class="post-toc-content{{ if not (and $globalAutoCollapseToc (ne .Params.auto_collapse_toc false)) }} always-active{{ end }}">
|
||||
{{- .TableOfContents -}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="post-toc-mobile" id="post-toc-mobile">
|
||||
<details>
|
||||
<summary><div class="post-toc-title"><span>{{ T "toc" }}</span><span><i class="details icon fas fa-angle-down"></i></span></div></summary>
|
||||
<summary>
|
||||
<div class="post-toc-title">
|
||||
<span>{{ T "toc" }}</span>
|
||||
<span><i class="details icon fas fa-angle-down"></i></span>
|
||||
</div>
|
||||
</summary>
|
||||
<div class="post-toc-content">
|
||||
{{ $toc := .TableOfContents }}
|
||||
{{ $toc = replaceRE `id="TableOfContents"` `id="TableOfContentsMobile"` $toc }}
|
||||
{{ $toc | safeHTML }}
|
||||
{{- $toc := .TableOfContents -}}
|
||||
{{- $toc = replaceRE `id="TableOfContents"` `id="TableOfContentsMobile"` $toc -}}
|
||||
{{- $toc | safeHTML -}}
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Content */ -}}
|
||||
<div class="post-content">
|
||||
{{ $content := .Content }}
|
||||
{{ $REin := `<img src="([^"]+)" alt="([^"]+)?" />` }}
|
||||
{{ $REout := "<figure><img src=/images/loading.svg data-sizes=auto data-src=$1 alt=$2 class=lazyload><figcaption class=image-caption>$2</figcaption></figure>" }}
|
||||
{{ $content = replaceRE $REin $REout $content }}
|
||||
{{ $REin = `<img src="([^"]+)" alt="([^"]+)?" title="([^"]+)?" />` }}
|
||||
{{ $REout = "<figure><img src=/images/loading.svg data-src=$1 data-sizes=auto alt=$2 title=$3 class=lazyload><figcaption class=image-caption>$2</figcaption></figure>" }}
|
||||
{{ $content = replaceRE $REin $REout $content }}
|
||||
{{ $REin = `:\(([\w- ]+?)\):` }}
|
||||
{{ $REout = `<i class="$1 fa-fw"></i>` }}
|
||||
{{ $content = replaceRE $REin $REout $content }}
|
||||
{{ $REin = `\[(.+?)\]\^\((.+?)\)` }}
|
||||
{{ $REout = `<strong><ruby>$1<rt>$2</rt></ruby></strong>` }}
|
||||
{{ $content = replaceRE $REin $REout $content }}
|
||||
{{ $REin = `<sup>\[return\]</sup>` }}
|
||||
{{ $REout = printf "<sup>[%s]</sup>" (T "return") }}
|
||||
{{ $content = replaceRE $REin $REout $content }}
|
||||
{{ $REin = `<(h[123456]) (id=".+?")>` }}
|
||||
{{ $REout = `<a class="post-dummy-target" $2></a><$1>` }}
|
||||
{{ $content = replaceRE $REin $REout $content }}
|
||||
{{ $REin = `<(sup class="footnote-ref") (id="fnref:.+?")>` }}
|
||||
{{ $REout = `<a class="post-dummy-target" $2></a><$1>` }}
|
||||
{{ $content = replaceRE $REin $REout $content }}
|
||||
{{ $REin = `<(li) (id="fn:.+?")>` }}
|
||||
{{ $REout = `<$1><a class="post-dummy-target" $2></a>` }}
|
||||
{{ $content = replaceRE $REin $REout $content }}
|
||||
{{ $content | safeHTML }}
|
||||
{{- partial "hook/content.html" .Content | safeHTML -}}
|
||||
</div>
|
||||
|
||||
{{ partial "post/footer.html" . }}
|
||||
{{- /* Footer */ -}}
|
||||
{{- partial "post/footer.html" . -}}
|
||||
|
||||
{{- /* Comment */ -}}
|
||||
<div class="post-comment">
|
||||
{{ if ( .Params.comment | default true ) }}
|
||||
{{ partial "comments.html" . }}
|
||||
{{ end }}
|
||||
{{- if ( .Params.comment | default true ) -}}
|
||||
{{- partial "comments.html" . -}}
|
||||
{{- end -}}
|
||||
</div>
|
||||
</article>
|
||||
{{- end }}
|
||||
{{- end -}}
|
|
@ -1,34 +1,62 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>{{ with .Title }}{{ . }} on {{ end }}{{ .Site.Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<description>Recent content {{ with .Title }}in {{ . }} {{ end }}on {{ .Site.Title }}</description>
|
||||
<title>
|
||||
{{- with .Title }}{{ . }} | {{ end }}{{ .Site.Title -}}
|
||||
</title>
|
||||
<link>
|
||||
{{- .Permalink -}}
|
||||
</link>
|
||||
<description>
|
||||
{{- with .Title }}{{ . }} | {{ end }}{{ .Site.Title -}}
|
||||
</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
{{ with .Site.LanguageCode }}
|
||||
<language>{{ . }}</language>
|
||||
{{ end }}
|
||||
{{ with .Site.Author.email }}
|
||||
<managingEditor>{{ . }}{{ with .Site.Author.name }} ({{ . }}){{ end }}</managingEditor>
|
||||
<webMaster>{{ . }}{{ with .Site.Author.name }} ({{ . }}){{ end }}</webMaster>
|
||||
{{ end }}
|
||||
{{ with .Site.Copyright }}
|
||||
<copyright>{{ . }}</copyright>
|
||||
{{ end }}
|
||||
{{ if not .Date.IsZero }}
|
||||
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>
|
||||
{{ end }}
|
||||
{{- with .Site.LanguageCode -}}
|
||||
<language>
|
||||
{{- . -}}
|
||||
</language>
|
||||
{{- end -}}
|
||||
{{- with .Site.Author.email -}}
|
||||
<managingEditor>
|
||||
{{- . }}{{ with .Site.Author.name }} ({{ . }}){{ end -}}
|
||||
</managingEditor>
|
||||
<webMaster>
|
||||
{{- . }}{{ with .Site.Author.name }} ({{ . }}){{ end -}}
|
||||
</webMaster>
|
||||
{{- end -}}
|
||||
{{- with .Site.Copyright -}}
|
||||
<copyright>
|
||||
{{- . -}}
|
||||
</copyright>
|
||||
{{- end -}}
|
||||
{{- if not .Date.IsZero -}}
|
||||
<lastBuildDate>
|
||||
{{- .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML -}}
|
||||
</lastBuildDate>
|
||||
{{- end -}}
|
||||
<atom:link href="{{.Permalink}}" rel="self" type="application/rss+xml" />
|
||||
{{ range first 15 (where .Data.Pages "Type" "!=" "home") }}
|
||||
{{- range first 15 (where .Data.Pages "Type" "!=" "home") -}}
|
||||
<item>
|
||||
<title>{{ .Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
||||
{{ with .Site.Author.email }}
|
||||
<author>{{ . }}{{ with .Site.Author.name }} ({{ . }}){{ end }}</author>
|
||||
{{ end }}
|
||||
<guid>{{ .Permalink }}</guid>
|
||||
<description>{{ .Content | html }}</description>
|
||||
<title>
|
||||
{{- .Title -}}
|
||||
</title>
|
||||
<link>
|
||||
{{- .Permalink -}}
|
||||
</link>
|
||||
<pubDate>
|
||||
{{- .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML -}}
|
||||
</pubDate>
|
||||
{{- with .Site.Author.email -}}
|
||||
<author>
|
||||
{{- . }}{{ with .Site.Author.name }} ({{ . }}){{ end -}}
|
||||
</author>
|
||||
{{- end -}}
|
||||
<guid>
|
||||
{{- .Permalink -}}
|
||||
</guid>
|
||||
<description>
|
||||
{{- .Content | html -}}
|
||||
</description>
|
||||
</item>
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
</channel>
|
||||
</rss>
|
||||
</rss>
|
|
@ -1,42 +1,54 @@
|
|||
{{ $_hugo_config := `{ "version": 1 }` -}}
|
||||
{{ $iconMap := dict "note" "fas fa-pencil-alt" -}}
|
||||
{{ $iconMap = dict "abstract" "fas fa-list-ul" | merge $iconMap -}}
|
||||
{{ $iconMap = dict "info" "fas fa-info-circle" | merge $iconMap -}}
|
||||
{{ $iconMap = dict "tip" "fas fa-lightbulb" | merge $iconMap -}}
|
||||
{{ $iconMap = dict "success" "fas fa-check-circle" | merge $iconMap -}}
|
||||
{{ $iconMap = dict "question" "fas fa-question-circle" | merge $iconMap -}}
|
||||
{{ $iconMap = dict "warning" "fas fa-exclamation-triangle" | merge $iconMap -}}
|
||||
{{ $iconMap = dict "failure" "fas fa-times-circle" | merge $iconMap -}}
|
||||
{{ $iconMap = dict "danger" "fas fa-skull-crossbones" | merge $iconMap -}}
|
||||
{{ $iconMap = dict "bug" "fas fa-bug" | merge $iconMap -}}
|
||||
{{ $iconMap = dict "example" "fas fa-list-ol" | merge $iconMap -}}
|
||||
{{ $iconMap = dict "quote" "fas fa-quote-right" | merge $iconMap -}}
|
||||
{{ $iconMap = dict "details" "fas fa-angle-down" | merge $iconMap -}}
|
||||
{{- $_hugo_config := `{ "version": 1 }` -}}
|
||||
{{- $iconMap := dict "note" "fas fa-pencil-alt" -}}
|
||||
{{- $iconMap = dict "abstract" "fas fa-list-ul" | merge $iconMap -}}
|
||||
{{- $iconMap = dict "info" "fas fa-info-circle" | merge $iconMap -}}
|
||||
{{- $iconMap = dict "tip" "fas fa-lightbulb" | merge $iconMap -}}
|
||||
{{- $iconMap = dict "success" "fas fa-check-circle" | merge $iconMap -}}
|
||||
{{- $iconMap = dict "question" "fas fa-question-circle" | merge $iconMap -}}
|
||||
{{- $iconMap = dict "warning" "fas fa-exclamation-triangle" | merge $iconMap -}}
|
||||
{{- $iconMap = dict "failure" "fas fa-times-circle" | merge $iconMap -}}
|
||||
{{- $iconMap = dict "danger" "fas fa-skull-crossbones" | merge $iconMap -}}
|
||||
{{- $iconMap = dict "bug" "fas fa-bug" | merge $iconMap -}}
|
||||
{{- $iconMap = dict "example" "fas fa-list-ol" | merge $iconMap -}}
|
||||
{{- $iconMap = dict "quote" "fas fa-quote-right" | merge $iconMap -}}
|
||||
{{- $iconDetails := "fas fa-angle-down" -}}
|
||||
|
||||
{{ if .IsNamedParams -}}
|
||||
{{ $type := .Get "type" }}
|
||||
{{ if eq (.Get "details") "true" -}}
|
||||
{{- if .IsNamedParams -}}
|
||||
{{- $type := .Get "type" | default "note" -}}
|
||||
{{- if eq (.Get "details") "true" -}}
|
||||
<details class="admonition {{ $type }}">
|
||||
{{- with .Get "title" }}<summary class="admonition-title"><i class="icon {{ index $iconMap $type }}"></i>{{ . }}<i class="details {{ index $iconMap "details" }}"></i></summary>{{ end }}
|
||||
{{- with .Get "title" -}}
|
||||
<summary class="admonition-title">
|
||||
<i class="icon {{ index $iconMap $type | default (index $iconMap "note") }}"></i>{{ . }}<i class="details {{ $iconDetails }}"></i>
|
||||
</summary>
|
||||
{{- end -}}
|
||||
{{- .Inner -}}
|
||||
</details>
|
||||
{{- else -}}
|
||||
<div class="admonition {{ $type }}">
|
||||
{{- with .Get "title" }}<p class="admonition-title"><i class="icon {{ index $iconMap $type }}"></i>{{ . }}</p>{{ end }}
|
||||
{{- with .Get "title" -}}
|
||||
<p class="admonition-title"><i class="icon {{ index $iconMap $type | default (index $iconMap "note") }}"></i>{{ . }}</p>
|
||||
{{- end -}}
|
||||
{{- .Inner -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{ else -}}
|
||||
{{ $type := .Get 0 }}
|
||||
{{ if eq (.Get 2) "true" }}
|
||||
{{- else -}}
|
||||
{{- $type := .Get 0 -}}
|
||||
{{- if eq (.Get 2) "true" -}}
|
||||
<details class="admonition {{ $type }}">
|
||||
{{- with .Get 1 }}<summary class="admonition-title"><i class="icon {{ index $iconMap $type }}"></i>{{ . }}<i class="details {{ index $iconMap "details" }}"></i></summary>{{ end }}
|
||||
{{- with .Get 1 -}}
|
||||
<summary class="admonition-title">
|
||||
<i class="icon {{ index $iconMap $type | default (index $iconMap "note") }}"></i>{{ . }}<i class="details {{ $iconDetails }}"></i>
|
||||
</summary>
|
||||
{{- end -}}
|
||||
{{- .Inner -}}
|
||||
</details>
|
||||
{{- else -}}
|
||||
<div class="admonition {{ $type }}">
|
||||
{{- with .Get 1 }}<p class="admonition-title"><i class="icon {{ index $iconMap $type }}"></i>{{ . }}</p>{{ end }}
|
||||
{{- with .Get 1 -}}
|
||||
<p class="admonition-title"><i class="icon {{ index $iconMap $type | default (index $iconMap "note") }}"></i>{{ . }}</p>
|
||||
{{- end -}}
|
||||
{{- .Inner -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{ end }}
|
||||
{{- end -}}
|
|
@ -1,12 +1,12 @@
|
|||
{{ if .Get "date" -}}
|
||||
{{ $date := .Get "date" }}
|
||||
{{ $id := delimit (split (md5 $date) "" | shuffle) "" | printf "countdown-%s" -}}
|
||||
{{ $defaultPattern := printf "%%D %s %%H %s %%M %s %%S %s" (T "day") (T "hour") (T "minute") (T "second") }}
|
||||
{{ $new := dict $id (dict "date" $date "pattern" (.Get "pattern" | default $defaultPattern)) }}
|
||||
{{ with .Page.Scratch.Get "countdownMap" -}}
|
||||
{{ .Page.Scratch.Set "countdownMap" (merge . $new) -}}
|
||||
{{ else -}}
|
||||
{{ .Page.Scratch.Set "countdownMap" $new -}}
|
||||
{{ end -}}
|
||||
{{- if .Get "date" -}}
|
||||
{{- $date := .Get "date" -}}
|
||||
{{- $id := delimit (split (md5 $date) "" | shuffle) "" | printf "countdown-%s" -}}
|
||||
{{- $defaultPattern := printf "%%D %s %%H %s %%M %s %%S %s" (T "day") (T "hour") (T "minute") (T "second") -}}
|
||||
{{- $new := dict $id (dict "date" $date "pattern" (.Get "pattern" | default $defaultPattern)) -}}
|
||||
{{- with .Page.Scratch.Get "countdownMap" -}}
|
||||
{{- .Page.Scratch.Set "countdownMap" (merge . $new) -}}
|
||||
{{- else -}}
|
||||
{{- .Page.Scratch.Set "countdownMap" $new -}}
|
||||
{{- end -}}
|
||||
<div id="{{ $id }}" style={{ .Get "style" | safeCSS }}></div>
|
||||
{{ end -}}
|
||||
{{- end -}}
|
|
@ -1,10 +1,10 @@
|
|||
<!-- shuffle md5 as id -->
|
||||
{{ $id := delimit (split (md5 .Inner) "" | shuffle) "" | printf "echarts-%s" -}}
|
||||
{{ $echartsMap := .Page.Scratch.Get "echartsMap" -}}
|
||||
{{ if $echartsMap -}}
|
||||
{{- $id := delimit (split (md5 .Inner) "" | shuffle) "" | printf "echarts-%s" -}}
|
||||
{{- $echartsMap := .Page.Scratch.Get "echartsMap" -}}
|
||||
{{- if $echartsMap -}}
|
||||
{{ $echartsMap = .Inner | printf "{%s}" | dict $id | merge $echartsMap -}}
|
||||
{{ else -}}
|
||||
{{- else -}}
|
||||
{{ $echartsMap = .Inner | printf "{%s}" | dict $id -}}
|
||||
{{ end -}}
|
||||
{{ .Page.Scratch.Set "echartsMap" $echartsMap -}}
|
||||
{{- end -}}
|
||||
{{- .Page.Scratch.Set "echartsMap" $echartsMap -}}
|
||||
<div class="echarts" id="{{ $id }}"></div>
|
|
@ -1,10 +1,10 @@
|
|||
<!-- shuffle md5 as id -->
|
||||
{{ $id := delimit (split (md5 .Inner) "" | shuffle) "" | printf "mermaid-%s" -}}
|
||||
{{ $mermaidMap := .Page.Scratch.Get "mermaidMap" -}}
|
||||
{{ if $mermaidMap -}}
|
||||
{{ $mermaidMap = trim .Inner "\n" | dict $id | merge $mermaidMap -}}
|
||||
{{ else -}}
|
||||
{{ $mermaidMap = trim .Inner "\n" | dict $id -}}
|
||||
{{ end -}}
|
||||
{{ .Page.Scratch.Set "mermaidMap" $mermaidMap -}}
|
||||
{{- $id := delimit (split (md5 .Inner) "" | shuffle) "" | printf "mermaid-%s" -}}
|
||||
{{- $mermaidMap := .Page.Scratch.Get "mermaidMap" -}}
|
||||
{{- if $mermaidMap -}}
|
||||
{{- $mermaidMap = trim .Inner "\n" | dict $id | merge $mermaidMap -}}
|
||||
{{- else -}}
|
||||
{{- $mermaidMap = trim .Inner "\n" | dict $id -}}
|
||||
{{- end -}}
|
||||
{{- .Page.Scratch.Set "mermaidMap" $mermaidMap -}}
|
||||
<div class="mermaid" id="{{ $id }}"></div>
|
|
@ -1,22 +1,12 @@
|
|||
{{ .Page.Scratch.Set "music" "true" -}}
|
||||
{{ if .IsNamedParams }}
|
||||
<meting-js server={{ .Get "server" }} type={{ .Get "type" }} id={{ .Get "id" }}
|
||||
{{ with .Get "autoplay" }}
|
||||
autoplay={{ . }}
|
||||
{{ end }}
|
||||
{{ with .Get "mini" }}
|
||||
mini={{ . }}
|
||||
{{ end }}
|
||||
{{ with .Get "fixed" }}
|
||||
fixed={{ . }}
|
||||
{{ end }}
|
||||
{{ with .Get "list-folded" }}
|
||||
list-folded={{ . }}
|
||||
{{ end }}
|
||||
{{ with .Get "list-max-height" }}
|
||||
list-max-height={{ . }}
|
||||
{{ end }}
|
||||
theme="#A9A9B3"></meting-js>
|
||||
{{ else }}
|
||||
<meting-js server={{ .Get 0 }} type={{ .Get 1 }} id={{ .Get 2 }} theme="#A9A9B3"></meting-js>></meting-js>
|
||||
{{ end }}
|
||||
{{- .Page.Scratch.Set "music" "true" -}}
|
||||
{{- if .IsNamedParams -}}
|
||||
<meting-js server="{{ .Get "server" }}" type="{{ .Get "type" }}" id="{{ .Get "id" }}" theme="#A9A9B3"
|
||||
{{- with .Get "autoplay" }} autoplay="{{ . }}"{{ end -}}
|
||||
{{- with .Get "mini" }} mini="{{ . }}"{{ end -}}
|
||||
{{- with .Get "fixed" }} fixed="{{ . }}"{{ end -}}
|
||||
{{- with .Get "list-folded" }} list-folded="{{ . }}"{{ end -}}
|
||||
{{- with .Get "list-max-height" }} list-max-height="{{ . }}"{{ end -}}
|
||||
></meting-js>
|
||||
{{- else -}}
|
||||
<meting-js server="{{ .Get 0 }}" type="{{ .Get 1 }}" id="{{ .Get 2 }}" theme="#A9A9B3"></meting-js>
|
||||
{{- end -}}
|
|
@ -1,50 +1,56 @@
|
|||
<!-- only the trailing newline is retained -->
|
||||
{{ $content := replaceRE `(?s)^\n*(.*?)\n*$` "$1\n" .Inner }}
|
||||
{{- $content := replaceRE `(?s)^\n*(.*?)\n*$` "$1\n" .Inner -}}
|
||||
<!-- shuffle md5 as id -->
|
||||
{{ $id := delimit (split (md5 $content) "" | shuffle) "" | printf "typeit-%s" }}
|
||||
{{- $id := delimit (split (md5 $content) "" | shuffle) "" | printf "typeit-%s" -}}
|
||||
|
||||
<div class={{ .Get "class" | default "typeit" }}>
|
||||
<!-- raw html content -->
|
||||
{{ if .Get "raw" }}
|
||||
<div id={{ printf "r%s" $id }} hidden=true>{{ $content | safeHTML }}</div>
|
||||
{{- if .Get "raw" -}}
|
||||
<div id={{ printf "r%s" $id }} hidden=true>
|
||||
{{- $content | safeHTML -}}
|
||||
</div>
|
||||
<div id={{ $id }}></div>
|
||||
{{ else if .Get "code" }}
|
||||
{{- else if .Get "code" -}}
|
||||
<!-- highlight code content without line number -->
|
||||
{{ $content = highlight $content (.Get "code") "linenos=false" }}
|
||||
{{- $content = highlight $content (.Get "code") "linenos=false" -}}
|
||||
<!-- delete outer label -->
|
||||
{{ $content = replaceRE `<div class="highlight"><pre class="chroma"><code[^<>]*>(?s)(.*)</code></pre></div>` "$1" $content }}
|
||||
{{- $content = replaceRE `<div class="highlight"><pre class="chroma"><code[^<>]*>(?s)(.*)</code></pre></div>` "$1" $content -}}
|
||||
<!-- parsing markdown links -->
|
||||
{{ $content = replaceRE `(<span[^<>]*>)([^<>]*)\[([^<>]+)\]\(([^<>]+)\)([^<>]*)(</span>)` "$1$2$6<a href=$4>$3</a>$1$5$6" $content }}
|
||||
{{- $content = replaceRE `(<span[^<>]*>)([^<>]*)\[([^<>]+)\]\(([^<>]+)\)([^<>]*)(</span>)` "$1$2$6<a href=$4>$3</a>$1$5$6" $content -}}
|
||||
<!-- replace " " to " " and replace "\n" to "<br />" -->
|
||||
{{ $content = replaceRE ` ` " " $content | replaceRE `(<\w+) ` "$1 " | replaceRE `\n` "<br />" }}
|
||||
{{- $content = replaceRE ` ` " " $content | replaceRE `(<\w+) ` "$1 " | replaceRE `\n` "<br />" -}}
|
||||
<!-- fix "<br />" location error which is a bug of Typeit HTML parser -->
|
||||
{{ $content = replaceRE `<br /></span>` "</span><br />" $content }}
|
||||
<div id={{ printf "r%s" $id }} hidden=true>{{ $content | safeHTML }}</div>
|
||||
<div class="code" id={{ $id }}></div>
|
||||
{{ else }}
|
||||
{{ $tag := .Get "tag" | default "p" }}
|
||||
{{ $content = $content | markdownify | chomp }}
|
||||
<div id={{ printf "r%s" $id }} hidden=true>{{ $content | safeHTML }}</div>
|
||||
{{ printf "<%s id=%s></%s>" $tag $id $tag | safeHTML }}
|
||||
{{ end }}
|
||||
{{- $content = replaceRE `<br /></span>` "</span><br />" $content -}}
|
||||
<div id={{ printf "r%s" $id }} hidden=true>
|
||||
{{- $content | safeHTML -}}
|
||||
</div>
|
||||
<div class="highlight" id={{ $id }}></div>
|
||||
{{- else -}}
|
||||
{{- $tag := .Get "tag" | default "p" -}}
|
||||
{{- $content = $content | markdownify | chomp -}}
|
||||
<div id={{ printf "r%s" $id }} hidden=true>
|
||||
{{- $content | safeHTML -}}
|
||||
</div>
|
||||
{{- printf "<%s id=%s></%s>" $tag $id $tag | safeHTML -}}
|
||||
{{- end -}}
|
||||
|
||||
{{ $typeitMap := .Page.Scratch.Get "typeitMap" }}
|
||||
{{ $group := slice $id }}
|
||||
{{ with .Get "group" }}
|
||||
{{ if $typeitMap }}
|
||||
{{ if index $typeitMap . }}
|
||||
{{ $group = index $typeitMap . | append $id }}
|
||||
{{ end }}
|
||||
{{ $typeitMap = dict . $group | merge $typeitMap }}
|
||||
{{ else }}
|
||||
{{ $typeitMap = dict . $group }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ if $typeitMap }}
|
||||
{{ $typeitMap = dict $id $group | merge $typeitMap }}
|
||||
{{ else }}
|
||||
{{ $typeitMap = dict $id $group }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ .Page.Scratch.Set "typeitMap" $typeitMap }}
|
||||
{{- $typeitMap := .Page.Scratch.Get "typeitMap" -}}
|
||||
{{- $group := slice $id -}}
|
||||
{{- with .Get "group" -}}
|
||||
{{- if $typeitMap -}}
|
||||
{{- if index $typeitMap . -}}
|
||||
{{- $group = index $typeitMap . | append $id -}}
|
||||
{{- end -}}
|
||||
{{- $typeitMap = dict . $group | merge $typeitMap -}}
|
||||
{{- else -}}
|
||||
{{- $typeitMap = dict . $group -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- if $typeitMap -}}
|
||||
{{- $typeitMap = dict $id $group | merge $typeitMap -}}
|
||||
{{- else -}}
|
||||
{{- $typeitMap = dict $id $group -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- .Page.Scratch.Set "typeitMap" $typeitMap -}}
|
||||
</div>
|
||||
|
|
|
@ -1,22 +1,41 @@
|
|||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
||||
{{ range (where .Data.Pages "Section" "!=" "gallery") }}
|
||||
<urlset
|
||||
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
||||
xmlns:xhtml="http://www.w3.org/1999/xhtml"
|
||||
>
|
||||
{{- range (where .Data.Pages "Section" "!=" "gallery") -}}
|
||||
<url>
|
||||
<loc>{{ .Permalink }}</loc>
|
||||
{{ if not .Lastmod.IsZero }}
|
||||
<lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>
|
||||
{{ end }}
|
||||
{{ with .Sitemap.ChangeFreq }}
|
||||
<changefreq>{{ . }}</changefreq>
|
||||
{{ end }}
|
||||
{{ if ge .Sitemap.Priority 0.0 }}
|
||||
<priority>{{ .Sitemap.Priority }}</priority>
|
||||
{{ end }}
|
||||
{{ if .IsTranslated }}
|
||||
{{ range .Translations }}
|
||||
<xhtml:link rel="alternate" hreflang="{{ .Lang }}" href="{{ .Permalink }}"/>
|
||||
{{ end }}
|
||||
<xhtml:link rel="alternate" hreflang="{{ .Lang }}" href="{{ .Permalink }}"/>
|
||||
{{ end }}
|
||||
<loc>
|
||||
{{- .Permalink -}}
|
||||
</loc>
|
||||
{{- if not .Lastmod.IsZero -}}
|
||||
<lastmod>
|
||||
{{- safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) -}}
|
||||
</lastmod>
|
||||
{{- end -}}
|
||||
{{- with .Sitemap.ChangeFreq -}}
|
||||
<changefreq>
|
||||
{{- . -}}
|
||||
</changefreq>
|
||||
{{- end -}}
|
||||
{{- if ge .Sitemap.Priority 0.0 -}}
|
||||
<priority>
|
||||
{{- .Sitemap.Priority -}}
|
||||
</priority>
|
||||
{{- end -}}
|
||||
{{- if .IsTranslated -}}
|
||||
{{- range .Translations -}}
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="{{ .Lang }}"
|
||||
href="{{ .Permalink }}"
|
||||
/>
|
||||
{{- end -}}
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="{{ .Lang }}"
|
||||
href="{{ .Permalink }}"
|
||||
/>
|
||||
{{- end -}}
|
||||
</url>
|
||||
{{ end }}
|
||||
</urlset>
|
||||
{{- end -}}
|
||||
</urlset>
|
|
@ -1,29 +1,35 @@
|
|||
{{ define "title" }}{{ .Title }} | {{ T .Data.Singular | default (humanize .Data.Singular) }} | {{ .Site.Title }}{{ end }}
|
||||
{{- define "title" -}}
|
||||
{{- .Title }} | {{ T .Data.Singular | default (humanize .Data.Singular) }} | {{ .Site.Title -}}
|
||||
{{- end -}}
|
||||
|
||||
{{ define "content" }}
|
||||
<div class="post-warp archive">
|
||||
{{- define "content" -}}
|
||||
<div class="page archive">
|
||||
{{- /* Title */ -}}
|
||||
<h2 class="post-title animated pulse faster">
|
||||
{{ $taxonomy := .Data.Singular }}
|
||||
{{ if eq $taxonomy "category" }}
|
||||
<i class="far fa-folder-open fa-fw"></i>{{ .Title }}
|
||||
{{ else if eq $taxonomy "tag" }}
|
||||
<i class="fas fa-tag fa-fw"></i>{{ .Title }}
|
||||
{{ else }}
|
||||
{{ printf "%s - %s" (T $taxonomy | default (humanize $taxonomy)) .Title }}
|
||||
{{ end }}
|
||||
{{- $taxonomy := .Data.Singular -}}
|
||||
{{- if eq $taxonomy "category" -}}
|
||||
<i class="far fa-folder-open fa-fw"></i> {{ humanize .Title }}
|
||||
{{- else if eq $taxonomy "tag" -}}
|
||||
<i class="fas fa-tag fa-fw"></i> {{ humanize .Title }}
|
||||
{{- else -}}
|
||||
{{- printf "%s - %s" (T $taxonomy | default (humanize $taxonomy)) .Title -}}
|
||||
{{- end -}}
|
||||
</h2>
|
||||
|
||||
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
|
||||
{{- /* Paginate */ -}}
|
||||
{{- range (.Paginate (.Pages.GroupByDate "2006")).PageGroups -}}
|
||||
<h3>{{ .Key }}</h3>
|
||||
{{ range .Pages }}
|
||||
{{- range .Pages -}}
|
||||
<article class="archive-item">
|
||||
<a href="{{ .RelPermalink }}" class="archive-item-link">{{ .Title }}</a>
|
||||
<a href="{{ .RelPermalink }}" class="archive-item-link">
|
||||
{{- .Title -}}
|
||||
</a>
|
||||
<span class="archive-item-date">
|
||||
{{ .Date.Format (.Site.Params.dateFormatToUse | default "01-02") }}
|
||||
{{- .Date.Format (.Site.Params.dateFormatToUse | default "01-02") -}}
|
||||
</span>
|
||||
</article>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ partial "paginator.html" . }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- partial "paginator.html" . -}}
|
||||
</div>
|
||||
{{end }}
|
||||
{{- end -}}
|
|
@ -1,51 +1,57 @@
|
|||
{{ define "title" }}{{ T "all" | humanize}}{{ T .Data.Plural | default .Data.Plural | humanize }} | {{ .Site.Title }}{{ end }}
|
||||
{{- define "title" -}}
|
||||
{{- T "all" | humanize }}{{ T .Data.Plural | default .Data.Plural | humanize }} | {{ .Site.Title -}}
|
||||
{{- end -}}
|
||||
|
||||
{{ define "content" }}
|
||||
{{ $taxonomies := .Data.Plural }}
|
||||
{{ $terms := .Data.Terms.ByCount }}
|
||||
{{ $type := .Type }}
|
||||
{{- define "content" -}}
|
||||
{{- $taxonomies := .Data.Plural -}}
|
||||
{{- $terms := .Data.Terms.ByCount -}}
|
||||
{{- $type := .Type -}}
|
||||
|
||||
<div class="post-warp archive">
|
||||
<div class="page archive">
|
||||
{{- /* Title */ -}}
|
||||
<h2 class="post-title animated pulse faster">
|
||||
{{ T "all" | humanize}}{{ T $taxonomies | default $taxonomies | humanize }}
|
||||
{{- T "all" | humanize}}{{ T $taxonomies | default $taxonomies | humanize -}}
|
||||
</h2>
|
||||
|
||||
<!-- Categories Page -->
|
||||
{{ if eq $taxonomies "categories" }}
|
||||
{{- /* Categories Page */ -}}
|
||||
{{- if eq $taxonomies "categories" -}}
|
||||
<div class="categories-card">
|
||||
{{ range $terms }}
|
||||
{{ $term := .Term }}
|
||||
{{ $pages := .Pages }}
|
||||
{{ with $.Site.GetPage "taxonomy" (printf "%s/%s" $type $term) }}
|
||||
{{- range $terms -}}
|
||||
{{- $term := .Term -}}
|
||||
{{- $pages := .Pages -}}
|
||||
{{- with $.Site.GetPage "taxonomy" (printf "%s/%s" $type $term) -}}
|
||||
<div class="card-item">
|
||||
<div class="categories">
|
||||
<a href="{{ .Permalink }}">
|
||||
<h3><i class="far fa-folder fa-fw"></i>{{ $term | humanize}}</h3>
|
||||
</a>
|
||||
{{ range first 5 $pages }}
|
||||
<div class="card-item-wrapper">
|
||||
<h3 class="card-item-title">
|
||||
<a href="{{ .Permalink }}">
|
||||
<i class="far fa-folder fa-fw"></i> {{ $term | humanize}}
|
||||
</a>
|
||||
</h3>
|
||||
{{- range first 5 $pages -}}
|
||||
<article class="archive-item">
|
||||
<a href="{{ .Permalink }}" class="archive-item-link">{{ .Title }}</a>
|
||||
<a href="{{ .Permalink }}" class="archive-item-link">
|
||||
{{- .Title -}}
|
||||
</a>
|
||||
</article>
|
||||
{{ end }}
|
||||
{{ if gt (len $pages) 5 }}
|
||||
{{- end -}}
|
||||
{{- if gt (len $pages) 5 -}}
|
||||
<span class="more-post">
|
||||
<a href="{{ .Permalink }}" class="more-post-link">{{ T "More" }} >></a>
|
||||
<a href="{{ .Permalink }}" class="more-post-link">{{ T "more" }} >></a>
|
||||
</span>
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</div>
|
||||
|
||||
<!-- Tag Cloud Page -->
|
||||
{{ else if eq $taxonomies "tags" }}
|
||||
{{- /* Tag Cloud Page */ -}}
|
||||
{{- else if eq $taxonomies "tags" -}}
|
||||
<div class="tag-cloud-tags">
|
||||
{{ range $.Site.Taxonomies.tags.ByCount }}
|
||||
{{- range $.Site.Taxonomies.tags.ByCount -}}
|
||||
<a href="{{ .Page.Permalink }}"> {{ .Page.Title }} <small>({{ .Count }})</small></a>
|
||||
{{end}}
|
||||
{{- end -}}
|
||||
</div>
|
||||
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{end }}
|
||||
{{- end -}}
|
|
@ -0,0 +1 @@
|
|||
{"Target":"css/style.min.css","MediaType":"text/css","Data":{}}
|
|
@ -22,7 +22,7 @@ features = [
|
|||
"syntax-highlighting",
|
||||
"SEO Optimized"
|
||||
]
|
||||
min_version = "0.53"
|
||||
min_version = "0.62.0"
|
||||
|
||||
[author]
|
||||
name = "Dillon"
|
||||
|
|