|
@ -14,7 +14,7 @@ It is based on the original [LeaveIt Theme](https://github.com/liuzc/LeaveIt/) a
|
|||
Since the three themes have a similar look, if you have questions about their differences,
|
||||
read [Why choose LoveIt](#why-choose-loveit) so that you can choose the one that works best for you.
|
||||
|
||||
![Hugo Theme LoveIt](images/Apple-Devices-Preview.png)
|
||||
![Hugo Theme LoveIt](https://github.com/dillonzq/LoveIt/raw/develop/images/Apple-Devices-Preview.png)
|
||||
|
||||
## [Demo Site](https://hugoloveit.com/)
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
由于三个主题外观的相似性,如果你对于它们的不同之处有疑问,请阅读 [为什么选择 LoveIt](#为什么选择-LoveIt),以便你能选择最适合你的一个。
|
||||
|
||||
![Hugo 主题 LoveIt](images/Apple-Devices-Preview.png)
|
||||
![Hugo 主题 LoveIt](https://github.com/dillonzq/LoveIt/raw/develop/images/Apple-Devices-Preview.png)
|
||||
|
||||
## 主题[预览](https://hugoloveit.com/zh-cn/)
|
||||
|
||||
|
|
|
@ -58,14 +58,9 @@ body {
|
|||
}
|
||||
}
|
||||
|
||||
b, strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
a {
|
||||
color: $global-link-color;
|
||||
text-decoration: none;
|
||||
transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
|
||||
|
||||
&:hover {
|
||||
color: $global-link-hover-color;
|
||||
|
@ -82,47 +77,10 @@ a {
|
|||
|
||||
b, strong {
|
||||
font-weight: bold;
|
||||
|
||||
.dark-theme & {
|
||||
color: #ddd;
|
||||
}
|
||||
}
|
||||
|
||||
#dynamic-to-top {
|
||||
display: none;
|
||||
overflow: hidden;
|
||||
width: auto;
|
||||
z-index: 90;
|
||||
position: fixed;
|
||||
bottom: 2rem;
|
||||
right: 2rem;
|
||||
top: auto;
|
||||
left: auto;
|
||||
font-family: sans-serif;
|
||||
font-size: 1rem;
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
padding: 1rem 1rem;
|
||||
border: 1px solid $global-border-color;
|
||||
background: #222;
|
||||
outline: none;
|
||||
&:hover {
|
||||
background: #000;
|
||||
cursor: pointer;
|
||||
}
|
||||
&:active {
|
||||
background: #000;
|
||||
outline: none;
|
||||
}
|
||||
&:focus, &:hover {
|
||||
outline: none;
|
||||
}
|
||||
span {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
width: .875rem;
|
||||
height: .75rem;
|
||||
background: url('data:image/png;base64,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') no-repeat center center;
|
||||
}
|
||||
|
||||
.dark-theme &{
|
||||
border: 1px solid $global-border-color-dark;
|
||||
}
|
||||
}
|
||||
@import "../_partial/dynamic-to-top";
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
@media only screen and (max-width: 960px) {
|
||||
#header-desktop {
|
||||
.header-wrapper {
|
||||
margin: 0 1rem;
|
||||
padding: 0 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 720px) {
|
||||
@media only screen and (max-width: 680px) {
|
||||
#header-desktop {
|
||||
display: none;
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/** Single **/
|
||||
.single {
|
||||
.single-title {
|
||||
margin: 0;
|
||||
font-size: 1.8rem;
|
||||
line-height: 3rem;
|
||||
margin: 0.8rem 0;
|
||||
font-size: 1.6rem;
|
||||
line-height: 140%;
|
||||
}
|
||||
|
||||
.post-meta {
|
||||
|
@ -22,14 +22,14 @@
|
|||
color: $single-link-color;
|
||||
|
||||
.dark-theme & {
|
||||
color: $single-link-color-dark;
|
||||
color: $global-link-color-dark;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: $single-link-hover-color;
|
||||
|
||||
.dark-theme & {
|
||||
color: $single-link-hover-color-dark;
|
||||
color: $global-link-hover-color-dark;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -101,7 +101,6 @@
|
|||
|
||||
.dark-theme &:hover {
|
||||
color: $single-link-hover-color-dark;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -143,6 +142,7 @@
|
|||
margin: .625rem 0;
|
||||
border-spacing: 0;
|
||||
background: $table-background-color;
|
||||
border-collapse: collapse;
|
||||
|
||||
.dark-theme & {
|
||||
background: $table-background-color-dark;
|
||||
|
@ -179,12 +179,10 @@
|
|||
min-width: 20%;
|
||||
max-width: 80%;
|
||||
display: inline-block;
|
||||
padding: .625rem;
|
||||
padding: .5rem;
|
||||
margin: 0 auto;
|
||||
border-bottom: 1px solid #d9d9d9;
|
||||
font-size: .875rem;
|
||||
color: #969696;
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
img {
|
||||
|
@ -252,31 +250,10 @@
|
|||
}
|
||||
|
||||
@import "../_partial/_single/code";
|
||||
@import "../_partial/_single/instagram";
|
||||
@import "../_partial/_single/admonition";
|
||||
|
||||
.echarts {
|
||||
width: 100%;
|
||||
height: 30rem;
|
||||
margin: 3% auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.bilibili {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 0;
|
||||
padding-bottom: 75%;
|
||||
margin: 3% auto;
|
||||
text-align: center;
|
||||
|
||||
iframe {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
@import "../_partial/_single/echarts";
|
||||
@import "../_partial/_single/bilibili";
|
||||
|
||||
hr {
|
||||
margin: 1rem 0;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
&:focus,
|
||||
&:hover {
|
||||
color: $global-link-hover-color;
|
||||
transform: scale(1.1);
|
||||
transform: scale(1.2);
|
||||
|
||||
.dark-theme & {
|
||||
color: $global-link-hover-color-dark;
|
||||
|
|
39
assets/css/_partial/_dynamic-to-top.scss
Normal file
|
@ -0,0 +1,39 @@
|
|||
#dynamic-to-top {
|
||||
display: none;
|
||||
overflow: hidden;
|
||||
width: auto;
|
||||
z-index: 100;
|
||||
position: fixed;
|
||||
bottom: 2rem;
|
||||
right: 2rem;
|
||||
top: auto;
|
||||
left: auto;
|
||||
font-size: 1.4rem;
|
||||
line-height: 1.8rem;
|
||||
padding: .6rem .6rem;
|
||||
color: $global-font-secondary-color;
|
||||
background: $header-background-color;
|
||||
border: 1px solid $global-border-color;
|
||||
border-radius: 2rem;
|
||||
|
||||
&:hover, &:active {
|
||||
color: $global-font-color;
|
||||
background: $global-background-color;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&:active, &:focus, &:hover {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.dark-theme & {
|
||||
color: $global-font-secondary-color-dark;
|
||||
background: $header-background-color-dark;
|
||||
border-color: $global-border-color-dark;
|
||||
|
||||
&:hover, &:active {
|
||||
color: $global-font-color-dark;
|
||||
background: $global-background-color-dark;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -8,25 +8,21 @@ header {
|
|||
}
|
||||
|
||||
.header-title {
|
||||
font-size: 1.5rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.menu .menu-item {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.language-select {
|
||||
font-weight: $global-font-weight;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
background: transparent;
|
||||
background-image: none;
|
||||
-webkit-appearance: none;
|
||||
color: $global-font-color;
|
||||
|
||||
.dark-theme & {
|
||||
color: $global-font-color-dark;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
}
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
|
@ -47,23 +43,20 @@ header {
|
|||
.header-wrapper {
|
||||
width: auto;
|
||||
text-align: center;
|
||||
margin: 0 4rem;
|
||||
padding: 0 3rem;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.header-title a {
|
||||
padding: 0 8px;
|
||||
font-size: 1.25rem;
|
||||
.menu {
|
||||
.menu-item {
|
||||
margin: 0 .5rem;
|
||||
|
||||
i {
|
||||
line-height: 2rem;
|
||||
&.theme-switch {
|
||||
margin: 0 .3rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.menu a {
|
||||
padding: 0 8px;
|
||||
|
||||
&.active {
|
||||
a.active {
|
||||
font-weight: 900;
|
||||
color: $header-hover-color;
|
||||
|
||||
|
@ -96,10 +89,6 @@ header {
|
|||
padding-left: 1rem;
|
||||
box-sizing: border-box;
|
||||
|
||||
.header-title {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
.menu-toggle {
|
||||
cursor: pointer;
|
||||
line-height: 4rem;
|
||||
|
|
|
@ -27,7 +27,9 @@
|
|||
}
|
||||
|
||||
.single-title {
|
||||
font-size: 1.6rem;
|
||||
font-size: 1.4rem;
|
||||
line-height: 140%;
|
||||
margin: 0.4rem 0;
|
||||
}
|
||||
|
||||
.content {
|
||||
|
@ -72,10 +74,10 @@
|
|||
&::before {
|
||||
content: "|";
|
||||
margin-right: .3125rem;
|
||||
color: $single-link-color;
|
||||
color: $global-link-color;
|
||||
|
||||
.dark-theme & {
|
||||
color: $single-link-color-dark;
|
||||
color: $global-link-color-dark;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -87,27 +89,49 @@
|
|||
content: "#";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.post-footer {
|
||||
margin-top: .5rem;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: .875rem !important;
|
||||
|
||||
a {
|
||||
color: $single-link-color !important;
|
||||
color: $global-link-color;
|
||||
|
||||
.dark-theme & {
|
||||
color: $single-link-color-dark !important;
|
||||
color: $global-link-color-dark;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: $single-link-hover-color !important;
|
||||
color: $global-link-hover-color;
|
||||
|
||||
.dark-theme & {
|
||||
color: $single-link-hover-color-dark !important;
|
||||
color: $global-link-hover-color-dark;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
b, strong {
|
||||
.dark-theme & {
|
||||
color: $global-font-secondary-color-dark;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.post-footer {
|
||||
margin-top: .4rem;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: .875rem;
|
||||
|
||||
a {
|
||||
color: $single-link-color;
|
||||
|
||||
.dark-theme & {
|
||||
color: $single-link-color-dark;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: $single-link-hover-color;
|
||||
|
||||
.dark-theme & {
|
||||
color: $single-link-hover-color-dark;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -116,17 +140,17 @@
|
|||
padding: 0;
|
||||
|
||||
a {
|
||||
color: $global-link-color !important;
|
||||
color: $global-link-color;
|
||||
|
||||
.dark-theme & {
|
||||
color: $global-link-color-dark !important;
|
||||
color: $global-link-color-dark;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: $global-link-hover-color !important;
|
||||
color: $global-link-hover-color;
|
||||
|
||||
.dark-theme & {
|
||||
color: $global-link-hover-color-dark !important;
|
||||
color: $global-link-hover-color-dark;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
16
assets/css/_partial/_single/_bilibili.scss
Normal file
|
@ -0,0 +1,16 @@
|
|||
.bilibili {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 0;
|
||||
padding-bottom: 75%;
|
||||
margin: 3% auto;
|
||||
text-align: center;
|
||||
|
||||
iframe {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
}
|
|
@ -46,15 +46,6 @@ code, pre, .highlight table, .highlight tr, .highlight td {
|
|||
}
|
||||
}
|
||||
|
||||
table, tr, td {
|
||||
margin: 0;
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
td {
|
||||
padding: .2rem .4rem;
|
||||
}
|
||||
|
||||
.lntd {
|
||||
&:first-child {
|
||||
width: 1.2rem;
|
||||
|
@ -107,3 +98,203 @@ code, pre, .highlight table, .highlight tr, .highlight td {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.highlight > .chroma, .gist {
|
||||
table, tr, td {
|
||||
margin: 0;
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
td {
|
||||
padding: .2rem .4rem;
|
||||
}
|
||||
}
|
||||
|
||||
.gist {
|
||||
.gist-file, .gist-data, .gist-meta {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.gist-meta {
|
||||
padding: .4rem .8rem;
|
||||
background-color: darken($code-background-color, 5%);
|
||||
|
||||
a {
|
||||
color: $single-link-color;
|
||||
|
||||
.dark-theme & {
|
||||
color: $single-link-color-dark;
|
||||
}
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: $single-link-hover-color;
|
||||
|
||||
.dark-theme &:hover {
|
||||
color: $single-link-hover-color-dark;
|
||||
}
|
||||
}
|
||||
|
||||
.dark-theme & {
|
||||
background-color: darken($code-background-color-dark, 5%);
|
||||
}
|
||||
}
|
||||
|
||||
.dark-theme & {
|
||||
// imported from https://github.com/lonekorean/gist-syntax-themes/blob/master/stylesheets/one-dark.css
|
||||
.highlight {
|
||||
background: #141414;
|
||||
}
|
||||
.blob-num,
|
||||
.blob-code-inner,
|
||||
.highlight,
|
||||
.pl-enm,
|
||||
.pl-ko,
|
||||
.pl-mo,
|
||||
.pl-mp1 .pl-sf,
|
||||
.pl-ms,
|
||||
.pl-pdc1,
|
||||
.pl-scp,
|
||||
.pl-smc,
|
||||
.pl-som,
|
||||
.pl-va,
|
||||
.pl-vpf,
|
||||
.pl-vpu,
|
||||
.pl-mdr {
|
||||
color: #aab1bf;
|
||||
}
|
||||
.pl-mb,
|
||||
.pl-pdb {
|
||||
font-weight: 700;
|
||||
}
|
||||
.pl-c,
|
||||
.pl-c span,
|
||||
.pl-pdc {
|
||||
color: #5b6270;
|
||||
font-style: italic;
|
||||
}
|
||||
.pl-sr .pl-cce {
|
||||
color: #56b5c2;
|
||||
font-weight: 400;
|
||||
}
|
||||
.pl-ef,
|
||||
.pl-en,
|
||||
.pl-enf,
|
||||
.pl-eoai,
|
||||
.pl-kos,
|
||||
.pl-mh .pl-pdh,
|
||||
.pl-mr {
|
||||
color: #61afef;
|
||||
}
|
||||
.pl-ens,
|
||||
.pl-vi {
|
||||
color: #be5046;
|
||||
}
|
||||
.pl-enti,
|
||||
.pl-mai .pl-sf,
|
||||
.pl-ml,
|
||||
.pl-sf,
|
||||
.pl-sr,
|
||||
.pl-sr .pl-sra,
|
||||
.pl-src,
|
||||
.pl-st,
|
||||
.pl-vo {
|
||||
color: #56b5c2;
|
||||
}
|
||||
.pl-eoi,
|
||||
.pl-mri,
|
||||
.pl-pds,
|
||||
.pl-pse .pl-s1,
|
||||
.pl-s,
|
||||
.pl-s1 {
|
||||
color: #97c279;
|
||||
}
|
||||
.pl-k,
|
||||
.pl-kolp,
|
||||
.pl-mc,
|
||||
.pl-pde {
|
||||
color: #c578dd;
|
||||
}
|
||||
.pl-mi,
|
||||
.pl-pdi {
|
||||
color: #c578dd;
|
||||
font-style: italic;
|
||||
}
|
||||
.pl-mp,
|
||||
.pl-stp {
|
||||
color: #818896;
|
||||
}
|
||||
.pl-mdh,
|
||||
.pl-mdi,
|
||||
.pl-mdr {
|
||||
font-weight: 400;
|
||||
}
|
||||
.pl-mdht,
|
||||
.pl-mi1 {
|
||||
color: #97c279;
|
||||
background: #020;
|
||||
}
|
||||
.pl-md,
|
||||
.pl-mdhf {
|
||||
color: #df6b75;
|
||||
background: #200;
|
||||
}
|
||||
.pl-corl {
|
||||
color: #df6b75;
|
||||
text-decoration: underline;
|
||||
}
|
||||
.pl-ib {
|
||||
background: #df6b75;
|
||||
}
|
||||
.pl-ii {
|
||||
background: #e0c184;
|
||||
color: #fff;
|
||||
}
|
||||
.pl-iu {
|
||||
background: #e05151;
|
||||
}
|
||||
.pl-ms1 {
|
||||
color: #aab1bf;
|
||||
background: #373b41;
|
||||
}
|
||||
.pl-c1,
|
||||
.pl-cn,
|
||||
.pl-e,
|
||||
.pl-eoa,
|
||||
.pl-eoac,
|
||||
.pl-eoac .pl-pde,
|
||||
.pl-kou,
|
||||
.pl-mm,
|
||||
.pl-mp .pl-s3,
|
||||
.pl-mq,
|
||||
.pl-s3,
|
||||
.pl-sok,
|
||||
.pl-sv,
|
||||
.pl-mb {
|
||||
color: #d19965;
|
||||
}
|
||||
.pl-enc,
|
||||
.pl-entc,
|
||||
.pl-pse .pl-s2,
|
||||
.pl-s2,
|
||||
.pl-sc,
|
||||
.pl-smp,
|
||||
.pl-sr .pl-sre,
|
||||
.pl-stj,
|
||||
.pl-v,
|
||||
.pl-pdb {
|
||||
color: #e4bf7a;
|
||||
}
|
||||
.pl-ent,
|
||||
.pl-entl,
|
||||
.pl-entm,
|
||||
.pl-mh,
|
||||
.pl-pdv,
|
||||
.pl-smi,
|
||||
.pl-sol,
|
||||
.pl-mdh,
|
||||
.pl-mdi {
|
||||
color: #df6b75;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
6
assets/css/_partial/_single/_echarts.scss
Normal file
|
@ -0,0 +1,6 @@
|
|||
.echarts {
|
||||
width: 100%;
|
||||
height: 30rem;
|
||||
margin: 3% auto;
|
||||
text-align: center;
|
||||
}
|
5
assets/css/_partial/_single/_instagram.scss
Normal file
|
@ -0,0 +1,5 @@
|
|||
iframe.instagram-media {
|
||||
.dark-theme & {
|
||||
border: none !important;
|
||||
}
|
||||
}
|
|
@ -2,12 +2,13 @@
|
|||
display: block;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
max-width: 1000px;
|
||||
margin-left: 1000px;
|
||||
padding: 0 .8rem;
|
||||
border-left: 1px solid $global-border-color;
|
||||
overflow-wrap: break-word;
|
||||
box-sizing: border-box;
|
||||
top: if($header-normal-mode-desktop, 7rem, 12rem);
|
||||
top: if($header-normal-mode-desktop, 5rem, 10rem);
|
||||
|
||||
.dark-theme & {
|
||||
border-left: 1px solid $global-border-color-dark;
|
||||
|
|
|
@ -50,8 +50,8 @@ $selection-color-dark: rgba(38, 139, 211, 0.3) !default;
|
|||
|
||||
// ========== Header ========== //
|
||||
// Height of the header
|
||||
$header-height-desktop: 4rem !default;
|
||||
$header-height-mobile: 4rem !default;
|
||||
$header-height-desktop: 3.5rem !default;
|
||||
$header-height-mobile: 3.5rem !default;
|
||||
|
||||
// Color of the header background
|
||||
$header-background-color: #f8f8f8 !default;
|
||||
|
@ -62,8 +62,8 @@ $header-position-desktop: if($header-normal-mode-desktop, static, fixed) !defaul
|
|||
$header-position-mobile: if($header-normal-mode-mobile, static, fixed) !default;
|
||||
|
||||
// Top of the page padding
|
||||
$page-padding-top-desktop: if($header-normal-mode-desktop, 1rem, 6rem) !default;
|
||||
$page-padding-top-mobile: if($header-normal-mode-mobile, 1rem, 6rem) !default;
|
||||
$page-padding-top-desktop: if($header-normal-mode-desktop, 0, $header-height-desktop) !default;
|
||||
$page-padding-top-mobile: if($header-normal-mode-mobile, 0, $header-height-mobile) !default;
|
||||
|
||||
// Color of the hover header item
|
||||
$header-hover-color: #161209 !default;
|
||||
|
@ -77,11 +77,11 @@ $toc-content-font-size: 0.9rem !default;
|
|||
|
||||
// Color of the single link
|
||||
$single-link-color: #2d96bd !default;
|
||||
$single-link-color-dark: #eee !default;
|
||||
$single-link-color-dark: #55bde2 !default;
|
||||
|
||||
// Color of the hover single link
|
||||
$single-link-hover-color: #ef3982 !default;
|
||||
$single-link-hover-color-dark: #2d96bd !default;
|
||||
$single-link-hover-color-dark: #bdebfc !default;
|
||||
|
||||
// Color of the table background
|
||||
$table-background-color: #fff !default;
|
||||
|
|
2
assets/js/theme.min.js
vendored
|
@ -10,6 +10,6 @@
|
|||
@import "themes/neutral/index";
|
||||
|
||||
.dark-theme & {
|
||||
@import "themes/darker/index";
|
||||
@import "themes/dark/index";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
$mainBkg: #BDD5EA;
|
||||
$secondBkg: #6D6D65;
|
||||
$mainContrastColor: lightgrey;
|
||||
$darkTextColor: #323D47;
|
||||
$lineColor: $mainContrastColor;
|
||||
$border1: #81B1DB;
|
||||
$border2: rgba(255, 255, 255, 0.25);
|
||||
$arrowheadColor: $mainContrastColor;
|
||||
|
||||
/* Flowchart variables */
|
||||
|
||||
$nodeBkg: $mainBkg;
|
||||
$nodeBorder: purple;
|
||||
$clusterBkg: $secondBkg;
|
||||
$clusterBorder: $border2;
|
||||
$defaultLinkColor: $lineColor;
|
||||
$titleColor: #F9FFFE;
|
||||
$edgeLabelBackground: #e8e8e8;
|
||||
|
||||
/* Sequence Diagram variables */
|
||||
|
||||
$actorBorder: $border1;
|
||||
$actorBkg: $mainBkg;
|
||||
$actorTextColor: black;
|
||||
$actorLineColor: $mainContrastColor;
|
||||
$signalColor: $mainContrastColor;
|
||||
$signalTextColor: $mainContrastColor;
|
||||
$labelBoxBkgColor: $actorBkg;
|
||||
$labelBoxBorderColor: $actorBorder;
|
||||
$labelTextColor: $darkTextColor;
|
||||
$loopTextColor: $mainContrastColor;
|
||||
$noteBorderColor: $border2;
|
||||
$noteBkgColor: #fff5ad;
|
||||
$activationBorderColor: #666;
|
||||
$activationBkgColor: #f4f4f4;
|
||||
$sequenceNumberColor: white;
|
||||
|
||||
/* Gantt chart variables */
|
||||
|
||||
$sectionBkgColor: rgba(255, 255, 255, 0.3);
|
||||
$altSectionBkgColor: white;
|
||||
$sectionBkgColor2: #EAE8B9;
|
||||
$taskBorderColor: rgba(255, 255, 255, 0.5);
|
||||
$taskBkgColor: $mainBkg;
|
||||
$taskTextColor: $darkTextColor;
|
||||
$taskTextLightColor: $mainContrastColor;
|
||||
$taskTextOutsideColor: $taskTextLightColor;
|
||||
$taskTextClickableColor: #003163;
|
||||
$activeTaskBorderColor: rgba(255, 255, 255, 0.5);
|
||||
$activeTaskBkgColor: #81B1DB;
|
||||
$gridColor: $mainContrastColor;
|
||||
$doneTaskBkgColor: $mainContrastColor;
|
||||
$doneTaskBorderColor: grey;
|
||||
$critBorderColor: #E83737;
|
||||
$critBkgColor: #E83737;
|
||||
$taskTextDarkColor: $darkTextColor;
|
||||
$todayLineColor: #DB5757;
|
||||
|
||||
/* state colors */
|
||||
$labelColor: black;
|
||||
|
||||
@import '../mermaid';
|
|
@ -59,6 +59,7 @@
|
|||
text {
|
||||
font-family: 'trebuchet ms', verdana, arial;
|
||||
font-family: var(--mermaid-font-family);
|
||||
fill: $taskTextOutsideColor;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -151,12 +152,12 @@
|
|||
.taskTextOutside0,
|
||||
.taskTextOutside2
|
||||
{
|
||||
fill: $taskTextOutsideColor;
|
||||
fill: $taskTextOutsideColor !important;
|
||||
}
|
||||
|
||||
.taskTextOutside1,
|
||||
.taskTextOutside3 {
|
||||
fill: $taskTextOutsideColor;
|
||||
fill: $taskTextOutsideColor !important;
|
||||
}
|
||||
|
||||
|
||||
|
@ -174,7 +175,7 @@
|
|||
.activeText1,
|
||||
.activeText2,
|
||||
.activeText3 {
|
||||
fill: $taskTextDarkColor !important;
|
||||
fill: $taskTextDarkColor;
|
||||
}
|
||||
|
||||
|
||||
|
@ -193,7 +194,7 @@
|
|||
.doneText1,
|
||||
.doneText2,
|
||||
.doneText3 {
|
||||
fill: $taskTextDarkColor !important;
|
||||
fill: $taskTextDarkColor;
|
||||
}
|
||||
|
||||
|
||||
|
@ -239,20 +240,20 @@
|
|||
.doneCritText1,
|
||||
.doneCritText2,
|
||||
.doneCritText3 {
|
||||
fill: $taskTextDarkColor !important;
|
||||
fill: $taskTextDarkColor;
|
||||
}
|
||||
|
||||
.activeCritText0,
|
||||
.activeCritText1,
|
||||
.activeCritText2,
|
||||
.activeCritText3 {
|
||||
fill: $taskTextDarkColor !important;
|
||||
fill: $taskTextDarkColor;
|
||||
}
|
||||
|
||||
.titleText {
|
||||
text-anchor: middle;
|
||||
font-size: 18px;
|
||||
fill: $taskTextDarkColor;
|
||||
fill: $taskTextOutsideColor;
|
||||
font-family: 'trebuchet ms', verdana, arial;
|
||||
font-family: var(--mermaid-font-family);
|
||||
}
|
||||
|
|
|
@ -25,6 +25,10 @@
|
|||
.v code, .v pre {
|
||||
background: #272C34;
|
||||
}
|
||||
|
||||
.v .vmark .vinput {
|
||||
color: #0e0f10;
|
||||
}
|
||||
}
|
||||
|
||||
.v code, .v pre {
|
|
@ -1,4 +1,4 @@
|
|||
baseURL = "/"
|
||||
baseURL = "https://example.com"
|
||||
# [en, zh-cn, fr, ...] determines default content language
|
||||
# [en, zh-cn, fr, ...] 设置默认的语言
|
||||
defaultContentLanguage = "en"
|
||||
|
@ -25,7 +25,7 @@ enableEmoji = true
|
|||
# language code
|
||||
languageCode = "en"
|
||||
# website title
|
||||
title = "LoveIt Theme"
|
||||
title = "LoveIt"
|
||||
# language name
|
||||
languageName = "English"
|
||||
# whether to include Chinese/Japanese/Korean
|
||||
|
@ -66,7 +66,7 @@ enableEmoji = true
|
|||
[[languages.en.menu.main]]
|
||||
identifier = "documentation"
|
||||
pre = ""
|
||||
name = "Documentation"
|
||||
name = "Docs"
|
||||
url = "/categories/documentation/"
|
||||
title = ""
|
||||
weight = 4
|
||||
|
@ -77,6 +77,13 @@ enableEmoji = true
|
|||
url = "/about/"
|
||||
title = ""
|
||||
weight = 5
|
||||
[[languages.en.menu.main]]
|
||||
identifier = "github"
|
||||
pre = "<i class='fab fa-github fa-fw'></i>"
|
||||
name = ""
|
||||
url = "https://github.com/dillonzq/LoveIt"
|
||||
title = "GitHub"
|
||||
weight = 6
|
||||
[languages.en.params]
|
||||
# site description
|
||||
description = "About LoveIt Theme"
|
||||
|
@ -242,7 +249,7 @@ enableEmoji = true
|
|||
# 网站语言, 仅在这里 CN 大写
|
||||
languageCode = "zh-CN"
|
||||
# 网站标题
|
||||
title = "LoveIt 主题"
|
||||
title = "LoveIt"
|
||||
# 语言名称
|
||||
languageName = "简体中文"
|
||||
# 是否包括中日韩文字
|
||||
|
@ -260,7 +267,7 @@ enableEmoji = true
|
|||
[[languages.zh-cn.menu.main]]
|
||||
identifier = "posts"
|
||||
pre = ""
|
||||
name = "文章"
|
||||
name = "所有文章"
|
||||
url = "/posts/"
|
||||
title = ""
|
||||
weight = 1
|
||||
|
@ -281,7 +288,7 @@ enableEmoji = true
|
|||
[[languages.zh-cn.menu.main]]
|
||||
identifier = "documentation"
|
||||
pre = ""
|
||||
name = "主题文档"
|
||||
name = "文档"
|
||||
url = "/categories/documentation/"
|
||||
title = ""
|
||||
weight = 4
|
||||
|
@ -292,6 +299,13 @@ enableEmoji = true
|
|||
url = "/about/"
|
||||
title = ""
|
||||
weight = 5
|
||||
[[languages.zh-cn.menu.main]]
|
||||
identifier = "github"
|
||||
pre = "<i class='fab fa-github fa-fw'></i>"
|
||||
name = ""
|
||||
url = "https://github.com/dillonzq/LoveIt"
|
||||
title = "GitHub"
|
||||
weight = 6
|
||||
[languages.zh-cn.params]
|
||||
# 网站描述
|
||||
description = "关于 LoveIt 主题"
|
||||
|
@ -457,7 +471,7 @@ enableEmoji = true
|
|||
# language code
|
||||
languageCode = "fr"
|
||||
# website title
|
||||
title = "LoveIt Thème"
|
||||
title = "LoveIt"
|
||||
# language name
|
||||
languageName = "Français"
|
||||
# whether to include Chinese/Japanese/Korean
|
||||
|
@ -496,7 +510,7 @@ enableEmoji = true
|
|||
[[languages.fr.menu.main]]
|
||||
identifier = "documentation"
|
||||
pre = ""
|
||||
name = "Documentation"
|
||||
name = "Docs"
|
||||
url = "/categories/documentation/"
|
||||
title = ""
|
||||
weight = 4
|
||||
|
@ -507,6 +521,13 @@ enableEmoji = true
|
|||
url = "/about/"
|
||||
title = ""
|
||||
weight = 5
|
||||
[[languages.fr.menu.main]]
|
||||
identifier = "github"
|
||||
pre = "<i class='fab fa-github fa-fw'></i>"
|
||||
name = ""
|
||||
url = "https://github.com/dillonzq/LoveIt"
|
||||
title = "GitHub"
|
||||
weight = 6
|
||||
[languages.fr.params]
|
||||
# site description
|
||||
description = "À propos du thème LoveIt"
|
||||
|
|
|
@ -11,6 +11,7 @@ lightgallery: true
|
|||
[![Hugo](https://img.shields.io/badge/Hugo-%5E0.62.0-ff4088?style=flat-square&logo=hugo)](https://gohugo.io/)
|
||||
[![License](https://img.shields.io/github/license/dillonzq/LoveIt?style=flat-square)](https://github.com/dillonzq/LoveIt/blob/master/LICENSE)
|
||||
[![GitHub stars](https://img.shields.io/github/stars/dillonzq/LoveIt?style=social)](https://github.com/dillonzq/LoveIt)
|
||||
[![GitHub forks](https://img.shields.io/github/forks/dillonzq/LoveIt?style=social)](https://github.com/dillonzq/LoveIt/fork)
|
||||
|
||||
[LoveIt :(far fa-heart):](https://github.com/dillonzq/LoveIt) is a **clean**, **elegant** but **advanced** blog theme for [Hugo](https://gohugo.io/) developed by [Dillon](https://dillonzq.com).
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ lightgallery: true
|
|||
[![Hugo](https://img.shields.io/badge/Hugo-%5E0.62.0-ff4088?style=flat-square&logo=hugo)](https://gohugo.io/)
|
||||
[![License](https://img.shields.io/github/license/dillonzq/LoveIt?style=flat-square)](https://github.com/dillonzq/LoveIt/blob/master/LICENSE)
|
||||
[![GitHub stars](https://img.shields.io/github/stars/dillonzq/LoveIt?style=social)](https://github.com/dillonzq/LoveIt)
|
||||
[![GitHub forks](https://img.shields.io/github/forks/dillonzq/LoveIt?style=social)](https://github.com/dillonzq/LoveIt/fork)
|
||||
|
||||
{{< admonition warning >}}
|
||||
Sorry, this article has not been completely translated into **French**.
|
||||
|
|
|
@ -11,6 +11,7 @@ lightgallery: true
|
|||
[![Hugo](https://img.shields.io/badge/Hugo-%5E0.62.0-ff4088?style=flat-square&logo=hugo)](https://gohugo.io/)
|
||||
[![License](https://img.shields.io/github/license/dillonzq/LoveIt?style=flat-square)](https://github.com/dillonzq/LoveIt/blob/master/LICENSE)
|
||||
[![GitHub stars](https://img.shields.io/github/stars/dillonzq/LoveIt?style=social)](https://github.com/dillonzq/LoveIt)
|
||||
[![GitHub forks](https://img.shields.io/github/forks/dillonzq/LoveIt?style=social)](https://github.com/dillonzq/LoveIt/fork)
|
||||
|
||||
[LoveIt :(far fa-heart):](https://github.com/dillonzq/LoveIt) 是一个由 [Dillon](https://dillonzq.com) 开发的**简洁**、**优雅**且**高效**的 [Hugo](https://gohugo.io/) 博客主题。
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
title: "Documentation"
|
||||
slug: "documentation"
|
||||
---
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
title: "Documentation"
|
||||
slug: "documentation"
|
||||
---
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
title: "文档"
|
||||
slug: "documentation"
|
||||
---
|
|
@ -547,9 +547,9 @@ Add a logo image (127x40) and a cover image (800x600) in the `static` directory.
|
|||
|
||||
**LoveIt** theme has been built to be as configurable as possible by defining custom `.scss` style files.
|
||||
|
||||
The directory including the custom `.scss` style files is `config/css` relative to **your project path**.
|
||||
The directory including the custom `.scss` style files is `config/css` relative to **your project root directory**.
|
||||
|
||||
In `_override.scss`, you can override the variables in `themes/LoveIt/assets/css/_variables.scss` to customize the style.
|
||||
In `config/css/_override.scss`, you can override the variables in `themes/LoveIt/assets/css/_variables.scss` to customize the style.
|
||||
|
||||
Here is a example:
|
||||
|
||||
|
@ -558,7 +558,7 @@ Here is a example:
|
|||
$code-font-family: Fira Mono, Source Code Pro, Menlo, Consolas, Monaco, monospace;
|
||||
```
|
||||
|
||||
In `_custom.scss`, you can add some css style code to customize the style.
|
||||
In `config/css/_custom.scss`, you can add some css style code to customize the style.
|
||||
|
||||
## 4 Multilingual and i18n
|
||||
|
||||
|
|
|
@ -30,11 +30,6 @@ Découvrez en quoi consiste le thème Hugo - **LoveIt** et les concepts fondamen
|
|||
|
||||
<!--more-->
|
||||
|
||||
{{< admonition warning >}}
|
||||
Sorry, this article has not been completely translated into **French**.
|
||||
Welcome to take the time to propose a translation by [making a PR](https://github.com/dillonzq/LoveIt/pulls) to the theme!
|
||||
{{< /admonition >}}
|
||||
|
||||
## 1 Requirements
|
||||
|
||||
Thanks to the simplicity of Hugo, [Hugo](https://gohugo.io/) is the only dependency of this theme.
|
||||
|
@ -552,9 +547,9 @@ Add a logo image (127x40) and a cover image (800x600) in the `static` directory.
|
|||
|
||||
**LoveIt** theme has been built to be as configurable as possible by defining custom `.scss` style files.
|
||||
|
||||
The directory including the custom `.scss` style files is `config/css` relative to **your project path**.
|
||||
The directory including the custom `.scss` style files is `config/css` relative to **your project root directory**.
|
||||
|
||||
In `_override.scss`, you can override the variables in `themes/LoveIt/assets/css/_variables.scss` to customize the style.
|
||||
In `config/css/_override.scss`, you can override the variables in `themes/LoveIt/assets/css/_variables.scss` to customize the style.
|
||||
|
||||
Here is a example:
|
||||
|
||||
|
@ -563,7 +558,7 @@ Here is a example:
|
|||
$code-font-family: Fira Mono, Source Code Pro, Menlo, Consolas, Monaco, monospace;
|
||||
```
|
||||
|
||||
In `_custom.scss`, you can add some css style code to customize the style.
|
||||
In `config/css/_custom.scss`, you can add some css style code to customize the style.
|
||||
|
||||
## 4 Multilingual and i18n
|
||||
|
||||
|
|
|
@ -549,9 +549,9 @@ hugo
|
|||
|
||||
通过定义自定义 `.scss` 样式文件, **LoveIt** 主题支持可配置的样式.
|
||||
|
||||
包含自定义 `.scss` 样式文件的目录相对于 **你的项目** 的路径为 `config / css`.
|
||||
包含自定义 `.scss` 样式文件的目录相对于 **你的项目根目录** 的路径为 `config/css`.
|
||||
|
||||
在 `_override.scss` 中, 你可以覆盖 `themes/LoveIt/assets/css/_variables.scss` 中的变量以自定义样式.
|
||||
在 `config/css/_override.scss` 中, 你可以覆盖 `themes/LoveIt/assets/css/_variables.scss` 中的变量以自定义样式.
|
||||
|
||||
这是一个例子:
|
||||
|
||||
|
@ -560,7 +560,7 @@ hugo
|
|||
$code-font-family: Fira Mono, Source Code Pro, Menlo, Consolas, Monaco, monospace;
|
||||
```
|
||||
|
||||
在 `_custom.scss` 中, 你可以添加一些 CSS 样式代码以自定义样式.
|
||||
在 `config/css/_custom.scss` 中, 你可以添加一些 CSS 样式代码以自定义样式.
|
||||
|
||||
## 4 多语言和 i18n
|
||||
|
||||
|
|
Before Width: | Height: | Size: 225 KiB After Width: | Height: | Size: 420 KiB |
Before Width: | Height: | Size: 225 KiB After Width: | Height: | Size: 420 KiB |
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 124 KiB |
BIN
images/tn.png
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 200 KiB |
|
@ -56,7 +56,7 @@
|
|||
|
||||
{{- /* Dynamic to top button */ -}}
|
||||
<a href="#" class="dynamic-to-top animated faster" id="dynamic-to-top">
|
||||
<span> </span>
|
||||
<i class="fas fa-chevron-up fa-fw"></i>
|
||||
</a>
|
||||
|
||||
{{- /* Load JavaScript scripts and CSS */ -}}
|
||||
|
|
|
@ -29,15 +29,14 @@
|
|||
</span>
|
||||
|
||||
{{- with .Params.categories -}}
|
||||
<span class="post-category">
|
||||
|
||||
<span class="post-category">
|
||||
{{- T "included" -}}
|
||||
{{- range . -}}
|
||||
|
||||
<span>
|
||||
<a href="{{ `/categories/` | relLangURL }}{{ urlize .}}">
|
||||
<i class="far fa-folder fa-fw"></i>{{ . | humanize }}
|
||||
</a>
|
||||
</span>
|
||||
{{- range $index, $value := . -}}
|
||||
{{- if gt $index 0 }} {{ end -}}
|
||||
<a href="{{ `/categories/` | relLangURL }}{{ urlize $value }}">
|
||||
<i class="far fa-folder fa-fw"></i>{{ $value | humanize }}
|
||||
</a>
|
||||
{{- end -}}
|
||||
</span>
|
||||
{{- end -}}
|
||||
|
@ -57,12 +56,10 @@
|
|||
<a href="{{ .RelPermalink }}">{{ T "readMore" }}</a>
|
||||
{{- with .Params.tags -}}
|
||||
<div class="post-tags">
|
||||
{{- range . -}}
|
||||
<span>
|
||||
<a href="{{ `/tags/` | relLangURL }}{{ urlize .}}">
|
||||
<i class="fas fa-tag fa-fw"></i>{{ . }}
|
||||
</a>
|
||||
</span>
|
||||
<i class="fas fa-tags fa-fw"></i>
|
||||
{{- range $index, $value := . -}}
|
||||
{{- if gt $index 0 }}, {{ end -}}
|
||||
<a href="{{ `/tags/` | relLangURL }}{{ urlize $value }}">{{ $value }}</a>
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
{{- if .Site.Params.comment.valine.enable -}}
|
||||
{{- $valine := .Site.Params.comment.valine -}}
|
||||
<div id="valine"></div>
|
||||
{{- slice "lib/valine/dark.scss" | $scratch.Add "linkLocal" -}}
|
||||
{{- slice "lib/valine/valine.scss" | $scratch.Add "linkLocal" -}}
|
||||
{{- with $CDN.valineJS -}}
|
||||
{{- slice . | $scratch.Add "scriptCDN" -}}
|
||||
{{- else -}}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div class="copyright">
|
||||
{{- /* Hugo and LoveIt */ -}}
|
||||
<div class="copyright-line">
|
||||
{{- printf (T "poweredBySome") `<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 "poweredBySome") `<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"><i class="far fa-heart fa-fw"></i> LoveIt</a>
|
||||
</div>
|
||||
|
||||
<div class="copyright-line">
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
{{- with $CDN.animateCSS -}}
|
||||
{{- . | safeHTML -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "lib/fontawesome-free/all.min.css" -}}
|
||||
{{- $res := resources.Get "lib/animate/animate.min.css" -}}
|
||||
{{- $stylesheet := dict "resource" $res "fingerprint" ($scratch.Get "fingerprint") -}}
|
||||
{{- partial "plugin/stylesheet.html" $stylesheet -}}
|
||||
{{- end -}}
|
||||
|
|
|
@ -20,15 +20,18 @@
|
|||
{
|
||||
"@context": "http://schema.org",
|
||||
"@type": "WebSite",
|
||||
"url": "{{ relLangURL `/` }}",
|
||||
"url": "{{ .Permalink }}",
|
||||
{{- with .Site.LanguageCode -}}
|
||||
"inLanguage": "{{ . }}",
|
||||
{{- end -}}
|
||||
{{- with .Site.Author.name -}}
|
||||
"author": {
|
||||
"@type": "Person",
|
||||
"name": "{{ . }}"
|
||||
"name": "{{ . | safeJS }}"
|
||||
},
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.description -}}
|
||||
"description": "{{ . }}",
|
||||
"description": "{{ . | safeJS }}",
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.image -}}
|
||||
"image": "{{ .url | absURL }}",
|
||||
|
@ -37,9 +40,9 @@
|
|||
"thumbnailUrl": "{{ .url | absURL }}",
|
||||
{{- end -}}
|
||||
{{- with .Site.Copyright -}}
|
||||
"license": "{{ . }}",
|
||||
"license": "{{ . | safeJS }}",
|
||||
{{- end -}}
|
||||
"name": "{{ .Site.Title }}"
|
||||
"name": "{{ .Site.Title | safeJS }}"
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -49,19 +52,13 @@
|
|||
{
|
||||
"@context": "http://schema.org",
|
||||
"@type": "BlogPosting",
|
||||
"headline": "{{ .Title }}",
|
||||
"headline": "{{ .Title | safeJS }}",
|
||||
"inLanguage": "{{ .Site.LanguageCode }}",
|
||||
"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" }}
|
||||
},
|
||||
{{- else if ge .Site.Params.image.width 696 -}}
|
||||
{{- if ge .Site.Params.image.width 696 -}}
|
||||
"image": {
|
||||
"@type": "ImageObject",
|
||||
"url": "{{ .Site.Params.image.url | absURL }}",
|
||||
|
@ -76,20 +73,20 @@
|
|||
"wordcount": {{ .WordCount }},
|
||||
"url": "{{ .Permalink }}",
|
||||
{{- if not .PublishDate.IsZero -}}
|
||||
"datePublished": "{{ .PublishDate.Format "2006-01-02T15:04:05-07:00" }}",
|
||||
"datePublished": "{{ .PublishDate.Format "2006-01-02" }}",
|
||||
{{- else if not .Date.IsZero -}}
|
||||
"datePublished": "{{ .Date.Format "2006-01-02T15:04:05-07:00" }}",
|
||||
"datePublished": "{{ .Date.Format "2006-01-02" }}",
|
||||
{{- end -}}
|
||||
{{- with .Lastmod -}}
|
||||
"dateModified": "{{ .Format "2006-01-02T15:04:05-07:00" }}",
|
||||
"dateModified": "{{ .Format "2006-01-02" }}",
|
||||
{{- end -}}
|
||||
{{- with .Site.Copyright -}}
|
||||
"license": "{{ . }}",
|
||||
"license": "{{ . | safeJS }}",
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.publisher -}}
|
||||
"publisher": {
|
||||
"@type": "Organization",
|
||||
"name": "{{ .name }}",
|
||||
"name": "{{ .name | safeJS }}",
|
||||
"logo": {
|
||||
"@type": "ImageObject",
|
||||
"url": "{{ .logo.url | absURL }}",
|
||||
|
@ -98,13 +95,13 @@
|
|||
}
|
||||
},
|
||||
{{- end -}}
|
||||
{{- with .Site.Author.Name -}}
|
||||
{{- with .Params.author | default .Site.Author.name | default (T "author") -}}
|
||||
"author": {
|
||||
"@type": "Person",
|
||||
"name": "{{ . }}"
|
||||
"name": "{{ . | safeJS }}"
|
||||
},
|
||||
{{- end -}}
|
||||
"description": "{{ .Description }}"
|
||||
"description": "{{ .Description | safeJS }}"
|
||||
}
|
||||
</script>
|
||||
{{- end -}}
|
||||
|
|
|
@ -1,22 +1,26 @@
|
|||
{{- /* Desktop header */ -}}
|
||||
<header class="desktop" id="header-desktop">
|
||||
<div class="header-wrapper">
|
||||
<div class="header-title animated bounceIn">
|
||||
<div class="header-title">
|
||||
<a href="{{ `/` | relLangURL }}">
|
||||
{{- .Site.Title -}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="menu">
|
||||
{{- range .Site.Menus.main -}}
|
||||
<a class="menu-item{{ if $.IsMenuCurrent "main" . | or ($.HasMenuCurrent "main" .) | or (.URL | relLangURL | string | eq $.RelPermalink ) }} active{{ end }}" href="{{ .URL | relLangURL }}"{{ with .Title }} title="{{ . }}"{{ end }}>
|
||||
<a class="menu-item{{ if $.IsMenuCurrent "main" . | or ($.HasMenuCurrent "main" .) | or (.URL | relLangURL | string | eq $.RelPermalink ) }} active{{ end }}" href="{{ .URL | relLangURL }}"{{ with .Title }} title="{{ . }}"{{ end }} rel="noopener noreffer"{{ if strings.HasPrefix .URL "http" }} target="_blank"{{ end }}>
|
||||
{{- .Pre | safeHTML }}{{ .Name -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
<span class="menu-item">|</span>
|
||||
<a href="javascript:void(0);" class="menu-item theme-switch" title="{{ T "switchTheme" }}">
|
||||
<i class="fas fa-adjust fa-fw"></i>
|
||||
</a>
|
||||
{{- if .Site.IsMultiLingual -}}
|
||||
|
|
||||
<a href="javascript:void(0);" class="menu-item" title="{{ T "selectLanguage" }}">
|
||||
<i class="fas fa-language fa-fw"></i>
|
||||
<select class="language-select" onchange="location = this.value;">
|
||||
{{- .Language.LanguageName -}}
|
||||
<i class="fas fa-chevron-right fa-fw"></i>
|
||||
<select class="language-select" id="language-select-desktop" onchange="location = this.value;">
|
||||
{{- range .Page.AllTranslations -}}
|
||||
{{- $translation := . -}}
|
||||
{{- range $.Site.Languages -}}
|
||||
|
@ -32,9 +36,6 @@
|
|||
</select>
|
||||
</a>
|
||||
{{- end -}}
|
||||
<a href="javascript:void(0);" class="theme-switch" title="{{ T "switchTheme" }}">
|
||||
<i class="fas fa-adjust fa-fw "></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
@ -43,7 +44,7 @@
|
|||
<header class="mobile" id="header-mobile">
|
||||
<div class="header-wrapper">
|
||||
<div class="header-container">
|
||||
<div class="header-title animated bounceIn">
|
||||
<div class="header-title">
|
||||
<a href="{{ `/` | relLangURL }}">
|
||||
{{- .Site.Title -}}
|
||||
</a>
|
||||
|
@ -55,13 +56,17 @@
|
|||
<div class="menu" id="menu-mobile">
|
||||
{{- $currentPage := . -}}
|
||||
{{- range .Site.Menus.main -}}
|
||||
<a class="menu-item" href="{{ .URL | relLangURL }}" title="{{ .Title }}">
|
||||
<a class="menu-item" href="{{ .URL | relLangURL }}" title="{{ .Title }}" rel="noopener noreffer"{{ if strings.HasPrefix .URL "http" }} target="_blank"{{ end }}>
|
||||
{{- .Pre | safeHTML }}{{ .Name -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
<a href="javascript:void(0);" class="menu-item theme-switch" title="{{ T "switchTheme" }}">
|
||||
<i class="fas fa-adjust fa-fw"></i>
|
||||
</a>
|
||||
{{- if .Site.IsMultiLingual -}}
|
||||
<a href="javascript:void(0);" class="menu-item" title="{{ T "selectLanguage" }}">
|
||||
<i class="fas fa-language fa-fw"></i>
|
||||
{{- .Language.LanguageName -}}
|
||||
<i class="fas fa-chevron-right fa-fw"></i>
|
||||
<select class="language-select" onchange="location = this.value;">
|
||||
{{- range .Page.AllTranslations -}}
|
||||
{{- $translation := . -}}
|
||||
|
@ -78,9 +83,6 @@
|
|||
</select>
|
||||
</a>
|
||||
{{- end -}}
|
||||
<a href="javascript:void(0);" class="theme-switch" title="{{ T "switchTheme" }}">
|
||||
<i class="fas fa-adjust fa-fw"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
|
|
@ -44,12 +44,10 @@
|
|||
<div class="post-info-more">
|
||||
<section>
|
||||
{{- with .Params.tags -}}
|
||||
{{- range . -}}
|
||||
<span>
|
||||
<a href="{{ `/tags/` | relLangURL }}{{ urlize .}}">
|
||||
<i class="fas fa-tag fa-fw"></i>{{ . }}
|
||||
</a>
|
||||
</span>
|
||||
<i class="fas fa-tags fa-fw"></i>
|
||||
{{- range $index, $value := . -}}
|
||||
{{- if gt $index 0 }}, {{ end -}}
|
||||
<a href="{{ `/tags/` | relLangURL }}{{ urlize $value }}">{{ $value }}</a>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</section>
|
||||
|
|
|
@ -17,15 +17,14 @@
|
|||
</span>
|
||||
|
||||
{{- with .Params.categories -}}
|
||||
<span class="post-category">
|
||||
|
||||
<span class="post-category">
|
||||
{{- T "included" -}}
|
||||
{{- range . -}}
|
||||
|
||||
<span>
|
||||
<a href="{{ `/categories/` | relLangURL }}{{ urlize .}}">
|
||||
<i class="far fa-folder fa-fw"></i>{{ . | humanize }}
|
||||
</a>
|
||||
</span>
|
||||
{{- range $index, $value := . -}}
|
||||
{{- if gt $index 0 }} {{ end -}}
|
||||
<a href="{{ `/categories/` | relLangURL }}{{ urlize $value }}">
|
||||
<i class="far fa-folder fa-fw"></i>{{ $value | humanize }}
|
||||
</a>
|
||||
{{- end -}}
|
||||
</span>
|
||||
{{- end -}}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{{- define "title" -}}
|
||||
{{- .Title | humanize }} | {{ T .Data.Singular | default (humanize .Data.Singular) }} | {{ .Site.Title -}}
|
||||
{{- .Title }} | {{ T .Data.Singular | default (humanize .Data.Singular) }} | {{ .Site.Title -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "content" -}}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{{- define "title" -}}
|
||||
{{- T "all" }}{{ T .Data.Plural | default (humanize .Data.Plural) }} | {{ .Site.Title -}}
|
||||
{{- .Title | default (T .Data.Plural) | default (humanize .Data.Plural) }} | {{ .Site.Title -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "content" -}}
|
||||
|
|
8
package-lock.json
generated
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "loveit-src",
|
||||
"version": "1.0.0",
|
||||
"version": "0.1.2",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -2998,9 +2998,9 @@
|
|||
}
|
||||
},
|
||||
"minimist": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
|
||||
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.2.tgz",
|
||||
"integrity": "sha512-rIqbOrKb8GJmx/5bc2M0QchhUouMXSpd1RTclXsB41JdL+VtnojfaJR+h7F9k18/4kHUsBFgk80Uk+q569vjPA==",
|
||||
"dev": true
|
||||
},
|
||||
"mixin-deep": {
|
||||
|
|
|
@ -9,12 +9,13 @@
|
|||
"@babel/core": "^7.8.4",
|
||||
"@babel/preset-env": "^7.8.4",
|
||||
"babel-preset-minify": "^0.5.1",
|
||||
"minimist": ">=1.2.2",
|
||||
"husky": "^4.2.3"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "npx babel src --out-file assets/js/theme.min.js --source-maps",
|
||||
"start": "hugo server --source=exampleSite --themesDir=../.. --disableFastRender",
|
||||
"copy": "hugo -v --source=exampleSite --themesDir=../.. -D --gc --minify && rm -rf resources && cp -rf exampleSite/resources resources"
|
||||
"build": "npx babel src --out-file assets/js/theme.min.js --source-maps && hugo -v --source=exampleSite --themesDir=../.. -D --gc",
|
||||
"start": "npm run build && hugo server --source=exampleSite --themesDir=../.. --disableFastRender",
|
||||
"copy": "rm -rf resources && cp -rf exampleSite/resources resources"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
{"Target":"lib/valine/dark.css","MediaType":"text/css","Data":{}}
|
|
@ -1,3 +1,3 @@
|
|||
.dark-theme .v *,.dark-theme .v .vwrap input,.dark-theme .v .vwrap input::placeholder,.dark-theme .v .veditor,.dark-theme .v .veditor::placeholder,.dark-theme .v a,.dark-theme .v a:hover{color:rgba(255,255,255,0.75);opacity:1}.dark-theme .v .vbtn{color:rgba(255,255,255,0.75);background:#333;border:none}.dark-theme .v .vbtn:hover{color:#3090e4;border-color:#3090e4}.dark-theme .v .vlist .vcard .vhead .vsys{background:#333}.dark-theme .v code,.dark-theme .v pre{background:#272C34}.v code,.v pre{text-align:left}
|
||||
.dark-theme .v *,.dark-theme .v .vwrap input,.dark-theme .v .vwrap input::placeholder,.dark-theme .v .veditor,.dark-theme .v .veditor::placeholder,.dark-theme .v a,.dark-theme .v a:hover{color:rgba(255,255,255,0.75);opacity:1}.dark-theme .v .vbtn{color:rgba(255,255,255,0.75);background:#333;border:none}.dark-theme .v .vbtn:hover{color:#3090e4;border-color:#3090e4}.dark-theme .v .vlist .vcard .vhead .vsys{background:#333}.dark-theme .v code,.dark-theme .v pre{background:#272C34}.dark-theme .v .vmark .vinput{color:#0e0f10}.v code,.v pre{text-align:left}
|
||||
|
||||
/*# sourceMappingURL=dark.css.map */
|
||||
/*# sourceMappingURL=valine.css.map */
|
|
@ -0,0 +1 @@
|
|||
{"Target":"lib/valine/valine.css","MediaType":"text/css","Data":{}}
|
|
@ -14,7 +14,7 @@
|
|||
}
|
||||
|
||||
isMobile() {
|
||||
return window.matchMedia('only screen and (max-width: 560px)').matches;
|
||||
return window.matchMedia('only screen and (max-width: 680px)').matches;
|
||||
}
|
||||
|
||||
isTocStatic() {
|
||||
|
@ -258,14 +258,14 @@
|
|||
header.classList.add('fadeInDown');
|
||||
}
|
||||
});
|
||||
if (this.newScrollTop > 400) {
|
||||
if (this.newScrollTop > 200) {
|
||||
if (scroll > MIN_SCROLL) {
|
||||
toTopButton.classList.remove('fadeIn');
|
||||
toTopButton.classList.add('fadeOut');
|
||||
toTopButton.classList.remove('fadeInUp');
|
||||
toTopButton.classList.add('fadeOutDown');
|
||||
} else if (scroll < - MIN_SCROLL) {
|
||||
toTopButton.style.display = 'block';
|
||||
toTopButton.classList.remove('fadeOut');
|
||||
toTopButton.classList.add('fadeIn');
|
||||
toTopButton.classList.remove('fadeOutDown');
|
||||
toTopButton.classList.add('fadeInUp');
|
||||
}
|
||||
} else {
|
||||
toTopButton.style.display = 'none';
|
||||
|
|