added heading to term pages

This commit is contained in:
Thunder33345 2023-04-27 00:54:20 +08:00
parent 9726b8d806
commit e76c7ebb66
No known key found for this signature in database
GPG Key ID: F02B0F022A819FCD
3 changed files with 61 additions and 0 deletions

View File

@ -16,4 +16,5 @@
@import "syntax";
@import "code";
@import "terms";
@import "term";
@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 }}