Perform cleanup

This commit is contained in:
Kevin Kandlbinder 2020-12-23 19:02:08 +01:00
parent f1fa8c9121
commit 9b9eed61c7
9 changed files with 66 additions and 17 deletions

View file

@ -5,5 +5,10 @@ module.exports = {
"payPalMail": "kevin@1in9.net", "payPalMail": "kevin@1in9.net",
"siteKeywords": "Kevin Kandlbinder, Kevin, Kandlbinder, Web, Web Developer, Developer, JavaScript, PHP, Java, Photos, Fotos", "siteKeywords": "Kevin Kandlbinder, Kevin, Kandlbinder, Web, Web Developer, Developer, JavaScript, PHP, Java, Photos, Fotos",
"iconPath": "src/images/fullbglogo@10x.png", "iconPath": "src/images/fullbglogo@10x.png",
"languages": ["en", "de"] "languages": ["en", "de"],
"contactEmail": "kevin@kevink.dev",
"contactPhone": "+4941068068004",
"mapsLink": "https://goo.gl/maps/KVq9z1PVaVP2",
"contactTwitter": "Unkn0wnKevin",
"contactGitHub": "Unkn0wnCat"
}; };

BIN
content/images/pplogo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View file

@ -6,7 +6,12 @@ module.exports = {
author: extConfig.siteAuthor, author: extConfig.siteAuthor,
siteUrl: extConfig.siteURL, siteUrl: extConfig.siteURL,
keywords: extConfig.siteKeywords, keywords: extConfig.siteKeywords,
payPalMail: extConfig.payPalMail payPalMail: extConfig.payPalMail,
contactEmail: extConfig.contactEmail,
contactPhone: extConfig.contactPhone,
mapsLink: extConfig.mapsLink,
contactTwitter: extConfig.contactTwitter,
contactGitHub: extConfig.contactGitHub
}, },
assetPrefix: "/assets", assetPrefix: "/assets",
plugins: [ plugins: [

View file

@ -27,5 +27,7 @@
"friends": "Friends", "friends": "Friends",
"friendsDescription": "In this list you can find friends of mine and this site. Feel free to check them out for more interesting projects.", "friendsDescription": "In this list you can find friends of mine and this site. Feel free to check them out for more interesting projects.",
"donate": "Donate", "donate": "Donate",
"donateDescription": "Hey! It looks like you're thinking about donating to me. That's nice of you! If you want your donation to go towards a specific project, feel free to write your wishes into the donation comment." "donateDescription": "Hey! It looks like you're thinking about donating to me. That's nice of you! If you want your donation to go towards a specific project, feel free to write your wishes into the donation comment.",
"donateThanks": "Thanks for donating!",
"donateThanksText": "I really appreciate you appreciating my work and showing it! Feel free to mail me at <1>{{contactEmail}}</1> if you have anything you want to talk about!"
} }

View file

@ -6,7 +6,7 @@ export default function LanguageSwitcher() {
return ( return (
<div class="languageModalInner"> <div class="languageModalInner">
<h2>Languages (<a href="#" class="modalCloseLink">&times;</a>)</h2> <h2>Languages (<a href="#top" class="modalCloseLink">&times;</a>)</h2>
<ul> <ul>
{languages.map((lng) => ( {languages.map((lng) => (
<li key={lng}> <li key={lng}>

View file

@ -15,11 +15,11 @@ export default function Navigation({isHome, module}) {
} }
} }
`} render={data => ( `} render={data => (
<Link to="/" className={"logo" + (module == "home" ? " active" : "")}>{data.site.siteMetadata.title}</Link> <Link to="/" className={"logo" + (module === "home" ? " active" : "")}>{data.site.siteMetadata.title}</Link>
)} /> )} />
<div className="flexSpacer"></div> <div className="flexSpacer"></div>
<Link id="navBtnProjects" to="/projects" className={(module == "projects" ? "active" : "")}><Trans>projects</Trans></Link> <Link id="navBtnProjects" to="/projects" className={(module === "projects" ? "active" : "")}><Trans>projects</Trans></Link>
<Link id="navBtnSocial" to="/social" className={(module == "social" ? "active" : "")}><Trans>social</Trans></Link> <Link id="navBtnSocial" to="/social" className={(module === "social" ? "active" : "")}><Trans>social</Trans></Link>
</nav> </nav>
</div> </div>
); );

View file

@ -12,7 +12,7 @@ export default function DonatePage() {
const {t} = useI18next(); const {t} = useI18next();
const {language, path} = React.useContext(I18nextContext); const {language, path} = React.useContext(I18nextContext);
const { site } = useStaticQuery( const { site, file } = useStaticQuery(
graphql` graphql`
query { query {
site { site {
@ -22,6 +22,13 @@ export default function DonatePage() {
payPalMail payPalMail
} }
} }
file(relativePath: {eq: "images/pplogo.png"}) {
childImageSharp {
resize(width: 240, height: 240, fit: CONTAIN) {
src
}
}
}
} }
` `
) )
@ -40,7 +47,7 @@ export default function DonatePage() {
<div></div> <div></div>
</div> </div>
<a className={styles.donateButton} rel="noopener" id="payPalBtn" href={"https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business="+encodeURIComponent(site.siteMetadata.payPalMail)+"&item_name="+encodeURIComponent(site.siteMetadata.title)+"&currency_code=EUR&image_url="+(encodeURIComponent(site.siteMetadata.siteUrl+logo))+"&return="+(encodeURIComponent(site.siteMetadata.siteUrl+"/"+path+"thank-you/"))+"&rm=0&cancel_return="+(encodeURIComponent(site.siteMetadata.siteUrl+"/"+path))+"&amount="+amount}><span>Donate using PayPal</span><i class="fas fa-fw fa-chevron-right" aria-hidden="true"></i></a> <a className={styles.donateButton} rel="noopener" id="payPalBtn" href={"https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business="+encodeURIComponent(site.siteMetadata.payPalMail)+"&item_name="+encodeURIComponent(site.siteMetadata.title)+"&currency_code=EUR&image_url="+(encodeURIComponent(site.siteMetadata.siteUrl+file.childImageSharp.resize.src))+"&return="+(encodeURIComponent(site.siteMetadata.siteUrl+"/"+path+"thank-you/"))+"&rm=0&cancel_return="+(encodeURIComponent(site.siteMetadata.siteUrl+"/"+path))+"&amount="+amount}><span>Donate using PayPal</span><i class="fas fa-fw fa-chevron-right" aria-hidden="true"></i></a>
</article> </article>
</section> </section>
</Layout> </Layout>

View file

@ -1,9 +1,22 @@
import React from "react" import React from "react"
import Layout from "../../layouts/default"; import Layout from "../../layouts/default";
import { Trans, Link, useI18next } from "gatsby-plugin-react-i18next" import { Trans, Link, useI18next } from "gatsby-plugin-react-i18next"
import {useStaticQuery, graphql} from "gatsby";
export default function ImprintPage() { export default function ImprintPage() {
const { site } = useStaticQuery(
graphql`
query {
site {
siteMetadata {
contactEmail
}
}
}
`
)
let contactEmail = site.siteMetadata.contactEmail;
const {t} = useI18next(); const {t} = useI18next();
return ( return (
<Layout module="donate" title={t("donate")}> <Layout module="donate" title={t("donate")}>
@ -11,7 +24,7 @@ export default function ImprintPage() {
<article> <article>
<h1><Trans>donateThanks</Trans></h1> <h1><Trans>donateThanks</Trans></h1>
<p></p> <p><Trans contactEmail={contactEmail} i18nKey="donateThanksText">donateThanksText<a href={"mailto:"+contactEmail}>{{contactEmail}}</a></Trans></p>
</article> </article>
</section> </section>
</Layout> </Layout>

View file

@ -4,10 +4,27 @@ import Layout from "../layouts/default"
import styles from "./index.module.scss" import styles from "./index.module.scss"
import { Trans, Link } from "gatsby-plugin-react-i18next" import { Trans, Link } from "gatsby-plugin-react-i18next"
import {graphql} from "gatsby";
export const query = graphql`
query {
site {
siteMetadata {
contactEmail
contactPhone
mapsLink
contactTwitter
contactGitHub
}
}
}
`;
// markup
class IndexPage extends React.Component { class IndexPage extends React.Component {
render() { render() {
let meta = this.props.data.site.siteMetadata;
return ( return (
<Layout title="Kevin Kandlbinder" module="home"> <Layout title="Kevin Kandlbinder" module="home">
<section className={styles.heroSection}> <section className={styles.heroSection}>
@ -20,11 +37,11 @@ class IndexPage extends React.Component {
<span className={styles.description}><Trans>homeMe</Trans> <span id="descriptionType"><Trans>homeWebDeveloper</Trans></span>.</span> <span className={styles.description}><Trans>homeMe</Trans> <span id="descriptionType"><Trans>homeWebDeveloper</Trans></span>.</span>
<div className={styles.contactLinks}> <div className={styles.contactLinks}>
<a className={styles.contactLink} href="tel:+4941068068004"><i className="fas fa-fw fa-phone"></i>+49 4106 8068004</a> <a className={styles.contactLink} href={"tel:"+meta.contactPhone}><i className="fas fa-fw fa-phone"></i>{meta.contactPhone}</a>
<a className={styles.contactLink} href="mailto:kevin@kevink.dev?subject=%5Bkevink.dev%5D%20"><i className="far fa-fw fa-envelope"></i>kevin@kevink.dev</a> <a className={styles.contactLink} href={"mailto:"+meta.contactEmail}><i className="far fa-fw fa-envelope"></i>{meta.contactEmail}</a>
<a className={styles.contactLink} href="https://goo.gl/maps/KVq9z1PVaVP2" rel="noopener" target="_blank"><i className="fas fa-fw fa-map-marker-alt"></i><Trans>homeMyLocation</Trans></a> <a className={styles.contactLink} href={meta.mapsLink} rel="noopener" target="_blank"><i className="fas fa-fw fa-map-marker-alt"></i><Trans>homeMyLocation</Trans></a>
<a className={styles.contactLink} href="https://twitter.com/unkn0wnkevin" rel="noopener" target="_blank"><i className="fab fa-fw fa-twitter"></i>@Unkn0wnKevin</a> <a className={styles.contactLink} href={"https://twitter.com/"+meta.contactTwitter} rel="noopener" target="_blank"><i className="fab fa-fw fa-twitter"></i>@{meta.contactTwitter}</a>
<a className={styles.contactLink} href="https://github.com/unkn0wncat" rel="noopener" target="_blank"><i className="fab fa-fw fa-github"></i>Unkn0wnCat</a> <a className={styles.contactLink} href={"https://github.com/"+meta.contactGitHub} rel="noopener" target="_blank"><i className="fab fa-fw fa-github"></i>{meta.contactGitHub}</a>
</div> </div>
</div> </div>
</div> </div>