Breadcrumb partial

This commit is contained in:
Hazem Krimi
2023-11-14 19:57:44 +01:00
parent 33b8d792cf
commit 84cd9fde72
9 changed files with 55 additions and 14 deletions
+4 -4
View File
@@ -8,11 +8,11 @@ main p {
}
section img {
float: right;
float: right;
}
@media only screen and (max-width: 1024px) {
section img {
display: none;
}
section img {
display: none;
}
}
+19
View File
@@ -0,0 +1,19 @@
.breadcrumb {
margin-bottom: 0.5rem;
}
.breadcrumb ol {
padding-left: 0;
}
.breadcrumb li {
display: inline;
}
.breadcrumb li:not(:last-child)::after {
content: '';
}
.breadcrumb a {
text-transform: capitalize;
}
+7 -7
View File
@@ -23,7 +23,7 @@ header {
justify-content: space-between;
}
nav {
nav:not(.breadcrumb) {
background-color: var(--nav-background);
display: none;
position: fixed;
@@ -40,7 +40,7 @@ header #header-face h3 {
font-weight: 600;
}
header #menus a, nav #menus a {
header #menus a, nav:not(.breadcrumb) #menus a {
text-decoration: none;
font-weight: 600;
font-size: 15px;
@@ -52,7 +52,7 @@ header #menus {
column-gap: 1.563rem;
}
nav #menus {
nav:not(.breadcrumb) #menus {
display: flex;
flex-direction: column;
align-items: end;
@@ -60,7 +60,7 @@ nav #menus {
row-gap: 3.125rem;
}
nav hr {
nav:not(.breadcrumb) hr {
margin-top: 3.125rem;
margin-bottom: 1.25rem;
}
@@ -71,13 +71,13 @@ header #links {
column-gap: 1.5rem;
}
nav #links {
nav:not(.breadcrumb) #links {
display: flex;
justify-content: end;
column-gap: 1.5rem;
}
nav #links .theme-toggler {
nav:not(.breadcrumb) #links .theme-toggler {
margin-right: auto;
}
@@ -90,7 +90,7 @@ header #nav-toggler {
}
@media only screen and (max-width: 1024px) {
header, nav {
header, nav:not(.breadcrumb) {
margin: 1.5rem auto;
padding: 0.938rem 1.25rem;
}
+1 -1
View File
@@ -1,4 +1,4 @@
---
title: "Hazem Krimi"
title: "Home"
date: 2023-10-18T20:03:43+01:00
---
+2
View File
@@ -5,6 +5,8 @@
{{ end }}
{{ define "main" }}
{{ partial "breadcrumb.html" . }}
{{ $faceImage := resources.Get "images/big-face.png" }}
<section>
+2
View File
@@ -5,6 +5,8 @@
{{ end }}
{{ define "main" }}
{{ partial "breadcrumb.html" . }}
{{ .Content }}
{{ partial "contact-form.html" . }}
+2
View File
@@ -5,6 +5,8 @@
{{ end }}
{{ define "main" }}
{{ partial "breadcrumb.html" . }}
{{ .Content }}
<section>
+16
View File
@@ -0,0 +1,16 @@
{{ $styles := resources.Get "css/partials/breadcrumb.css" | toCSS | minify }}
<link rel="stylesheet" href="{{ $styles.Permalink }}" />
<nav aria-label="breadcrumb" class="breadcrumb">
<ol>
{{ range .Ancestors.Reverse }}
<li>
<a href="{{ .Permalink }}">{{ .Title }}</a>
</li>
{{ end }}
<li class="active">
<a aria-current="page" href="{{ .Permalink }}">{{ .Title }}</a>
</li>
</ol>
</nav>
+1 -1
View File
@@ -34,6 +34,6 @@
<script>
const copyright = (document.querySelector(
'#copyright'
).innerHTML = `&copy ${new Date().getFullYear()} Hazem Krimi`);
).innerHTML = `Hazem Krimi &copy ${new Date().getFullYear()}`);
</script>
</footer>