Remove redundant code

This commit is contained in:
Kevin Kandlbinder 2021-04-12 12:57:10 +00:00 committed by GitHub
parent abb502c863
commit 1e89cccdc9
12 changed files with 375 additions and 377 deletions

View file

@ -66,8 +66,7 @@ const Navigation = ({ isHome }) => {
} }
Navigation.propTypes = { Navigation.propTypes = {
isHome: PropTypes.bool.isRequired, isHome: PropTypes.bool.isRequired
module: PropTypes.string.isRequired
} }
export default Navigation; export default Navigation;

View file

@ -12,7 +12,7 @@ class Layout extends React.Component {
return ( return (
<> <>
<SEO description={this.props.description} lang={this.props.lang} meta={this.props.meta} title={this.props.title} /> <SEO description={this.props.description} lang={this.props.lang} meta={this.props.meta} title={this.props.title} />
<Navigation isHome={this.props.transparentTopbar} module={this.props.module} /> <Navigation isHome={this.props.transparentTopbar} />
<div id="content" role="main"> <div id="content" role="main">
{this.props.children} {this.props.children}
</div> </div>
@ -36,7 +36,6 @@ Layout.propTypes = {
lang: PropTypes.string, lang: PropTypes.string,
meta: PropTypes.arrayOf(PropTypes.object), meta: PropTypes.arrayOf(PropTypes.object),
title: PropTypes.string.isRequired, title: PropTypes.string.isRequired,
module: PropTypes.string.isRequired,
transparentTopbar: PropTypes.bool, transparentTopbar: PropTypes.bool,
children: PropTypes.any.isRequired children: PropTypes.any.isRequired
} }

View file

@ -5,7 +5,7 @@ import Layout from "../layouts/default"
// markup // markup
const NotFoundPage = () => { const NotFoundPage = () => {
return ( return (
<Layout title="Not found" module="error"> <Layout title="Not found">
<section> <section>
<article> <article>
<h1>Page not found</h1> <h1>Page not found</h1>

View file

@ -44,7 +44,7 @@ function DonatePage(props) {
const { site, file } = props.data; const { site, file } = props.data;
return ( return (
<Layout module="donate" title={t("donate")} description={t("donationCatchphrase")}> <Layout title={t("donate")} description={t("donationCatchphrase")}>
<section> <section>
<article> <article>
<h1><Trans>donate</Trans></h1> <h1><Trans>donate</Trans></h1>

View file

@ -29,7 +29,7 @@ function ThankYouPage(props) {
let contactEmail = site.siteMetadata.contactEmail; let contactEmail = site.siteMetadata.contactEmail;
const { t } = useI18next(); const { t } = useI18next();
return ( return (
<Layout module="donate" title={t("donate")}> <Layout title={t("donate")}>
<section> <section>
<article> <article>
<h1><Trans>donateThanks</Trans></h1> <h1><Trans>donateThanks</Trans></h1>

View file

@ -42,7 +42,7 @@ const FriendsPage = ({ data }) => {
} }
return ( return (
<Layout module="social" title={t("friends")} description={t("friendsDescription")}> <Layout title={t("friends")} description={t("friendsDescription")}>
<section> <section>
<article> <article>
<h1><Trans>social</Trans></h1> <h1><Trans>social</Trans></h1>

View file

@ -82,7 +82,7 @@ class IndexPage extends React.Component {
let meta = this.props.data.site.siteMetadata; let meta = this.props.data.site.siteMetadata;
return ( return (
<Layout title="Kevin Kandlbinder" module="home" transparentTopbar={true}> <Layout title="Kevin Kandlbinder" transparentTopbar={true}>
<section className={styles.heroSection}> <section className={styles.heroSection}>
<div className={styles.profile + " profile"}> <div className={styles.profile + " profile"}>
<div data-bg="url(https://cdn.kevink.dev/images/kevin/kevin-kandlbinder-03.jpg)" style={{ backgroundImage: "url(https://cdn.kevink.dev/images/kevin/kevin-kandlbinder-03.jpg)" }} className={styles.profileImage + " lazy"}></div> <div data-bg="url(https://cdn.kevink.dev/images/kevin/kevin-kandlbinder-03.jpg)" style={{ backgroundImage: "url(https://cdn.kevink.dev/images/kevin/kevin-kandlbinder-03.jpg)" }} className={styles.profileImage + " lazy"}></div>

View file

@ -21,7 +21,7 @@ export default function ImprintPage() {
const { t } = useI18next(); const { t } = useI18next();
return ( return (
<Layout module="legal" title={t("imprint")}> <Layout title={t("imprint")}>
<section> <section>
<article> <article>
<h1><Trans>imprint</Trans></h1> <h1><Trans>imprint</Trans></h1>

View file

@ -21,7 +21,7 @@ export default function DataSecPage() {
const { t } = useI18next(); const { t } = useI18next();
return ( return (
<Layout module="legal" title={t("datasec")}> <Layout title={t("datasec")}>
<section> <section>
<article> <article>
<h1><Trans>datasec</Trans></h1> <h1><Trans>datasec</Trans></h1>

View file

@ -21,7 +21,7 @@ export default function DisclaimerPage() {
const { t } = useI18next(); const { t } = useI18next();
return ( return (
<Layout module="legal" title={t("disclaimer")}> <Layout title={t("disclaimer")}>
<section> <section>
<article> <article>
<h1><Trans>disclaimer</Trans></h1> <h1><Trans>disclaimer</Trans></h1>

View file

@ -39,7 +39,7 @@ const ProjectsPage = ({ data }) => {
const { t } = useI18next(); const { t } = useI18next();
return ( return (
<Layout module="projects" title={t("projects")} description={t("projectsDescription")}> <Layout title={t("projects")} description={t("projectsDescription")}>
<section> <section>
<article> <article>
<h1><Trans>projects</Trans></h1> <h1><Trans>projects</Trans></h1>

View file

@ -32,7 +32,7 @@ const SocialPage = ({ data }) => {
const { t } = useI18next(); const { t } = useI18next();
return ( return (
<Layout module="social" title={t("social")} description={t("socialDescription")}> <Layout title={t("social")} description={t("socialDescription")}>
<section> <section>
<article> <article>
<h1><Trans>social</Trans></h1> <h1><Trans>social</Trans></h1>