From 76ae43efd3fb222aaa815f45c946387a720a1b7b Mon Sep 17 00:00:00 2001 From: Anna Date: Mon, 29 Aug 2022 05:46:23 -0400 Subject: [PATCH] feat: add initial index --- css/index.css | 11 +++++++++++ index.html | 46 ++++++++++++++++++++++++++++++++++++++++++++-- js/index.js | 18 ++++++++++++++++++ 3 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 css/index.css create mode 100644 js/index.js diff --git a/css/index.css b/css/index.css new file mode 100644 index 0000000..ac7bf12 --- /dev/null +++ b/css/index.css @@ -0,0 +1,11 @@ +main > article:first-child { + margin-top: 0; +} + +main > article:last-child { + margin-bottom: 0; +} + +article > header > hgroup { + margin-bottom: 0; +} diff --git a/index.html b/index.html index 74c5056..8792e35 100644 --- a/index.html +++ b/index.html @@ -1,11 +1,53 @@ - + Anna + + -

Hi

+
+
+
+
+

Hi, I'm Anna!

+

I make stuff on the internet.

+
+
+ +
+
+

+ I like Rust, C#, and Python. +

+ +
    +
  • she/her
  • +
  • programmer
  • +
  • gay
  • +
+
+ + +
+
+
+ + +
+ + +

+ My email is . +

+
+
diff --git a/js/index.js b/js/index.js new file mode 100644 index 0000000..7544d33 --- /dev/null +++ b/js/index.js @@ -0,0 +1,18 @@ +(function() { + function y(s) { + return s.replace(/[a-zA-Z]/g,(c)=>String.fromCharCode((c<="Z"?90:122)>=(c=c.charCodeAt(0)+13)?c:c-26)); + } + + document.getElementById('email-button').addEventListener('click', () => { + let email = 'si' + atob('dGVAYW4=') + 'na' + atob(y('L2kyoJIhpl5c')) + 'o'; + let emailLink = document.createElement('a'); + emailLink.setAttribute('href', `mailto:${email}`); + emailLink.innerText = email; + document.getElementById('email-text').replaceWith(emailLink); + document.getElementById('modal').setAttribute('open', ''); + }); + + document.getElementById('email-close').addEventListener('click', () => { + document.getElementById('modal').removeAttribute('open'); + }); +})();