commit
69f23442e8
7 changed files with 104 additions and 3 deletions
|
@ -15,6 +15,71 @@ body{
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
line-height: 24px;
|
line-height: 24px;
|
||||||
color: rgb(33, 37, 41);
|
color: rgb(33, 37, 41);
|
||||||
|
|
||||||
|
code {
|
||||||
|
font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", "Liberation Mono", Menlo, Monaco, Consolas, "Microsoft YaHei", monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
:not(pre) > code {
|
||||||
|
font-size: 14px;
|
||||||
|
background-color: #e3e6e8;
|
||||||
|
padding: 2px 4px;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.highlight {
|
||||||
|
padding: 0;
|
||||||
|
width: 100%;
|
||||||
|
font-size: 13px;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
overflow-x: auto;
|
||||||
|
|
||||||
|
pre {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
blockquote {
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
margin: 0 16px 16px 16px;
|
||||||
|
padding: 16px 0 0 16px;
|
||||||
|
color: #525960;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
content: "";
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 4px;
|
||||||
|
border-radius: 2px;
|
||||||
|
background: #c8ccd0;
|
||||||
|
}
|
||||||
|
|
||||||
|
mark { // fix color for mark inside blockquote
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
overflow-wrap: break-word;
|
||||||
|
|
||||||
|
summary {
|
||||||
|
margin-bottom: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
details {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #0059b3;
|
||||||
|
&:visited {
|
||||||
|
color: #430085;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.page{
|
.page{
|
||||||
|
@ -158,7 +223,6 @@ $gray: #919EB1;
|
||||||
.avatar{
|
.avatar{
|
||||||
max-height: 45px;
|
max-height: 45px;
|
||||||
float: left;
|
float: left;
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.intro{
|
.intro{
|
||||||
|
@ -172,11 +236,17 @@ $gray: #919EB1;
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div:nth-child(2) {
|
||||||
|
word-break: break-all;
|
||||||
|
line-height: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
.tag{
|
.tag{
|
||||||
font-size: 80%;
|
font-size: 80%;
|
||||||
margin-left: 0px;
|
margin-left: 0px;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
color: #6c757d!important;
|
color: #6c757d!important;
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
&::before{
|
&::before{
|
||||||
content:"#";
|
content:"#";
|
||||||
|
@ -184,6 +254,8 @@ $gray: #919EB1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
margin-bottom: 24px;
|
||||||
}
|
}
|
||||||
/* END - user name, avatar & tags */
|
/* END - user name, avatar & tags */
|
||||||
|
|
||||||
|
|
|
@ -78,6 +78,10 @@ document.addEventListener("scroll", () => {
|
||||||
}).then((html_string) => {
|
}).then((html_string) => {
|
||||||
const parser = new DOMParser();
|
const parser = new DOMParser();
|
||||||
const next_page = parser.parseFromString(html_string, "text/html");
|
const next_page = parser.parseFromString(html_string, "text/html");
|
||||||
|
{{ if .Site.Params.heti }}
|
||||||
|
const heti = new Heti(next_page);
|
||||||
|
heti.autoSpacing();
|
||||||
|
{{ end }}
|
||||||
const rows = next_page.querySelectorAll(".moment-row");
|
const rows = next_page.querySelectorAll(".moment-row");
|
||||||
const container = document.querySelector(".page > .container");
|
const container = document.querySelector(".page > .container");
|
||||||
rows.forEach((r) => {
|
rows.forEach((r) => {
|
||||||
|
@ -94,3 +98,11 @@ document.addEventListener("scroll", () => {
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|
||||||
|
{{ if .Site.Params.heti }}
|
||||||
|
<script>
|
||||||
|
const heti = new Heti(document);
|
||||||
|
heti.autoSpacing();
|
||||||
|
</script>
|
||||||
|
{{ end }}
|
||||||
|
|
|
@ -55,6 +55,13 @@
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pangu/4.0.7/pangu.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/pangu/4.0.7/pangu.min.js"></script>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|
||||||
|
{{ if .Site.Params.heti }}
|
||||||
|
<link rel="stylesheet" href="/style/heti.min.css">
|
||||||
|
<script src="/scripts/heti-addon.min.js"></script>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
|
||||||
<!-- website title -->
|
<!-- website title -->
|
||||||
<title>{{ .Site.Params.title }}</title>
|
<title>{{ .Site.Params.title }}</title>
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
|
|
||||||
<div style="padding-left: 5px; padding-right: 5px;">
|
<div style="padding-left: 5px; padding-right: 5px;">
|
||||||
{{/* Main text content */}}
|
{{/* Main text content */}}
|
||||||
<div class="context">
|
<div class="context heti">
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -125,4 +125,4 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
4
layouts/shortcodes/details.html
Normal file
4
layouts/shortcodes/details.html
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<details>
|
||||||
|
<summary>{{ (.Get 0) | markdownify }}</summary>
|
||||||
|
{{ .Inner | markdownify }}
|
||||||
|
</details>
|
1
static/scripts/heti-addon.min.js
vendored
Normal file
1
static/scripts/heti-addon.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
static/style/heti.min.css
vendored
Normal file
5
static/style/heti.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue