From 06a2bd793f25abd431fed9d40f0a1dc9699893cb Mon Sep 17 00:00:00 2001 From: Kevin Kandlbinder Date: Sun, 7 Nov 2021 00:51:00 +0000 Subject: [PATCH] Cleanup code --- gatsby-config.js | 12 --- src/components/navigation.js | 24 +----- src/components/offscreenNav.js | 28 ++---- src/pages/about.js | 2 +- src/pages/donate/thank-you.js | 6 +- src/pages/friends.js | 152 ++++++++++++++------------------- src/pages/index.js | 1 - src/pages/index.module.scss | 4 - src/pages/legal/about.js | 4 +- src/pages/legal/datasec.js | 4 +- src/pages/legal/disclaimer.js | 4 +- src/templates/blogPost.js | 5 -- 12 files changed, 86 insertions(+), 160 deletions(-) diff --git a/gatsby-config.js b/gatsby-config.js index 68f85b0..1ab89cb 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -102,18 +102,6 @@ module.exports = { }, }, `gatsby-plugin-robots-txt`, - /*{ - resolve: `gatsby-plugin-offline`, - options: { - precachePages: [ - "/", - "/en", - "/en/projects", - "/de", - "/de/projects", - ], - }, - },*/ `gatsby-plugin-sitemap`, `gatsby-plugin-react-helmet`, { diff --git a/src/components/navigation.js b/src/components/navigation.js index 4c437a1..7a24412 100644 --- a/src/components/navigation.js +++ b/src/components/navigation.js @@ -83,32 +83,16 @@ const Navigation = ({ isHome }) => { )} />
- + about.title - + project.plural - + social.title - + blog.title
diff --git a/src/components/offscreenNav.js b/src/components/offscreenNav.js index 3cccf9c..ffa7969 100644 --- a/src/components/offscreenNav.js +++ b/src/components/offscreenNav.js @@ -26,32 +26,16 @@ const OffScreenNav = ({ active, close }) => { home.title - + about.title - - projects + + project.plural - - social + + social.title - + blog.title
diff --git a/src/pages/about.js b/src/pages/about.js index 3e421ef..5160b25 100644 --- a/src/pages/about.js +++ b/src/pages/about.js @@ -111,7 +111,7 @@ const AboutPage = (props) => { xPath: ["article"], }} > -
+
{file.childMdx.body} diff --git a/src/pages/donate/thank-you.js b/src/pages/donate/thank-you.js index 9066a60..5cb1606 100644 --- a/src/pages/donate/thank-you.js +++ b/src/pages/donate/thank-you.js @@ -29,17 +29,17 @@ const ThankYouPage = (props) => { let contactEmail = site.siteMetadata.contactEmail; const { t } = useI18next(); return ( - +

- donateThanks + donate.thanks

donateThanksText diff --git a/src/pages/friends.js b/src/pages/friends.js index b811475..fc1099a 100644 --- a/src/pages/friends.js +++ b/src/pages/friends.js @@ -41,14 +41,6 @@ export const query = graphql` const FriendsPage = ({ data }) => { const { t } = useI18next(); - /*function shuffle(a) { - for (let i = a.length - 1; i > 0; i--) { - const j = Math.floor(Math.random() * (i + 1)); - [a[i], a[j]] = [a[j], a[i]]; - } - return a; - }*/ - return ( {

- { - /*shuffle(*/ data.allFriendsJson.nodes /*)*/ - .map((friend) => { - return ( -
-
-
- -
- - {friend.name} - - - {friend.profession} - -
- -
+ {data.allFriendsJson.nodes.map((friend) => { + return ( +
+
+
+
- ); - }) - } + + {friend.name} + + + {friend.profession} + +
+ + +
+ ); + })}
diff --git a/src/pages/index.js b/src/pages/index.js index 1c66807..beea1ee 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -97,7 +97,6 @@ const IndexPage = (props) => { className={styles.heroSectionBg} id="particle-container" >
- {/*
*/}
+

- imprint + layout.imprint

Angaben gemäß § 5 TMG

diff --git a/src/pages/legal/datasec.js b/src/pages/legal/datasec.js index afdbafd..207dfd5 100644 --- a/src/pages/legal/datasec.js +++ b/src/pages/legal/datasec.js @@ -20,11 +20,11 @@ export const query = graphql` export default function DataSecPage() { const { t } = useI18next(); return ( - +

- datasec + layout.datasec

diff --git a/src/pages/legal/disclaimer.js b/src/pages/legal/disclaimer.js index 99ec147..35af15c 100644 --- a/src/pages/legal/disclaimer.js +++ b/src/pages/legal/disclaimer.js @@ -20,11 +20,11 @@ export const query = graphql` export default function DisclaimerPage() { const { t } = useI18next(); return ( - +

- disclaimer + layout.disclaimer

Haftung für Inhalte

diff --git a/src/templates/blogPost.js b/src/templates/blogPost.js index 2a1245a..19e6902 100644 --- a/src/templates/blogPost.js +++ b/src/templates/blogPost.js @@ -24,11 +24,6 @@ const BlogPost = ({ data }) => { "@context": "https://schema.org", "@type": "NewsArticle", headline: data.mdx.frontmatter.title, - /*"image": [ - "https://example.com/photos/1x1/photo.jpg", - "https://example.com/photos/4x3/photo.jpg", - "https://example.com/photos/16x9/photo.jpg" - ],*/ datePublished: data.mdx.frontmatter.publishedIso, dateModified: data.mdx.frontmatter.publishedIso, author: [