diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..2a745da --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "i18n-ally.localesPaths": "locales" +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 06879f7..8e10284 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12511,9 +12511,9 @@ } }, "gatsby-plugin-sass": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/gatsby-plugin-sass/-/gatsby-plugin-sass-4.0.1.tgz", - "integrity": "sha512-QZiak/7eL58QUZy+y5zTlTWk+qiE/xtXa/eS+CvHP09hbxtGeVn2Ea3XQ9upHxM2TjKaWQJ00EjnKnoVKoxzVQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/gatsby-plugin-sass/-/gatsby-plugin-sass-4.0.0.tgz", + "integrity": "sha512-q2FIQFFU7FMgX8jMGUCsBMUcmdNdVertE1HnViiriB1x5FagUJUUJe9Z6Irq14h0LfSL2Z1Lg8iQzgxSX30djw==", "requires": { "@babel/runtime": "^7.12.5", "resolve-url-loader": "^3.1.2", diff --git a/package.json b/package.json index c33d36e..d5df975 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "gatsby-plugin-react-helmet": "4.0.0", "gatsby-plugin-react-i18next": "1.0.4", "gatsby-plugin-robots-txt": "1.5.5", - "gatsby-plugin-sass": "4.0.1", + "gatsby-plugin-sass": "^4.0.0", "gatsby-plugin-sharp": "3.0.0", "gatsby-plugin-sitemap": "3.0.0", "gatsby-source-filesystem": "3.0.0", diff --git a/src/pages/donate.js b/src/pages/donate.js index 40e2d63..ed2c710 100644 --- a/src/pages/donate.js +++ b/src/pages/donate.js @@ -1,69 +1,69 @@ -import React, { useState } from "react" -import Layout from "../layouts/default"; -import { graphql } from "gatsby"; -import { Trans, useI18next, I18nextContext } from "gatsby-plugin-react-i18next" -import PropTypes from "prop-types" - -import styles from "./donate.module.scss"; - -export const query = graphql` -query ($language: String!) { - site { - siteMetadata { - title - siteUrl - payPalMail - } - } - file(relativePath: {eq: "images/pplogo.png"}) { - childImageSharp { - resize(width: 240, height: 240, fit: CONTAIN) { - src - } - } - } - locales: allLocale(filter: {language: {eq: $language}}) { - edges { - node { - ns - data - language - } - } - } -} -`; - -function DonatePage(props) { - const [amount, setAmount] = useState(5); - const { t } = useI18next(); - const { path } = React.useContext(I18nextContext); - - const { site, file } = props.data; - - return ( - -
-
-

donate

- -

donateDescription

- -
- - { setAmount(ev.target.value) }} name="priceInput" id="priceInput" /> -
-
- - -
-
-
- ); -} - -DonatePage.propTypes = { - data: PropTypes.object.isRequired -}; - +import React, { useState } from "react" +import Layout from "../layouts/default"; +import { graphql } from "gatsby"; +import { Trans, useI18next, I18nextContext } from "gatsby-plugin-react-i18next" +import PropTypes from "prop-types" + +import * as styles from "./donate.module.scss"; + +export const query = graphql` +query ($language: String!) { + site { + siteMetadata { + title + siteUrl + payPalMail + } + } + file(relativePath: {eq: "images/pplogo.png"}) { + childImageSharp { + resize(width: 240, height: 240, fit: CONTAIN) { + src + } + } + } + locales: allLocale(filter: {language: {eq: $language}}) { + edges { + node { + ns + data + language + } + } + } +} +`; + +function DonatePage(props) { + const [amount, setAmount] = useState(5); + const { t } = useI18next(); + const { path } = React.useContext(I18nextContext); + + const { site, file } = props.data; + + return ( + +
+
+

donate

+ +

donateDescription

+ +
+ + { setAmount(ev.target.value) }} name="priceInput" id="priceInput" /> +
+
+ + +
+
+
+ ); +} + +DonatePage.propTypes = { + data: PropTypes.object.isRequired +}; + export default DonatePage; \ No newline at end of file diff --git a/src/pages/friends.js b/src/pages/friends.js index 0fb1b91..d4139de 100644 --- a/src/pages/friends.js +++ b/src/pages/friends.js @@ -1,83 +1,83 @@ -import React from "react" -import Layout from "../layouts/default"; -import { Trans, useI18next } from "gatsby-plugin-react-i18next" -import { graphql } from 'gatsby' -import PropTypes from "prop-types" - -import styles from "./friends.module.scss"; - -export const query = graphql` -query AllFriendsQuery($language: String!) { - allFriendsJson { - nodes { - name - profession - url - imageURL - } - } - locales: allLocale(filter: {language: {eq: $language}}) { - edges { - node { - ns - data - language - } - } - } - } - -` - -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 ( - -
-
-

social

- -

friendsDescription

- -
- { - shuffle(data.allFriendsJson.nodes).map((friend) => { - return ( -
-
- {friend.name} - {friend.profession} -
- - {/**/} - -
- ); - }) - } -
- - {/*
{JSON.stringify(data, null, 2)}
*/} -
-
-
- ); -} - -FriendsPage.propTypes = { - data: PropTypes.object.isRequired -}; - +import React from "react" +import Layout from "../layouts/default"; +import { Trans, useI18next } from "gatsby-plugin-react-i18next" +import { graphql } from 'gatsby' +import PropTypes from "prop-types" + +import * as styles from "./friends.module.scss"; + +export const query = graphql` +query AllFriendsQuery($language: String!) { + allFriendsJson { + nodes { + name + profession + url + imageURL + } + } + locales: allLocale(filter: {language: {eq: $language}}) { + edges { + node { + ns + data + language + } + } + } + } + +` + +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 ( + +
+
+

social

+ +

friendsDescription

+ +
+ { + shuffle(data.allFriendsJson.nodes).map((friend) => { + return ( +
+
+ {friend.name} + {friend.profession} +
+ + {/**/} + +
+ ); + }) + } +
+ + {/*
{JSON.stringify(data, null, 2)}
*/} +
+
+
+ ); +} + +FriendsPage.propTypes = { + data: PropTypes.object.isRequired +}; + export default FriendsPage; \ No newline at end of file diff --git a/src/pages/index.js b/src/pages/index.js index 4fa4333..d7540a0 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -1,157 +1,157 @@ -import * as React from "react" -import Layout from "../layouts/default" -import PropTypes from "prop-types" - -import styles from "./index.module.scss" -import projectStyles from "./projects.module.scss" - -import { Trans, Link } from "gatsby-plugin-react-i18next" -import { graphql } from "gatsby"; - -import anime from "animejs"; - - -export const query = graphql` - query GetMetaAndProjects($language: String) { - site { - siteMetadata { - contactEmail - contactPhone - mapsLink - contactTwitter - contactGitHub - contactMastodon - contactMastodonHref - } - } - allProjectsJson(filter: {lang: {eq: $language}, featured: {gte: 0}}, sort: {fields: featured, order: ASC}) { - nodes { - lang - urlname - name - image { - childImageSharp { - resize(width: 400, quality: 90) { - src - } - } - } - shortDescription - featured - } - } - locales: allLocale(filter: {language: {eq: $language}}) { - edges { - node { - ns - data - language - } - } - } - } -`; - -class IndexPage extends React.Component { - componentDidMount() { - anime({ - targets: ["."+styles.profileCard+" > span", "."+styles.profileCard+" a"], - opacity: [0, 1], - translateX: [100, 0], - duration: 250, - delay: anime.stagger(20), - easing: 'easeInOutCirc' - }); - anime({ - targets: ["."+styles.profileImageDummy], - translateX: [0, -3], - translateY: [0, 3], - duration: 250, - easing: 'easeInOutCirc' - }); - anime({ - targets: ["."+styles.profileImage], - translateX: [0, 4], - translateY: [0, -4], - duration: 250, - easing: 'easeInOutCirc' - }); - } - - render() { - let meta = this.props.data.site.siteMetadata; - - return ( - -
-
-
-
-
- homeHello - Kevin Kandlbinder - homeMe homeWebDeveloper. - -
- {meta.contactPhone} - {meta.contactEmail} - homeMyLocation - {meta.contactMastodon} - {meta.contactGitHub} -
-
-
-
-
-
-

homeAboutMe

-

homeAboutMeHello
homeAboutMeText

-
-
- -
- homeImageCredit - -
-
-
-
-

featuredProjects

-
- {this.props.data.allProjectsJson.nodes.map((project) => { - return ( - - {/*
Live
*/} -
-
- {project.name} - {project.shortDescription} -
-
- - {/*
-
projectView
-
*/} - - ); - })} -
- seeMore -
-
- -
- donationCatchphrase - -
- -
- ) - } -} - -IndexPage.propTypes = { - data: PropTypes.object.isRequired -} - -export default IndexPage +import * as React from "react" +import Layout from "../layouts/default" +import PropTypes from "prop-types" + +import * as styles from "./index.module.scss" +import * as projectStyles from "./projects.module.scss" + +import { Trans, Link } from "gatsby-plugin-react-i18next" +import { graphql } from "gatsby"; + +import anime from "animejs"; + + +export const query = graphql` + query GetMetaAndProjects($language: String) { + site { + siteMetadata { + contactEmail + contactPhone + mapsLink + contactTwitter + contactGitHub + contactMastodon + contactMastodonHref + } + } + allProjectsJson(filter: {lang: {eq: $language}, featured: {gte: 0}}, sort: {fields: featured, order: ASC}) { + nodes { + lang + urlname + name + image { + childImageSharp { + resize(width: 400, quality: 90) { + src + } + } + } + shortDescription + featured + } + } + locales: allLocale(filter: {language: {eq: $language}}) { + edges { + node { + ns + data + language + } + } + } + } +`; + +class IndexPage extends React.Component { + componentDidMount() { + anime({ + targets: ["."+styles.profileCard+" > span", "."+styles.profileCard+" a"], + opacity: [0, 1], + translateX: [100, 0], + duration: 250, + delay: anime.stagger(20), + easing: 'easeInOutCirc' + }); + anime({ + targets: ["."+styles.profileImageDummy], + translateX: [0, -3], + translateY: [0, 3], + duration: 250, + easing: 'easeInOutCirc' + }); + anime({ + targets: ["."+styles.profileImage], + translateX: [0, 4], + translateY: [0, -4], + duration: 250, + easing: 'easeInOutCirc' + }); + } + + render() { + let meta = this.props.data.site.siteMetadata; + + return ( + +
+
+
+
+
+ homeHello + Kevin Kandlbinder + homeMe homeWebDeveloper. + +
+ {meta.contactPhone} + {meta.contactEmail} + homeMyLocation + {meta.contactMastodon} + {meta.contactGitHub} +
+
+
+
+
+
+

homeAboutMe

+

homeAboutMeHello
homeAboutMeText

+
+
+ +
+ homeImageCredit + +
+
+
+
+

featuredProjects

+
+ {this.props.data.allProjectsJson.nodes.map((project) => { + return ( + + {/*
Live
*/} +
+
+ {project.name} + {project.shortDescription} +
+
+ + {/*
+
projectView
+
*/} + + ); + })} +
+ seeMore +
+
+ +
+ donationCatchphrase + +
+ +
+ ) + } +} + +IndexPage.propTypes = { + data: PropTypes.object.isRequired +} + +export default IndexPage diff --git a/src/pages/projects.js b/src/pages/projects.js index 94a02a8..1fac809 100644 --- a/src/pages/projects.js +++ b/src/pages/projects.js @@ -1,80 +1,80 @@ -import React from "react" -import Layout from "../layouts/default"; -import { Trans, Link, useI18next } from "gatsby-plugin-react-i18next" -import { graphql } from 'gatsby' -import PropTypes from "prop-types" - -import styles from "./projects.module.scss"; - -export const query = graphql` -query GetProjects($language: String) { - allProjectsJson(filter: {lang: {eq: $language}}) { - nodes { - lang - urlname - name - image { - childImageSharp { - resize(width: 400, quality: 90) { - src - } - } - } - shortDescription - } - } - locales: allLocale(filter: {language: {eq: $language}}) { - edges { - node { - ns - data - language - } - } - } -} -` - -const ProjectsPage = ({ data }) => { - - const { t } = useI18next(); - return ( - -
-
-

projects

- -

projectsDescription

- -
- {data.allProjectsJson.nodes.map((project) => { - return ( - - {/*
Live
*/} -
-
- {project.name} - {project.shortDescription} -
-
- - {/*
-
projectView
-
*/} - - ); - })} -
- - {/*
{JSON.stringify(data, null, 2)}
*/} -
-
-
- ); -} - -ProjectsPage.propTypes = { - data: PropTypes.object -} - +import React from "react" +import Layout from "../layouts/default"; +import { Trans, Link, useI18next } from "gatsby-plugin-react-i18next" +import { graphql } from 'gatsby' +import PropTypes from "prop-types" + +import * as styles from "./projects.module.scss"; + +export const query = graphql` +query GetProjects($language: String) { + allProjectsJson(filter: {lang: {eq: $language}}) { + nodes { + lang + urlname + name + image { + childImageSharp { + resize(width: 400, quality: 90) { + src + } + } + } + shortDescription + } + } + locales: allLocale(filter: {language: {eq: $language}}) { + edges { + node { + ns + data + language + } + } + } +} +` + +const ProjectsPage = ({ data }) => { + + const { t } = useI18next(); + return ( + +
+
+

projects

+ +

projectsDescription

+ +
+ {data.allProjectsJson.nodes.map((project) => { + return ( + + {/*
Live
*/} +
+
+ {project.name} + {project.shortDescription} +
+
+ + {/*
+
projectView
+
*/} + + ); + })} +
+ + {/*
{JSON.stringify(data, null, 2)}
*/} +
+
+
+ ); +} + +ProjectsPage.propTypes = { + data: PropTypes.object +} + export default ProjectsPage; \ No newline at end of file diff --git a/src/pages/social.js b/src/pages/social.js index df71578..1fc107e 100644 --- a/src/pages/social.js +++ b/src/pages/social.js @@ -1,68 +1,68 @@ -import React from "react" -import Layout from "../layouts/default"; -import { Trans, Link, useI18next } from "gatsby-plugin-react-i18next" -import { graphql } from 'gatsby' -import PropTypes from "prop-types" - -import styles from "./social.module.scss"; - -export const query = graphql` -query AllSocialsQuery($language: String!) { - allSocialsJson { - nodes { - image - platformHandle - platformName - url - } - } - locales: allLocale(filter: {language: {eq: $language}}) { - edges { - node { - ns - data - language - } - } - } - } -` - -const SocialPage = ({ data }) => { - - const { t } = useI18next(); - return ( - -
- -
-
- ); -} - -SocialPage.propTypes = { - data: PropTypes.object.isRequired -}; - +import React from "react" +import Layout from "../layouts/default"; +import { Trans, Link, useI18next } from "gatsby-plugin-react-i18next" +import { graphql } from 'gatsby' +import PropTypes from "prop-types" + +import * as styles from "./social.module.scss"; + +export const query = graphql` +query AllSocialsQuery($language: String!) { + allSocialsJson { + nodes { + image + platformHandle + platformName + url + } + } + locales: allLocale(filter: {language: {eq: $language}}) { + edges { + node { + ns + data + language + } + } + } + } +` + +const SocialPage = ({ data }) => { + + const { t } = useI18next(); + return ( + +
+ +
+
+ ); +} + +SocialPage.propTypes = { + data: PropTypes.object.isRequired +}; + export default SocialPage; \ No newline at end of file diff --git a/src/templates/project.js b/src/templates/project.js index 14cc053..7e5e4b0 100644 --- a/src/templates/project.js +++ b/src/templates/project.js @@ -1,92 +1,92 @@ -import React from "react" -import { graphql } from "gatsby" -import { Trans, useTranslation } from 'gatsby-plugin-react-i18next'; -import Layout from "../layouts/default"; -import PropTypes from "prop-types" - -import styles from "./project.module.scss"; - -export const query = graphql` -query GetProject($urlname: String!, $lang: String!, $language: String!) { - allProjectsJson(filter: {urlname: {eq: $urlname}, lang: {eq: $lang}}) { - nodes { - lang - urlname - name - links { - github - website - } - image { - publicURL - } - longDescription - shortDescription - } - } - locales: allLocale(filter: {language: {eq: $language}}) { - edges { - node { - ns - data - language - } - } - } -} -` - -const ProjectTemplate = ({ data }) => { - const { t } = useTranslation(); - let project = data.allProjectsJson.nodes[0]; - let projectName = project.name; - - return ( - -
-
-
-
-
-

project: {projectName}

- {project.shortDescription} -
-
-
-
-
- {project.longDescription != null ? -
-
-

projectAboutHeader{{ projectName }}

-

{project.longDescription}

-
-
- : null} - {project.links !== null ? -
-
-

Links

-
- {project.links.github !== null ? projectViewGitHub : null} - {project.links.website !== null ? projectViewWebsite : null} - -
-
-
- : null} - {/*
-
- -
{JSON.stringify(data, null, 2)}
-
-
*/} -
- ); -} - -ProjectTemplate.propTypes = { - data: PropTypes.object.isRequired -} - +import React from "react" +import { graphql } from "gatsby" +import { Trans, useTranslation } from 'gatsby-plugin-react-i18next'; +import Layout from "../layouts/default"; +import PropTypes from "prop-types" + +import * as styles from "./project.module.scss"; + +export const query = graphql` +query GetProject($urlname: String!, $lang: String!, $language: String!) { + allProjectsJson(filter: {urlname: {eq: $urlname}, lang: {eq: $lang}}) { + nodes { + lang + urlname + name + links { + github + website + } + image { + publicURL + } + longDescription + shortDescription + } + } + locales: allLocale(filter: {language: {eq: $language}}) { + edges { + node { + ns + data + language + } + } + } +} +` + +const ProjectTemplate = ({ data }) => { + const { t } = useTranslation(); + let project = data.allProjectsJson.nodes[0]; + let projectName = project.name; + + return ( + +
+
+
+
+
+

project: {projectName}

+ {project.shortDescription} +
+
+
+
+
+ {project.longDescription != null ? +
+
+

projectAboutHeader{{ projectName }}

+

{project.longDescription}

+
+
+ : null} + {project.links !== null ? +
+
+

Links

+
+ {project.links.github !== null ? projectViewGitHub : null} + {project.links.website !== null ? projectViewWebsite : null} + +
+
+
+ : null} + {/*
+
+ +
{JSON.stringify(data, null, 2)}
+
+
*/} +
+ ); +} + +ProjectTemplate.propTypes = { + data: PropTypes.object.isRequired +} + export default ProjectTemplate; \ No newline at end of file