Cleanup code

This commit is contained in:
Kevin Kandlbinder 2021-11-07 00:51:00 +00:00 committed by GitHub
parent de5056c440
commit 06a2bd793f
12 changed files with 86 additions and 160 deletions

View file

@ -102,18 +102,6 @@ module.exports = {
}, },
}, },
`gatsby-plugin-robots-txt`, `gatsby-plugin-robots-txt`,
/*{
resolve: `gatsby-plugin-offline`,
options: {
precachePages: [
"/",
"/en",
"/en/projects",
"/de",
"/de/projects",
],
},
},*/
`gatsby-plugin-sitemap`, `gatsby-plugin-sitemap`,
`gatsby-plugin-react-helmet`, `gatsby-plugin-react-helmet`,
{ {

View file

@ -83,32 +83,16 @@ const Navigation = ({ isHome }) => {
)} )}
/> />
<div className="flexSpacer"></div> <div className="flexSpacer"></div>
<Link <Link to="/about" activeClassName={styles.active}>
id="navBtnProjects"
to="/about"
activeClassName={styles.active}
>
<Trans>about.title</Trans> <Trans>about.title</Trans>
</Link> </Link>
<Link <Link to="/projects" activeClassName={styles.active}>
id="navBtnProjects"
to="/projects"
activeClassName={styles.active}
>
<Trans>project.plural</Trans> <Trans>project.plural</Trans>
</Link> </Link>
<Link <Link to="/social" activeClassName={styles.active}>
id="navBtnSocial"
to="/social"
activeClassName={styles.active}
>
<Trans>social.title</Trans> <Trans>social.title</Trans>
</Link> </Link>
<Link <Link to="/blog" activeClassName={styles.active}>
id="navBtnBlog"
to="/blog"
activeClassName={styles.active}
>
<Trans>blog.title</Trans> <Trans>blog.title</Trans>
</Link> </Link>
<div className={styles.hamburger}> <div className={styles.hamburger}>

View file

@ -26,32 +26,16 @@ const OffScreenNav = ({ active, close }) => {
<Link to="/" activeClassName={styles.active}> <Link to="/" activeClassName={styles.active}>
<Trans>home.title</Trans> <Trans>home.title</Trans>
</Link> </Link>
<Link <Link to="/about" activeClassName={styles.active}>
id="osnavBtnProjects"
to="/about"
activeClassName={styles.active}
>
<Trans>about.title</Trans> <Trans>about.title</Trans>
</Link> </Link>
<Link <Link to="/projects" activeClassName={styles.active}>
id="osnavBtnProjects" <Trans>project.plural</Trans>
to="/projects"
activeClassName={styles.active}
>
<Trans>projects</Trans>
</Link> </Link>
<Link <Link to="/social" activeClassName={styles.active}>
id="osnavBtnSocial" <Trans>social.title</Trans>
to="/social"
activeClassName={styles.active}
>
<Trans>social</Trans>
</Link> </Link>
<Link <Link to="/blog" activeClassName={styles.active}>
id="osnavBtnBlog"
to="/blog"
activeClassName={styles.active}
>
<Trans>blog.title</Trans> <Trans>blog.title</Trans>
</Link> </Link>
</div> </div>

View file

@ -111,7 +111,7 @@ const AboutPage = (props) => {
xPath: ["article"], xPath: ["article"],
}} }}
> >
<section className={styles.aboutSection} id="about"> <section className={styles.aboutSection}>
<article> <article>
<div className={styles.aboutText}> <div className={styles.aboutText}>
<MDXRenderer>{file.childMdx.body}</MDXRenderer> <MDXRenderer>{file.childMdx.body}</MDXRenderer>

View file

@ -29,17 +29,17 @@ const ThankYouPage = (props) => {
let contactEmail = site.siteMetadata.contactEmail; let contactEmail = site.siteMetadata.contactEmail;
const { t } = useI18next(); const { t } = useI18next();
return ( return (
<Layout title={t("donate")}> <Layout title={t("donate.thanks")}>
<section> <section>
<article> <article>
<h1> <h1>
<Trans>donateThanks</Trans> <Trans>donate.thanks</Trans>
</h1> </h1>
<p> <p>
<Trans <Trans
contactEmail={contactEmail} contactEmail={contactEmail}
i18nKey="donateThanksText" i18nKey="donate.thanksText"
> >
donateThanksText donateThanksText
<a href={"mailto:" + contactEmail}> <a href={"mailto:" + contactEmail}>

View file

@ -41,14 +41,6 @@ export const query = graphql`
const FriendsPage = ({ data }) => { const FriendsPage = ({ data }) => {
const { t } = useI18next(); 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 ( return (
<Layout <Layout
title={t("friends.title")} title={t("friends.title")}
@ -65,85 +57,73 @@ const FriendsPage = ({ data }) => {
</p> </p>
<div className={styles.friendsList}> <div className={styles.friendsList}>
{ {data.allFriendsJson.nodes.map((friend) => {
/*shuffle(*/ data.allFriendsJson.nodes /*)*/ return (
.map((friend) => { <div
return ( className={styles.friendProfile}
<div key={friend.url + "#" + friend.name}
className={styles.friendProfile} >
key={friend.url + "#" + friend.name} <div
> className={styles.friendImage}
<div key={
className={styles.friendImage} friend.url +
key={ "#" +
friend.url + friend.name +
"#" + "#image"
friend.name + }
"#image" >
} <div className={styles.friendBg}>
> <GatsbyImage
<div image={getImage(
className={styles.friendBg} friend.localImage
> )}
<GatsbyImage ></GatsbyImage>
image={getImage(
friend.localImage
)}
></GatsbyImage>
</div>
<span
className={
styles.friendName
}
key={
friend.url +
"#" +
friend.name +
"#name"
}
>
{friend.name}
</span>
<span
className={
styles.friendTitle
}
key={
friend.url +
"#" +
friend.name +
"#profession"
}
>
{friend.profession}
</span>
</div>
<div
className={styles.contactLinks}
key={
friend.url +
"#" +
friend.name +
"#links"
}
>
<a
className={
styles.contactLink
}
href={friend.url}
target="_blank"
rel="noreferrer"
>
<Globe2 height={20} />{" "}
{friend.url}
</a>
</div>
</div> </div>
); <span
}) className={styles.friendName}
} key={
friend.url +
"#" +
friend.name +
"#name"
}
>
{friend.name}
</span>
<span
className={styles.friendTitle}
key={
friend.url +
"#" +
friend.name +
"#profession"
}
>
{friend.profession}
</span>
</div>
<div
className={styles.contactLinks}
key={
friend.url +
"#" +
friend.name +
"#links"
}
>
<a
className={styles.contactLink}
href={friend.url}
target="_blank"
rel="noreferrer"
>
<Globe2 height={20} /> {friend.url}
</a>
</div>
</div>
);
})}
</div> </div>
</article> </article>
</section> </section>

View file

@ -97,7 +97,6 @@ const IndexPage = (props) => {
className={styles.heroSectionBg} className={styles.heroSectionBg}
id="particle-container" id="particle-container"
></div> ></div>
{/*<div className={styles.heroSectionBgOver}></div>*/}
<div className={styles.profile + " profile"}> <div className={styles.profile + " profile"}>
<div className={styles.profileImage}> <div className={styles.profileImage}>
<StaticImage <StaticImage

View file

@ -30,8 +30,6 @@
} }
.heroSectionBg { .heroSectionBg {
/*background: radial-gradient(ellipse at top left, #1f0ba659, transparent),
radial-gradient(ellipse at bottom right, #4a086829, transparent);*/
background: linear-gradient(45deg, #000850 0%, #000320 100%), background: linear-gradient(45deg, #000850 0%, #000320 100%),
radial-gradient(100% 225% at 100% 0%, #ff6928 0%, #000000 100%), radial-gradient(100% 225% at 100% 0%, #ff6928 0%, #000000 100%),
@ -53,8 +51,6 @@
.heroSectionBgOver { .heroSectionBgOver {
bottom: 0; bottom: 0;
height: 150px; height: 150px;
/*background-color: $background;
transition: background-color 0.25s, box-shadow 0.25s;*/
@media (max-width: 950px) { @media (max-width: 950px) {
display: none; display: none;

View file

@ -20,11 +20,11 @@ export const query = graphql`
export default function ImprintPage() { export default function ImprintPage() {
const { t } = useI18next(); const { t } = useI18next();
return ( return (
<Layout title={t("imprint")}> <Layout title={t("layout.imprint")}>
<section> <section>
<article> <article>
<h1> <h1>
<Trans>imprint</Trans> <Trans>layout.imprint</Trans>
</h1> </h1>
<p>Angaben gemäß § 5 TMG</p> <p>Angaben gemäß § 5 TMG</p>

View file

@ -20,11 +20,11 @@ export const query = graphql`
export default function DataSecPage() { export default function DataSecPage() {
const { t } = useI18next(); const { t } = useI18next();
return ( return (
<Layout title={t("datasec")}> <Layout title={t("layout.datasec")}>
<section> <section>
<article> <article>
<h1> <h1>
<Trans>datasec</Trans> <Trans>layout.datasec</Trans>
</h1> </h1>
<h3 id="dsg-general-intro"></h3> <h3 id="dsg-general-intro"></h3>

View file

@ -20,11 +20,11 @@ export const query = graphql`
export default function DisclaimerPage() { export default function DisclaimerPage() {
const { t } = useI18next(); const { t } = useI18next();
return ( return (
<Layout title={t("disclaimer")}> <Layout title={t("layout.disclaimer")}>
<section> <section>
<article> <article>
<h1> <h1>
<Trans>disclaimer</Trans> <Trans>layout.disclaimer</Trans>
</h1> </h1>
<h2>Haftung für Inhalte</h2> <h2>Haftung für Inhalte</h2>

View file

@ -24,11 +24,6 @@ const BlogPost = ({ data }) => {
"@context": "https://schema.org", "@context": "https://schema.org",
"@type": "NewsArticle", "@type": "NewsArticle",
headline: data.mdx.frontmatter.title, 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, datePublished: data.mdx.frontmatter.publishedIso,
dateModified: data.mdx.frontmatter.publishedIso, dateModified: data.mdx.frontmatter.publishedIso,
author: [ author: [