Theme Update
This commit is contained in:
parent
93515f310d
commit
f2ebaae569
@ -248,4 +248,37 @@ footer a {
|
||||
.toc ul {
|
||||
margin-top: 0;
|
||||
margin-bottom: .5rem;
|
||||
}
|
||||
|
||||
|
||||
/* Autonumbering */
|
||||
|
||||
.autonumber {
|
||||
counter-reset: h2-counter 0;
|
||||
}
|
||||
|
||||
.autonumber h2 {
|
||||
counter-increment: h2-counter 1;
|
||||
counter-reset: h3-counter 0;
|
||||
}
|
||||
|
||||
.autonumber h3 {
|
||||
counter-increment: h3-counter 1;
|
||||
counter-reset: h4-counter 0;
|
||||
}
|
||||
|
||||
.autonumber h4 {
|
||||
counter-increment: h4-counter 1;
|
||||
}
|
||||
|
||||
.autonumber h2:before {
|
||||
content: counter(h2-counter) "\00a0\00a0";
|
||||
}
|
||||
|
||||
.autonumber h3:before {
|
||||
content: counter(h2-counter) "." counter(h3-counter) "\00a0\00a0";
|
||||
}
|
||||
|
||||
.autonumber h4:before {
|
||||
content: counter(h2-counter) "." counter(h3-counter) "." counter(h4-counter) "\00a0\00a0";
|
||||
}
|
@ -2,44 +2,48 @@
|
||||
|
||||
{{/* Intro */}}
|
||||
|
||||
<div class="single-intro-container">
|
||||
<div {{ if .Param "autonumber" }} class="autonumber" {{end}}>
|
||||
|
||||
{{/* Title and Summary */}}
|
||||
<div class=" single-intro-container">
|
||||
|
||||
<h1 class="single-title">{{ .Title }}</h1>
|
||||
{{if .Param "summary" }}
|
||||
<p class="single-summary">{{ .Summary }}</p>
|
||||
{{/* Title and Summary */}}
|
||||
|
||||
<h1 class="single-title">{{ .Title }}</h1>
|
||||
{{if .Param "summary" }}
|
||||
<p class="single-summary">{{ .Summary }}</p>
|
||||
{{ end }}
|
||||
|
||||
{{/* Reading Time */}}
|
||||
|
||||
<p class="single-readtime">
|
||||
{{if .Date }}
|
||||
{{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
|
||||
{{ $dateHuman := .Date | time.Format ":date_long" }}
|
||||
<time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>
|
||||
-
|
||||
{{end}}
|
||||
{{if (.Param "readTime")}}
|
||||
{{.ReadingTime}} min
|
||||
{{end }}
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
{{/* Table of Content */}}
|
||||
|
||||
{{if .Param "toc" }}
|
||||
<aside class="toc">
|
||||
<p><strong>Table of contents</strong></p>
|
||||
{{ .TableOfContents }}
|
||||
</aside>
|
||||
{{ end }}
|
||||
|
||||
{{/* Reading Time */}}
|
||||
{{/* Actual document content */}}
|
||||
|
||||
<p class="single-readtime">
|
||||
{{if .Date }}
|
||||
{{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
|
||||
{{ $dateHuman := .Date | time.Format ":date_long" }}
|
||||
<time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>
|
||||
-
|
||||
{{end}}
|
||||
{{if (.Param "readTime")}}
|
||||
{{.ReadingTime}} min
|
||||
{{end }}
|
||||
</p>
|
||||
<div class="single-content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{{/* Table of Content */}}
|
||||
|
||||
{{if .Param "toc" }}
|
||||
<aside class="toc">
|
||||
<p><strong>Table of contents</strong></p>
|
||||
{{ .TableOfContents }}
|
||||
</aside>
|
||||
{{ end }}
|
||||
|
||||
{{/* Actual document content */}}
|
||||
|
||||
<div class="single-content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
|
||||
{{ end }}
|
Loading…
Reference in New Issue
Block a user