From 38492baf96bcc244b01d9fef55b286d8bdcc6d63 Mon Sep 17 00:00:00 2001 From: Daniel Kluge Date: Sun, 17 Dec 2023 10:56:07 +0100 Subject: [PATCH] Add document footer --- src/layouts/MarkdownLayout.astro | 54 ++++++++++++++-------------- src/pages/blog/[diary].astro | 2 +- src/pages/blog/[diary]/[entry].astro | 3 +- src/pages/blog/[entry].astro | 2 +- 4 files changed, 30 insertions(+), 31 deletions(-) diff --git a/src/layouts/MarkdownLayout.astro b/src/layouts/MarkdownLayout.astro index 0fbb092..8f2dea7 100644 --- a/src/layouts/MarkdownLayout.astro +++ b/src/layouts/MarkdownLayout.astro @@ -3,9 +3,12 @@ import Layout from "./Layout.astro"; interface Props { title: string; + published?: Date; + srcPath?: string; } -const { title } = Astro.props; +const { title, srcPath, published } = Astro.props; +const gitUrl = `https://git.c0ntroller.de/c0ntroller/frontpage/src/branch/astro/src/content/${srcPath}` --- @@ -13,6 +16,15 @@ const { title } = Astro.props; : null} + { published || srcPath ? <> +
+ + + : null } {Astro.slots.has("footer-nav") ? : null} @@ -20,35 +32,21 @@ const { title } = Astro.props;