diff --git a/assets/css/main.css b/assets/css/main.css index 0c4c7f4..0941263 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -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"; } \ No newline at end of file diff --git a/layouts/_default/single.html b/layouts/_default/single.html index b68da6c..9a478f7 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -2,44 +2,48 @@ {{/* Intro */}} -
{{ .Summary }}
+ {{/* Title and Summary */}} + +{{ .Summary }}
+ {{ end }} + + {{/* Reading Time */}} + ++ {{if .Date }} + {{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }} + {{ $dateHuman := .Date | time.Format ":date_long" }} + + - + {{end}} + {{if (.Param "readTime")}} + {{.ReadingTime}} min + {{end }} +
+ +- {{if .Date }} - {{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }} - {{ $dateHuman := .Date | time.Format ":date_long" }} - - - - {{end}} - {{if (.Param "readTime")}} - {{.ReadingTime}} min - {{end }} -
+