mirror of
https://github.com/hazemKrimi/personal-website.git
synced 2026-05-01 18:00:26 +00:00
Breadcrumb partial
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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
@@ -1,4 +1,4 @@
|
||||
---
|
||||
title: "Hazem Krimi"
|
||||
title: "Home"
|
||||
date: 2023-10-18T20:03:43+01:00
|
||||
---
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
{{ end }}
|
||||
|
||||
{{ define "main" }}
|
||||
{{ partial "breadcrumb.html" . }}
|
||||
|
||||
{{ $faceImage := resources.Get "images/big-face.png" }}
|
||||
|
||||
<section>
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
{{ end }}
|
||||
|
||||
{{ define "main" }}
|
||||
{{ partial "breadcrumb.html" . }}
|
||||
|
||||
{{ .Content }}
|
||||
|
||||
{{ partial "contact-form.html" . }}
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
{{ end }}
|
||||
|
||||
{{ define "main" }}
|
||||
{{ partial "breadcrumb.html" . }}
|
||||
|
||||
{{ .Content }}
|
||||
|
||||
<section>
|
||||
|
||||
@@ -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>
|
||||
@@ -34,6 +34,6 @@
|
||||
<script>
|
||||
const copyright = (document.querySelector(
|
||||
'#copyright'
|
||||
).innerHTML = `© ${new Date().getFullYear()} Hazem Krimi`);
|
||||
).innerHTML = `Hazem Krimi © ${new Date().getFullYear()}`);
|
||||
</script>
|
||||
</footer>
|
||||
|
||||
Reference in New Issue
Block a user