simplify
This commit is contained in:
@@ -8,45 +8,25 @@
|
||||
{{- end }}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/index.css">
|
||||
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/classes.css">
|
||||
{{- if .Site.Params.sidebar }}
|
||||
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/sidebar.css" media="screen and (min-width: 70em)">
|
||||
{{- end }}
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
<link rel="alternate" type="application/rss+xml" href="{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}" title="{{ .Site.Title }}">
|
||||
{{- if or .Params.math .Site.Params.math }}
|
||||
{{ partial "math.html" . }}
|
||||
{{- end }}
|
||||
|
||||
<body>
|
||||
|
||||
<header class="icons">
|
||||
<header>
|
||||
{{ if not (gt (len .Site.Menus) 1) }}
|
||||
<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
|
||||
{{ end }}
|
||||
{{ range $menu, $items := .Site.Menus }}
|
||||
<nav>
|
||||
{{ range $items }}
|
||||
<a href="{{ .URL }}" {{ if (eq $.RelPermalink .URL) }}class="selected"{{ end }}>
|
||||
{{ if and .Identifier (index $.Site.Data.fontawesome.icons .Identifier) }}
|
||||
{{ $icon := index $.Site.Data.fontawesome.icons .Identifier }}
|
||||
{{ $svg := $icon.svg.solid | default $icon.svg.regular | default $icon.svg.brands }}
|
||||
<span {{ if eq $menu "main" }}class="hidden"{{ end }}>{{ safeHTML $svg.raw }}</span>
|
||||
<span {{ if not (eq $menu "main") }}class="hidden"{{ end }}>{{ .Name }}</span>
|
||||
{{ else }}
|
||||
{{ .Name }}
|
||||
{{ end }}
|
||||
</a>
|
||||
<a href="{{ .URL }}">{{ .Name }}</a>
|
||||
{{ end }}
|
||||
</nav>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.description }}
|
||||
<div class="hidden description">{{ safeHTML . }}</div>
|
||||
{{ end }}
|
||||
</header>
|
||||
|
||||
{{- block "main" . }}{{- end }}
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
@@ -6,29 +6,12 @@
|
||||
{{ $Pages = where site.RegularPages "Type" "in" .Site.Params.mainSections }}
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.show_excerpts }}
|
||||
|
||||
{{- range $Pages }}
|
||||
<article>
|
||||
<header>
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ if .Date }}<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "January 02, 2006" }}</time>{{ end }}
|
||||
</header>
|
||||
{{ .Summary }}
|
||||
{{- if .Truncated }}
|
||||
<div class="more"><a href="{{ .RelPermalink }}">read more</a></div>
|
||||
{{- end }}
|
||||
</article>
|
||||
{{- end }}
|
||||
|
||||
{{ else }}
|
||||
|
||||
<article>
|
||||
<header><h1>{{ .Title | default "Posts" | humanize }}</h1></header>
|
||||
<ul class="archive">
|
||||
<ul>
|
||||
{{- range $Pages }}
|
||||
<li>
|
||||
{{ if .Date }}<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time>{{ end }}
|
||||
<li style="font-size: 1.1em;">
|
||||
{{ if .Date }}<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}" style="display: inline-block; min-width: 10ch; margin: 0 .2em;">{{ .Date.Format "2006-01-02" }}</time>{{ end }}
|
||||
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||
</li>
|
||||
{{- end }}
|
||||
@@ -37,5 +20,3 @@
|
||||
</article>
|
||||
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
|
@@ -2,10 +2,6 @@
|
||||
|
||||
<article>
|
||||
<header>
|
||||
{{ range $index, $tag := .Params.categories }}
|
||||
{{- if gt $index 0 }}, {{ end -}}
|
||||
<a href="{{ ($.Site.GetPage (printf "/%s/%s" "categories" $tag)).Permalink }}">{{ $tag | upper }}</a>
|
||||
{{- end -}}
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ if .Date }}<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "January 02, 2006" }}</time>{{ end }}
|
||||
</header>
|
||||
|
Reference in New Issue
Block a user