add a conditionally rendered "back to home" link

This commit is contained in:
2025-05-07 10:54:10 -07:00
parent 2430e8c214
commit 40e8f5c07c
3 changed files with 19 additions and 1 deletions

View File

@@ -16,6 +16,14 @@
<title>{{ page.title }}</title> <title>{{ page.title }}</title>
</head> </head>
<body> <body>
{% if page.isIndexPage != 1 %}
<nav>
<a href="/" title="Home">
back to home
</a>
</nav>
{% endif %}
<main> <main>
{{ content }} {{ content }}
</main> </main>

View File

@@ -9,6 +9,15 @@ body {
align-items: center; align-items: center;
} }
nav {
max-width: 720px;
width: 100%;
}
.nav-home-icon {
max-width: 64px;
}
main { main {
max-width: 720px; max-width: 720px;
width: 100%; width: 100%;
@@ -27,7 +36,7 @@ a {
} }
@media screen and (min-width: 720px) { @media screen and (min-width: 720px) {
main { nav {
padding-top: 32px; padding-top: 32px;
} }
} }

View File

@@ -1,6 +1,7 @@
--- ---
title: "Brendan Chen" title: "Brendan Chen"
layout: default layout: default
isIndexPage: 1
--- ---
# Brendan Chen # Brendan Chen