mirror of
https://github.com/maikka39/Personal-Website.git
synced 2026-10-02 14:46:25 +00:00
Fix breadcrumbs to actually be a nav element
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
{{ $paginator := .Paginate .Data.Pages }}
|
||||
|
||||
<main class="posts">
|
||||
<p class="posts-breadcrumbs">{{ partial "breadcrumbs.html" (dict "page" . "end" ">" "min" 1) }}</p>
|
||||
<div class="posts-breadcrumbs">{{ partial "breadcrumbs.html" (dict "page" . "end" ">" "min" 1) }}</div>
|
||||
|
||||
<h1>{{ .Title }}</h1>
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<p class="post-breadcrumbs">{{ partial "breadcrumbs.html" (dict "page" . "end" ">" "min" 1) }}</p>
|
||||
<div class="post-breadcrumbs">{{ partial "breadcrumbs.html" (dict "page" . "end" ">" "min" 1) }}</div>
|
||||
|
||||
<h1 class="post-title">
|
||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||
|
||||
@@ -16,11 +16,17 @@
|
||||
{{- $breadcrumbs = after (int .page.IsPage) $breadcrumbs}}
|
||||
{{- if ne .page.Type "page"}}
|
||||
{{- if lt (default 0 .min) (len $breadcrumbs) }}
|
||||
{{- range $index, $breadcrumb := $breadcrumbs }}
|
||||
<a href="{{ $breadcrumb.url }}">{{ $breadcrumb.name }}</a>{{ if ne $index (sub (len $breadcrumbs) 1) }}<span> > </span>{{ end }}
|
||||
{{- end }}
|
||||
{{- if and $breadcrumbs .end }}
|
||||
{{ .end }}
|
||||
{{- end }}
|
||||
<nav aria-label="breadcrumb" class="breadcrumbs">
|
||||
<ol>
|
||||
{{- range $index, $breadcrumb := $breadcrumbs }}
|
||||
<li>
|
||||
<a href="{{ $breadcrumb.url }}">{{ $breadcrumb.name }}</a>{{ if ne $index (sub (len $breadcrumbs) 1) }}<span> > </span>{{ end }}
|
||||
</li>
|
||||
{{- end }}
|
||||
</ol>
|
||||
{{- if and $breadcrumbs .end }}
|
||||
{{ .end }}
|
||||
{{- end }}
|
||||
</nav>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{{ define "main" }}
|
||||
|
||||
<main class="portfolios">
|
||||
<p class="posts-breadcrumbs">{{ partial "breadcrumbs.html" (dict "page" . "end" ">") }}</p>
|
||||
<div class="posts-breadcrumbs">{{ partial "breadcrumbs.html" (dict "page" . "end" ">") }}</div>
|
||||
|
||||
<h1>Portfolio</h1>
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<p class="post-breadcrumbs">{{ partial "breadcrumbs.html" (dict "page" . "end" ">" "min" 1) }}</p>
|
||||
<div class="post-breadcrumbs">{{ partial "breadcrumbs.html" (dict "page" . "end" ">" "min" 1) }}</div>
|
||||
|
||||
<h1 class="portfolio-title">
|
||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{{ $paginator := (.Paginate .RegularPagesRecursive) }}
|
||||
|
||||
<main class="posts">
|
||||
<p class="posts-breadcrumbs">{{ partial "breadcrumbs.html" (dict "page" . "end" ">") }}</p>
|
||||
<div class="posts-breadcrumbs">{{ partial "breadcrumbs.html" (dict "page" . "end" ">") }}</div>
|
||||
|
||||
<h1>{{ .Title }}</h1>
|
||||
|
||||
@@ -19,14 +19,14 @@
|
||||
<div class="post">
|
||||
<h2 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h2>
|
||||
|
||||
<p class="post-subtitle">
|
||||
<div class="post-subtitle">
|
||||
{{/* {{- with .Params.Subtitle }}
|
||||
{{ . | markdownify }}
|
||||
<br>
|
||||
{{- end }} */}}
|
||||
|
||||
{{ partial "breadcrumbs.html" (dict "page" . "min" 0) }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="post-meta">
|
||||
{{- if .Date }}
|
||||
|
||||
Reference in New Issue
Block a user