From d78fe7b020d320428a93a5f6704bff34ed25fc93 Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Mon, 26 Jun 2023 01:02:57 +0200 Subject: [PATCH] remove non navigateable footer links add github to footer add imprint add marked --- web/package.json | 2 ++ web/src/components/Layout/Footer.astro | 8 ++++---- web/src/pages/legal/imprint.astro | 27 ++++++++++++++++++++++++++ web/src/styles/global.css | 22 ++++++++++++++++++--- web/yarn.lock | 10 ++++++++++ 5 files changed, 62 insertions(+), 7 deletions(-) create mode 100644 web/src/pages/legal/imprint.astro diff --git a/web/package.json b/web/package.json index 71cfb6d..3d6a6ab 100644 --- a/web/package.json +++ b/web/package.json @@ -11,12 +11,14 @@ }, "dependencies": { "@astrojs/tailwind": "^3.1.3", + "@types/marked": "^5.0.0", "@unom/style": "^0.2.14", "astro": "^2.5.0", "astro-icon": "^0.8.1", "autoprefixer": "^10.4.14", "class-variance-authority": "^0.6.0", "clsx": "^1.2.1", + "marked": "^5.1.0", "motion": "^10.16.2", "postcss": "^8.4.24", "postcss-custom-media": "^9.1.5", diff --git a/web/src/components/Layout/Footer.astro b/web/src/components/Layout/Footer.astro index d25bddd..649c781 100644 --- a/web/src/components/Layout/Footer.astro +++ b/web/src/components/Layout/Footer.astro @@ -20,12 +20,12 @@ const tree: Array = [ label: "Landing", }, { - path: "/blog", - label: "Blog", + path: "https://github.com/tempblade/creator", + label: "GitHub", }, { - path: "/contact", - label: "Contact", + path: "https://tempblade.com", + label: "tempblade", }, ], }, diff --git a/web/src/pages/legal/imprint.astro b/web/src/pages/legal/imprint.astro new file mode 100644 index 0000000..f9756fb --- /dev/null +++ b/web/src/pages/legal/imprint.astro @@ -0,0 +1,27 @@ +--- +import Heading from "@/components/Heading.astro"; +import Section from "@/components/Section.astro"; +import RootLayout from "@/layouts/RootLayout.astro"; +import { marked } from "marked"; +const response = await fetch("https://api.enrico.buehler.earth/api/imprint", { + headers: { + "Content-Type": "application/json; charset='utf-8'", + }, +}); + +const json = await response.json(); +const markdownContent = json.data.attributes.content; + +console.log(markdownContent); + +const content = marked.parse(markdownContent); +--- + + +
+ Imprint +
+
+
+
+
diff --git a/web/src/styles/global.css b/web/src/styles/global.css index c7df736..b7cbef2 100644 --- a/web/src/styles/global.css +++ b/web/src/styles/global.css @@ -79,10 +79,26 @@ h4 { @apply text-lg; } -p { - @apply max-w-[600px] text-secondary; -} + [astro-icon] { fill: currentColor; +} + +article { + + & h1, h2, h3, h4, h5 { + @apply mt-6; + } + + & h1, h2, h3, h4, h5, p, ol, ul { + @apply mb-4; + } + +} + +p, +li { + @apply max-w-[600px] mb-6 whitespace-pre-line text-base text-secondary; + line-height: 1.5; } \ No newline at end of file diff --git a/web/yarn.lock b/web/yarn.lock index 3337fc9..31f5c39 100644 --- a/web/yarn.lock +++ b/web/yarn.lock @@ -670,6 +670,11 @@ resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.30.tgz#44cb52f32a809734ca562e685c6473b5754a7818" integrity sha512-sqm9g7mHlPY/43fcSNrCYfOeX9zkTTK+euO5E6+CVijSMm5tTjkVdwdqRkY3ljjIAf8679vps5jKUoJBCLsMDA== +"@types/marked@^5.0.0": + version "5.0.0" + resolved "https://registry.yarnpkg.com/@types/marked/-/marked-5.0.0.tgz#3235b9133054e6586eedabfb77aa7d4a4bafbfcf" + integrity sha512-YcZe50jhltsCq7rc9MNZC/4QB/OnA2Pd6hrOSTOFajtabN+38slqgDDCeE/0F83SjkKBQcsZUj7VLWR0H5cKRA== + "@types/mdast@^3.0.0": version "3.0.11" resolved "https://registry.yarnpkg.com/@types/mdast/-/mdast-3.0.11.tgz#dc130f7e7d9306124286f6d6cee40cf4d14a3dc0" @@ -2052,6 +2057,11 @@ markdown-table@^3.0.0: resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-3.0.3.tgz#e6331d30e493127e031dd385488b5bd326e4a6bd" integrity sha512-Z1NL3Tb1M9wH4XESsCDEksWoKTdlUafKc4pt0GRwjUyXaCFZ+dc3g2erqB6zm3szA2IUSi7VnPI+o/9jnxh9hw== +marked@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/marked/-/marked-5.1.0.tgz#cf51f03ba04dfb3469774029fd0106d258658767" + integrity sha512-z3/nBe7aTI8JDszlYLk7dDVNpngjw0o1ZJtrA9kIfkkHcIF+xH7mO23aISl4WxP83elU+MFROgahqdpd05lMEQ== + mdast-util-definitions@^5.0.0: version "5.1.2" resolved "https://registry.yarnpkg.com/mdast-util-definitions/-/mdast-util-definitions-5.1.2.tgz#9910abb60ac5d7115d6819b57ae0bcef07a3f7a7"