Colored category badges, images with categories, redo categories & tags for posts, tags in archive view, redid icons on menu

This commit is contained in:
2023-11-26 15:40:29 -05:00
Unverified
parent daad69ea45
commit d55cdea917
29 changed files with 130 additions and 69 deletions

View File

@@ -214,7 +214,7 @@
border-radius: var(--card-border-radius);
overflow: hidden;
position: relative;
height: 350px;
// height: 350px;
width: 250px;
box-shadow: var(--shadow-l1);
transition: box-shadow 0.3s ease;

View File

@@ -69,3 +69,28 @@
}
}
}
.subsection-list-tags {
overflow-x: auto;
.article-list--tile {
display: flex;
padding-bottom: 15px;
article {
width: 250px;
// height: 75px;
margin-right: 20px;
flex-shrink: 0;
.article-title {
margin: 0;
font-size: 1.8rem;
}
.article-details {
padding: 20px;
}
}
}
}

View File

@@ -15,6 +15,21 @@
{{ end }}
</header>
<header>
{{- $taxonomy := $.Site.GetPage "taxonomyTerm" "tags" -}}
{{- $terms := $taxonomy.Pages -}}
{{ if $terms }}
<h2 class="section-title">{{ $taxonomy.Title }}</h2>
<div class="subsection-list-tags">
<div class="article-list--tile">
{{ range $terms }}
{{ partial "article-list/tile" (dict "context" . "size" "250x75" "Type" "taxonomy") }}
{{ end }}
</div>
</div>
{{ end }}
</header>
{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
{{ $notHidden := where .Site.RegularPages "Params.hidden" "!=" true }}
{{ $filtered := ($pages | intersect $notHidden) }}

View File

@@ -15,6 +15,7 @@
{{ with .Params.description }}
<h2 class="section-description">{{ . }}</h2>
{{ end }}
<section class="section-description">{{ .Content }}</section>
</div>
{{- $image := partialCached "helper/image" (dict "Context" . "Type" "section") .RelPermalink "section" -}}

View File

@@ -2,34 +2,36 @@
{{- $context := .Context -}}
{{- $limit := default 5 .Params.limit -}}
{{- if $query -}}
{{- $archivesPage := index $query 0 -}}
<section class="widget archives">
{{- $archivesPage := index $query 0 -}}
<section class="widget archives">
<a href="/page/archives">
<div class="widget-icon">
{{ partial "helper/icon" "infinity" }}
{{ partial "helper/icon" "calendar" }}
</div>
<h2 class="widget-title section-title">{{ T "widget.archives.title" }}</h2>
</a>
{{ $pages := where $context.Site.RegularPages "Type" "in" $context.Site.Params.mainSections }}
{{ $notHidden := where $context.Site.RegularPages "Params.hidden" "!=" true }}
{{ $filtered := ($pages | intersect $notHidden) }}
{{ $archives := $filtered.GroupByDate "2006" }}
<div class="widget-archive--list">
{{ range $index, $item := first (add $limit 1) ($archives) }}
{{- $id := lower (replace $item.Key " " "-") -}}
<div class="archives-year">
<a href="{{ $archivesPage.RelPermalink }}#{{ $id }}">
{{ if eq $index $limit }}
<span class="year">{{ T "widget.archives.more" }}</span>
{{ else }}
<span class="year">{{ .Key }}</span>
<span class="count">{{ len $item.Pages }}</span>
{{ end }}
</a>
</div>
{{ end }}
{{ $pages := where $context.Site.RegularPages "Type" "in" $context.Site.Params.mainSections }}
{{ $notHidden := where $context.Site.RegularPages "Params.hidden" "!=" true }}
{{ $filtered := ($pages | intersect $notHidden) }}
{{ $archives := $filtered.GroupByDate "2006" }}
<div class="widget-archive--list">
{{ range $index, $item := first (add $limit 1) ($archives) }}
{{- $id := lower (replace $item.Key " " "-") -}}
<div class="archives-year">
<a href="{{ $archivesPage.RelPermalink }}#{{ $id }}">
{{ if eq $index $limit }}
<span class="year">{{ T "widget.archives.more" }}</span>
{{ else }}
<span class="year">{{ .Key }}</span>
<span class="count">{{ len $item.Pages }}</span>
{{ end }}
</a>
</div>
</section>
{{ end }}
</div>
</section>
{{- else -}}
{{- warnf "Archives page not found. Create a page with layout: archives." -}}
{{- warnf "Archives page not found. Create a page with layout: archives." -}}
{{- end -}}

View File

@@ -1,16 +1,19 @@
{{- $context := .Context -}}
{{- $limit := default 10 .Params.limit -}}
<section class="widget tagCloud">
<div class="widget-icon">
{{ partial "helper/icon" "categories" }}
</div>
<h2 class="widget-title section-title">{{ T "widget.categoriesCloud.title" }}</h2>
<a href="/categories">
<div class="widget-icon">
{{ partial "helper/icon" "book-2" }}
</div>
<h2 class="widget-title section-title">Projects</h2>
<!-- {{ T "widget.categoriesCloud.title" }} -->
</a>
<div class="tagCloud-tags">
{{ range first $limit $context.Site.Taxonomies.categories.ByCount }}
<a href="{{ .Page.RelPermalink }}" class="font_size_{{ .Count }}">
{{ .Page.Title }}
</a>
<a href="{{ .Page.RelPermalink }}" class="font_size_{{ .Count }}">
{{ .Page.Title }}
</a>
{{ end }}
</div>
</section>
</section>

View File

@@ -1,16 +1,18 @@
{{- $context := .Context -}}
{{- $limit := default 10 .Params.limit -}}
<section class="widget tagCloud">
<div class="widget-icon">
{{ partial "helper/icon" "tag" }}
</div>
<h2 class="widget-title section-title">{{ T "widget.tagCloud.title" }}</h2>
<a href="/tags">
<div class="widget-icon">
{{ partial "helper/icon" "tag" }}
</div>
<h2 class="widget-title section-title">{{ T "widget.tagCloud.title" }}</h2>
</a>
<div class="tagCloud-tags">
{{ range first $limit $context.Site.Taxonomies.tags.ByCount }}
<a href="{{ .Page.RelPermalink }}" class="font_size_{{ .Count }}">
{{ .Page.Title }}
</a>
<a href="{{ .Page.RelPermalink }}" class="font_size_{{ .Count }}">
{{ .Page.Title }}
</a>
{{ end }}
</div>
</section>