Removed alembic poem and github references
This commit is contained in:
parent
d00fa2e8b4
commit
25501f07a7
61
index.html
61
index.html
|
@ -209,84 +209,38 @@
|
||||||
<caption>Web Resources</caption>
|
<caption>Web Resources</caption>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Github</td>
|
<td>Gitea</td>
|
||||||
<td><a href="https://github.com/MatMasIt" aria-label="GitHub Profile of MatMasIt">MatMasIt</a></td>
|
<td><a href="https://gitea.mattiaturin.duckdns.org" aria-label="Gitea profile">My gitea stash</a></td>
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>"Stazione Meteorologica Permanente del Liceo Scientifico Statale Leonardo Cocito"</td>
|
|
||||||
<td><a href="https://liceococito.edu.it/meteo" aria-label="Home of the Cocito Weather Station">Home</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Open Source Cocito Weather Station</td>
|
|
||||||
<td><a href="http://github.com/StazioneMeteoCocito/"
|
|
||||||
aria-label="GitHub Repositories for Cocito Weather Station">Repos</a></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<table>
|
<table>
|
||||||
<caption>Top Listed Projects</caption>
|
<caption>Selected Listed Projects</caption>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>BiblioTau <em>(Work in Progress)</em></td>
|
<td><a href="https://gitea.mattiaturin.duckdns.org/mattia/Alembic" aria-label="Alembic - My Poetry in English">Alembic</a>
|
||||||
<td>Library Management System</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><a href="https://github.com/MatMasIt/Alembic" aria-label="Alembic - My Poetry in English">Alembic</a>
|
|
||||||
</td>
|
</td>
|
||||||
<td>My Poetry in English</td>
|
<td>My Poetry in English</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="https://github.com/MatMasIt/epg-it"
|
<td><a href="https://gitea.mattiaturin.duckdns.org/mattia/costLatex"
|
||||||
aria-label="epg-it - Italian TV Electronic Program Guide">epg-it</a></td>
|
|
||||||
<td>Italian tv electronic program guide archival repo</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><a href="https://github.com/MatMasIt/notesArchive"
|
|
||||||
aria-label="notesArchive - My School Notes Organized">notesArchive</a></td>
|
|
||||||
<td>My school notes organized</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><a href="https://github.com/MatMasIt/fantaProf"
|
|
||||||
aria-label="fantaProf - The Classic Italian Professor Blaming Game">fantaProf</a></td>
|
|
||||||
<td>The classic italian professor blaming game</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><a href="https://github.com/MatMasIt/dante-lang"
|
|
||||||
aria-label="dante-lang - The Dante Programming Language">dante-lang</a></td>
|
|
||||||
<td>The Dante Programming Language</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><a href="https://github.com/MatMasIt/costLatex"
|
|
||||||
aria-label="costLatex - Italian Constitution in LaTeX">costLatex</a></td>
|
aria-label="costLatex - Italian Constitution in LaTeX">costLatex</a></td>
|
||||||
<td>Italian Constitution in <span class="latex">L<span>a</span>T<span>e</span>X</span></td>
|
<td>Italian Constitution in <span class="latex">L<span>a</span>T<span>e</span>X</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="https://github.com/MatMasIt/costGit"
|
<td><a href="https://gitea.mattiaturin.duckdns.org/mattia/costGit"
|
||||||
aria-label="costGit - Amendments to the Italian Constitution as Git Commits">costGit</a></td>
|
aria-label="costGit - Amendments to the Italian Constitution as Git Commits">costGit</a></td>
|
||||||
<td>Amendments to the italian constitution as git commits</td>
|
<td>Amendments to the italian constitution as git commits</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="https://github.com/MatMasIt/SocialCreditScoreGame"
|
<td><a href="https://gitea.mattiaturin.duckdns.org/mattia/mordApp"
|
||||||
aria-label="SocialCreditScoreGame - A Video Game to Praise Chinese Social Credit System">SocialCreditScoreGame</a>
|
|
||||||
</td>
|
|
||||||
<td>A videogame to eloquently praise the most perfect chinese social credit system</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><a href="https://github.com/MatMasIt/mordApp"
|
|
||||||
aria-label="mordApp - Mordecai Food Ordering System">mordApp</a></td>
|
aria-label="mordApp - Mordecai Food Ordering System">mordApp</a></td>
|
||||||
<td>Mordecai Food Ordering System</td>
|
<td>Mordecai Food Ordering System</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<article id="poemOfTheDay">
|
|
||||||
<h3>My <i>poem of the day</i>, n. <span id="poemn"></span>, from <a target="_blank"
|
|
||||||
href="https://github.com/MatMasIt/Alembic" aria-label="Alembic - Collection of Poems"><i>Alembic</i></a>
|
|
||||||
</h3>
|
|
||||||
<h2 id="poemTitle" aria-live="polite">(loading)</h2>
|
|
||||||
<p id="poemText" aria-live="polite">...</p>
|
|
||||||
</article>
|
|
||||||
<br>
|
<br>
|
||||||
<div class="centered-container">
|
<div class="centered-container">
|
||||||
<img src="images/Gadsden_flag.svg" alt="Liberty above all"><br>
|
<img src="images/Gadsden_flag.svg" alt="Liberty above all"><br>
|
||||||
|
@ -343,7 +297,6 @@
|
||||||
document.getElementById("noScript").style.display = "none";
|
document.getElementById("noScript").style.display = "none";
|
||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
<script src="poemOfTheDay.js"></script>
|
|
||||||
<script src="script.js"></script>
|
<script src="script.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|
|
@ -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, "\\\\", "<br />");
|
|
||||||
te = replaceAll(te, "\\", "<br />");
|
|
||||||
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;
|
|
||||||
});
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user