refractor code
This commit is contained in:
parent
e91d459aa4
commit
6f79007058
3 changed files with 5 additions and 6 deletions
|
@ -81,7 +81,7 @@
|
|||
}).then((html_string) => {
|
||||
const parser = new DOMParser();
|
||||
const next_page = parser.parseFromString(html_string, "text/html");
|
||||
{{ if .Site.Params.heti }}
|
||||
{{ if .Site.Params.features.heti }}
|
||||
const heti = new Heti(next_page);
|
||||
heti.autoSpacing();
|
||||
{{ end }}
|
||||
|
@ -103,7 +103,7 @@
|
|||
{{ end }}
|
||||
|
||||
|
||||
{{ if .Site.Params.heti }}
|
||||
{{ if .Site.Params.features.heti }}
|
||||
<script>
|
||||
const heti = new Heti(document);
|
||||
heti.autoSpacing();
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
{{ end }}
|
||||
|
||||
|
||||
{{ if .Site.Params.heti }}
|
||||
{{ if .Site.Params.features.heti }}
|
||||
<link rel="stylesheet" href="/style/heti.min.css">
|
||||
<script src="/scripts/heti-addon.min.js"></script>
|
||||
{{ end }}
|
||||
|
|
|
@ -5,8 +5,7 @@
|
|||
{{/* time info shown in the left (or above in small screens) */}}
|
||||
<div class="pure-u-1 pure-u-sm-1-3">
|
||||
<div class="time">
|
||||
<div class="month-day">{{ .Date.Format "Jan 2"}}{{ if in (slice 1 21 31) .Date.Day}}st{{ else if in (slice 2 22)
|
||||
.Date.Day}}nd{{ else if in (slice 3 23) .Date.Day}}rd{{ else }}th{{ end }}</div>
|
||||
<div class="month-day">{{ .Date.Format "Jan 2"}}{{ if in (slice 1 21 31) .Date.Day}}st{{ else if in (slice 2 22) .Date.Day}}nd{{ else if in (slice 3 23) .Date.Day}}rd{{ else }}th{{ end }}</div>
|
||||
<div class="year">{{ .Date.Format "2006"}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -55,7 +54,7 @@
|
|||
|
||||
<div style="padding-left: 5px; padding-right: 5px;">
|
||||
{{/* Main text content */}}
|
||||
<div class="context heti">
|
||||
{{ if .Site.Params.features.heti }}<div class="context heti">{{ else }}<div class="context">{{ end }}
|
||||
{{ .Content }}
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue