From 86f27d97324f0836a2bcd66237c44d7743e6d2d4 Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Sat, 4 Feb 2023 14:52:53 +0100 Subject: [PATCH] Content update & email protection instead of cipher --- components/hiddenemail.tsx | 22 ++++++++++++++++++++++ pages/index.tsx | 38 +++++++++++++++----------------------- 2 files changed, 37 insertions(+), 23 deletions(-) create mode 100644 components/hiddenemail.tsx diff --git a/components/hiddenemail.tsx b/components/hiddenemail.tsx new file mode 100644 index 0000000..4f30cdb --- /dev/null +++ b/components/hiddenemail.tsx @@ -0,0 +1,22 @@ +import React, { useState, useEffect } from "react"; + +const HiddenEmail = ({ + email, + alt, + althref, +}: { + email: string; + alt: string; + althref: string; +}) => { + const [visible, setVisible] = useState(false); + useEffect(() => { + setVisible(true); + }, []); + + return ( + {visible ? email : alt} + ); +}; + +export default HiddenEmail; diff --git a/pages/index.tsx b/pages/index.tsx index ea5682e..f595bc7 100755 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -4,6 +4,7 @@ import Layout from "../components/layout"; import styled from "styled-components"; import IconLink from "components/iconlink"; import ScrollMe from "components/scrollme"; +import HiddenEmail from "components/hiddenemail"; import { faEnvelope } from "@fortawesome/free-solid-svg-icons"; import { faGit, faGithub } from "@fortawesome/free-brands-svg-icons"; @@ -108,10 +109,11 @@ const Page: NextPageWithLayout = () => {

/almqv

- I am a {secondsToYears(getAge())} year old{" "} - Computer Science & Engineering student with a passion for{" "} - physics, programming, mathematics and - anything *NIX (Linux, UNIX etc) related. + I am a {secondsToYears(getAge())}-year-old{" "} + Computer Science and Engineering student with a passion for{" "} + engineering, programming, and mathematics. + I also have an interest in physics and *NIX{" "} + (Linux, UNIX etc) systems.

{/*TODO: Add GitHub code frequency/contrib here*/}

@@ -148,30 +150,14 @@ const Page: NextPageWithLayout = () => { rel="noreferrer" /> - +

Contact

You can contact me through email. And if you prefer it, you can - contact me using PGP. Do note that my{" "} - email address below is encrypted as a precaution against bots - et cetera. Do not worry, it is easy to crack. Alternatively - you could query for my email with my PGP fingerprint (key-id) on some - PGP key server (i.e. the{" "} - - MIT - {" "} - or{" "} - - Ubuntu - {" "} - key-server). + contact me using PGP.

  • @@ -179,7 +165,13 @@ const Page: NextPageWithLayout = () => { 68B2 9768 49F0 3C72 38AE B081 E31A 99CE 3E75 A158
  • - Email: cnlueXpkaXZmZ0B0em52eS5wYnoK + Email:{" "} + {" "} + {/* cnlueXpkaXZmZ0B0em52eS5wYnoK */}
  • GitHub:{" "}