From 38a7a5b5e9ee4cb66da43c775aa5271f1ac8a134 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elian=20=E2=98=95=EF=B8=8F?= Date: Sun, 10 Oct 2021 16:52:54 +0200 Subject: [PATCH] add backlink to blogposts (#1504) --- www/src/components/BackArrow.astro | 16 ++++++++++++++++ www/src/components/BlogPost.astro | 2 ++ 2 files changed, 18 insertions(+) create mode 100644 www/src/components/BackArrow.astro diff --git a/www/src/components/BackArrow.astro b/www/src/components/BackArrow.astro new file mode 100644 index 000000000..2d9d3332f --- /dev/null +++ b/www/src/components/BackArrow.astro @@ -0,0 +1,16 @@ +--- +interface Props { + url: string + title: string +} +const { url, title } = Astro.props +--- + + ← {title} + + \ No newline at end of file diff --git a/www/src/components/BlogPost.astro b/www/src/components/BlogPost.astro index c2cd18587..394eff7ce 100644 --- a/www/src/components/BlogPost.astro +++ b/www/src/components/BlogPost.astro @@ -2,6 +2,7 @@ import Author from './Author.astro'; import GithubStarButton from './GithubStarButton.astro'; import GoogleAnalytics from './GoogleAnalytics.astro'; +import BackArrow from './BackArrow.astro'; export interface Props { title: string; @@ -24,6 +25,7 @@ const { title, author, publishDate, heroImage } = Astro.props;
+