mirror of
https://github.com/maikka39/Personal-Website.git
synced 2026-10-02 14:46:25 +00:00
Add breadcrumbs and cleanup writeup ui
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
+++
|
+++
|
||||||
author = "Maik de Kruif"
|
author = "Maik de Kruif"
|
||||||
title = "SANS Holiday Hack Challenge 2024"
|
title = "SANS Holiday Hack Challenge 2024"
|
||||||
|
breadcrumb = "2024"
|
||||||
description = "A collection of my writeups for the 2024 edition of the SANS Holiday Hack Challenge (HHC). HHC is a free series of fun, quality, hands-on cybersecurity challenges."
|
description = "A collection of my writeups for the 2024 edition of the SANS Holiday Hack Challenge (HHC). HHC is a free series of fun, quality, hands-on cybersecurity challenges."
|
||||||
+++
|
+++
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
+++
|
+++
|
||||||
author = "Maik de Kruif"
|
author = "Maik de Kruif"
|
||||||
title = "SANS Holiday Hack Challenge 2024"
|
title = "Prologue - SANS HHC 2024"
|
||||||
|
breadcrumb = "Prologue"
|
||||||
description = "A collection of my writeups for the 2024 edition of the SANS Holiday Hack Challenge (HHC). HHC is a free series of fun, quality, hands-on cybersecurity challenges."
|
description = "A collection of my writeups for the 2024 edition of the SANS Holiday Hack Challenge (HHC). HHC is a free series of fun, quality, hands-on cybersecurity challenges."
|
||||||
+++
|
+++
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ author = "Maik de Kruif"
|
|||||||
title = "Elf Minder"
|
title = "Elf Minder"
|
||||||
subtitle = "Prologue - SANS Holiday Hack Challenge 2024"
|
subtitle = "Prologue - SANS Holiday Hack Challenge 2024"
|
||||||
date = 2024-11-21T15:18:53+01:00
|
date = 2024-11-21T15:18:53+01:00
|
||||||
description = ""
|
description = "On to our second game of the Holiday Hack Challenge. This time we'll have to find some routes."
|
||||||
cover = "img/writeups/holiday-hack-challenge/2024/prologue/elf-minder/cover.png"
|
cover = "img/writeups/holiday-hack-challenge/2024/prologue/elf-minder/cover.png"
|
||||||
tags = [
|
tags = [
|
||||||
"Holiday Hack Challenge",
|
"Holiday Hack Challenge",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
window.addEventListener("load", () => {
|
window.addEventListener("load", () => {
|
||||||
for (let figure of document.getElementsByTagName("figure")) {
|
for (let figure of document.getElementsByTagName("figure")) {
|
||||||
if (figure.classList.contains("post-cover"))
|
if (figure.classList.contains("post-cover") || figure.classList.contains("portfolio-cover"))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
figure.addEventListener("click", () => {
|
figure.addEventListener("click", () => {
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ figure {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
background-color: #212020ec;
|
background-color: #212020ec;
|
||||||
z-index: 100;
|
z-index: 10000;
|
||||||
|
|
||||||
figcaption {
|
figcaption {
|
||||||
color: #ddd3c6;
|
color: #ddd3c6;
|
||||||
@@ -460,3 +460,7 @@ table {
|
|||||||
width: 1em;
|
width: 1em;
|
||||||
height: 1em;
|
height: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.nostyle {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,10 +1,15 @@
|
|||||||
.masonry {
|
.masonry {
|
||||||
display: grid;
|
display: grid;
|
||||||
|
margin-top: 20px;
|
||||||
grid-gap: 20px 90px;
|
grid-gap: 20px 90px;
|
||||||
grid-template-columns: repeat(2, minmax(250px, 1fr));
|
grid-template-columns: repeat(2, minmax(250px, 1fr));
|
||||||
// grid-auto-rows: 20px; // Set by JavaScript
|
// grid-auto-rows: 20px; // Set by JavaScript
|
||||||
// margin-bottom: calc(4 * 20px); // Set by JavaScript
|
// margin-bottom: calc(4 * 20px); // Set by JavaScript
|
||||||
|
|
||||||
|
> * {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
@media #{$media-size-medium} {
|
@media #{$media-size-medium} {
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,22 +58,11 @@
|
|||||||
> * {
|
> * {
|
||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
// display: flex;
|
|
||||||
// flex-direction: row;
|
|
||||||
// align-items: center;
|
|
||||||
// font-size: 0.9em;
|
|
||||||
// gap: 10px;
|
|
||||||
|
|
||||||
|
|
||||||
// > * {
|
|
||||||
// margin: 0;
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&-cover {
|
&-cover {
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
margin: 40px -50px;
|
margin: 30px -50px;
|
||||||
width: 1060px;
|
width: 1060px;
|
||||||
max-width: 1060px;
|
max-width: 1060px;
|
||||||
|
|
||||||
|
|||||||
@@ -38,9 +38,21 @@
|
|||||||
@media #{$media-size-phone} {
|
@media #{$media-size-phone} {
|
||||||
font-size: 1.6rem;
|
font-size: 1.6rem;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
a {
|
&-breadcrumbs {
|
||||||
text-decoration: none;
|
font-size: 1.15rem;
|
||||||
|
margin: 10px 0 5px;
|
||||||
|
|
||||||
|
@media #{$media-size-phone} {
|
||||||
|
font-size: 0.9rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&-description {
|
||||||
|
font-size: 1.15rem;
|
||||||
|
@media #{$media-size-phone} {
|
||||||
|
font-size: 1.075rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -61,9 +73,10 @@
|
|||||||
|
|
||||||
&-cover {
|
&-cover {
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
margin: 40px -50px;
|
margin: 30px -5.20%;
|
||||||
width: 1060px;
|
width: 110%;
|
||||||
max-width: 1060px;
|
max-width: 110%;
|
||||||
|
text-decoration: none;
|
||||||
|
|
||||||
@media #{$media-size-medium} {
|
@media #{$media-size-medium} {
|
||||||
max-width: 860px;
|
max-width: 860px;
|
||||||
@@ -71,7 +84,7 @@
|
|||||||
|
|
||||||
@media #{$media-size-tablet} {
|
@media #{$media-size-tablet} {
|
||||||
margin: 20px 0;
|
margin: 20px 0;
|
||||||
width: 100%;
|
width: 100% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
img {
|
img {
|
||||||
|
|||||||
@@ -38,27 +38,23 @@
|
|||||||
list-style: none;
|
list-style: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&-breadcrumbs {
|
||||||
|
margin: 0 0 -25px;
|
||||||
|
|
||||||
|
@media #{$media-size-phone} {
|
||||||
|
font-size: 0.9rem;
|
||||||
|
margin: 0 0 -15px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.post {
|
.post {
|
||||||
&.masonry-item {
|
|
||||||
.post-cover {
|
|
||||||
width: 115%;
|
|
||||||
margin: 40px -30px;
|
|
||||||
|
|
||||||
img {
|
|
||||||
max-height: 20rem;
|
|
||||||
margin: 0 auto;
|
|
||||||
object-fit: contain;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&-title {
|
&-title {
|
||||||
font-size: 1.9rem;
|
font-size: 1.9rem;
|
||||||
margin: 5px 0 5px 0;
|
margin: 5px 0 5px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
&-subtitle {
|
&-subtitle {
|
||||||
font-size: 1.2rem;
|
font-size: 1.1rem;
|
||||||
margin: 5px 0 10px 0;
|
margin: 5px 0 10px 0;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
@@ -91,5 +87,15 @@
|
|||||||
margin-left: 1em;
|
margin-left: 1em;
|
||||||
@include dimmed;
|
@include dimmed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&-cover {
|
||||||
|
margin-top: 20px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-content {
|
||||||
|
margin-top: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ $dark-border-color: #4a4b50;
|
|||||||
$media-size-phone: "(max-width: 684px)";
|
$media-size-phone: "(max-width: 684px)";
|
||||||
$media-size-tablet: "(max-width: 900px)";
|
$media-size-tablet: "(max-width: 900px)";
|
||||||
$media-size-medium: "(max-width: 1200px)";
|
$media-size-medium: "(max-width: 1200px)";
|
||||||
|
$media-size-medium-min: "(min-width: 1200px)";
|
||||||
|
|
||||||
/* variables for js, must be the same as these in @custom-media queries */
|
/* variables for js, must be the same as these in @custom-media queries */
|
||||||
:root {
|
:root {
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
{{ $paginator := .Paginate .Data.Pages }}
|
{{ $paginator := .Paginate .Data.Pages }}
|
||||||
|
|
||||||
<main class="posts">
|
<main class="posts">
|
||||||
|
<p class="posts-breadcrumbs">{{ partial "breadcrumbs.html" (dict "page" . "end" ">" "min" 1) }}</p>
|
||||||
|
|
||||||
<h1>{{ .Title }}</h1>
|
<h1>{{ .Title }}</h1>
|
||||||
|
|
||||||
{{- if and .Content (not .Paginator.HasPrev) }}
|
{{- if and .Content (not .Paginator.HasPrev) }}
|
||||||
@@ -43,6 +45,7 @@
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- if .Params.Cover }}
|
{{- if .Params.Cover }}
|
||||||
|
<a href="{{ .Permalink }}" class="nostyle">
|
||||||
<figure class="post-cover">
|
<figure class="post-cover">
|
||||||
{{- partial "image.html" (dict "path" .Params.Cover "alt" (.Title | plainify)) }}
|
{{- partial "image.html" (dict "path" .Params.Cover "alt" (.Title | plainify)) }}
|
||||||
|
|
||||||
@@ -50,6 +53,7 @@
|
|||||||
<figcaption class="center">{{ .Params.CoverCaption | markdownify }}</figcaption>
|
<figcaption class="center">{{ .Params.CoverCaption | markdownify }}</figcaption>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</figure>
|
</figure>
|
||||||
|
</a>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
<div class="post-content">
|
<div class="post-content">
|
||||||
|
|||||||
@@ -9,7 +9,11 @@
|
|||||||
<circle cx="12" cy="12" r="10"></circle>
|
<circle cx="12" cy="12" r="10"></circle>
|
||||||
<polyline points="12 6 12 12 16 14"></polyline>
|
<polyline points="12 6 12 12 16 14"></polyline>
|
||||||
</svg>
|
</svg>
|
||||||
{{ i18n "readingTime" .Page.ReadingTime }}
|
{{- $readingTime := .Page.ReadingTime }}
|
||||||
|
{{- if eq .Type "writeups" }}
|
||||||
|
{{- $readingTime = mul 1.5 .Page.ReadingTime | int }}
|
||||||
|
{{- end }}
|
||||||
|
{{ i18n "readingTime" $readingTime }}
|
||||||
|
|
||||||
{{- if .IsTranslated }} | {{ i18n "postAvailable" }}
|
{{- if .IsTranslated }} | {{ i18n "postAvailable" }}
|
||||||
{{- range .Translations }}
|
{{- range .Translations }}
|
||||||
@@ -21,11 +25,13 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<article>
|
<article>
|
||||||
|
<p class="post-breadcrumbs">{{ partial "breadcrumbs.html" (dict "page" . "end" ">" "min" 1) }}</p>
|
||||||
|
|
||||||
<h1 class="post-title">
|
<h1 class="post-title">
|
||||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||||
</h1>
|
</h1>
|
||||||
{{- with .Params.Subtitle }}
|
{{- with .Params.Description }}
|
||||||
<p class="post-subtitle">{{ . | markdownify }}</p>
|
<p class="post-description">{{ . | markdownify }}</p>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- if .Params.Cover }}
|
{{- if .Params.Cover }}
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
{{- $breadcrumbs := slice }}
|
||||||
|
{{- $path := .page.RelPermalink }}
|
||||||
|
{{- $path = trim $path "/" }}
|
||||||
|
{{- $currentPath := "" }}
|
||||||
|
{{- range split $path "/" }}
|
||||||
|
{{- $currentPath = printf "%s/%s" $currentPath . }}
|
||||||
|
{{- $page := $.page.GetPage $currentPath }}
|
||||||
|
{{- if ne (trim $currentPath "/") $path }}
|
||||||
|
{{- $title := $page.Title }}
|
||||||
|
{{- with $page.Params.breadcrumb }}
|
||||||
|
{{- $title = . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- $breadcrumbs = $breadcrumbs | append (dict "name" $title "url" $page.Permalink) }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- $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 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -21,6 +21,9 @@
|
|||||||
{{- $breadcrumbs = $breadcrumbs | append (dict "name" "Not Found" "url" (printf "%s%s" $.Site.BaseURL (strings.TrimLeft "/" $currentPath))) }}
|
{{- $breadcrumbs = $breadcrumbs | append (dict "name" "Not Found" "url" (printf "%s%s" $.Site.BaseURL (strings.TrimLeft "/" $currentPath))) }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
{{- $title := $page.Title }}
|
{{- $title := $page.Title }}
|
||||||
|
{{- with $page.Params.breadcrumb }}
|
||||||
|
{{- $title = . }}
|
||||||
|
{{- end }}
|
||||||
{{- if eq (trim $currentPath "/") $path }}
|
{{- if eq (trim $currentPath "/") $path }}
|
||||||
{{- $breadcrumbs = $breadcrumbs | append (dict "name" $visiblePage.Title "url" $visiblePage.Permalink) }}
|
{{- $breadcrumbs = $breadcrumbs | append (dict "name" $visiblePage.Title "url" $visiblePage.Permalink) }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
|
|
||||||
<main class="portfolios">
|
<main class="portfolios">
|
||||||
|
<p class="posts-breadcrumbs">{{ partial "breadcrumbs.html" (dict "page" . "end" ">") }}</p>
|
||||||
|
|
||||||
<h1>Portfolio</h1>
|
<h1>Portfolio</h1>
|
||||||
|
|
||||||
{{- if and .Content (not .Paginator.HasPrev) }}
|
{{- if and .Content (not .Paginator.HasPrev) }}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
<main class="portfolio">
|
<main class="portfolio">
|
||||||
|
|
||||||
<div class="portfolio-info">
|
<div class="portfolio-info">
|
||||||
<p>
|
<p>
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
|
||||||
@@ -21,6 +20,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<article>
|
<article>
|
||||||
|
<p class="post-breadcrumbs">{{ partial "breadcrumbs.html" (dict "page" . "end" ">" "min" 1) }}</p>
|
||||||
|
|
||||||
<h1 class="portfolio-title">
|
<h1 class="portfolio-title">
|
||||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||||
</h1>
|
</h1>
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
{{ $paginator := (.Paginate .RegularPagesRecursive) }}
|
{{ $paginator := (.Paginate .RegularPagesRecursive) }}
|
||||||
|
|
||||||
<main class="posts">
|
<main class="posts">
|
||||||
|
<p class="posts-breadcrumbs">{{ partial "breadcrumbs.html" (dict "page" . "end" ">") }}</p>
|
||||||
|
|
||||||
<h1>{{ .Title }}</h1>
|
<h1>{{ .Title }}</h1>
|
||||||
|
|
||||||
{{- if and .Content (not .Paginator.HasPrev) }}
|
{{- if and .Content (not .Paginator.HasPrev) }}
|
||||||
@@ -14,12 +16,18 @@
|
|||||||
|
|
||||||
<div class="posts-list masonry">
|
<div class="posts-list masonry">
|
||||||
{{ range $paginator.Pages }}
|
{{ range $paginator.Pages }}
|
||||||
<div class="post masonry-item">
|
<div class="post">
|
||||||
<div class="masonry-item-content">
|
|
||||||
<h2 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h2>
|
<h2 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h2>
|
||||||
{{- with .Params.Subtitle }}
|
|
||||||
<p class="post-subtitle">{{ . | markdownify }}</p>
|
<p class="post-subtitle">
|
||||||
{{- end }}
|
{{/* {{- with .Params.Subtitle }}
|
||||||
|
{{ . | markdownify }}
|
||||||
|
<br>
|
||||||
|
{{- end }} */}}
|
||||||
|
|
||||||
|
{{ partial "breadcrumbs.html" (dict "page" . "min" 0) }}
|
||||||
|
</p>
|
||||||
|
|
||||||
<div class="post-meta">
|
<div class="post-meta">
|
||||||
{{- if .Date }}
|
{{- if .Date }}
|
||||||
<span class="post-date">
|
<span class="post-date">
|
||||||
@@ -44,6 +52,7 @@
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- if .Params.Cover }}
|
{{- if .Params.Cover }}
|
||||||
|
<a href="{{ .Permalink }}" class="nostyle">
|
||||||
<figure class="post-cover">
|
<figure class="post-cover">
|
||||||
{{- partial "image.html" (dict "path" .Params.Cover "alt" (.Title | plainify)) }}
|
{{- partial "image.html" (dict "path" .Params.Cover "alt" (.Title | plainify)) }}
|
||||||
|
|
||||||
@@ -51,6 +60,7 @@
|
|||||||
<figcaption class="center">{{ .Params.CoverCaption | markdownify }}</figcaption>
|
<figcaption class="center">{{ .Params.CoverCaption | markdownify }}</figcaption>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</figure>
|
</figure>
|
||||||
|
</a>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
<div class="post-content">
|
<div class="post-content">
|
||||||
@@ -68,7 +78,6 @@
|
|||||||
→</a></div>
|
→</a></div>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user