From c020aacdce0ba23cea75056c165bf3cdfcaacbf1 Mon Sep 17 00:00:00 2001 From: tdpeuter Date: Fri, 4 Aug 2023 15:46:53 +0200 Subject: [PATCH 1/5] Add simple button to try again for now --- script.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/script.js b/script.js index 2073a9c..a693ca3 100644 --- a/script.js +++ b/script.js @@ -48,13 +48,23 @@ function createCheckButton(destination) { check(destination, container, dot, message, button); } +function createTryAgainButton(destination) { + const button = document.createElement('button'); + button.textContent = 'Try Again'; + button.onclick = function () { + window.location.href = destination; + } + + document.getElementById('checkContainer').appendChild(button); +} + function checkDestination() { const url = window.location.search; const searchParams = new URLSearchParams(url); const destination = searchParams.get('destination'); if (destination) { - createCheckButton(destination); + createTryAgainButton(destination); } } From 8aa281e1f4362ec5b67d29ec9486581c9be0c13d Mon Sep 17 00:00:00 2001 From: tdpeuter Date: Fri, 4 Aug 2023 16:45:20 +0200 Subject: [PATCH 2/5] Improve responsiveness --- index.html | 23 ++++++++++++++------ style.css | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index f7465a0..5486e65 100644 --- a/index.html +++ b/index.html @@ -1,22 +1,33 @@ - Service unavailable + + + + + Service unavailable + - - +

Oh, no!

-

The website you are trying to reach is currently down. Your URL works, but the system is in maintenance and powered off temporarily.

+

The website you are trying to reach is currently down. Your URL works, but the system is in maintenance and/or powered off temporarily.

Please come back later!

Kind regards, Tibo De Peuter

- kitten holding paw to forehead +
- + + + diff --git a/style.css b/style.css index 6b9ec86..c4fce4e 100644 --- a/style.css +++ b/style.css @@ -1,3 +1,22 @@ +:root { + /* Support dark mode */ + color-scheme: light dark; +} + +body { + margin: 20px; + padding: 10px; +} + +footer { + opacity: 0.6; + font-size: small; + + display: flex; + width: 100%; + justify-content: center; +} + .dot { width: 15px; height: 15px; @@ -17,3 +36,46 @@ .dot.red { background-color: red; } + +.heart { + color: #CD001A; /* Cherry red */ +} + +/* Don't let media go offscreen */ +img, +picture, +video { + max-width: 100%; + padding: 2% 0; +} + +/* Display the button in the center of small screens such as phones */ +@media screen and (max-device-width: 1000px) { + #checkContainer { + display: flex; + justify-content: center; + } +} + +/* Hover animation for URLs */ +a { + text-decoration: none; + color: inherit; /* Reset to default text color */ + position: relative; +} + +a::before { + content: ''; + position: absolute; + /* Height of the line */ + bottom: -2px; + height: 2px; + left: 0; + width: 0; + background-color: orange; + transition: width 0.3s ease; +} + +a:hover::before { + width: 100%; +} \ No newline at end of file From 29813a169729c5463fcb0321645a4b5aa1acffe0 Mon Sep 17 00:00:00 2001 From: tdpeuter Date: Fri, 4 Aug 2023 18:08:11 +0200 Subject: [PATCH 3/5] Fix link --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 5486e65..2f81ffa 100644 --- a/index.html +++ b/index.html @@ -24,7 +24,7 @@ From 4432e3c4d0b2a1236d379eaa5e41884bc2038672 Mon Sep 17 00:00:00 2001 From: tdpeuter Date: Sat, 5 Aug 2023 19:32:53 +0200 Subject: [PATCH 4/5] Add project files --- .gitignore | 1 + .idea/.gitignore | 5 ++++ .idea/down-message.iml | 12 ++++++++ .idea/jsLibraryMappings.xml | 6 ++++ .idea/modules.xml | 8 +++++ .idea/vcs.xml | 6 ++++ flake.lock | 59 +++++++++++++++++++++++++++++++++++++ flake.nix | 28 ++++++++++++++++++ 8 files changed, 125 insertions(+) create mode 100644 .gitignore create mode 100644 .idea/.gitignore create mode 100644 .idea/down-message.iml create mode 100644 .idea/jsLibraryMappings.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +node_modules diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..b58b603 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,5 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/down-message.iml b/.idea/down-message.iml new file mode 100644 index 0000000..24643cc --- /dev/null +++ b/.idea/down-message.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/jsLibraryMappings.xml b/.idea/jsLibraryMappings.xml new file mode 100644 index 0000000..d23208f --- /dev/null +++ b/.idea/jsLibraryMappings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..e631a5e --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..215baea --- /dev/null +++ b/flake.lock @@ -0,0 +1,59 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1689068808, + "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1691003216, + "narHash": "sha256-Qq/MPkhS12Bl0X060pPvX3v9ac3f2rRQfHjjozPh/Qs=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "4a56ce9727a0c5478a836a0d8a8f641c5b9a3d5f", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..0dc06dd --- /dev/null +++ b/flake.nix @@ -0,0 +1,28 @@ +{ + description = "down-message"; + + inputs.flake-utils.url = "github:numtide/flake-utils"; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem + (system: + let + pkgs = import nixpkgs { + inherit system; + config.allowUnfree = true; + }; + in { + devShells.default = pkgs.mkShell { + packages = with pkgs; [ + jetbrains.webstorm + nodejs + nodePackages.live-server + ]; + + shellHook = '' + webstorm . && exit + ''; + }; + } + ); +} From 2dfce58c6dc48be84d9ef2c10a5bcedf74c41f4b Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Mon, 15 Apr 2024 21:11:03 +0200 Subject: [PATCH 5/5] chore: Change URL to mirror Change to mirror site to avoid having the source code offline when the main server is down. --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 2f81ffa..593d9eb 100644 --- a/index.html +++ b/index.html @@ -24,7 +24,7 @@