Breadcrumbs tmp
This commit is contained in:
parent
4cfd8c83ed
commit
d45314792a
@ -157,6 +157,12 @@ footer a {
|
|||||||
align-items: baseline;
|
align-items: baseline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tag-line {
|
||||||
|
margin-bottom: .5rem;
|
||||||
|
display: flex;
|
||||||
|
align-items: baseline;
|
||||||
|
}
|
||||||
|
|
||||||
.post-line p {
|
.post-line p {
|
||||||
margin-top: 0rem;
|
margin-top: 0rem;
|
||||||
margin-bottom: 0rem;
|
margin-bottom: 0rem;
|
||||||
@ -177,6 +183,10 @@ footer a {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tag-title {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.line-summary {
|
.line-summary {
|
||||||
font-size: small;
|
font-size: small;
|
||||||
margin-top: .2rem !important;
|
margin-top: .2rem !important;
|
||||||
@ -330,3 +340,10 @@ footer a {
|
|||||||
font-size: 6rem;
|
font-size: 6rem;
|
||||||
margin-bottom: 3rem;
|
margin-bottom: 3rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* breadcrumbs */
|
||||||
|
|
||||||
|
.breadcrumbs {
|
||||||
|
/* font-family: "Monaspace"; */
|
||||||
|
font-size: small;
|
||||||
|
}
|
@ -1,7 +1,12 @@
|
|||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
|
|
||||||
|
{{ partial "breadcrumbs.html" . }}
|
||||||
|
|
||||||
<h1>{{ .Title }}</h1>
|
<h1>{{ .Title }}</h1>
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
|
|
||||||
|
{{ $tagsPage := eq .Title "Tags"}}
|
||||||
|
|
||||||
{{ $paginationSize := 1}}
|
{{ $paginationSize := 1}}
|
||||||
{{ if (gt .Site.Params.paginationSize 0) }}
|
{{ if (gt .Site.Params.paginationSize 0) }}
|
||||||
{{ $paginationSize = .Site.Params.paginationSize }}
|
{{ $paginationSize = .Site.Params.paginationSize }}
|
||||||
@ -10,9 +15,15 @@
|
|||||||
{{ $paginator := .Paginate (.Pages) $paginationSize }}
|
{{ $paginator := .Paginate (.Pages) $paginationSize }}
|
||||||
|
|
||||||
{{ range $index, $page := $paginator.Pages }}
|
{{ range $index, $page := $paginator.Pages }}
|
||||||
|
|
||||||
|
{{ if $tagsPage }}
|
||||||
|
{{ partial "tag-entry.html" $page}}
|
||||||
|
{{ else }}
|
||||||
{{ partial "post-entry.html" $page}}
|
{{ partial "post-entry.html" $page}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ partial "pagination-controls.html" $paginator}}
|
{{ partial "pagination-controls.html" $paginator}}
|
||||||
|
|
||||||
{{ end }}
|
{{ end }}
|
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
{{/* Intro */}}
|
{{/* Intro */}}
|
||||||
|
|
||||||
|
{{ partial "breadcrumbs.html" . }}
|
||||||
|
|
||||||
<div {{ if .Param "autonumber" }} class="autonumber" {{ end }}>
|
<div {{ if .Param "autonumber" }} class="autonumber" {{ end }}>
|
||||||
|
|
||||||
<div class=" single-intro-container">
|
<div class=" single-intro-container">
|
||||||
@ -30,6 +32,8 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{/* {{ .Params.tags }} */}}
|
||||||
|
|
||||||
{{/* Table of Content */}}
|
{{/* Table of Content */}}
|
||||||
|
|
||||||
{{if .Param "toc" }}
|
{{if .Param "toc" }}
|
||||||
|
8
layouts/partials/breadcrumbs.html
Normal file
8
layouts/partials/breadcrumbs.html
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<div class="breadcrumbs">
|
||||||
|
{{ range .Ancestors.Reverse }}
|
||||||
|
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||||
|
<span class="breadcrumbs-separator"> > </span>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||||
|
</div>
|
7
layouts/partials/tag-entry.html
Normal file
7
layouts/partials/tag-entry.html
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<div class="tag-line">
|
||||||
|
<div>
|
||||||
|
<p class="tag-title">
|
||||||
|
<a href="{{ .RelPermalink }}">#{{ .Title }}</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
Loading…
Reference in New Issue
Block a user