Fix html errors.

This commit is contained in:
Sergey Trofimov 2020-04-22 12:14:28 +02:00
parent bbf6c6513d
commit d0b426c3fa
7 changed files with 81 additions and 115 deletions

View file

@ -1,11 +1,11 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
{{- partial "head.html" . -}}
<body>
{{- partial "header.html" . -}} {{- partial "header.html" . -}}
<div id="content"> <body>
<div class="content">
{{- partial "head.html" . -}}
{{- block "main" . }}{{- end }} {{- block "main" . }}{{- end }}
</div>
{{- partial "footer.html" . -}} {{- partial "footer.html" . -}}
</div>
</body> </body>
</html> </html>

View file

@ -1,11 +1,4 @@
<!DOCTYPE html> {{ define "main" }}
<html>
{{ partial "header.html" . }}
<body>
<div class="container wrapper list">
{{ partial "head.html" . }}
{{ if isset .Data "Term" }} {{ if isset .Data "Term" }}
<h1>Entries tagged - "{{ .Data.Term }}"</h1> <h1>Entries tagged - "{{ .Data.Term }}"</h1>
{{ else }} {{ else }}
@ -14,18 +7,11 @@
<ul class="posts"> <ul class="posts">
{{- range .Data.Pages -}} {{- range .Data.Pages -}}
{{- if (in (.Site.Params.excludedTypes | default (slice "page")) .Type) -}} {{- if (not (in (.Site.Params.excludedTypes | default (slice "page")) .Type)) -}}
{{- else -}}
<li class="post"> <li class="post">
<a href="{{ .RelPermalink }}">{{.Title}}</a> <span class="meta">{{ dateFormat "Jan 2, 2006" .Date }}{{ if .Draft }} <span class="draft-label">DRAFT</span> {{ end }}</span> <a href="{{ .RelPermalink }}">{{.Title}}</a> <span class="meta">{{ dateFormat "Jan 2, 2006" .Date }}{{ if .Draft }} <span class="draft-label">DRAFT</span> {{ end }}</span>
</li> </li>
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
</ul> </ul>
{{ partial "footer.html" . }} {{ end }}
</div>
</body>
</html>

View file

@ -1,22 +1,15 @@
<!DOCTYPE html> {{ define "main" }}
<html>
{{ partial "header.html" . }}
<body>
<div class="content">
{{ partial "head.html" . }}
<main> <main>
<article> <article>
<div class="title"> <div class="title">
<h1 class="title">{{ .Title }}</h1> <h1 class="title">{{ .Title }}</h1>
<div class="meta">Posted on {{ dateFormat "Jan 2, 2006" .Date }}{{ if .Draft }} <span class="draft-label">DRAFT</span> {{ end }}</div> <div class="meta">Posted on {{ dateFormat "Jan 2, 2006" .Date }}{{ if .Draft }} <span class="draft-label">DRAFT</span> {{ end }}</div>
</div> </div>
<div>
{{ if isset .Params "tldr" }} {{ if isset .Params "tldr" }}
<div class="tldr"> <div class="tldr">
<strong>tl;dr:</strong> <strong>tl;dr:</strong>
{{ .Params.tldr }} {{ .Params.tldr }}
</div>{{ end }} </div>{{ end }}
</div>
<section class="body"> <section class="body">
{{ .Content }} {{ .Content }}
@ -35,9 +28,6 @@
{{ end }} {{ end }}
{{ end }} {{ end }}
</div> </div>
</article>
</main>
{{ partial "footer.html" . }} {{ end }}
</div>
</body>
</html>

View file

@ -1,11 +1,4 @@
<!DOCTYPE html> {{ define "main" }}
<html>
{{ partial "header.html" . }}
<body>
<div class="container wrapper tags">
{{ partial "head.html" . }}
<h1 class="page-title">All tags</h1> <h1 class="page-title">All tags</h1>
{{ $biggest := 1 }} {{ $biggest := 1 }}
@ -16,7 +9,7 @@
{{ $data := .Data }} {{ $data := .Data }}
<div class="tag-cloud"> <div class="tag-cloud">
<ul> <ul class="tags">
{{ range $key, $value := .Data.Terms.ByCount }} {{ range $key, $value := .Data.Terms.ByCount }}
{{ $size := (add (mul (div $value.Count $biggest) (sub $max $min)) $min) }} {{ $size := (add (mul (div $value.Count $biggest) (sub $max $min)) $min) }}
{{ $size := (cond (eq $biggest $smallest) $min $size) }} {{ $size := (cond (eq $biggest $smallest) $min $size) }}
@ -24,8 +17,4 @@
{{ end }} {{ end }}
</ul> </ul>
</div> </div>
{{ partial "footer.html" . }} {{ end }}
</div>
</body>
</html>

View file

@ -2,6 +2,7 @@
<html> <html>
{{ partial "header.html" . }} {{ partial "header.html" . }}
<body> <body>
<div class="content">
{{ partial "head.html" . }} {{ partial "head.html" . }}
<main class="list"> <main class="list">
@ -16,13 +17,13 @@
<section class="list-item"> <section class="list-item">
<h1 class="title"><a href="{{ .RelPermalink }}">{{.Title}}</a></h1> <h1 class="title"><a href="{{ .RelPermalink }}">{{.Title}}</a></h1>
<time>{{ dateFormat "Jan 2, 2006" .Date }}{{ if .Draft }} <span class="draft-label">DRAFT</span> {{ end }}</time> <time>{{ dateFormat "Jan 2, 2006" .Date }}{{ if .Draft }} <span class="draft-label">DRAFT</span> {{ end }}</time>
<br><span class="description"> <br><div class="description">
{{ if isset .Params "description" }} {{ if isset .Params "description" }}
{{ .Description }} {{ .Description }}
{{ else }} {{ else }}
{{ .Summary }}&hellip; {{ .Summary }}&hellip;
{{ end }} {{ end }}
</span><br/> </div>
<a href="{{ .RelPermalink }}">Read more ⟶</a> <a href="{{ .RelPermalink }}">Read more ⟶</a>
</section> </section>
{{ end }} {{ end }}
@ -31,7 +32,5 @@
{{ partial "footer.html" . }} {{ partial "footer.html" . }}
</div> </div>
</div>
</body> </body>
</html> </html>

View file

@ -8,7 +8,10 @@
{{ if not .Site.IsServer }} {{ if not .Site.IsServer }}
{{ template "_internal/google_analytics_async.html" . }} {{ template "_internal/google_analytics_async.html" . }}
{{ end }} {{ end }}
{{- if (isset .Site.Params "social") -}}
<script> <script>
feather.replace() feather.replace()
</script> </script>
{{- end }}

View file

@ -1,4 +1,3 @@
<div class="content">
<header> <header>
<div class="main"> <div class="main">
<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a> <a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>