Cleanup and Fixes

This commit is contained in:
Alexandre Vicenzi 2020-06-15 19:52:15 +02:00
parent ac7ec7386b
commit 01322efeb2
11 changed files with 15 additions and 53 deletions

View File

@ -14,7 +14,6 @@ Soho is a minimalist two-column [hugo](https://gohugo.io) theme based on [Hyde](
- Rich Snippets (JSON-LD) - Rich Snippets (JSON-LD)
- Twitter Card - Twitter Card
- Pagination - Pagination
- Hidden Pages
- Customizable - Customizable
- Support all [Hugo Internals](https://gohugo.io/templates/internal/) - Support all [Hugo Internals](https://gohugo.io/templates/internal/)

View File

@ -1,11 +0,0 @@
+++
title = "Hidden Page"
date = "2020-02-01"
description = "This page is hidden and should not be visible without knowing the URL."
tags = [
"privacy",
]
hidden = true
+++
This page is hidden and should not be visible without knowing the URL.

View File

@ -19,7 +19,6 @@ tags = [
- Rich Snippets (JSON-LD) - Rich Snippets (JSON-LD)
- Twitter Card - Twitter Card
- Pagination - Pagination
- Hidden Pages
- Customizable - Customizable
- Support all [Hugo Internals](https://gohugo.io/templates/internal/) - Support all [Hugo Internals](https://gohugo.io/templates/internal/)

View File

@ -1,13 +1,7 @@
{{ define "main" -}} {{ define "main" -}}
<ul class="posts"> <ul class="posts">
<h1>Category: {{ .Title }}</h1> <h1>Category: {{ .Title }}</h1>
{{ $regularPages := .Data.Pages -}} {{ range .Data.Pages -}}
{{ $pagesNotHidden := where $regularPages ".Params.hidden" "==" false }}
{{ $pagesHiddenUnset := where $regularPages ".Params.hidden" "==" nil }}
{{ $pages := $pagesNotHidden | union $pagesHiddenUnset }}
{{ range $pages -}}
<li> <li>
<span> <span>
<a href="{{ .Permalink }}">{{ .Title }}</a> <a href="{{ .Permalink }}">{{ .Title }}</a>

View File

@ -1,13 +1,7 @@
{{ define "main" -}} {{ define "main" -}}
<ul class="posts"> <ul class="posts">
<h1>{{ .Title }}</h1> <h1>{{ .Title }}</h1>
{{ $regularPages := .Data.Pages -}} {{ range .Data.Pages -}}
{{ $pagesNotHidden := where $regularPages ".Params.hidden" "==" false }}
{{ $pagesHiddenUnset := where $regularPages ".Params.hidden" "==" nil }}
{{ $pages := $pagesNotHidden | union $pagesHiddenUnset }}
{{ range $pages -}}
<li> <li>
<span> <span>
<a href="{{ .Permalink }}">{{ .Title }}</a> <a href="{{ .Permalink }}">{{ .Title }}</a>

View File

@ -4,7 +4,7 @@
{{ if ne .Type "page" -}} {{ if ne .Type "page" -}}
<div class="post-date"> <div class="post-date">
<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}">{{ .Date.Format "Jan 2, 2006" }}</time> · {{ .ReadingTime }} min read <time datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}">{{ .Date.Format "Jan 2, 2006" }}</time> &middot; {{ .ReadingTime }} min read
</div> </div>
{{- end }} {{- end }}

View File

@ -1,13 +1,7 @@
{{ define "main" -}} {{ define "main" -}}
<ul class="posts"> <ul class="posts">
<h1>Tag: {{ .Title }}</h1> <h1>Tag: {{ .Title }}</h1>
{{ $regularPages := .Data.Pages -}} {{ range .Data.Pages -}}
{{ $pagesNotHidden := where $regularPages ".Params.hidden" "==" false }}
{{ $pagesHiddenUnset := where $regularPages ".Params.hidden" "==" nil }}
{{ $pages := $pagesNotHidden | union $pagesHiddenUnset }}
{{ range $pages -}}
<li> <li>
<span> <span>
<a href="{{ .Permalink }}">{{ .Title }}</a> <a href="{{ .Permalink }}">{{ .Title }}</a>

View File

@ -1,10 +1,6 @@
{{ define "main" -}} {{ define "main" -}}
<div class="posts"> <div class="posts">
{{- $regularPages := where .Site.RegularPages "Type" "in" .Site.Params.MainSections -}} {{- $pages := where .Site.RegularPages "Type" "in" .Site.Params.MainSections -}}
{{- $pagesNotHidden := where $regularPages ".Params.hidden" "==" false -}}
{{- $pagesHiddenUnset := where $regularPages ".Params.hidden" "==" nil -}}
{{- $pages := $pagesNotHidden | union $pagesHiddenUnset -}}
{{- $paginator := .Paginate $pages -}} {{- $paginator := .Paginate $pages -}}
{{ range $paginator.Pages }} {{ range $paginator.Pages }}
@ -14,14 +10,12 @@
</h1> </h1>
<div class="post-date"> <div class="post-date">
<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}">{{ .Date.Format "Jan 2, 2006" }}</time> · {{ .ReadingTime }} min read <time datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}">{{ .Date.Format "Jan 2, 2006" }}</time> &middot; {{ .ReadingTime }} min read
</div> </div>
{{ if .Description }} <div>
{{ .Description }}
{{ else }}
{{ .Summary }} {{ .Summary }}
{{ end }} </div>
{{ if .Truncated }} {{ if .Truncated }}
<div class="read-more-link"> <div class="read-more-link">

View File

@ -1,14 +1,13 @@
<footer> <footer>
<div> <div>
&copy; {{ $.Site.Params.Copyright }} {{ now.Format "2006"}} &copy; {{ $.Site.Params.Copyright }} {{ now.Format "2006"}}
·
{{ with $.Site.Params.License }} {{ with $.Site.Params.License }}
<a href="{{ $.Site.Params.licenseURL }}" &middot; <a href="{{ $.Site.Params.licenseURL }}" target="_blank">{{ . | safeHTML }}</a>
target="_blank">{{ . | safeHTML }}</a>
{{end}} {{end}}
{{ with $.Site.Params.BuiltWith }} {{ with $.Site.Params.BuiltWith }}
· &middot; Build with <a href="https://gohugo.io/" target="_blank">Hugo</a> & <a href="https://themes.gohugo.io/soho/" target="_blank">Soho</a> theme
Build with <a href="https://gohugo.io/" target="_blank">Hugo</a> & <a href="https://themes.gohugo.io/soho/" target="_blank">Soho</a> theme
{{end}} {{end}}
</div> </div>
</footer> </footer>

View File

@ -35,7 +35,7 @@
<section class="social-icons"> <section class="social-icons">
{{ range $item := .Site.Params.socialIcons }} {{ range $item := .Site.Params.socialIcons }}
<a href="{{ $item.url }}" rel="me" title="{{ $item.title }}"> <a href="{{ $item.url }}" rel="me" title="{{ $item.title }}" target="_blank">
<i class="fab {{ $item.icon }}" aria-hidden="true"></i> <i class="fab {{ $item.icon }}" aria-hidden="true"></i>
</a> </a>
{{ end }} {{ end }}

View File

@ -214,7 +214,7 @@ ul.posts {
.pagination { .pagination {
justify-content: center; justify-content: center;
display: flex; display: flex;
margin: 1em 0; margin: 1em 0 2rem 0;
padding: 0; padding: 0;
} }