diff --git a/_site/assets/js/localtime.js b/_site/assets/js/localtime.js new file mode 100644 index 0000000..fb84e23 --- /dev/null +++ b/_site/assets/js/localtime.js @@ -0,0 +1,70 @@ +function parseEventTimes() { + const dateformatter = Intl.DateTimeFormat( + "en-CA", + { + hour: '2-digit', + minute: '2-digit', + timeZoneName: 'short', + hour12: false + }); + + const eventtimes = document.getElementsByClassName("eventtime"); + for(eventtime of eventtimes) { + const eventdate = eventtime.getAttribute("data-event-date") + if(eventdate) { + let parts = eventdate.split("-"); + if(parts.length !== 3) + continue; + + const year = parseInt(parts[0], 10); + const month = parseInt(parts[1], 10); + const day = parseInt(parts[2], 10); + + parts = eventtime.innerText.split("UTC"); + if(parts.length < 2) + continue; + + parts = parts[0].split(":") + if(parts.length !== 2) + continue; + + const hour = parseInt(parts[0], 10); + const minute = parseInt(parts[1], 10); + + let date = Date.UTC(year, month, day, hour, minute); + date = new Date(date); + date = dateformatter.format(date); + eventtime.innerHTML += " (" + date + ")"; + } + } +} + +function parseEventDates() { + const dateformatter = Intl.DateTimeFormat( + "en-CA", + { + weekday: 'short', + hour: '2-digit', + minute: '2-digit', + timeZoneName: 'short', + hour12: false + }); + + const eventdates = document.getElementsByClassName("eventdate"); + for(eventdate of eventdates) { + const date_attribute = eventdate.getAttribute("data-event-datetime") + if(date_attribute) { + let date = Date.parse(date_attribute.replace("UTC", "Z")) + if(isNaN(date)) + continue; + + date = new Date(date); + date = dateformatter.format(date); + eventdate.innerHTML += " (" + date + ")"; + } + }} + +document.addEventListener("DOMContentLoaded", (event) => { + parseEventTimes(); + parseEventDates(); +}); diff --git a/_site/assets/js/terminalcolors.js b/_site/assets/js/terminalcolors.js deleted file mode 100644 index 715968b..0000000 --- a/_site/assets/js/terminalcolors.js +++ /dev/null @@ -1,117 +0,0 @@ -// Collection of scripts to deploy a server hosting several open-source games -// Copyright (C) 2022 Jarno van der Kolk -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published -// by the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -// Shell command can have control codes. Some of these mean colours. -function convertTerminalCodeToHtml(line) { - let htmlline = ""; - let open_spans = 0; - for(let i = 0; i < line.length; i++) { - if(line[i] == '\033') { - let code = line[++i] - if(code == '[') { - // This means it's a colour - while(i < line.length && line[i] != 'm') { - let colour_code = ""; - for(i++; i < line.length && line[i] != 'm' && line[i] != ';'; i++) { - colour_code += line[i]; - } - colour_code = parseInt(colour_code); - if(colour_code === 0) { - for(let i = 0; i < open_spans; i++) { - htmlline += ""; - } - open_spans = 0; - } - if(colour_code === 1) { - htmlline += ''; - open_spans++; - } - else if(colour_code >= 30 && colour_code <= 37) { - htmlline += ''; - open_spans++; - } - else if(colour_code >= 90 && colour_code <= 97) { - htmlline += ''; - open_spans++; - } - } - } - } - else if(line[i] == '<') { - htmlline += "<" - } - else if(line[i] == '>') { - htmlline += ">" - } - else if(line[i] == '&') { - htmlline += "&" - } - else { - htmlline += line[i]; - } - } - - for(let i = 0; i < open_spans; i++) { - htmlline += ""; - } - - return htmlline -} - -// Shell command can have control codes. Some of these mean colours. -function convertDaemonedCodeToHtml(line) { - let htmlline = ""; - let open_spans = 0; - for(let i = 0; i < line.length; i++) { - if(line[i] == '^') { - let code = line[++i] - for(let i = 0; i < open_spans; i++) { - htmlline += ""; - } - open_spans = 0; - - if(code == 'N') { - htmlline += ''; - open_spans++; - } - else { - let colour_code = parseInt(code); - if(colour_code >= 0) { - htmlline += ''; - open_spans++; - } - } - } - else if(line[i] == '<') { - htmlline += "<" - } - else if(line[i] == '>') { - htmlline += ">" - } - else if(line[i] == '&') { - htmlline += "&" - } - else { - htmlline += line[i]; - } - } - - for(let i = 0; i < open_spans; i++) { - htmlline += ""; - } - - return htmlline -} diff --git a/_site/feed.xml b/_site/feed.xml index 1f55f8d..5a6844e 100644 --- a/_site/feed.xml +++ b/_site/feed.xml @@ -1,4 +1,4 @@ -Jekyll2023-05-26T11:33:22-04:00https://onfoss.org/feed.xmlonFOSSonFOSS is an online, "Free (as Freedom) and Open Source" LAN-Party. The goal is to get people together, enjoying the art of computer games and having a great time in these days. The FOSS community is a place of being open minded and acceptance to all different kinds of people with the focus of fully transparent systems and protecting individuals. So it does not matter if you are on Windows, Mac or Linux and it is also NOT necessary to have a PC MASTERRACE setup to run those games. +Jekyll2023-05-27T17:31:55-04:00https://onfoss.org/feed.xmlonFOSSonFOSS is an online, "Free (as Freedom) and Open Source" LAN-Party. The goal is to get people together, enjoying the art of computer games and having a great time in these days. The FOSS community is a place of being open minded and acceptance to all different kinds of people with the focus of fully transparent systems and protecting individuals. So it does not matter if you are on Windows, Mac or Linux and it is also NOT necessary to have a PC MASTERRACE setup to run those games. onFOSS: The next generation!2023-05-24T00:00:00-04:002023-05-24T00:00:00-04:00https://onfoss.org/news/2023/05/24/onFOSS-Next-Gen<p>The “onFOSS-LAN” started as an idea by <a href="https://hribhrib.at">hribhrib</a> to host a LAN-party-like experience online. Yes, the pun with LAN instead of WAN-party was intended but didn’t ripe well, however, what instead did ripe well was the whole Event! Only one year after the first public onFOSS-LAN another host joined the team: <a href="http://jarno.ca/">DeathByDenim</a>. Even more people got together to bring this experience to everyone that was interested in FOSS-Gaming, and group-effort hosting started to sprout, mostly by people of the <a href="https://libregaming.org/">LibreGaming</a> community.</p> <h2 id="rebranding">Rebranding</h2> diff --git a/_site/help.html b/_site/help.html index d1a8cfc..89204d7 100644 --- a/_site/help.html +++ b/_site/help.html @@ -6,6 +6,7 @@ +