mirror of
https://github.com/tomfran/typo.git
synced 2025-04-25 21:19:55 +03:00
Breadcrumbs tmp
This commit is contained in:
parent
c5e52feadb
commit
1a5d0d46a1
5 changed files with 47 additions and 0 deletions
|
@ -157,6 +157,12 @@ footer a {
|
|||
align-items: baseline;
|
||||
}
|
||||
|
||||
.tag-line {
|
||||
margin-bottom: .5rem;
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
}
|
||||
|
||||
.post-line p {
|
||||
margin-top: 0rem;
|
||||
margin-bottom: 0rem;
|
||||
|
@ -177,6 +183,10 @@ footer a {
|
|||
margin: 0;
|
||||
}
|
||||
|
||||
.tag-title {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.line-summary {
|
||||
font-size: small;
|
||||
margin-top: .2rem !important;
|
||||
|
@ -329,4 +339,11 @@ footer a {
|
|||
.not-found div h1 {
|
||||
font-size: 6rem;
|
||||
margin-bottom: 3rem;
|
||||
}
|
||||
|
||||
/* breadcrumbs */
|
||||
|
||||
.breadcrumbs {
|
||||
/* font-family: "Monaspace"; */
|
||||
font-size: small;
|
||||
}
|
|
@ -1,7 +1,12 @@
|
|||
{{ define "main" }}
|
||||
|
||||
{{ partial "breadcrumbs.html" . }}
|
||||
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ .Content }}
|
||||
|
||||
{{ $tagsPage := eq .Title "Tags"}}
|
||||
|
||||
{{ $paginationSize := 1}}
|
||||
{{ if (gt .Site.Params.paginationSize 0) }}
|
||||
{{ $paginationSize = .Site.Params.paginationSize }}
|
||||
|
@ -10,9 +15,15 @@
|
|||
{{ $paginator := .Paginate (.Pages) $paginationSize }}
|
||||
|
||||
{{ range $index, $page := $paginator.Pages }}
|
||||
|
||||
{{ if $tagsPage }}
|
||||
{{ partial "tag-entry.html" $page}}
|
||||
{{ else }}
|
||||
{{ partial "post-entry.html" $page}}
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
|
||||
{{ partial "pagination-controls.html" $paginator}}
|
||||
|
||||
{{ end }}
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
{{/* Intro */}}
|
||||
|
||||
{{ partial "breadcrumbs.html" . }}
|
||||
|
||||
<div {{ if .Param "autonumber" }} class="autonumber" {{ end }}>
|
||||
|
||||
<div class=" single-intro-container">
|
||||
|
@ -30,6 +32,8 @@
|
|||
|
||||
</div>
|
||||
|
||||
{{/* {{ .Params.tags }} */}}
|
||||
|
||||
{{/* Table of Content */}}
|
||||
|
||||
{{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…
Add table
Add a link
Reference in a new issue