commit 5c2f4508cef1bc306d1e6014391519e37979bec1 Author: Marc Michalsky Date: Sun Jan 30 20:40:45 2022 +0100 🎉 Initial commit diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/eridian_clock.iml b/.idea/eridian_clock.iml new file mode 100644 index 0000000..c956989 --- /dev/null +++ b/.idea/eridian_clock.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..fd0ae56 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..949679f --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# Eridian Clock + +This little website is inspired by the novel *Project Hail Mary* by the great author [Andy Weir](https://www.andyweirauthor.com/). \ No newline at end of file diff --git a/css/style.css b/css/style.css new file mode 100644 index 0000000..c8a820b --- /dev/null +++ b/css/style.css @@ -0,0 +1,50 @@ +@font-face { + font-family: 'eridani'; + src: url('../fonts/eridani.eot?o2f7zp'); + src: url('../fonts/eridani.eot?o2f7zp#iefix') format('embedded-opentype'), + url('../fonts/eridani.ttf?o2f7zp') format('truetype'), + url('../fonts/eridani.woff?o2f7zp') format('woff'), + url('../fonts/eridani.svg?o2f7zp#eridani') format('svg'); + font-weight: normal; + font-style: normal; + font-display: block; +} + +body { + background-color: #121212; + color: #52ff7c; +} + +h1 { + font-family: Arvo, serif; +} + +ul li { + height: 32px; +} + +.content { + margin-top: 80px; + text-align: center; + font-family: sans-serif; +} + +.subtitle { + font-family: sans-serif; + font-size: 20px; + text-align: center; +} + +.eridani { + font-family: 'eridani' !important; + font-size: 18px; +} + +#clock { + font-family: 'eridani' !important; + color: #52ff7c; + font-size: 62px; + text-align: center; + padding-top: 60px; + padding-bottom: 40px; +} \ No newline at end of file diff --git a/fonts/eridani.eot b/fonts/eridani.eot new file mode 100644 index 0000000..a9c9446 Binary files /dev/null and b/fonts/eridani.eot differ diff --git a/fonts/eridani.svg b/fonts/eridani.svg new file mode 100644 index 0000000..7e178a6 --- /dev/null +++ b/fonts/eridani.svg @@ -0,0 +1,35 @@ + + + + + + +{ + "fontFamily": "eridani", + "majorVersion": 1, + "minorVersion": 0, + "copyright": "Public Domain", + "license": "CC0", + "licenseURL": "https://creativecommons.org/publicdomain/zero/1.0/", + "description": "Eridian numbers based on the novel \"Project Hail Mary\" by Andy Weir\nFont generated by IcoMoon.", + "version": "Version 1.0", + "fontId": "eridani", + "psName": "eridani", + "subFamily": "Regular", + "fullName": "eridani" +} + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fonts/eridani.ttf b/fonts/eridani.ttf new file mode 100644 index 0000000..8ebbcf8 Binary files /dev/null and b/fonts/eridani.ttf differ diff --git a/fonts/eridani.woff b/fonts/eridani.woff new file mode 100644 index 0000000..5e8812f Binary files /dev/null and b/fonts/eridani.woff differ diff --git a/img/favicon.png b/img/favicon.png new file mode 100644 index 0000000..0e26505 Binary files /dev/null and b/img/favicon.png differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..ba7c569 --- /dev/null +++ b/index.html @@ -0,0 +1,29 @@ + + + + + Eridian Clock + + + + + + +
+
+

+ This clock shows the Eridian number of Earth seconds that have passed on Earth today. +

+
+
+

Time measurement on Earth

+ +
+ + + \ No newline at end of file diff --git a/js/scripts.js b/js/scripts.js new file mode 100644 index 0000000..8cb0e14 --- /dev/null +++ b/js/scripts.js @@ -0,0 +1,22 @@ +function earthTime() { + let date = new Date(); + let hours = date.getUTCHours() + let minutes = date.getUTCMinutes() + let seconds = date.getUTCSeconds() + + document.getElementById("clock").innerText = + appendLeadingZeros(((hours * 3600) + (minutes * 60) + seconds).toString(6)); + + setTimeout(function () { + earthTime() + }, 1000); +} + +function appendLeadingZeros(time) { + while (time.length < 7) { + time = "0" + time; + } + return time; +} + +earthTime(); \ No newline at end of file