mirror of
https://github.com/Aroy-Art/Rinkusu.git
synced 2024-12-26 17:04:23 +01:00
Fix: Complete rework of the breadcrumb
This commit is contained in:
parent
4b88f2c7cd
commit
9486d2e8c6
2 changed files with 7 additions and 17 deletions
|
@ -20,7 +20,8 @@ Author: Aroy (https://aroy-art.com)
|
|||
--neon-color: #39ff14;
|
||||
--neon-pink-color: #ff00d4;
|
||||
|
||||
|
||||
--bg-light: #0f1e31;
|
||||
--bg-dark: #040b1e;
|
||||
}
|
||||
|
||||
|
||||
|
@ -491,7 +492,7 @@ ol li::marker {
|
|||
}
|
||||
|
||||
.breadcrumb {
|
||||
background-color: #0f1e31;
|
||||
background-color: var(--bg-dark, #040b1e);
|
||||
}
|
||||
|
||||
nav[aria-label="breadcrumb"] li:last-child a{
|
||||
|
|
|
@ -1,25 +1,14 @@
|
|||
{{ if site.Params.breadcrumbs }}
|
||||
{{"<!-- Bradcrumb Section -->" | safeHTML}}
|
||||
{{ $siteUrl := replace .Permalink ( printf "%s" .Site.BaseURL) "" }}
|
||||
{{ $.Scratch.Add "sitePath" .Site.BaseURL }}
|
||||
|
||||
{{ $.Scratch.Add "siteBreadcrumbs" (slice (dict "url" .Site.BaseURL "name" "home" "position" 1 )) }}
|
||||
{{ range $index, $element := split $siteUrl "/" }}
|
||||
{{ $.Scratch.Add "sitePath" $element }}
|
||||
{{ $.Scratch.Add "sitePath" "/" }}
|
||||
{{ if ne $element "" }}
|
||||
{{ $.Scratch.Add "siteBreadcrumbs" (slice (dict "url" ($.Scratch.Get "sitePath") "name" . "position" (add $index 2))) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
<nav class="navbar navbar-expand-lg">
|
||||
<div class="container-fluid">
|
||||
<nav aria-label="breadcrumb">
|
||||
<!-- <p> You are hear ↓↓↓</p> -->
|
||||
<ol class="breadcrumb">
|
||||
{{ range $.Scratch.Get "siteBreadcrumbs" }}
|
||||
<li class="breadcrumb-item"><a href="{{ .url }}">{{ .name }}</a></li>
|
||||
{{ end }}
|
||||
{{- range .Ancestors.Reverse }}
|
||||
<li class="breadcrumb-item"><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
|
||||
{{- end }}
|
||||
<li class="breadcrumb-item"><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
|
||||
</ol>
|
||||
</nav>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue