diff options
| author | Francesco <tomaselli.fr@gmail.com> | 2024-05-06 21:53:29 +0200 | 
|---|---|---|
| committer | Francesco <tomaselli.fr@gmail.com> | 2024-05-06 21:53:29 +0200 | 
| commit | 1ee175c6bea9bdc15188ad475565149487cb27f2 (patch) | |
| tree | 815d76d751052ec1f3ed169ba6debd7f9d9c9a63 | |
| parent | 769239a8e95cf761075a1248818a6578d7522fac (diff) | |
Breadcrumbs tmp
| -rw-r--r-- | assets/css/main.css | 17 | ||||
| -rw-r--r-- | layouts/_default/list.html | 11 | ||||
| -rw-r--r-- | layouts/_default/single.html | 4 | ||||
| -rw-r--r-- | layouts/partials/breadcrumbs.html | 8 | ||||
| -rw-r--r-- | layouts/partials/tag-entry.html | 7 | 
5 files changed, 47 insertions, 0 deletions
| diff --git a/assets/css/main.css b/assets/css/main.css index 9f6cb73..830da4e 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -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;  }
\ No newline at end of file diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 8c52a86..5cf6c81 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -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 }}
\ No newline at end of file diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 420a8ba..3eb46af 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -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" }} diff --git a/layouts/partials/breadcrumbs.html b/layouts/partials/breadcrumbs.html new file mode 100644 index 0000000..9040d1f --- /dev/null +++ b/layouts/partials/breadcrumbs.html @@ -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>
\ No newline at end of file diff --git a/layouts/partials/tag-entry.html b/layouts/partials/tag-entry.html new file mode 100644 index 0000000..378654b --- /dev/null +++ b/layouts/partials/tag-entry.html @@ -0,0 +1,7 @@ +<div class="tag-line"> +    <div> +        <p class="tag-title"> +            <a href="{{ .RelPermalink }}">#{{ .Title }}</a> +        </p> +    </div> +</div>
\ No newline at end of file | 
