Normalize Code Style

This commit is contained in:
Kevin Kandlbinder 2020-12-27 03:44:12 +01:00
parent f62930067b
commit 75c52c744d
36 changed files with 508 additions and 526 deletions

View file

@ -10,16 +10,18 @@
@mixin cardGeneric {
border-radius: 5px;
overflow: hidden;
box-shadow: -1px 11px 33px -10px rgba(127,127,127,0.3);
box-shadow: -1px 11px 33px -10px rgba(127, 127, 127, 0.3);
transition: transform .25s, box-shadow .25s;
color: $textColor;
text-decoration: none;
margin: 20px;
background: $background;
&:hover, &:active, &:focus {
&:hover,
&:active,
&:focus {
transform: scale(1.05);
box-shadow: -1px 11px 33px -10px rgba(127,127,127,0.2), -1px 11px 33px -10px rgba($accentColor, .75);
box-shadow: -1px 11px 33px -10px rgba(127, 127, 127, 0.2), -1px 11px 33px -10px rgba($accentColor, .75);
}
}
@ -33,7 +35,9 @@
box-shadow: 0 0 33px -10px rgba($accentColor, .5);
transition: box-shadow .25s;
&:hover, &:active, &:hover {
&:hover,
&:active,
&:hover {
box-shadow: 0 0 33px -10px rgba($accentColor, .9);
}
}
@ -54,7 +58,7 @@
height: 50px;
}
> div {
>div {
display: flex;
height: 100%;
padding: 20px !important;
@ -62,13 +66,13 @@
font-size: 1.7em;
color: white;
> span {
>span {
margin-left: auto;
margin-right: auto;
}
> i {
>i {
display: inline-flex;
flex-direction: column;
justify-content: center;

View file

@ -4,4 +4,5 @@ $background: #070707;
$textColor: white;
$layoutPadding: 20px;
$mainFont: 'Anonymous Pro', monospace;
$mainFont: 'Anonymous Pro',
monospace;

View file

@ -1,8 +1,8 @@
import React from "react"
import {Link, Trans, useI18next} from 'gatsby-plugin-react-i18next';
import { Link, Trans, useI18next } from 'gatsby-plugin-react-i18next';
export default function LanguageSwitcher() {
const {languages, originalPath} = useI18next();
const { languages, originalPath } = useI18next();
return (
<div className="languageModalInner">

View file

@ -3,7 +3,7 @@ import PropTypes from "prop-types"
import { Trans, Link } from "gatsby-plugin-react-i18next"
import { graphql, StaticQuery } from 'gatsby'
const Navigation = ({isHome, module}) => {
const Navigation = ({ isHome, module }) => {
return (
<div className={"topBar" + (isHome ? " homeBar" : "")}>
<nav className="topBarInner">
@ -16,8 +16,8 @@ const Navigation = ({isHome, module}) => {
}
}
`} 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>
<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>
@ -29,6 +29,6 @@ const Navigation = ({isHome, module}) => {
Navigation.propTypes = {
isHome: PropTypes.bool.isRequired,
module: PropTypes.string.isRequired
}
}
export default Navigation;

View file

@ -2,10 +2,10 @@ import React from "react"
import PropTypes from "prop-types"
import { Helmet } from "gatsby-plugin-react-i18next"
import { useStaticQuery, graphql } from "gatsby"
import {useTranslation} from 'gatsby-plugin-react-i18next';
import { useTranslation } from 'gatsby-plugin-react-i18next';
function SEO({ description, meta, title }) {
const {t} = useTranslation();
const { t } = useTranslation();
const { site } = useStaticQuery(
graphql`
query {
@ -60,14 +60,14 @@ function SEO({ description, meta, title }) {
content: metaDescription,
},
{
name: "keywords",
content: site.siteMetadata.keywords
name: "keywords",
content: site.siteMetadata.keywords
}
].concat(meta)}
].concat(meta)}
>
<script src="https://kit.fontawesome.com/1377f925e0.js" crossOrigin="anonymous"></script>
<link rel="preconnect" href="https://fonts.gstatic.com"/>
<link href="https://fonts.googleapis.com/css2?family=Anonymous+Pro:wght@400;700&family=Roboto&display=swap" rel="stylesheet"/>
<script src="https://kit.fontawesome.com/1377f925e0.js" crossOrigin="anonymous"></script>
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link href="https://fonts.googleapis.com/css2?family=Anonymous+Pro:wght@400;700&family=Roboto&display=swap" rel="stylesheet" />
</Helmet>
)
}

View file

@ -4,7 +4,7 @@ import Navigation from "../components/navigation"
import SEO from "../components/seo";
import "./default.scss";
import {Link, Trans} from 'gatsby-plugin-react-i18next';
import { Link, Trans } from 'gatsby-plugin-react-i18next';
import LanguageSwitcher from "../components/languageSwitcher";
class Layout extends React.Component {

View file

@ -4,7 +4,10 @@
box-sizing: border-box;
}
body, html, #___gatsby, #gatsby-focus-wrapper {
body,
html,
#___gatsby,
#gatsby-focus-wrapper {
margin: 0;
padding: 0;
width: 100%;
@ -55,15 +58,15 @@ footer {
width: 100%;
max-width: $layoutWidth;
margin: auto;
> :first-child {
padding-left: $layoutPadding;
}
> :last-child {
padding-right: $layoutPadding;
}
a {
display: block;
padding: 10px $layoutPadding;
@ -93,7 +96,10 @@ footer {
text-align: center;
}
section > div:not(.profile), section > article, .section > div:not(.profile), .section > article {
section>div:not(.profile),
section>article,
.section>div:not(.profile),
.section>article {
max-width: $layoutWidth;
width: 100%;
padding: 39px 20px;
@ -148,7 +154,7 @@ h1 {
color: white;
text-decoration-style: dotted;
}
}
.modalCloseLink {

View file

@ -1,17 +1,17 @@
import React, {useState} from "react"
import React, { useState } from "react"
import Layout from "../layouts/default";
import {useStaticQuery, graphql} from "gatsby";
import { useStaticQuery, graphql } from "gatsby";
import { Trans, useI18next, I18nextContext } from "gatsby-plugin-react-i18next"
import styles from "./donate.module.scss";
export default function DonatePage() {
const [amount, setAmount] = useState(5);
const {t} = useI18next();
const {path} = React.useContext(I18nextContext);
const [amount, setAmount] = useState(5);
const { t } = useI18next();
const { path } = React.useContext(I18nextContext);
const { site, file } = useStaticQuery(
graphql`
const { site, file } = useStaticQuery(
graphql`
query {
site {
siteMetadata {
@ -29,25 +29,25 @@ export default function DonatePage() {
}
}
`
)
)
return (
<Layout module="donate" title={t("donate")} description={t("donationCatchphrase")}>
<section>
<article>
<h1><Trans>donate</Trans></h1>
return (
<Layout module="donate" title={t("donate")} description={t("donationCatchphrase")}>
<section>
<article>
<h1><Trans>donate</Trans></h1>
<p><Trans>donateDescription</Trans></p>
<p><Trans>donateDescription</Trans></p>
<div className={styles.priceAmount}>
<label htmlFor="priceInput" className={styles.sronly}>Amount</label>
<input type="number" min="1" placeholder="10.00" step="1" value={amount} onChange={(ev) => {setAmount(ev.target.value)}} name="priceInput" id="priceInput" />
<div></div>
</div>
<div className={styles.priceAmount}>
<label htmlFor="priceInput" className={styles.sronly}>Amount</label>
<input type="number" min="1" placeholder="10.00" step="1" value={amount} onChange={(ev) => { setAmount(ev.target.value) }} name="priceInput" id="priceInput" />
<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+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 className="fas fa-fw fa-chevron-right" aria-hidden="true"></i></a>
</article>
</section>
</Layout>
);
<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 className="fas fa-fw fa-chevron-right" aria-hidden="true"></i></a>
</article>
</section>
</Layout>
);
}

View file

@ -5,7 +5,7 @@
display: flex;
width: 150px;
margin: 20px auto;
border: thin solid rgba(0,0,0,.25);
border: thin solid rgba(0, 0, 0, .25);
border-radius: 5px;
overflow: hidden;
line-height: 40px;
@ -15,7 +15,7 @@
border: none;
padding-left: 10px;
width: 1px;
border-right: thin solid rgba(0,0,0,.25);
border-right: thin solid rgba(0, 0, 0, .25);
}
div {
@ -30,12 +30,11 @@
.sronly {
border: 0;
clip: rect(0,0,0,0);
clip: rect(0, 0, 0, 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
}

View file

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

View file

@ -20,9 +20,9 @@ query AllFriendsQuery {
`
const FriendsPage = ({data}) => {
const {t} = useI18next();
const FriendsPage = ({ data }) => {
const { t } = useI18next();
function shuffle(a) {
for (let i = a.length - 1; i > 0; i--) {
@ -44,12 +44,12 @@ const FriendsPage = ({data}) => {
{
shuffle(data.allFriendsJson.nodes).map((friend) => {
return (
<div className={styles.friendProfile} key={friend.url+"#"+friend.name}>
<div className={styles.friendImage} style={{backgroundImage: "url("+friend.imageURL+")"}}>
<div className={styles.friendProfile} key={friend.url + "#" + friend.name}>
<div className={styles.friendImage} style={{ backgroundImage: "url(" + friend.imageURL + ")" }}>
<span className={styles.friendName}>{friend.name}</span>
<span className={styles.friendTitle}>{friend.profession}</span>
</div>
{/*<span class="friendBio"></span>*/}
<div className={styles.contactLinks}>
<a className={styles.contactLink} href={friend.url} target="_blank" rel="noreferrer"><i className="fas fa-globe-europe" aria-hidden="true"></i> {friend.url}</a>

View file

@ -25,7 +25,7 @@
font-size: 2em;
margin-top: -5px;
}
.friendTitle {
margin-top: auto;
}
@ -38,7 +38,7 @@
display: block;
padding-bottom: 0;
}
.contactLinks {
padding: 15px;
margin: 0;
@ -51,7 +51,7 @@
padding: 6px 0 6px 25px;
color: $textColor;
> i {
>i {
color: $accentColor;
margin-left: -25px;
margin-right: 5px;

View file

@ -6,7 +6,7 @@ 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 { graphql } from "gatsby";
export const query = graphql`
@ -47,19 +47,19 @@ class IndexPage extends React.Component {
<Layout title="Kevin Kandlbinder" module="home" transparentTopbar={true}>
<section className={styles.heroSection}>
<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>
<div className={styles.profileImageDummy}></div>
<div className={styles.profileCard}>
<span className={styles.hello}><Trans>homeHello</Trans></span>
<span className={styles.name}>Kevin Kandlbinder</span>
<span className={styles.description}><Trans>homeMe</Trans> <span id="descriptionType"><Trans>homeWebDeveloper</Trans></span>.</span>
<div className={styles.contactLinks}>
<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:"+meta.contactEmail}><i className="far fa-fw fa-envelope"></i>{meta.contactEmail}</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:" + meta.contactEmail}><i className="far fa-fw fa-envelope"></i>{meta.contactEmail}</a>
<a className={styles.contactLink} href={meta.mapsLink} rel="noreferrer" target="_blank"><i className="fas fa-fw fa-map-marker-alt"></i><Trans>homeMyLocation</Trans></a>
<a className={styles.contactLink} href={"https://twitter.com/"+meta.contactTwitter} rel="noreferrer" target="_blank"><i className="fab fa-fw fa-twitter"></i>@{meta.contactTwitter}</a>
<a className={styles.contactLink} href={"https://github.com/"+meta.contactGitHub} rel="noreferrer" target="_blank"><i className="fab fa-fw fa-github"></i>{meta.contactGitHub}</a>
<a className={styles.contactLink} href={"https://twitter.com/" + meta.contactTwitter} rel="noreferrer" target="_blank"><i className="fab fa-fw fa-twitter"></i>@{meta.contactTwitter}</a>
<a className={styles.contactLink} href={"https://github.com/" + meta.contactGitHub} rel="noreferrer" target="_blank"><i className="fab fa-fw fa-github"></i>{meta.contactGitHub}</a>
</div>
</div>
</div>
@ -67,7 +67,7 @@ class IndexPage extends React.Component {
<section className="aboutSection">
<article>
<h1><Trans>homeAboutMe</Trans></h1>
<p><Trans>homeAboutMeHello</Trans><br/><Trans>homeAboutMeText</Trans></p>
<p><Trans>homeAboutMeHello</Trans><br /><Trans>homeAboutMeText</Trans></p>
</article>
</section>
<a className={styles.creditSection} href="https://unsplash.com/@jannikkiel" target="_blank" rel="noreferrer">
@ -80,23 +80,23 @@ class IndexPage extends React.Component {
<article>
<h1><Trans>featuredProjects</Trans></h1>
<div className={projectStyles.projectList}>
{this.props.data.allProjectsJson.nodes.map((project) => {
return (
<div className={projectStyles.projectCard} key={project.lang+"/"+project.urlname}>
{/*<div className="projectCardActivityIndicator activityIndicatorBlue">Live</div>*/}
<div className={projectStyles.projectCardImage} style={{ backgroundImage: "url("+project.image.childImageSharp.resize.src+")" }}>
<div className={projectStyles.projectCardMeta}>
<span className={projectStyles.projectCardTitle}>{project.name}</span>
<span className={projectStyles.projectCardTeaser}>{project.shortDescription}</span>
</div>
</div>
<div className={projectStyles.projectCardCTAContainer}>
<div className={projectStyles.projectCardCTA}><Link to={"/projects/"+project.urlname}><Trans>projectView</Trans></Link></div>
</div>
</div>
);
})}
{this.props.data.allProjectsJson.nodes.map((project) => {
return (
<div className={projectStyles.projectCard} key={project.lang + "/" + project.urlname}>
{/*<div className="projectCardActivityIndicator activityIndicatorBlue">Live</div>*/}
<div className={projectStyles.projectCardImage} style={{ backgroundImage: "url(" + project.image.childImageSharp.resize.src + ")" }}>
<div className={projectStyles.projectCardMeta}>
<span className={projectStyles.projectCardTitle}>{project.name}</span>
<span className={projectStyles.projectCardTeaser}>{project.shortDescription}</span>
</div>
</div>
<div className={projectStyles.projectCardCTAContainer}>
<div className={projectStyles.projectCardCTA}><Link to={"/projects/" + project.urlname}><Trans>projectView</Trans></Link></div>
</div>
</div>
);
})}
</div>
<Link to="/projects" className={styles.seeMoreButton}><Trans>seeMore</Trans> <i className="fas fa-fw fa-chevron-right"></i></Link>
</article>

View file

@ -9,7 +9,8 @@
overflow: hidden;
background: linear-gradient(to bottom, transparent 80%, $background), radial-gradient(ellipse at top left, #1f0ba659, transparent), radial-gradient(ellipse at bottom right, #4a086829, transparent);
@media(pointer: coarse), (pointer: none) {
@media(pointer: coarse),
(pointer: none) {
min-height: 700px;
}
@ -24,18 +25,18 @@
&:hover .profileImage {
transform: translate(4px, -4px);
}
&:hover .profileImageDummy {
transform: translate(-3px, 3px);
}
.hello {
font-weight: 100;
opacity: .75;
display: block;
margin-bottom: -5px;
}
.name {
font-weight: 100;
font-size: 2em;
@ -59,17 +60,19 @@
padding: 6px 0 6px 25px;
color: $textColor;
@media(pointer: coarse), (pointer: none) {
@media(pointer: coarse),
(pointer: none) {
padding-top: 15px;
padding-bottom: 15px;
}
}
.contactLink:hover, .contactLink:active {
.contactLink:hover,
.contactLink:active {
text-decoration: underline dotted rgba(0, 0, 0, .5);
}
.contactLink > i {
.contactLink>i {
color: $accentColor;
margin-left: -25px;
margin-right: 5px;
@ -86,8 +89,9 @@
padding: 20px 20px 20px 230px;
color: $textColor;
}
.profileImage, .profileImageDummy {
.profileImage,
.profileImageDummy {
display: inline-block;
width: 250px;
height: 350px;
@ -100,12 +104,12 @@
transform: translate(0, 0);
transition: transform .25s;
}
.profileImage {
z-index: 20;
/*box-shadow: -5px 7px 10px -6px rgba(127,127,127,.4);*/
}
.profileImageDummy {
z-index: 10;
background: $accentColor;
@ -115,35 +119,39 @@
}
@media (max-width: 590px) {
.profileImage,.profileImageDummy {
.profileImage,
.profileImageDummy {
display: none;
}
.profileCard {
padding: 20px 20px 20px 20px;
transform: translate(20px, 20px);
}
}
}
}
.amazonAlexaSection, .donationSection, .hireMeSection {
.amazonAlexaSection,
.donationSection,
.hireMeSection {
@include homeBanner;
}
.creditSection {
@include homeBanner;
> div {
>div {
padding: 15px !important;
line-height: 15px;
font-size: 1.2em;
color: white;
> span > i {
>span>i {
line-height: 15px !important;
}
}

View file

@ -3,22 +3,22 @@ import Layout from "../../layouts/default";
import { Trans, useI18next } from "gatsby-plugin-react-i18next"
export default function ImprintPage() {
const {t} = useI18next();
const { t } = useI18next();
return (
<Layout module="legal" title={t("imprint")}>
<section>
<article>
<h1><Trans>imprint</Trans></h1>
<p>Angaben gemäß § 5 TMG</p><p>Kevin Kandlbinder<br/>
Eichenweg 48<br/>
25451 Quickborn <br/>
</p><p> <strong>Vertreten durch: </strong><br/>
Kevin Kandlbinder<br/>
</p><p><strong>Kontakt:</strong> <br/>
Telefon: +49 4106 8068004<br/>
E-Mail: <a href='mailto:contact@kevink.dev'>contact@kevink.dev</a><br/></p>
<p>Angaben gemäß § 5 TMG</p><p>Kevin Kandlbinder<br />
Eichenweg 48<br />
25451 Quickborn <br />
</p><p> <strong>Vertreten durch: </strong><br />
Kevin Kandlbinder<br />
</p><p><strong>Kontakt:</strong> <br />
Telefon: +49 4106 8068004<br />
E-Mail: <a href='mailto:contact@kevink.dev'>contact@kevink.dev</a><br /></p>
</article>
</section>
</Layout>

File diff suppressed because one or more lines are too long

View file

@ -3,8 +3,8 @@ import Layout from "../../layouts/default";
import { Trans, useI18next } from "gatsby-plugin-react-i18next"
export default function DisclaimerPage() {
const {t} = useI18next();
const { t } = useI18next();
return (
<Layout module="legal" title={t("disclaimer")}>
<section>
@ -13,21 +13,21 @@ export default function DisclaimerPage() {
<h2>Haftung für Inhalte</h2>
<p>Als Diensteanbieter sind wir gemäß § 7 Abs.1 TMG für eigene Inhalte auf diesen Seiten nach den allgemeinen Gesetzen verantwortlich. Nach §§ 8 bis 10 TMG sind wir als Diensteanbieter jedoch nicht verpflichtet, übermittelte oder gespeicherte fremde Informationen zu überwachen oder nach Umständen zu forschen, die auf eine rechtswidrige Tätigkeit hinweisen.</p>
<p>Als Diensteanbieter sind wir gemäß § 7 Abs.1 TMG für eigene Inhalte auf diesen Seiten nach den allgemeinen Gesetzen verantwortlich. Nach §§ 8 bis 10 TMG sind wir als Diensteanbieter jedoch nicht verpflichtet, übermittelte oder gespeicherte fremde Informationen zu überwachen oder nach Umständen zu forschen, die auf eine rechtswidrige Tätigkeit hinweisen.</p>
<p>Verpflichtungen zur Entfernung oder Sperrung der Nutzung von Informationen nach den allgemeinen Gesetzen bleiben hiervon unberührt. Eine diesbezügliche Haftung ist jedoch erst ab dem Zeitpunkt der Kenntnis einer konkreten Rechtsverletzung möglich. Bei Bekanntwerden von entsprechenden Rechtsverletzungen werden wir diese Inhalte umgehend entfernen.</p>
<p>Verpflichtungen zur Entfernung oder Sperrung der Nutzung von Informationen nach den allgemeinen Gesetzen bleiben hiervon unberührt. Eine diesbezügliche Haftung ist jedoch erst ab dem Zeitpunkt der Kenntnis einer konkreten Rechtsverletzung möglich. Bei Bekanntwerden von entsprechenden Rechtsverletzungen werden wir diese Inhalte umgehend entfernen.</p>
<h2>Haftung für Links</h2>
<h2>Haftung für Links</h2>
<p>Unser Angebot enthält Links zu externen Websites Dritter, auf deren Inhalte wir keinen Einfluss haben. Deshalb können wir für diese fremden Inhalte auch keine Gewähr übernehmen. Für die Inhalte der verlinkten Seiten ist stets der jeweilige Anbieter oder Betreiber der Seiten verantwortlich. Die verlinkten Seiten wurden zum Zeitpunkt der Verlinkung auf mögliche Rechtsverstöße überprüft. Rechtswidrige Inhalte waren zum Zeitpunkt der Verlinkung nicht erkennbar.</p>
<p>Unser Angebot enthält Links zu externen Websites Dritter, auf deren Inhalte wir keinen Einfluss haben. Deshalb können wir für diese fremden Inhalte auch keine Gewähr übernehmen. Für die Inhalte der verlinkten Seiten ist stets der jeweilige Anbieter oder Betreiber der Seiten verantwortlich. Die verlinkten Seiten wurden zum Zeitpunkt der Verlinkung auf mögliche Rechtsverstöße überprüft. Rechtswidrige Inhalte waren zum Zeitpunkt der Verlinkung nicht erkennbar.</p>
<p>Eine permanente inhaltliche Kontrolle der verlinkten Seiten ist jedoch ohne konkrete Anhaltspunkte einer Rechtsverletzung nicht zumutbar. Bei Bekanntwerden von Rechtsverletzungen werden wir derartige Links umgehend entfernen.</p>
<p>Eine permanente inhaltliche Kontrolle der verlinkten Seiten ist jedoch ohne konkrete Anhaltspunkte einer Rechtsverletzung nicht zumutbar. Bei Bekanntwerden von Rechtsverletzungen werden wir derartige Links umgehend entfernen.</p>
<h2>Urheberrecht</h2>
<h2>Urheberrecht</h2>
<p>Die durch die Seitenbetreiber erstellten Inhalte und Werke auf diesen Seiten unterliegen dem deutschen Urheberrecht. Die Vervielfältigung, Bearbeitung, Verbreitung und jede Art der Verwertung außerhalb der Grenzen des Urheberrechtes bedürfen der schriftlichen Zustimmung des jeweiligen Autors bzw. Erstellers. Downloads und Kopien dieser Seite sind nur für den privaten, nicht kommerziellen Gebrauch gestattet.</p>
<p>Die durch die Seitenbetreiber erstellten Inhalte und Werke auf diesen Seiten unterliegen dem deutschen Urheberrecht. Die Vervielfältigung, Bearbeitung, Verbreitung und jede Art der Verwertung außerhalb der Grenzen des Urheberrechtes bedürfen der schriftlichen Zustimmung des jeweiligen Autors bzw. Erstellers. Downloads und Kopien dieser Seite sind nur für den privaten, nicht kommerziellen Gebrauch gestattet.</p>
<p>Soweit die Inhalte auf dieser Seite nicht vom Betreiber erstellt wurden, werden die Urheberrechte Dritter beachtet. Insbesondere werden Inhalte Dritter als solche gekennzeichnet. Sollten Sie trotzdem auf eine Urheberrechtsverletzung aufmerksam werden, bitten wir um einen entsprechenden Hinweis. Bei Bekanntwerden von Rechtsverletzungen werden wir derartige Inhalte umgehend entfernen.</p>
<p>Soweit die Inhalte auf dieser Seite nicht vom Betreiber erstellt wurden, werden die Urheberrechte Dritter beachtet. Insbesondere werden Inhalte Dritter als solche gekennzeichnet. Sollten Sie trotzdem auf eine Urheberrechtsverletzung aufmerksam werden, bitten wir um einen entsprechenden Hinweis. Bei Bekanntwerden von Rechtsverletzungen werden wir derartige Inhalte umgehend entfernen.</p>
</article>
</section>
</Layout>

View file

@ -26,42 +26,42 @@ query GetProjects($language: String) {
}
`
const ProjectsPage = ({data}) => {
const {t} = useI18next();
return (
<Layout module="projects" title={t("projects")} description={t("projectsDescription")}>
<section>
<article>
<h1><Trans>projects</Trans></h1>
const ProjectsPage = ({ data }) => {
<p><Trans>projectsDescription</Trans></p>
const { t } = useI18next();
return (
<Layout module="projects" title={t("projects")} description={t("projectsDescription")}>
<section>
<article>
<h1><Trans>projects</Trans></h1>
<div className={styles.projectList}>
{data.allProjectsJson.nodes.map((project) => {
return (
<div className={styles.projectCard} key={project.lang+project.urlname}>
{/*<div className="projectCardActivityIndicator activityIndicatorBlue">Live</div>*/}
<div className={styles.projectCardImage} style={{ backgroundImage: "url("+project.image.childImageSharp.resize.src+")" }}>
<div className={styles.projectCardMeta}>
<span className={styles.projectCardTitle}>{project.name}</span>
<span className={styles.projectCardTeaser}>{project.shortDescription}</span>
</div>
</div>
<div className={styles.projectCardCTAContainer}>
<div className={styles.projectCardCTA}><Link to={"/projects/"+project.urlname}><Trans>projectView</Trans></Link></div>
</div>
</div>
);
})}
<p><Trans>projectsDescription</Trans></p>
<div className={styles.projectList}>
{data.allProjectsJson.nodes.map((project) => {
return (
<div className={styles.projectCard} key={project.lang + project.urlname}>
{/*<div className="projectCardActivityIndicator activityIndicatorBlue">Live</div>*/}
<div className={styles.projectCardImage} style={{ backgroundImage: "url(" + project.image.childImageSharp.resize.src + ")" }}>
<div className={styles.projectCardMeta}>
<span className={styles.projectCardTitle}>{project.name}</span>
<span className={styles.projectCardTeaser}>{project.shortDescription}</span>
</div>
</div>
{/*<pre>{JSON.stringify(data, null, 2)}</pre>*/}
</article>
</section>
</Layout>
);
<div className={styles.projectCardCTAContainer}>
<div className={styles.projectCardCTA}><Link to={"/projects/" + project.urlname}><Trans>projectView</Trans></Link></div>
</div>
</div>
);
})}
</div>
{/*<pre>{JSON.stringify(data, null, 2)}</pre>*/}
</article>
</section>
</Layout>
);
}
ProjectsPage.propTypes = {

View file

@ -23,15 +23,15 @@
&.activityIndicatorGreen {
background: #26de81;
}
&.activityIndicatorYellow {
background: #f7b731;
}
&.activityIndicatorRed {
background: #fc5c65;
}
&.activityIndicatorBlue {
background: #45aaf2;
}
@ -77,13 +77,13 @@
.projectCardCTAContainer {
flex-direction: column;
}
.projectCardCTA:nth-child(2) {
border-left: none;
}
}
.projectCardCTAContainer > * {
.projectCardCTAContainer>* {
flex-grow: 1;
}
}

View file

@ -19,9 +19,9 @@ query AllSocialsQuery {
}
`
const SocialPage = ({data}) => {
const {t} = useI18next();
const SocialPage = ({ data }) => {
const { t } = useI18next();
return (
<Layout module="social" title={t("social")} description={t("socialDescription")}>
<section>
@ -35,7 +35,7 @@ const SocialPage = ({data}) => {
data.allSocialsJson.nodes.map((social) => {
return (
<a className={styles.socialCard} href={social.url} target="_blank" rel="noreferrer" key={social.url}>
<div className={styles.socialImage} style={{backgroundImage: "url("+social.image+")"}}>
<div className={styles.socialImage} style={{ backgroundImage: "url(" + social.image + ")" }}>
<span className={styles.socialName}>{social.platformName}</span>
<span className={styles.socialUsername}>{social.platformHandle}</span>
</div>

View file

@ -1,3 +1,4 @@
/* eslint-disable no-undef */
const config = require("../../config");
const locale = require("locale");
@ -11,21 +12,22 @@ export default ({ Router }) => {
async function checkLang({ request }) {
const { url } = request
// eslint-disable-next-line no-undef
let requestURL = new URL(url);
if(requestURL.pathname.startsWith("/assets") ||
requestURL.pathname.startsWith("/icons") ||
requestURL.pathname.startsWith("/manifest.webmanifest") ||
requestURL.pathname.startsWith("/favicon") ||
requestURL.pathname.startsWith("/sw.js")) {
if (requestURL.pathname.startsWith("/assets") ||
requestURL.pathname.startsWith("/icons") ||
requestURL.pathname.startsWith("/manifest.webmanifest") ||
requestURL.pathname.startsWith("/favicon") ||
requestURL.pathname.startsWith("/sw.js")) {
return;
}
for (let i = 0; i < config.languages.length; i++) {
const language = config.languages[i];
if(requestURL.pathname.startsWith("/"+language)) {
if (requestURL.pathname.startsWith("/" + language)) {
return;
}
}
@ -34,23 +36,22 @@ async function checkLang({ request }) {
let selectedLanguage = defaultLang;
if(headers.has("Accept-Language")) {
if (headers.has("Accept-Language")) {
let languageHeader = headers.get("Accept-Language");
let requestLocales = new locale.Locales(languageHeader);
selectedLanguage = requestLocales.best(supported);
}
requestURL.pathname = "/"+selectedLanguage+requestURL.pathname;
requestURL.pathname = "/" + selectedLanguage + requestURL.pathname;
///return Response.redirect(requestURL.toString(), 302);
return new Response(null, {
status: 302,
headers: {
Location: requestURL.toString(),
},
});
}
}

View file

@ -1,6 +1,6 @@
import React from "react"
import {graphql} from "gatsby"
import {Trans, useTranslation} from 'gatsby-plugin-react-i18next';
import { graphql } from "gatsby"
import { Trans, useTranslation } from 'gatsby-plugin-react-i18next';
import Layout from "../layouts/default";
import PropTypes from "prop-types"
@ -27,53 +27,53 @@ query GetProject($urlname: String!, $lang: String!) {
}
`
const ProjectTemplate = ({data}) => {
const {t} = useTranslation();
const ProjectTemplate = ({ data }) => {
const { t } = useTranslation();
let project = data.allProjectsJson.nodes[0];
let projectName = project.name;
return (
<Layout description={project.shortDescription} title={t("project")+": "+projectName} transparentTopbar={true}>
<section className={styles.projectHeader}>
<div style={{paddingTop: 0}}>
<div className={styles.headerBackground} style={{backgroundImage: "url("+project.image.publicURL+")"}}></div>
<header>
<div className={styles.headerInner}>
<h1><Trans>project</Trans>: {projectName}</h1>
<span className={styles.postMeta}>{project.shortDescription}</span>
</div>
</header>
<div className={styles.headerPlaceholder}></div>
return (
<Layout description={project.shortDescription} title={t("project") + ": " + projectName} transparentTopbar={true}>
<section className={styles.projectHeader}>
<div style={{ paddingTop: 0 }}>
<div className={styles.headerBackground} style={{ backgroundImage: "url(" + project.image.publicURL + ")" }}></div>
<header>
<div className={styles.headerInner}>
<h1><Trans>project</Trans>: {projectName}</h1>
<span className={styles.postMeta}>{project.shortDescription}</span>
</div>
</section>
{project.longDescription != null ?
<section className={styles.projectAbout}>
<article>
<h1><Trans projectName={projectName} i18nKey="projectAboutHeader">projectAboutHeader{{projectName}}</Trans></h1>
<p>{project.longDescription}</p>
</article>
</section>
: null}
{project.links.github !== null || project.links.website !== null ?
<section className={styles.projectLinks}>
<div>
<h1>Links</h1>
<div className={styles.linkList}>
{project.links.github !== null ? <a href={project.links.github} target="_blank" rel="noreferrer"><i className="fab fa-github" aria-hidden="true"></i> <Trans>projectViewGitHub</Trans></a> : null}
{project.links.website !== null ? <a href={project.links.website} target="_blank" rel="noreferrer"><i className="fas fa-external-link-alt" aria-hidden="true"></i> <Trans>projectViewWebsite</Trans></a> : null}
</header>
<div className={styles.headerPlaceholder}></div>
</div>
</section>
{project.longDescription != null ?
<section className={styles.projectAbout}>
<article>
<h1><Trans projectName={projectName} i18nKey="projectAboutHeader">projectAboutHeader{{ projectName }}</Trans></h1>
<p>{project.longDescription}</p>
</article>
</section>
: null}
{project.links.github !== null || project.links.website !== null ?
<section className={styles.projectLinks}>
<div>
<h1>Links</h1>
<div className={styles.linkList}>
{project.links.github !== null ? <a href={project.links.github} target="_blank" rel="noreferrer"><i className="fab fa-github" aria-hidden="true"></i> <Trans>projectViewGitHub</Trans></a> : null}
{project.links.website !== null ? <a href={project.links.website} target="_blank" rel="noreferrer"><i className="fas fa-external-link-alt" aria-hidden="true"></i> <Trans>projectViewWebsite</Trans></a> : null}
</div>
</div>
</section>
: null}
{/*<section>
</div>
</div>
</section>
: null}
{/*<section>
<div>
<pre>{JSON.stringify(data, null, 2)}</pre>
</div>
</section>*/}
</Layout>
);
</Layout>
);
}
ProjectTemplate.propTypes = {

View file

@ -1,7 +1,7 @@
@import "../variables";
.projectHeader {
> div {
>div {
padding-bottom: 0 !important;
}
@ -19,8 +19,8 @@
left: 0;
width: 100%;
height: 300px;
background:linear-gradient(to bottom, rgba($background, .95), rgba($background, .5) 20%);
background: linear-gradient(to bottom, rgba($background, .95), rgba($background, .5) 20%);
.headerInner {
max-width: $layoutWidth;
width: 100%;
@ -32,12 +32,12 @@
margin: 0;
color: white;
}
h1 {
font-size: 2em;
}
}
}
.headerPlaceholder {
@ -68,7 +68,11 @@
text-decoration-skip: none;
text-decoration: underline dotted currentColor;
i.fab, i.fas, i.fa, i.far, i.fal {
i.fab,
i.fas,
i.fa,
i.far,
i.fal {
display: inline;
}
}