diff --git a/content/friends/feuerhamster.json b/content/friends/feuerhamster.json new file mode 100644 index 0000000..fe6c965 --- /dev/null +++ b/content/friends/feuerhamster.json @@ -0,0 +1,6 @@ +{ + "profession": "Full-Stack-Developer", + "name": "Feuerhamster", + "url": "https://hamsterlabs.de", + "imageURL": "https://cdn.kevink.dev/assets/friends/feuerhamster.png" +} \ No newline at end of file diff --git a/content/friends/jannik.json b/content/friends/jannik.json new file mode 100644 index 0000000..5fcbf82 --- /dev/null +++ b/content/friends/jannik.json @@ -0,0 +1,6 @@ +{ + "profession": "", + "name": "Jannik Kiel", + "url": "https://unsplash.com/@jannikkiel", + "imageURL": "https://source.unsplash.com/user/jannikkiel/300x300" +} \ No newline at end of file diff --git a/content/friends/timo.json b/content/friends/timo.json new file mode 100644 index 0000000..78cda98 --- /dev/null +++ b/content/friends/timo.json @@ -0,0 +1,6 @@ +{ + "profession": "Systemadministrator", + "name": "Timo Strüker", + "url": "https://strueker.dev", + "imageURL": "https://cdn.kevink.dev/assets/friends/timo.jpg" +} \ No newline at end of file diff --git a/src/pages/friends.js b/src/pages/friends.js new file mode 100644 index 0000000..c59d141 --- /dev/null +++ b/src/pages/friends.js @@ -0,0 +1,67 @@ +import React from "react" +import Layout from "../layouts/default"; +import { Trans, Link, useI18next } from "gatsby-plugin-react-i18next" +import { graphql } from 'gatsby' + +import styles from "./friends.module.scss"; + +export const query = graphql` +query AllFriendsQuery { + allFriendsJson { + nodes { + name + profession + url + imageURL + } + } + } + +` + +export default function SocialPage({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)}
*/} +
+
+
+ ); +} \ No newline at end of file diff --git a/src/pages/friends.module.scss b/src/pages/friends.module.scss new file mode 100644 index 0000000..77e915b --- /dev/null +++ b/src/pages/friends.module.scss @@ -0,0 +1,73 @@ +@import "../variables"; + +.friendsList { + display: flex; + flex-wrap: wrap; + justify-content: center; +} + +.friendProfile { + max-width: 300px; + width: 100%; + border-radius: 5px; + overflow: hidden; + box-shadow: -1px 11px 33px -10px rgba(127,127,127,0.3); + transition: transform .25s; + display: flex; + flex-direction: column; + margin: 20px; + color: white; + text-decoration: none; +} + +.friendImage { + width: 100%; + height: 300px; + background-position: center; + background-size: cover; + display: flex; + padding: 10px; + flex-direction: column-reverse; + text-shadow: 0 0 10px black, 0 0 10px black, 0 0 20px black; +} + +.friendBio { + padding: 15px; + flex-grow: 1; + text-align: justify; + display: block; + padding-bottom: 0; +} + +.friendProfile .contactLinks { + padding: 15px; + margin: 0; + display: flex; + flex-direction: column; +} + +.contactLink { + transition: text-decoration .5s; + text-decoration: underline dotted rgba(0, 0, 0, 0); + padding: 6px 0 6px 25px; + color: $textColor; +} + +.contactLink > i { + color: $accentColor; + margin-left: -25px; + margin-right: 5px; +} + +.friendProfile:hover { + transform: scale(1.05); +} + +.friendName { + font-size: 2em; + margin-top: -5px; +} + +.friendTitle { + margin-top: auto; +} \ No newline at end of file