From de4e109bcac382450f60a77725626baf706764d5 Mon Sep 17 00:00:00 2001 From: MeowcaTheoRange Date: Sun, 26 Nov 2023 00:55:00 -0600 Subject: [PATCH] Links section --- embeds/nav.html | 4 +-- views/about/index.html | 8 ----- views/about/scripts/data_get_domain.js | 13 +++----- views/index.html | 17 ++++++++--- views/links/index.html | 41 ++++++++++++++++++++++++++ views/links/scripts/data_get_links.js | 12 ++++++++ 6 files changed, 72 insertions(+), 23 deletions(-) create mode 100644 views/links/index.html create mode 100644 views/links/scripts/data_get_links.js diff --git a/embeds/nav.html b/embeds/nav.html index 198f9df..de35173 100644 --- a/embeds/nav.html +++ b/embeds/nav.html @@ -1,7 +1,7 @@

- Home - Projects - - About - + Home - Links - + Projects - About - Site Information

diff --git a/views/about/index.html b/views/about/index.html index a34c9fc..1976e57 100644 --- a/views/about/index.html +++ b/views/about/index.html @@ -5,7 +5,6 @@ MeowcaTheoRange - + + +
+
+

Links

+

Where else you can find me.

+
+ <$ nav.html $> +
+
+
+

Getting links...

+
+
+ + + + + diff --git a/views/links/scripts/data_get_links.js b/views/links/scripts/data_get_links.js new file mode 100644 index 0000000..9f7bcbd --- /dev/null +++ b/views/links/scripts/data_get_links.js @@ -0,0 +1,12 @@ +const data_get = document.getElementById("data_get"); +fetch("https://pronouns.cc/api/v1/users/MeowcaTheoRange") + .then((x) => x.json()) + .then((user) => { + data_get.innerHTML = user.links.reduce( + (html, link) => + html + + `

${new URL(link).host}

+

${link}

`, + "" + ); + });