feat: new index and style update
This commit is contained in:
@@ -4,13 +4,19 @@ date: {{ .Date }}
|
|||||||
lastmod: {{ .Date }}
|
lastmod: {{ .Date }}
|
||||||
draft: true
|
draft: true
|
||||||
description: ""
|
description: ""
|
||||||
|
show_in_homepage: true
|
||||||
|
show_description: false
|
||||||
|
|
||||||
tags: []
|
tags: []
|
||||||
categories: []
|
categories: []
|
||||||
|
|
||||||
featured_image: ""
|
featured_image: ""
|
||||||
|
featured_image_preview: ""
|
||||||
|
|
||||||
comment: true
|
comment: true
|
||||||
toc: false
|
toc: false
|
||||||
autoCollapseToc: true
|
autoCollapseToc: true
|
||||||
math: false
|
math: false
|
||||||
---
|
---
|
||||||
|
|
||||||
|
<!--more-->
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
/** Home **/
|
/** Home **/
|
||||||
|
|
||||||
.intro {
|
.intro {
|
||||||
transform: translateY(25vh);
|
transform: translateY(25vh);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|||||||
@@ -1,65 +0,0 @@
|
|||||||
.post-warp {
|
|
||||||
.intro {
|
|
||||||
transform: translateY(0);
|
|
||||||
margin: 2em 0 5em 0;
|
|
||||||
|
|
||||||
.avatar {
|
|
||||||
img {
|
|
||||||
width: 96px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.post {
|
|
||||||
margin-bottom: 4em;
|
|
||||||
border-bottom: 1px dashed #ddd;
|
|
||||||
|
|
||||||
.post-content {
|
|
||||||
padding-top: .5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.post-footer {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.post-meta {
|
|
||||||
a {
|
|
||||||
color: rgba(85, 85, 85, 0.52941) !important;
|
|
||||||
|
|
||||||
.dark-theme & {
|
|
||||||
color: $global-font-secondary-color-dark !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
color: $global-font-secondary-color !important;
|
|
||||||
|
|
||||||
.dark-theme & {
|
|
||||||
color: $global-font-secondary-color-dark !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.post-tags {
|
|
||||||
span {
|
|
||||||
a {
|
|
||||||
color: rgba(85, 85, 85, 0.52941) !important;
|
|
||||||
|
|
||||||
.dark-theme & {
|
|
||||||
color: $global-font-secondary-color-dark !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
color: $global-font-secondary-color !important;
|
|
||||||
|
|
||||||
.dark-theme & {
|
|
||||||
color: $global-font-secondary-color-dark !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
22
assets/css/_page/_index.scss
Normal file
22
assets/css/_page/_index.scss
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
@import "_home";
|
||||||
|
|
||||||
|
.post-warp {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
max-width: 780px;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding-top: 2rem;
|
||||||
|
|
||||||
|
@import "_post";
|
||||||
|
@import "_posts";
|
||||||
|
}
|
||||||
|
|
||||||
|
.archive {
|
||||||
|
.post-title {
|
||||||
|
text-align: right;
|
||||||
|
padding-bottom: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
@import "_terms";
|
||||||
|
@import "_tags";
|
||||||
|
}
|
||||||
@@ -1,372 +1,370 @@
|
|||||||
/** Post **/
|
/** Post **/
|
||||||
|
.post-header {
|
||||||
|
.post-title {
|
||||||
|
margin: 0 !important;
|
||||||
|
font-size: 2em;
|
||||||
|
line-height: 1.5em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.post-warp {
|
.post-meta {
|
||||||
position: relative;
|
font-size: 14px;
|
||||||
width: 100%;
|
color: rgba(85, 85, 85, 0.52941) !important;
|
||||||
max-width: 780px;
|
|
||||||
margin: 0 auto;
|
|
||||||
padding-top: 2rem;
|
|
||||||
|
|
||||||
.post-header {
|
span {
|
||||||
.post-title {
|
display: inline-block;
|
||||||
margin: 0 !important;
|
|
||||||
font-size: 2em;
|
|
||||||
line-height: 1.5em;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-meta {
|
.dark-theme & {
|
||||||
font-size: 14px;
|
color: $global-font-secondary-color-dark !important;
|
||||||
color: rgba(85, 85, 85, 0.52941) !important;
|
}
|
||||||
|
|
||||||
span {
|
a {
|
||||||
display: inline-block;
|
color: $post-link-color;
|
||||||
}
|
|
||||||
|
|
||||||
.dark-theme & {
|
.dark-theme & {
|
||||||
color: $global-font-secondary-color-dark !important;
|
color: $post-link-color-dark;
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
&:hover {
|
||||||
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-toc {
|
|
||||||
position: absolute;
|
|
||||||
width: 200px;
|
|
||||||
max-width: 240px;
|
|
||||||
margin-left: 800px;
|
|
||||||
padding: 10px;
|
|
||||||
border-left: 1px solid $global-border-color;
|
|
||||||
word-wrap: break-word;
|
|
||||||
box-sizing: border-box;
|
|
||||||
top: 120px;
|
|
||||||
|
|
||||||
.post-toc-title {
|
|
||||||
font-weight: 400;
|
|
||||||
text-transform: uppercase;
|
|
||||||
}
|
|
||||||
|
|
||||||
.post-toc-content {
|
|
||||||
&.always-active ul {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
>nav>ul {
|
|
||||||
margin: 10px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul {
|
|
||||||
padding-left: 10px;
|
|
||||||
list-style: none;
|
|
||||||
|
|
||||||
ul {
|
|
||||||
padding-left: 20px;
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.has-active > ul {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.toc-link.active {
|
|
||||||
color: $global-link-hover-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.post-content {
|
|
||||||
h2,
|
|
||||||
h3,
|
|
||||||
h4,
|
|
||||||
h5,
|
|
||||||
h6 {
|
|
||||||
padding-top: .8em;
|
|
||||||
padding-bottom: .3em;
|
|
||||||
}
|
|
||||||
|
|
||||||
h2::before {
|
|
||||||
content: "#";
|
|
||||||
margin-right: 5px;
|
|
||||||
color: $post-link-color;
|
|
||||||
|
|
||||||
.dark-theme & {
|
|
||||||
color: $post-link-color-dark;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
h3::before {
|
|
||||||
content: "|";
|
|
||||||
margin-right: 5px;
|
|
||||||
color: $post-link-color;
|
|
||||||
|
|
||||||
.dark-theme & {
|
|
||||||
color: $post-link-color-dark;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: $post-link-color;
|
|
||||||
|
|
||||||
.dark-theme & {
|
|
||||||
color: $post-link-color-dark;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
a:hover {
|
|
||||||
color: $post-link-hover-color;
|
color: $post-link-hover-color;
|
||||||
|
|
||||||
.dark-theme &:hover {
|
.dark-theme & {
|
||||||
color: $post-link-hover-color-dark;
|
color: $post-link-hover-color-dark;
|
||||||
font-weight: bold;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.author {
|
||||||
|
font-size: 1.2em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.post-toc {
|
||||||
|
position: absolute;
|
||||||
|
width: 200px;
|
||||||
|
max-width: 240px;
|
||||||
|
margin-left: 800px;
|
||||||
|
padding: 10px;
|
||||||
|
border-left: 1px solid $global-border-color;
|
||||||
|
word-wrap: break-word;
|
||||||
|
box-sizing: border-box;
|
||||||
|
top: 120px;
|
||||||
|
|
||||||
|
.post-toc-title {
|
||||||
|
font-weight: 400;
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
.post-toc-content {
|
||||||
|
&.always-active ul {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
>nav>ul {
|
||||||
|
margin: 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
ul {
|
ul {
|
||||||
padding-left: 2em;
|
padding-left: 10px;
|
||||||
}
|
list-style: none;
|
||||||
|
|
||||||
.table-wrapper {
|
ul {
|
||||||
overflow-x: auto;
|
padding-left: 20px;
|
||||||
|
display: none;
|
||||||
> table {
|
|
||||||
width: 100%;
|
|
||||||
max-width: 100%;
|
|
||||||
margin: 10px 0;
|
|
||||||
border-spacing: 0;
|
|
||||||
box-shadow: 2px 2px 3px rgba(0,0,0,.125);
|
|
||||||
background: $table-background-color;
|
|
||||||
|
|
||||||
.dark-theme & {
|
|
||||||
background: $table-background-color-dark;
|
|
||||||
}
|
|
||||||
|
|
||||||
thead {
|
|
||||||
background: $table-thead-color;
|
|
||||||
|
|
||||||
.dark-theme & {
|
|
||||||
background-color: $table-thead-color-dark;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
th, td {
|
|
||||||
padding: 5px 15px;
|
|
||||||
border: 1px double $global-border-color;
|
|
||||||
|
|
||||||
.dark-theme & {
|
|
||||||
border: 1px double $global-border-color-dark;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
figure {
|
.has-active > ul {
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.image-caption:not(:empty) {
|
|
||||||
min-width: 20%;
|
|
||||||
max-width: 80%;
|
|
||||||
display: inline-block;
|
|
||||||
padding: 10px;
|
|
||||||
margin: 0 auto;
|
|
||||||
border-bottom: 1px solid #d9d9d9;
|
|
||||||
font-size: 14px;
|
|
||||||
color: #969696;
|
|
||||||
line-height: 1.7;
|
|
||||||
}
|
|
||||||
|
|
||||||
img {
|
|
||||||
display: block;
|
|
||||||
max-width: 80%;
|
|
||||||
height: auto;
|
|
||||||
margin: 0 auto;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.featured_image {
|
|
||||||
width: 100% !important;
|
|
||||||
max-width: 100% !important;
|
|
||||||
height: auto !important;
|
|
||||||
margin: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote {
|
|
||||||
font-size: 1rem;
|
|
||||||
display: block;
|
|
||||||
border-width: 1px 0;
|
|
||||||
border-style: solid;
|
|
||||||
border-color: $global-border-color;
|
|
||||||
padding: 1.5em 1.2em 0.5em 1.2em;
|
|
||||||
margin: 0 0 2em 0;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
&:before {
|
|
||||||
content: '\201C';
|
|
||||||
position: absolute;
|
|
||||||
top: 0em;
|
|
||||||
left: 50%;
|
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
width: 3rem;
|
|
||||||
height: 2rem;
|
|
||||||
font: 6em/1.08em 'PT Sans', sans-serif;
|
|
||||||
color: $post-link-color;
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
.dark-theme & {
|
|
||||||
color: $post-link-color-dark;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
&:after {
|
|
||||||
content: "#blockquote" attr(cite);
|
|
||||||
display: block;
|
display: block;
|
||||||
text-align: right;
|
}
|
||||||
font-size: 0.875em;
|
}
|
||||||
color: $post-link-color;
|
|
||||||
|
.toc-link.active {
|
||||||
|
color: $global-link-hover-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.featured_image {
|
||||||
|
display: block;
|
||||||
|
max-width: 100%;
|
||||||
|
height: auto;
|
||||||
|
margin: 0 auto;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.post-content {
|
||||||
|
h2,
|
||||||
|
h3,
|
||||||
|
h4,
|
||||||
|
h5,
|
||||||
|
h6 {
|
||||||
|
padding-top: .8em;
|
||||||
|
padding-bottom: .3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2::before {
|
||||||
|
content: "#";
|
||||||
|
margin-right: 5px;
|
||||||
|
color: $post-link-color;
|
||||||
|
|
||||||
|
.dark-theme & {
|
||||||
|
color: $post-link-color-dark;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
h3::before {
|
||||||
|
content: "|";
|
||||||
|
margin-right: 5px;
|
||||||
|
color: $post-link-color;
|
||||||
|
|
||||||
|
.dark-theme & {
|
||||||
|
color: $post-link-color-dark;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: $post-link-color;
|
||||||
|
|
||||||
|
.dark-theme & {
|
||||||
|
color: $post-link-color-dark;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
color: $post-link-hover-color;
|
||||||
|
|
||||||
|
.dark-theme &:hover {
|
||||||
|
color: $post-link-hover-color-dark;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ul {
|
||||||
|
padding-left: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-wrapper {
|
||||||
|
overflow-x: auto;
|
||||||
|
|
||||||
|
> table {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 100%;
|
||||||
|
margin: 10px 0;
|
||||||
|
border-spacing: 0;
|
||||||
|
box-shadow: 2px 2px 3px rgba(0,0,0,.125);
|
||||||
|
background: $table-background-color;
|
||||||
|
|
||||||
|
.dark-theme & {
|
||||||
|
background: $table-background-color-dark;
|
||||||
|
}
|
||||||
|
|
||||||
|
thead {
|
||||||
|
background: $table-thead-color;
|
||||||
|
|
||||||
.dark-theme & {
|
.dark-theme & {
|
||||||
color: $post-link-color-dark;
|
background-color: $table-thead-color-dark;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.dark-theme & {
|
th, td {
|
||||||
border-color: $global-border-color-dark;
|
padding: 5px 15px;
|
||||||
|
border: 1px double $global-border-color;
|
||||||
|
|
||||||
|
.dark-theme & {
|
||||||
|
border: 1px double $global-border-color-dark;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@import "../_partial/_post/code";
|
figure {
|
||||||
@import "../_partial/_post/admonition";
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
.mermaid {
|
.image-caption:not(:empty) {
|
||||||
@import "../_mermaid/neutral/index";
|
min-width: 20%;
|
||||||
|
max-width: 80%;
|
||||||
|
display: inline-block;
|
||||||
|
padding: 10px;
|
||||||
|
margin: 0 auto;
|
||||||
|
border-bottom: 1px solid #d9d9d9;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #969696;
|
||||||
|
line-height: 1.7;
|
||||||
|
}
|
||||||
|
|
||||||
.dark-theme & {
|
img {
|
||||||
@import "../_mermaid/dark/index";
|
display: block;
|
||||||
}
|
max-width: 100%;
|
||||||
}
|
height: auto;
|
||||||
|
margin: 0 auto;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
.echarts {
|
blockquote {
|
||||||
margin: 3% auto;
|
font-size: 1rem;
|
||||||
|
display: block;
|
||||||
|
border-width: 1px 0;
|
||||||
|
border-style: solid;
|
||||||
|
border-color: $global-border-color;
|
||||||
|
padding: 1.5em 1.2em 0.5em 1.2em;
|
||||||
|
margin: 0 0 2em 0;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
&:before {
|
||||||
|
content: '\201C';
|
||||||
|
position: absolute;
|
||||||
|
top: 0em;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
width: 3rem;
|
||||||
|
height: 2rem;
|
||||||
|
font: 6em/1.08em 'PT Sans', sans-serif;
|
||||||
|
color: $post-link-color;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
|
.dark-theme & {
|
||||||
|
color: $post-link-color-dark;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&:after {
|
||||||
|
content: "#blockquote" attr(cite);
|
||||||
|
display: block;
|
||||||
|
text-align: right;
|
||||||
|
font-size: 0.875em;
|
||||||
|
color: $post-link-color;
|
||||||
|
|
||||||
|
.dark-theme & {
|
||||||
|
color: $post-link-color-dark;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.bilibili {
|
.dark-theme & {
|
||||||
position: relative;
|
border-color: $global-border-color-dark;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@import "../_partial/_post/code";
|
||||||
|
@import "../_partial/_post/admonition";
|
||||||
|
|
||||||
|
.mermaid {
|
||||||
|
@import "../_mermaid/neutral/index";
|
||||||
|
|
||||||
|
.dark-theme & {
|
||||||
|
@import "../_mermaid/dark/index";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.echarts {
|
||||||
|
margin: 3% auto;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bilibili {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
height: 0;
|
||||||
|
padding-bottom: 75%;
|
||||||
|
margin: 3% auto;
|
||||||
|
|
||||||
|
iframe {
|
||||||
|
position: absolute;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 0;
|
height: 100%;
|
||||||
padding-bottom: 75%;
|
left: 0;
|
||||||
margin: 3% auto;
|
top: 0;
|
||||||
|
|
||||||
iframe {
|
|
||||||
position: absolute;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
left: 0;
|
|
||||||
top: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
hr {
|
|
||||||
margin: 1rem 0;
|
|
||||||
position: relative;
|
|
||||||
border-top: 1px dashed $global-border-color;
|
|
||||||
border-bottom: none;
|
|
||||||
|
|
||||||
.dark-theme & {
|
|
||||||
border-top: 1px dashed $global-border-color-dark;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
kbd {
|
|
||||||
display: inline-block;
|
|
||||||
padding: .25em;
|
|
||||||
background-color: $global-background-color;
|
|
||||||
border: 1px solid $global-border-color;
|
|
||||||
border-bottom-color: $global-border-color;
|
|
||||||
border-radius: 3px;
|
|
||||||
-webkit-box-shadow: inset 0 -1px 0 $global-border-color;
|
|
||||||
box-shadow: inset 0 -1px 0 $global-border-color;
|
|
||||||
font-size: .8em;
|
|
||||||
line-height: 1.25;
|
|
||||||
font-family: $code-font-family;
|
|
||||||
color: $code-color;
|
|
||||||
|
|
||||||
.dark-theme & {
|
|
||||||
background-color: $global-background-color-dark;
|
|
||||||
border: 1px solid $global-border-color-dark;
|
|
||||||
border-bottom-color: $global-border-color-dark;
|
|
||||||
-webkit-box-shadow: inset 0 -1px 0 $global-border-color-dark;
|
|
||||||
box-shadow: inset 0 -1px 0 $global-border-color-dark;
|
|
||||||
color: $code-color-dark;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.typeit {
|
|
||||||
.code {
|
|
||||||
padding: 6px;
|
|
||||||
font-size: 14px;
|
|
||||||
font-family: Consolas, Monaco, Menlo, Consolas, monospace;
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
p {
|
hr {
|
||||||
font-size: 1em;
|
margin: 1rem 0;
|
||||||
margin: .5em 0 .5em 0;
|
position: relative;
|
||||||
|
border-top: 1px dashed $global-border-color;
|
||||||
|
border-bottom: none;
|
||||||
|
|
||||||
|
.dark-theme & {
|
||||||
|
border-top: 1px dashed $global-border-color-dark;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
kbd {
|
||||||
|
display: inline-block;
|
||||||
|
padding: .25em;
|
||||||
|
background-color: $global-background-color;
|
||||||
|
border: 1px solid $global-border-color;
|
||||||
|
border-bottom-color: $global-border-color;
|
||||||
|
border-radius: 3px;
|
||||||
|
-webkit-box-shadow: inset 0 -1px 0 $global-border-color;
|
||||||
|
box-shadow: inset 0 -1px 0 $global-border-color;
|
||||||
|
font-size: .8em;
|
||||||
|
line-height: 1.25;
|
||||||
|
font-family: $code-font-family;
|
||||||
|
color: $code-color;
|
||||||
|
|
||||||
|
.dark-theme & {
|
||||||
|
background-color: $global-background-color-dark;
|
||||||
|
border: 1px solid $global-border-color-dark;
|
||||||
|
border-bottom-color: $global-border-color-dark;
|
||||||
|
-webkit-box-shadow: inset 0 -1px 0 $global-border-color-dark;
|
||||||
|
box-shadow: inset 0 -1px 0 $global-border-color-dark;
|
||||||
|
color: $code-color-dark;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.typeit {
|
||||||
|
.code {
|
||||||
|
padding: 6px;
|
||||||
|
font-size: 14px;
|
||||||
|
font-family: Consolas, Monaco, Menlo, Consolas, monospace;
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
font-size: 1em;
|
||||||
|
margin: .5em 0 .5em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.post-footer {
|
||||||
.post-info {
|
.post-info {
|
||||||
margin-top: 3rem;
|
margin-top: 3rem;
|
||||||
border-bottom: 1px solid $global-border-color;
|
border-bottom: 1px solid $global-border-color;
|
||||||
@@ -419,28 +417,28 @@
|
|||||||
transform: translateX(4px);
|
transform: translateX(4px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
.post-comment {
|
|
||||||
padding: 3em 0;
|
.post-comment {
|
||||||
}
|
padding: 3em 0;
|
||||||
|
}
|
||||||
.align-left {
|
|
||||||
text-align: left;
|
.align-left {
|
||||||
}
|
text-align: left;
|
||||||
|
}
|
||||||
.align-center {
|
|
||||||
text-align: center;
|
.align-center {
|
||||||
}
|
text-align: center;
|
||||||
|
}
|
||||||
.align-right {
|
|
||||||
text-align: right;
|
.align-right {
|
||||||
}
|
text-align: right;
|
||||||
|
}
|
||||||
.float-left {
|
|
||||||
float: left;
|
.float-left {
|
||||||
}
|
float: left;
|
||||||
|
}
|
||||||
.float-right {
|
|
||||||
float: right;
|
.float-right {
|
||||||
}
|
float: right;
|
||||||
}
|
}
|
||||||
128
assets/css/_page/_posts.scss
Normal file
128
assets/css/_page/_posts.scss
Normal file
@@ -0,0 +1,128 @@
|
|||||||
|
.intro {
|
||||||
|
transform: translateY(0);
|
||||||
|
padding: 2em 0 2em 0;
|
||||||
|
|
||||||
|
.avatar {
|
||||||
|
img {
|
||||||
|
width: 96px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.post {
|
||||||
|
padding-top: 0.8em;
|
||||||
|
padding-bottom: 0.8em;
|
||||||
|
color: $global-font-color;
|
||||||
|
border-top: 1px dashed $global-border-color;
|
||||||
|
border-bottom: 1px dashed $global-border-color;
|
||||||
|
|
||||||
|
.dark-theme & {
|
||||||
|
color: $global-font-color-dark;
|
||||||
|
border-bottom: 1px dashed $global-border-color-dark;
|
||||||
|
}
|
||||||
|
|
||||||
|
.featured_image_preview {
|
||||||
|
width: 100%;
|
||||||
|
padding: 30% 0 0;
|
||||||
|
position: relative;
|
||||||
|
margin-bottom: 1em;
|
||||||
|
|
||||||
|
img {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%; height: 100%;
|
||||||
|
left: 0; top: 0;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.post-list-title {
|
||||||
|
font-size: 1.6em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.post-meta {
|
||||||
|
font-size: 14px !important;
|
||||||
|
a {
|
||||||
|
color: $global-font-secondary-color !important;
|
||||||
|
|
||||||
|
.dark-theme & {
|
||||||
|
color: $global-font-secondary-color-dark !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: $global-link-hover-color !important;
|
||||||
|
|
||||||
|
.dark-theme & {
|
||||||
|
color: $global-link-hover-color-dark !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.post-content {
|
||||||
|
padding-top: .2em;
|
||||||
|
font-size: 0.9em;
|
||||||
|
width: 100%;
|
||||||
|
max-height: 100px;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
h2,
|
||||||
|
h3,
|
||||||
|
h4,
|
||||||
|
h5,
|
||||||
|
h6 {
|
||||||
|
font-size: 1em;
|
||||||
|
line-height: 1em;
|
||||||
|
padding-top: .3em;
|
||||||
|
padding-bottom: .3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin: 0;
|
||||||
|
padding-top: .3em;
|
||||||
|
padding-bottom: .3em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.post-footer {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 14px !important;
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: $post-link-color !important;
|
||||||
|
|
||||||
|
.dark-theme & {
|
||||||
|
color: $post-link-color-dark !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: $post-link-hover-color !important;
|
||||||
|
|
||||||
|
.dark-theme & {
|
||||||
|
color: $post-link-hover-color-dark !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.post-tags {
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: $global-link-color !important;
|
||||||
|
|
||||||
|
.dark-theme & {
|
||||||
|
color: $global-link-color-dark !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: $global-link-hover-color !important;
|
||||||
|
|
||||||
|
.dark-theme & {
|
||||||
|
color: $global-link-hover-color-dark !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,76 +1,73 @@
|
|||||||
.post-warp {
|
.archive-item {
|
||||||
|
margin-left: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
.archive-item {
|
.categories-card {
|
||||||
margin-left: 2rem;
|
margin: 0 auto;
|
||||||
}
|
margin-top: 3em;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
padding: 0 2.5em;
|
||||||
|
line-height: 1.6em;
|
||||||
|
|
||||||
.categories-card {
|
.card-item {
|
||||||
margin: 0 auto;
|
font-size: 14px;
|
||||||
margin-top: 3em;
|
text-align: left;
|
||||||
|
width: 45%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: flex-start;
|
||||||
justify-content: space-between;
|
margin-top: 2em;
|
||||||
flex-direction: row;
|
min-height: 16em;
|
||||||
flex-wrap: wrap;
|
padding: 0 2%;
|
||||||
padding: 0 2.5em;
|
position: relative;
|
||||||
line-height: 1.6em;
|
|
||||||
|
|
||||||
.card-item {
|
.categories {
|
||||||
font-size: 14px;
|
overflow: hidden;
|
||||||
text-align: left;
|
|
||||||
width: 45%;
|
|
||||||
display: flex;
|
|
||||||
align-items: flex-start;
|
|
||||||
margin-top: 2em;
|
|
||||||
min-height: 16em;
|
|
||||||
padding: 0 2%;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.categories {
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.archive-item-link {
|
.archive-item-link {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
text-decoration: none;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
max-width: 95%;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: $global-link-hover-color;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark-theme & {
|
||||||
|
color: $global-link-color-dark;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
overflow: hidden;
|
transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
|
||||||
text-overflow: ellipsis;
|
|
||||||
white-space: nowrap;
|
|
||||||
max-width: 95%;
|
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: $global-link-hover-color;
|
color: $global-link-hover-color-dark;
|
||||||
background-color: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dark-theme & {
|
|
||||||
color: $global-link-color-dark;
|
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
|
transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
|
||||||
|
|
||||||
&:hover {
|
|
||||||
color: $global-link-hover-color-dark;
|
|
||||||
text-decoration: none;
|
|
||||||
transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.archive-item-date {
|
.archive-item-date {
|
||||||
float: right;
|
float: right;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
color: $global-font-secondary-color;
|
color: $global-font-secondary-color;
|
||||||
|
|
||||||
.dark-theme & {
|
.dark-theme & {
|
||||||
color: $global-font-secondary-color-dark;
|
color: $global-font-secondary-color-dark;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.more-post {
|
.more-post {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.categories {
|
.categories {
|
||||||
|
|||||||
@@ -7,11 +7,11 @@
|
|||||||
list-style: none;
|
list-style: none;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding-top: 2em;
|
padding-top: 1em;
|
||||||
|
|
||||||
a {
|
a {
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
font-size: 12px;
|
font-size: 0.8em;
|
||||||
color: #bfbfbf;
|
color: #bfbfbf;
|
||||||
letter-spacing: 0.1em;
|
letter-spacing: 0.1em;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
|
|||||||
@@ -5,11 +5,7 @@
|
|||||||
@import "_core/base";
|
@import "_core/base";
|
||||||
@import "_core/layout";
|
@import "_core/layout";
|
||||||
|
|
||||||
@import "_page/home";
|
@import "_page/index";
|
||||||
@import "_page/home_post";
|
|
||||||
@import "_page/post";
|
|
||||||
@import "_page/tags";
|
|
||||||
@import "_page/terms";
|
|
||||||
|
|
||||||
@import "_partial/navbar";
|
@import "_partial/navbar";
|
||||||
@import "_partial/footer";
|
@import "_partial/footer";
|
||||||
|
|||||||
@@ -56,56 +56,64 @@ jQuery(function($) {
|
|||||||
_Blog._initToc = function() {
|
_Blog._initToc = function() {
|
||||||
const SPACING = 20;
|
const SPACING = 20;
|
||||||
const $toc = $('.post-toc');
|
const $toc = $('.post-toc');
|
||||||
|
const $footer = $('.post-footer');
|
||||||
|
|
||||||
if ($toc.length) {
|
if ($toc.length) {
|
||||||
const startTop = $toc.css("top");
|
const minTop = $toc.position().top;
|
||||||
const minScrollTop = $toc.offset().top - SPACING;
|
const mainTop = $('main').position().top;
|
||||||
|
const minScrollTop = minTop + mainTop - SPACING;
|
||||||
const tocState = {
|
|
||||||
start: {
|
|
||||||
'position': 'absolute',
|
|
||||||
'top': startTop,
|
|
||||||
},
|
|
||||||
process: {
|
|
||||||
'position': 'fixed',
|
|
||||||
'top': SPACING,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
$(window).scroll(function() {
|
$(window).scroll(function() {
|
||||||
const scrollTop = $(window).scrollTop();
|
const scrollTop = $(window).scrollTop();
|
||||||
|
const maxTop = $footer.position().top - $toc.height();
|
||||||
|
const maxScrollTop = maxTop + mainTop - SPACING;
|
||||||
|
|
||||||
if (scrollTop < minScrollTop) {
|
const tocState = {
|
||||||
$toc.css(tocState.start);
|
start: {
|
||||||
} else {
|
'position': 'absolute',
|
||||||
$toc.css(tocState.process);
|
'top': minTop,
|
||||||
}
|
},
|
||||||
|
process: {
|
||||||
|
'position': 'fixed',
|
||||||
|
'top': SPACING,
|
||||||
|
},
|
||||||
|
end: {
|
||||||
|
'position': 'absolute',
|
||||||
|
'top': maxTop,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
if (scrollTop < minScrollTop) {
|
||||||
|
$toc.css(tocState.start);
|
||||||
|
} else if (scrollTop > maxScrollTop) {
|
||||||
|
$toc.css(tocState.end);
|
||||||
|
} else {
|
||||||
|
$toc.css(tocState.process);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const HEADERFIX = 30;
|
const HEADERFIX = 60;
|
||||||
const $toclink = $('.toc-link');
|
const $toclink = $('.toc-link');
|
||||||
const $headerlink = $('.headerlink');
|
const $headerlink = $('.headerlink');
|
||||||
const $tocLinkLis = $('.post-toc-content li');
|
const $tocLinkLis = $('.post-toc-content li');
|
||||||
|
|
||||||
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[array.length - 1]) return array.length - 1;
|
|
||||||
return 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
const activeIndex = function() {
|
const activeIndex = function() {
|
||||||
const scrollTop = $(window).scrollTop();
|
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[array.length - 1]) return array.length - 1;
|
||||||
|
return 0;
|
||||||
|
};
|
||||||
|
|
||||||
const activeTocIndex = searchActiveTocIndex(headerLinksOffsetForSearch, scrollTop);
|
const activeTocIndex = searchActiveTocIndex(headerLinksOffsetForSearch, scrollTop);
|
||||||
|
|
||||||
$($toclink).removeClass('active');
|
$($toclink).removeClass('active');
|
||||||
@@ -182,7 +190,7 @@ jQuery(function($) {
|
|||||||
_Blog.countdown = function() {
|
_Blog.countdown = function() {
|
||||||
if (window.countdownMap) {
|
if (window.countdownMap) {
|
||||||
Object.keys(countdownMap).forEach(function(id) {
|
Object.keys(countdownMap).forEach(function(id) {
|
||||||
$(id).countdown(countdownMap[id], {elapse: true})
|
$(`#${id}`).countdown(countdownMap[id], {elapse: true})
|
||||||
.on('update.countdown', function(event) {
|
.on('update.countdown', function(event) {
|
||||||
var $this = $(this).html(event.strftime(''
|
var $this = $(this).html(event.strftime(''
|
||||||
+ '<span>%D</span> 天 <br />'
|
+ '<span>%D</span> 天 <br />'
|
||||||
@@ -226,9 +234,9 @@ jQuery(function($) {
|
|||||||
_Blog.changeTitle();
|
_Blog.changeTitle();
|
||||||
_Blog.chroma();
|
_Blog.chroma();
|
||||||
_Blog.responsiveTable();
|
_Blog.responsiveTable();
|
||||||
_Blog.toc();
|
|
||||||
_Blog.echarts(isDark);
|
_Blog.echarts(isDark);
|
||||||
_Blog.countdown();
|
_Blog.countdown();
|
||||||
_Blog.typeit();
|
_Blog.typeit();
|
||||||
|
_Blog.toc();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -37,6 +37,9 @@ other = "Theme - "
|
|||||||
[toc]
|
[toc]
|
||||||
other = "Table of Contents"
|
other = "Table of Contents"
|
||||||
|
|
||||||
|
[publish]
|
||||||
|
other = "published on"
|
||||||
|
|
||||||
[included]
|
[included]
|
||||||
other = "included in"
|
other = "included in"
|
||||||
|
|
||||||
@@ -63,6 +66,9 @@ other = "Back"
|
|||||||
|
|
||||||
[home]
|
[home]
|
||||||
other = "Home"
|
other = "Home"
|
||||||
|
|
||||||
|
[readmore]
|
||||||
|
other = "Read More......"
|
||||||
# === posts/single.html ===
|
# === posts/single.html ===
|
||||||
|
|
||||||
# === 404.html ===
|
# === 404.html ===
|
||||||
|
|||||||
@@ -37,6 +37,9 @@ other = "主题 - "
|
|||||||
[toc]
|
[toc]
|
||||||
other = "目录"
|
other = "目录"
|
||||||
|
|
||||||
|
[publish]
|
||||||
|
other = "发布于"
|
||||||
|
|
||||||
[included]
|
[included]
|
||||||
other = "收录于"
|
other = "收录于"
|
||||||
|
|
||||||
@@ -63,6 +66,9 @@ other = "返回"
|
|||||||
|
|
||||||
[home]
|
[home]
|
||||||
other = "主页"
|
other = "主页"
|
||||||
|
|
||||||
|
[readmore]
|
||||||
|
other = "阅读全文......"
|
||||||
# === posts/single.html ===
|
# === posts/single.html ===
|
||||||
|
|
||||||
# === 404.html ===
|
# === 404.html ===
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||||
<title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title>
|
<title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title>
|
||||||
{{ partial "head.html" . }}
|
{{ partial "head.html" . }}
|
||||||
{{ $style := resources.Get "css/style.scss" | resources.ToCSS | resources.Minify}}
|
|
||||||
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
|
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.10.1/css/all.min.css" integrity="sha256-fdcFNFiBMrNfWL6OcAGQz6jDgNTRxnrLEd4vJYFWScE=" crossorigin="anonymous">
|
|
||||||
</head>
|
</head>
|
||||||
<body class="">
|
<body class="">
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
@@ -18,7 +15,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
{{ partial "footer.html" . }}
|
{{ partial "footer.html" . }}
|
||||||
|
{{ partial "scripts.html" . }}
|
||||||
</div>
|
</div>
|
||||||
{{ partial "js.html" . }}
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -1,22 +1,22 @@
|
|||||||
{{ define "title" }}{{ T "posts" }} - {{ .Site.Title }}{{ end }}
|
{{ define "title" }}{{ T "posts" }} - {{ .Site.Title }}{{ end -}}
|
||||||
|
|
||||||
{{ define "content" }}
|
{{ define "content" -}}
|
||||||
{{ $data := .Data }}
|
{{ $data := .Data -}}
|
||||||
<div class="post-warp archive">
|
<div class="post-warp archive">
|
||||||
<h2 class="post-title" style="text-align:right;padding-bottom:2em">
|
<h2 class="post-title">
|
||||||
{{ printf "- %s -" (T "posts") }}
|
{{ printf "- %s -" (T "posts") }}
|
||||||
</h2>
|
</h2>
|
||||||
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
|
{{- range (.Paginate (.Pages.GroupByDate "2006")).PageGroups -}}
|
||||||
<h3>{{ .Key }}</h3>
|
<h3>{{ .Key }}</h3>
|
||||||
|
{{- range .Pages -}}
|
||||||
{{ range .Pages }}
|
<article class="archive-item">
|
||||||
<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">
|
||||||
<span class="archive-item-date">
|
{{- .Date.Format (.Site.Params.dateFormatToUse | default "01-02") -}}
|
||||||
{{ .Date.Format (.Site.Params.dateFormatToUse | default "01-02") }}
|
</span>
|
||||||
</span>
|
</article>
|
||||||
</article>
|
{{- end -}}
|
||||||
{{ end }} {{ end }}
|
{{- end -}}
|
||||||
{{ partial "paginator.html" . }}
|
{{- partial "paginator.html" . -}}
|
||||||
</div>
|
</div>
|
||||||
{{end }}
|
{{- end }}
|
||||||
55
layouts/_default/summary.html
Normal file
55
layouts/_default/summary.html
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
<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 . }}
|
||||||
|
<div class="featured_image_preview">
|
||||||
|
<img src=/images/loading.svg data-sizes=auto data-src={{ $image }} alt="featured image" class="lazyload">
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
<!-- end featured_image-->
|
||||||
|
<header class="post-header">
|
||||||
|
<h1 class="post-title post-list-title" itemprop="name headline">
|
||||||
|
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||||
|
</h1>
|
||||||
|
</header>
|
||||||
|
<div class="post-meta">
|
||||||
|
<a class="author" href="{{.Site.BaseURL }}" rel="author"><i class="fas fa-user-circle"></i> {{ $author }} </a>
|
||||||
|
{{ T "publish" }}<span class="post-time"> <time datetime={{ $publish_date }}>{{ $publish_date }}</time> </span>
|
||||||
|
{{ with .Params.categories -}}
|
||||||
|
<span class="post-category">
|
||||||
|
{{ 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"></i> <a href="{{ .Permalink }}">{{ $name }}</a>
|
||||||
|
{{ end -}}
|
||||||
|
{{ end }}
|
||||||
|
</span>
|
||||||
|
{{- end }}
|
||||||
|
</div>
|
||||||
|
<div class="post-content">
|
||||||
|
{{ if .Params.show_description }}
|
||||||
|
<p>{{ . }}</p>
|
||||||
|
{{ else }}
|
||||||
|
{{ .Summary }}
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
<div class="post-footer">
|
||||||
|
<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"></i> {{ . }}</a>
|
||||||
|
</span>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
@@ -1,15 +1,16 @@
|
|||||||
{{ define "content" }}
|
{{ define "content" -}}
|
||||||
{{ if eq .Site.Params.home_mode "post" }}
|
{{ if eq .Site.Params.home_mode "post" -}}
|
||||||
<div class="post-warp">
|
<div class="post-warp">
|
||||||
{{ partial "home/profile.html" . }}
|
{{- partial "home/profile.html" . -}}
|
||||||
|
|
||||||
{{ range (.Paginate (where .Pages "Type" "posts")).Pages }}
|
{{- $paginator := .Paginate (where (where .Data.Pages "Type" "posts") ".Params.show_in_homepage" "!=" false) }}
|
||||||
{{ .Render "summary" }}
|
{{ range $paginator.Pages -}}
|
||||||
{{ end }}
|
{{ .Render "summary" -}}
|
||||||
|
{{ end -}}
|
||||||
|
|
||||||
{{ partial "paginator.html" . }}
|
{{ partial "paginator.html" . }}
|
||||||
</div>
|
</div>
|
||||||
{{ else }}
|
{{- else -}}
|
||||||
{{ partial "home/profile.html" . }}
|
{{ partial "home/profile.html" . -}}
|
||||||
{{ end }}
|
{{ end -}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
@@ -30,12 +30,15 @@
|
|||||||
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
|
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
|
||||||
<meta name="msapplication-TileColor" content="#da532c">
|
<meta name="msapplication-TileColor" content="#da532c">
|
||||||
<meta name="theme-color" content="#ffffff">
|
<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="alternate" href="{{ .RelPermalink }}" type="application/rss+xml" title="{{ site.Title }}">
|
||||||
<link rel="feed" 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" . }}
|
{{- template "_internal/twitter_cards.html" . -}}
|
||||||
|
|
||||||
{{ partial "seo_schema.html" . }}
|
{{- partial "seo_schema.html" . -}}
|
||||||
|
|
||||||
|
{{- $style := resources.Get "css/style.scss" | resources.ToCSS | resources.Minify -}}
|
||||||
|
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
|
||||||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.10.1/css/all.min.css" integrity="sha256-fdcFNFiBMrNfWL6OcAGQz6jDgNTRxnrLEd4vJYFWScE=" crossorigin="anonymous">
|
||||||
@@ -13,7 +13,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<nav class="navbar-mobile" id="nav-mobile" style="display: none">
|
<nav class="navbar-mobile" id="nav-mobile" style="display: none">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="navbar-header">
|
<div class="navbar-header">
|
||||||
|
|||||||
35
layouts/partials/post/footer.html
Normal file
35
layouts/partials/post/footer.html
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
{{ $modify_date := .Lastmod.Format (.Site.Params.dateFormatToUse | default "2006-01-02") -}}
|
||||||
|
<div class="post-footer">
|
||||||
|
<div class="post-info">
|
||||||
|
<div class="post-info-mod"><span>{{ printf (T "lastMod") $modify_date }}</span></div>
|
||||||
|
<div class="post-info-share">
|
||||||
|
{{ if and ( .Param "socialShare" ) (gt (len (.Param "share")) 0) }}
|
||||||
|
<span>{{ partial "post/share.html" . }}</span>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="post-tags">
|
||||||
|
<section>
|
||||||
|
{{ with .Params.tags }}
|
||||||
|
{{ range . }}
|
||||||
|
<span class="tag">
|
||||||
|
<a href="{{ "tags/" | absURL }}{{ . | urlize }}/"><i class="fas fa-tag"></i> {{.}} </a>
|
||||||
|
</span>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<span><a href="javascript:window.history.back();">{{ T "back" }}</a></span> | <span><a href="{{ .Site.BaseURL }}">{{ T "home" }}</a></span>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="post-nav">
|
||||||
|
{{ if .PrevInSection }}
|
||||||
|
<a href="{{.PrevInSection.Permalink}}" class="prev" rel="prev" title="{{ .PrevInSection.Title}}"><i class="fas fa-angle-left"></i> {{ .PrevInSection.Title}}</a>
|
||||||
|
{{ end }}
|
||||||
|
{{ if .NextInSection }}
|
||||||
|
<a href="{{.NextInSection.Permalink}}" class="next" rel="next" title="{{.NextInSection.Title}}">{{.NextInSection.Title}} <i class="fas fa-angle-right"></i></a>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -1,59 +1,49 @@
|
|||||||
{{ if or .Params.socialShare (and .Site.Params.socialShare (ne .Params.socialShare false)) }}
|
{{ 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)) }}
|
{{ 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">
|
<a href="//twitter.com/share?url={{ .Permalink }}&text={{ .Title }}&via={{ .Site.Params.Social.Twitter }}" target="_blank" title="Share on Twitter">
|
||||||
<i class="fab fa-twitter"></i>
|
<i class="fab fa-twitter"></i>
|
||||||
</a>
|
</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if or .Params.Share.Facebook (and .Site.Params.Share.Facebook (ne .Params.Share.Facebook false)) }}
|
{{ 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">
|
<a href="//www.facebook.com/sharer/sharer.php?u={{ .Permalink }}" target="_blank" title="Share on Facebook">
|
||||||
<i class="fab fa-facebook-square"></i>
|
<i class="fab fa-facebook-square"></i>
|
||||||
</a>
|
</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if or .Params.Share.Reddit (and .Site.Params.Share.Reddit (ne .Params.Share.Reddit false)) }}
|
{{ 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">
|
<a href="//reddit.com/submit?url={{ .Permalink }}&title={{ .Title }}" target="_blank" title="Share on Reddit">
|
||||||
<i class="fab fa-reddit"></i>
|
<i class="fab fa-reddit"></i>
|
||||||
</a>
|
</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if or .Params.Share.Linkedin (and .Site.Params.Share.Linkedin (ne .Params.Share.Linkedin false)) }}
|
{{ 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">
|
<a href="//www.linkedin.com/shareArticle?url={{ .Permalink }}&title={{ .Title }}" target="_blank" title="Share on LinkedIn">
|
||||||
<i class="fab fa-linkedin"></i>
|
<i class="fab fa-linkedin"></i>
|
||||||
</a>
|
</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if or .Params.Share.Pinterest (and .Site.Params.Share.Pinterest (ne .Params.Share.Pinterest false)) }}
|
{{ 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">
|
<a href="//www.pinterest.com/pin/create/button/?url={{ .Permalink }}&description={{ .Title }}" target="_blank" title="Share on Pinterest">
|
||||||
<i class="fab fa-pinterest"></i>
|
<i class="fab fa-pinterest"></i>
|
||||||
</a>
|
</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if or .Params.Share.YCombinator (and .Site.Params.Share.YCombinator (ne .Params.Share.YCombinator false)) }}
|
{{ 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">
|
<a href="//news.ycombinator.com/submitlink?u={{ .Permalink }}&description={{ .Title }}" target="_blank" title="Share on Hacker News">
|
||||||
<i class="fab fa-y-combinator"></i>
|
<i class="fab fa-y-combinator"></i>
|
||||||
</a>
|
</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if or .Params.Share.Mix (and .Site.Params.Share.Mix (ne .Params.Share.Mix false)) }}
|
{{ 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">
|
<a href="//mix.com/add?url={{ .Permalink }}&description={{ .Title }}" target="_blank" title="Share on Mix">
|
||||||
<i class="fab fa-mix"></i>
|
<i class="fab fa-mix"></i>
|
||||||
</a>
|
</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if or .Params.Share.Tumblr (and .Site.Params.Share.Tumblr (ne .Params.Share.Tumblr false)) }}
|
{{ 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">
|
<a href="//www.tumblr.com/widgets/share/tool?canonicalUrl={{ .Permalink }}&title={{ .Title }}" target="_blank" title="Share on Tumblr">
|
||||||
<i class="fab fa-tumblr"></i>
|
<i class="fab fa-tumblr"></i>
|
||||||
</a>
|
</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if or .Params.Share.VK (and .Site.Params.Share.VK (ne .Params.Share.VK false)) }}
|
{{ 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 ">
|
<a href="//vk.com/share.php?url={{ .Permalink }}&title={{ .Title }}" target="_blank" title="Share on VKontakte ">
|
||||||
<i class="fab fa-vk"></i>
|
<i class="fab fa-vk"></i>
|
||||||
</a>
|
</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if or .Params.Share.Weibo (and .Site.Params.Share.Weibo (ne .Params.Share.Weibo false)) }}
|
{{ 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 }}" target="_blank" title="Share on Weibo">
|
<a href="//service.weibo.com/share/share.php?url={{ .Permalink }}&appkey=&title={{ .Title }}" target="_blank" title="Share on Weibo">
|
||||||
<i class="fab fa-weibo"></i>
|
<i class="fab fa-weibo"></i>
|
||||||
@@ -1,6 +1,3 @@
|
|||||||
{{ $scripts := resources.Get "/js/main.js" | slice }}
|
|
||||||
{{ $dynamicToTop := resources.Get "/js/dynamicToTop.js" }}
|
|
||||||
|
|
||||||
<!-- jQuery https://github.com/jquery/jquery -->
|
<!-- jQuery https://github.com/jquery/jquery -->
|
||||||
{{ $jquery := `
|
{{ $jquery := `
|
||||||
<script src="https://cdn.jsdelivr.net/npm/jquery@3.4.1/dist/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
|
<script src="https://cdn.jsdelivr.net/npm/jquery@3.4.1/dist/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
|
||||||
@@ -41,10 +38,9 @@
|
|||||||
` }}
|
` }}
|
||||||
|
|
||||||
{{ $jquery | safeHTML }}
|
{{ $jquery | safeHTML }}
|
||||||
|
{{ $lazysizes | safeHTML }}
|
||||||
|
|
||||||
{{ if .IsPage }}
|
{{ if .IsPage }}
|
||||||
{{ $lazysizes | safeHTML }}
|
|
||||||
|
|
||||||
{{ if .Scratch.Get "diagram" }}
|
{{ if .Scratch.Get "diagram" }}
|
||||||
{{ $diagram | safeHTML }}
|
{{ $diagram | safeHTML }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
@@ -71,11 +67,6 @@
|
|||||||
{{ $countdown | safeHTML }}
|
{{ $countdown | safeHTML }}
|
||||||
<script>var countdownMap = {{ . | jsonify | safeJS }};</script>
|
<script>var countdownMap = {{ . | jsonify | safeJS }};</script>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ $scripts = $scripts | append $dynamicToTop }}
|
|
||||||
{{ $scripts = $scripts | resources.Concat "/js/vendor_post.js" | resources.Minify }}
|
|
||||||
{{ else }}
|
|
||||||
{{ $scripts = $scripts | resources.Concat "/js/vendor_main.js" | resources.Minify}}
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ $typeitMap := .Scratch.Get "typeitMap" }}
|
{{ $typeitMap := .Scratch.Get "typeitMap" }}
|
||||||
@@ -88,6 +79,7 @@
|
|||||||
<script>var typeitArr = {{ $typeitArr | jsonify | safeJS }};</script>
|
<script>var typeitArr = {{ $typeitArr | jsonify | safeJS }};</script>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{ $scripts := slice (resources.Get "/js/main.js") (resources.Get "/js/dynamicToTop.js") | resources.Concat "/js/vendor.js" | resources.Minify }}
|
||||||
<script src="{{ $scripts.RelPermalink }}" async=""></script>
|
<script src="{{ $scripts.RelPermalink }}" async=""></script>
|
||||||
|
|
||||||
{{ template "_internal/google_analytics_async.html" . }}
|
{{ template "_internal/google_analytics_async.html" . }}
|
||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
{{ define "content" }}
|
{{ define "content" }}
|
||||||
{{ $publish_date := .PublishDate.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }}
|
{{ $publish_date := .PublishDate.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }}
|
||||||
{{ $modify_date := .Lastmod.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }}
|
|
||||||
{{ $author := .Site.Author.name }}
|
{{ $author := .Site.Author.name }}
|
||||||
{{ if isset .Params "author" }}
|
{{ if isset .Params "author" }}
|
||||||
{{ $author = .Site.Author.name }}
|
{{ $author = .Site.Author.name }}
|
||||||
@@ -15,20 +14,19 @@
|
|||||||
|
|
||||||
<div class="post-meta">
|
<div class="post-meta">
|
||||||
<div class="post-meta-main">
|
<div class="post-meta-main">
|
||||||
<a href="{{.Site.BaseURL }}" rel="author">{{ $author }}</a>
|
<a class="author" href="{{.Site.BaseURL }}" rel="author"><i class="fas fa-user-circle"></i> {{ $author }} </a>
|
||||||
{{ T "included" }}
|
|
||||||
{{ with .Params.categories -}}
|
{{ with .Params.categories -}}
|
||||||
<span class="post-category">
|
<span class="post-category">
|
||||||
|
{{ T "included" }}
|
||||||
{{ range . }}
|
{{ range . }}
|
||||||
{{- $name := . -}}
|
{{- $name := . -}}
|
||||||
{{- with $.Site.GetPage "taxonomy" (printf "categories/%s" $name) | default ($.Site.GetPage "taxonomy" (printf "categories/%s" ($name | urlize))) -}}
|
{{- with $.Site.GetPage "taxonomy" (printf "categories/%s" $name) | default ($.Site.GetPage "taxonomy" (printf "categories/%s" ($name | urlize))) -}}
|
||||||
<i class="far fa-folder"></i> <a href="{{ .Permalink }}">{{ $name }}</a>
|
<i class="far fa-folder"></i> <a href="{{ .Permalink }}">{{ $name }}</a>
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</span>
|
</span>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="post-meta-other">
|
<div class="post-meta-other">
|
||||||
<span class="post-time"><i class="far fa-calendar-alt"></i> <time datetime={{ $publish_date }}>{{ $publish_date }}</time> </span>
|
<span class="post-time"><i class="far fa-calendar-alt"></i> <time datetime={{ $publish_date }}>{{ $publish_date }}</time> </span>
|
||||||
<i class="fas fa-pencil-alt"></i> {{ T "wordCount" .WordCount }}
|
<i class="fas fa-pencil-alt"></i> {{ T "wordCount" .WordCount }}
|
||||||
@@ -45,64 +43,34 @@
|
|||||||
<div class="post-toc" id="post-toc">
|
<div class="post-toc" id="post-toc">
|
||||||
<h2 class="post-toc-title">{{ T "toc" }}</h2>
|
<h2 class="post-toc-title">{{ T "toc" }}</h2>
|
||||||
{{- $globalAutoCollapseToc := .Site.Params.autoCollapseToc | default true }}
|
{{- $globalAutoCollapseToc := .Site.Params.autoCollapseToc | default true }}
|
||||||
<div class="post-toc-content{{ if not (or .Params.autoCollapseToc (and $globalAutoCollapseToc (ne .Params.autoCollapseToc false))) }} always-active{{ end }}">
|
<div class="post-toc-content{{ if not (and $globalAutoCollapseToc (ne .Params.autoCollapseToc false)) }} always-active{{ end }}">
|
||||||
{{.TableOfContents}}
|
{{ .TableOfContents }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
{{ with .Params.featured_image }}
|
||||||
|
<img src=/images/loading.svg data-sizes=auto data-src={{ . }} alt="featured image" class="featured_image lazyload">
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
<div class="post-content">
|
<div class="post-content">
|
||||||
<!--featured_image-->
|
{{ $content := .Content }}
|
||||||
{{ with .Params.featured_image }}
|
{{ $REin := `<img src="([^"]+)" alt="([^"]+)?" />` }}
|
||||||
<img src=/images/loading.svg data-sizes=auto data-src={{ . }} alt="featured image" class="featured_image lazyload">
|
{{ $REout := "<figure><img src=/images/loading.svg data-sizes=auto data-src=$1 alt=$2 class=lazyload><figcaption class=image-caption>$2</figcaption></figure>" }}
|
||||||
{{ end }}
|
{{ $content = replaceRE $REin $REout $content }}
|
||||||
<!-- end featured_image-->
|
{{ $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>" }}
|
||||||
{{ $reAltIn := `<img src="([^"]+)" alt="([^"]+)?" />` }}
|
{{ $content = replaceRE $REin $REout $content }}
|
||||||
{{ $reAltOut := "<figure><img src=/images/loading.svg data-sizes=auto data-src=$1 alt=$2 class=lazyload><figcaption class=image-caption>$2</figcaption></figure>" }}
|
{{ $REin = `:\(([\w- ]+?)\):` }}
|
||||||
{{ $altContent := .Content | replaceRE $reAltIn $reAltOut | safeHTML }}
|
{{ $REout = `<i class="inline-icon $1"></i>` }}
|
||||||
{{ $reAltTitleIn := `<img src="([^"]+)" alt="([^"]+)?" title="([^"]+)?" />` }}
|
{{ $content = replaceRE $REin $REout $content }}
|
||||||
{{ $reAltTitleOut := "<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 | safeHTML }}
|
||||||
{{ $finalContent := $altContent | replaceRE $reAltTitleIn $reAltTitleOut | safeHTML }}
|
|
||||||
{{ $finalContent }}
|
|
||||||
</div>
|
</div>
|
||||||
<div class="post-footer">
|
|
||||||
<div class="post-info">
|
|
||||||
<div class="post-info-mod"><span>{{ printf (T "lastMod") $modify_date }}</span></div>
|
|
||||||
<div class="post-info-share">
|
|
||||||
{{ if and ( $.Param "socialShare" ) (gt (len ($.Param "share")) 0) }}
|
|
||||||
<span>{{ partial "post/share-links.html" . }}</span>
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="post-tags">
|
{{ partial "post/footer.html" . }}
|
||||||
<section>
|
|
||||||
{{ with .Params.tags }}
|
|
||||||
{{ range . }}
|
|
||||||
<span class="tag">
|
|
||||||
<i class="fas fa-tag"></i><a href="{{ "tags/" | absURL }}{{ . | urlize }}/"> {{.}} </a>
|
|
||||||
</span>
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<span><a href="javascript:window.history.back();">{{ T "back" }}</a></span> | <span><a href="{{ .Site.BaseURL }}">{{ T "home" }}</a></span>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="post-nav">
|
|
||||||
{{ if .PrevInSection }}
|
|
||||||
<a href="{{.PrevInSection.Permalink}}" class="prev" rel="prev" title="{{ .PrevInSection.Title}}"><i class="fas fa-angle-left"></i> {{ .PrevInSection.Title}}</a>
|
|
||||||
{{ end }}
|
|
||||||
{{ if .NextInSection }}
|
|
||||||
<a href="{{.NextInSection.Permalink}}" class="next" rel="next" title="{{.NextInSection.Title}}">{{.NextInSection.Title}} <i class="fas fa-angle-right"></i></a>
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="post-comment">
|
<div class="post-comment">
|
||||||
{{ if ( .Params.showComments | default true ) }}
|
{{ if ( .Params.comment | default true ) }}
|
||||||
{{ partial "comments.html" . }}
|
{{ partial "comments.html" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,46 +0,0 @@
|
|||||||
<article class="post" itemscope itemtype="http://schema.org/Article">
|
|
||||||
<header class="post-header">
|
|
||||||
<h1 class="post-title" itemprop="name headline">
|
|
||||||
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
|
||||||
</h1>
|
|
||||||
</header>
|
|
||||||
<div class="post-content">
|
|
||||||
<!--featured_image-->
|
|
||||||
{{ with .Params.featured_image }}
|
|
||||||
<p><img itemprop="image" src={{ . }} class="featured_image"></p>
|
|
||||||
{{ end }}
|
|
||||||
<!-- end featured_image-->
|
|
||||||
{{ .Summary }}
|
|
||||||
</div>
|
|
||||||
<div class="post-footer">
|
|
||||||
<div class="post-meta">
|
|
||||||
<span class="post-time">
|
|
||||||
<time datetime={{.Date.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }} itemprop="datePublished">
|
|
||||||
{{ .Date.Format (.Site.Params.dateFormatToUse | default "2 January 2006") }}
|
|
||||||
</time>
|
|
||||||
</span>
|
|
||||||
in
|
|
||||||
{{ with .Params.categories }}
|
|
||||||
<i class="far fa-folder"></i>
|
|
||||||
<span class="post-category">
|
|
||||||
{{ range . }}
|
|
||||||
{{ $name := . }}
|
|
||||||
{{ with $.Site.GetPage "taxonomy" (printf "categories/%s" $name) | default ($.Site.GetPage "taxonomy" (printf "categories/%s" ($name | urlize))) }}
|
|
||||||
<a href="{{ .Permalink }}">{{ $name }}</a>
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
</span>
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{ with .Params.tags }}
|
|
||||||
<div class="post-tags">
|
|
||||||
{{ range . }}
|
|
||||||
<span class="tag">
|
|
||||||
<a href="{{ "tags/" | absURL }}{{ . | urlize }}/">#{{ . }}</a>
|
|
||||||
</span>
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
||||||
</article>
|
|
||||||
@@ -1,17 +1,16 @@
|
|||||||
{{ if .Get "id" }}
|
{{ if .Get "id" -}}
|
||||||
{{ $id := .Get "id" }}
|
{{ $id := .Get "id" -}}
|
||||||
{{ with .Get "class" }}
|
{{ if .Get "date" -}}
|
||||||
<div id={{ $id }} class="{{ . }}"></div>
|
{{ $date := .Get "date" -}}
|
||||||
{{ else }}
|
{{ with .Page.Scratch.Get "countdownMap" -}}
|
||||||
<div id={{ $id }}></div>
|
{{ .Page.Scratch.Set "countdownMap" (dict $id $date | merge .) -}}
|
||||||
{{ end }}
|
{{ else -}}
|
||||||
{{ $id = printf "#%s" $id }}
|
{{ .Page.Scratch.Set "countdownMap" (dict $id $date) -}}
|
||||||
{{ with .Get "date" }}
|
{{ end -}}
|
||||||
{{ $date := . }}
|
{{ with .Get "class" -}}
|
||||||
{{ with $.Page.Scratch.Get "countdownMap" }}
|
<div id={{ $id }} class="{{ . }}"></div>
|
||||||
{{ $.Page.Scratch.Set "countdownMap" (dict $id $date | merge .) }}
|
{{- else -}}
|
||||||
{{ else }}
|
<div id={{ $id }}></div>
|
||||||
{{ $.Page.Scratch.Set "countdownMap" (dict $id $date) }}
|
{{- end -}}
|
||||||
{{ end }}
|
{{ end -}}
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
{{ $taxonomyName = (T "category") }}
|
{{ $taxonomyName = (T "category") }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div class="post-warp archive">
|
<div class="post-warp archive">
|
||||||
<h2 class="post-title" style="text-align:right;padding-bottom:2em">
|
<h2 class="post-title">
|
||||||
{{- printf "%s - %s" $taxonomyName .Title -}}
|
{{- printf "%s - %s" $taxonomyName .Title -}}
|
||||||
</h2>
|
</h2>
|
||||||
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
|
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
|
||||||
|
|||||||
@@ -13,8 +13,8 @@
|
|||||||
{{ $length := len $terms }}
|
{{ $length := len $terms }}
|
||||||
{{ $type := .Type }}
|
{{ $type := .Type }}
|
||||||
|
|
||||||
<div class="post-warp {{.Data.Plural}}">
|
<div class="post-warp archive">
|
||||||
<h2 class="post-title" style="text-align:right;padding-bottom:2em">
|
<h2 class="post-title">
|
||||||
{{- printf "- %s -" $taxonomysName -}}
|
{{- printf "- %s -" $taxonomysName -}}
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user