Merge pull request #460 from Thunder33345/taxonomy-title

Added heading to term pages
This commit is contained in:
Radek Kozieł 2023-06-09 23:37:19 +02:00 committed by GitHub
commit 653c3a1b7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 61 additions and 0 deletions

View File

@ -16,4 +16,5 @@
@import "syntax"; @import "syntax";
@import "code"; @import "code";
@import "terms"; @import "terms";
@import "term";
@import "gist"; @import "gist";

3
assets/css/term.scss Normal file
View File

@ -0,0 +1,3 @@
h1.term {
color: $accent;
}

View File

@ -0,0 +1,57 @@
{{ define "main" }}
<h1 class="term">{{ .Title }}</h1>
{{ with .Content }}
<div class="index-content">
{{ . }}
</div>
{{ end }}
<div class="posts">
{{ range .Paginator.Pages }}
<article class="post on-list">
<h1 class="post-title">
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
</h1>
<div class="post-meta">
{{ if .Date }}
<time class="post-date">
{{ .Date.Format "2006-01-02" }}
</time>
{{ end }}
{{ with .Params.Author }}
<span class="post-author"> :: {{ . }}</span>
{{ end }}
</div>
{{ if .Params.tags }}
<span class="post-tags">
{{ range .Params.tags }}
#<a href="{{ (urlize (printf "tags/%s/" . )) | absLangURL }}">
{{- . -}}
</a>&nbsp;
{{ end }}
</span>
{{ end }}
{{ partial "cover.html" . }}
<div class="post-content">
{{ if .Params.showFullContent }}
{{ .Content }}
{{ else if .Description }}
{{ .Description | markdownify }}
{{ else }}
{{ .Summary }}
{{ end }}
</div>
{{ if not .Params.showFullContent }}
<div>
<a class="read-more button" href="{{.RelPermalink}}">{{ $.Site.Params.ReadMore }} →</a>
</div>
{{ end }}
</article>
{{ end }}
{{ partial "pagination.html" . }}
</div>
{{ end }}