renamed discreteCards to paperCards, discreteTags to buttonTags; got rid of discrete class in favor of pure hugo conditional styling

This commit is contained in:
Gabriele Musco 2021-12-28 10:46:29 +01:00
parent 74132d5083
commit c896fcb147
No known key found for this signature in database
GPG key ID: 0587A5D65B5DC99E
8 changed files with 25 additions and 30 deletions

View file

@ -1,6 +1,6 @@
{{ define "main" }}
{{- partial "inject/content-before.html" . -}}
<article class="card {{ if .Site.Params.discreteCards }}discrete{{ end }} single">
<article class="card single">
<h1>{{ .Title }}</h1>
{{ if (.Params.showDate | default true) }}
<p class="date">
@ -20,14 +20,14 @@
<div>{{ .Content }}</div>
</article>
{{ if .Params.tags }}
{{ if not .Site.Params.discreteCards }}<hr />{{ end }}
{{ if not .Site.Params.paperCards }}<hr />{{ end }}
<p class="articleTagsContainer">
<span></span>
<strong>{{ i18n "tagsColumn" }}</strong>
{{ range sort .Params.tags }}
<a
{{ if site.Params.discreteTags | default false }}
class="discreteTag"
{{ if site.Params.buttonTags | default false }}
class="buttonTag"
{{ end }}
href="/tags/{{ . | urlize }}">#{{ . }}</a>
{{ end }}

View file

@ -1,4 +1,4 @@
<article class="card postlistitem {{ if .Site.Params.discreteCards }}discrete{{ end }}">
<article class="card postlistitem">
<div>
<h2>
<a href="{{ .Permalink }}">{{ .Title }}</a>

View file

@ -1,7 +1,7 @@
<div class="featured postlist gridView">
{{ range . }}
<a class="featuredCardLink" href="{{ .Permalink }}">
<article class="featuredCard {{ if .Site.Params.discreteCards }}discrete{{ end }}"
<article class="featuredCard"
style="
background-image: linear-gradient(to bottom,
rgba(0, 0, 0, 0) 0%,

View file

@ -14,7 +14,7 @@
}
function renderSingleArticle(article) {
return `
<article class="card postlistitem {{ if .Site.Params.discreteCards }}discrete{{ end }}">
<article class="card postlistitem">
<div>
<h2>
<a href="${article.link}">${article.title}</a>

View file

@ -3,7 +3,7 @@
<div class="postlist gridView">
{{ range (sort $showcasePosts "File.LogicalName") }}
{{ if in .File.Dir .Site.Params.showcaseDir }}
<article class="card postlistitem {{ if .Site.Params.discreteCards }}discrete{{ end }}">
<article class="card postlistitem">
<div>
<h2>{{ .Title }}</h2>
{{ if .Params.image }}