From 25501f07a79675ae3bac59fb18cc213a0a281c11 Mon Sep 17 00:00:00 2001 From: Mattia Mascarello Date: Tue, 20 Aug 2024 22:03:06 +0200 Subject: [PATCH] Removed alembic poem and github references --- index.html | 61 ++++++------------------------------------------- poemOfTheDay.js | 41 --------------------------------- 2 files changed, 7 insertions(+), 95 deletions(-) delete mode 100644 poemOfTheDay.js diff --git a/index.html b/index.html index 6c27177..9714dd5 100644 --- a/index.html +++ b/index.html @@ -209,84 +209,38 @@ Web Resources - Github - MatMasIt - - - "Stazione Meteorologica Permanente del Liceo Scientifico Statale Leonardo Cocito" - Home - - - Open Source Cocito Weather Station - Repos + Gitea + My gitea stash
- + - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Top Listed ProjectsSelected Listed Projects
BiblioTau (Work in Progress)Library Management System
Alembic + Alembic My Poetry in English
epg-itItalian tv electronic program guide archival repo
notesArchiveMy school notes organized
fantaProfThe classic italian professor blaming game
dante-langThe Dante Programming Language
costLatex Italian Constitution in LaTeX
costGit Amendments to the italian constitution as git commits
SocialCreditScoreGame - A videogame to eloquently praise the most perfect chinese social credit system
mordApp Mordecai Food Ordering System
-
-

My poem of the day, n. , from Alembic -

-

(loading)

-

...

-

Liberty above all
@@ -343,7 +297,6 @@ document.getElementById("noScript").style.display = "none";
- diff --git a/poemOfTheDay.js b/poemOfTheDay.js deleted file mode 100644 index dcbdc12..0000000 --- a/poemOfTheDay.js +++ /dev/null @@ -1,41 +0,0 @@ -function getDayOfTheYear() { - var now = new Date(); - var start = new Date(now.getFullYear(), 0, 0); - var diff = now - start; - var oneDay = 1000 * 60 * 60 * 24; - return Math.floor(diff / oneDay); -} -function replaceAll(string, search, replace) { - return string.split(search).join(replace); -} - - -function getPoemOfTheDayIndex(npoems) { - return getDayOfTheYear() % npoems; -} - -function cleanText(text) { - let te = ""; - let i = 0; - let t = text.split("\\begin{Verse}").forEach(element => { // there may be multiple pages of verses - if (i == 0) { i++; return; } // skip title - te += element.split("\\end")[0]; - }); - te = replaceAll(te, "\\\\", "
"); - te = replaceAll(te, "\\", "
"); - return te; -} -function setPoemOfTheDay() { - fetch('https://raw.githubusercontent.com/MatMasIt/Alembic/main/Alembic.tex') - .then((response) => response.text()) - .then((data) => { - let parts = data.split("\\chapter{"); - let n = getPoemOfTheDayIndex(parts.length - 1); // ignore header, data[0] - let part = parts[n + 1]; - let title = part.split("}")[0]; - let text = cleanText(part); - document.getElementById("poemn").innerText = n + 1; - document.getElementById("poemTitle").innerText = title; - document.getElementById("poemText").innerHTML = text; - }); -} \ No newline at end of file