Merge pull request #3 from sarg/iss-1

Fix html errors.
This commit is contained in:
Athul Cyriac Ajay 2020-04-26 20:09:49 +05:30 committed by GitHub
commit 5cdcf6d3b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 81 additions and 115 deletions

View file

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

View file

@ -1,31 +1,17 @@
<!DOCTYPE html>
<html>
{{ partial "header.html" . }}
{{ define "main" }}
{{ if isset .Data "Term" }}
<h1>Entries tagged - "{{ .Data.Term }}"</h1>
{{ else }}
<h1 class="page-title">All articles</h1>
{{ end }}
<body>
<div class="container wrapper list">
{{ partial "head.html" . }}
{{ if isset .Data "Term" }}
<h1>Entries tagged - "{{ .Data.Term }}"</h1>
{{ else }}
<h1 class="page-title">All articles</h1>
{{ end }}
<ul class="posts">
{{- range .Data.Pages -}}
{{- if (in (.Site.Params.excludedTypes | default (slice "page")) .Type) -}}
{{- else -}}
<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>
</li>
{{- end -}}
{{- end -}}
</ul>
{{ partial "footer.html" . }}
</div>
</body>
</html>
<ul class="posts">
{{- range .Data.Pages -}}
{{- if (not (in (.Site.Params.excludedTypes | default (slice "page")) .Type)) -}}
<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>
</li>
{{- end -}}
{{- end -}}
</ul>
{{ end }}

View file

@ -1,22 +1,15 @@
<!DOCTYPE html>
<html>
{{ partial "header.html" . }}
<body>
<div class="content">
{{ partial "head.html" . }}
{{ define "main" }}
<main>
<article>
<article>
<div class="title">
<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>
<div>
{{ if isset .Params "tldr" }}
<div class="tldr">
<strong>tl;dr:</strong>
{{ .Params.tldr }}
</div>{{ end }}
</div>
{{ if isset .Params "tldr" }}
<div class="tldr">
<strong>tl;dr:</strong>
{{ .Params.tldr }}
</div>{{ end }}
<section class="body">
{{ .Content }}
@ -24,20 +17,17 @@
<div class="post-tags">
{{ if ne .Type "page" }}
{{ if gt .Params.tags 0 }}
<nav class="nav tags">
<ul class="tags">
{{ range .Params.tags }}
<li><a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a></li>
{{ end }}
</ul>
</nav>
{{ end }}
{{ if gt .Params.tags 0 }}
<nav class="nav tags">
<ul class="tags">
{{ range .Params.tags }}
<li><a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a></li>
{{ end }}
</ul>
</nav>
{{ end }}
{{ end }}
</div>
{{ partial "footer.html" . }}
</div>
</body>
</html>
</article>
</main>
{{ end }}

View file

@ -1,31 +1,20 @@
<!DOCTYPE html>
<html>
{{ partial "header.html" . }}
{{ define "main" }}
<h1 class="page-title">All tags</h1>
<body>
<div class="container wrapper tags">
{{ partial "head.html" . }}
{{ $biggest := 1 }}
{{ $smallest := 1 }}
{{ $max := 3 }}
{{ $min := 1 }}
{{ $size := $min }}
<h1 class="page-title">All tags</h1>
{{ $biggest := 1 }}
{{ $smallest := 1 }}
{{ $max := 3 }}
{{ $min := 1 }}
{{ $size := $min }}
{{ $data := .Data }}
<div class="tag-cloud">
<ul>
{{ $data := .Data }}
<div class="tag-cloud">
<ul class="tags">
{{ range $key, $value := .Data.Terms.ByCount }}
{{ $size := (add (mul (div $value.Count $biggest) (sub $max $min)) $min) }}
{{ $size := (cond (eq $biggest $smallest) $min $size) }}
<li><a style="font-size: {{ $size }}rem;" href="{{ $.Site.LanguagePrefix | absURL }}{{ $data.Plural }}/{{ $value.Name | urlize }}/">{{ $value.Name }}</a></li>
{{ $size := (add (mul (div $value.Count $biggest) (sub $max $min)) $min) }}
{{ $size := (cond (eq $biggest $smallest) $min $size) }}
<li><a style="font-size: {{ $size }}rem;" href="{{ $.Site.LanguagePrefix | absURL }}{{ $data.Plural }}/{{ $value.Name | urlize }}/">{{ $value.Name }}</a></li>
{{ end }}
</ul>
</div>
{{ partial "footer.html" . }}
</div>
</body>
</html>
</ul>
</div>
{{ end }}

View file

@ -1,28 +1,29 @@
<!DOCTYPE html>
<html>
{{ partial "header.html" . }}
<body>
{{ partial "head.html" . }}
{{ partial "header.html" . }}
<body>
<div class="content">
{{ partial "head.html" . }}
<main class="list">
<div class="site-description">
{{- if isset .Site.Params "subtitle" -}}
<p>{{ .Site.Params.Subtitle | markdownify }}</p>
{{- end -}}
</div>
<div class="site-description">
{{- if isset .Site.Params "subtitle" -}}
<p>{{ .Site.Params.Subtitle | markdownify }}</p>
{{- end -}}
</div>
{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
{{ $paginator := .Paginate (where $pages "Params.hidden" "ne" true) }}
{{ range $paginator.Pages }}
<section class="list-item">
<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>
<br><span class="description">
<br><div class="description">
{{ if isset .Params "description" }}
{{ .Description }}
{{ else }}
{{ .Summary }}&hellip;
{{ end }}
</span><br/>
</div>
<a href="{{ .RelPermalink }}">Read more ⟶</a>
</section>
{{ end }}
@ -31,7 +32,5 @@
{{ partial "footer.html" . }}
</div>
</div>
</body>
</html>
</body>
</html>

View file

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

View file

@ -1,11 +1,10 @@
<div class="content">
<header>
<div class="main">
<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
</div>
<nav>
{{ range .Site.Menus.main }}
<a href="{{ .URL }}">{{ .Name }}</a>
{{ end }}
</nav>
</header>
<div class="main">
<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
</div>
<nav>
{{ range .Site.Menus.main }}
<a href="{{ .URL }}">{{ .Name }}</a>
{{ end }}
</nav>
</header>