Compare commits

..

1 commit

Author SHA1 Message Date
4432e3c4d0 Add project files 2023-08-05 19:32:53 +02:00
11 changed files with 132 additions and 90 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
node_modules

5
.idea/.gitignore vendored Normal file
View file

@ -0,0 +1,5 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/

12
.idea/down-message.iml Normal file
View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
<excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptLibraryMappings">
<includedPredefinedLibrary name="Node.js Core" />
</component>
</project>

8
.idea/modules.xml Normal file
View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/down-message.iml" filepath="$PROJECT_DIR$/.idea/down-message.iml" />
</modules>
</component>
</project>

6
.idea/vcs.xml Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

59
flake.lock Normal file
View file

@ -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
}

28
flake.nix Normal file
View file

@ -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
'';
};
}
);
}

View file

@ -1,33 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="robots" content="noindex">
<title>Service unavailable</title>
<title>Service unavailable</title>
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="shortcut icon" type="image/png" href="assets/icon.jpg">
<meta name="color-scheme" content="light dark">
<meta name="robots" content="noindex">
</head>
<body>
<main>
<h1>Oh, no!</h1>
<p>The website you are trying to reach is currently down. Your URL works, but the system is in maintenance and/or powered off temporarily.</p>
<p>The website you are trying to reach is currently down. Your URL works, but the system is in maintenance and powered off temporarily.</p>
<p>Please come back later!</p>
<p>Kind regards, <a href="https://tibo.depeuter.dev">Tibo De Peuter</a></p>
<div id="checkContainer"></div>
<img src="/assets/oh-no-kitten.jpg" alt="kitten holding paw to forehead"/>
</main>
<footer>
<p>
Made with <span class="heart">&hearts;</span>.
<a href="https://github.com/tdpeuter/down-message" about="source code of this webpage" class="hidden">Source code</a>
</p>
</footer>
<script src="script.js"></script>
<script src="script.js"></script>
</body>
</html>

View file

@ -48,23 +48,13 @@ 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) {
createTryAgainButton(destination);
createCheckButton(destination);
}
}

View file

@ -1,22 +1,3 @@
: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;
@ -36,46 +17,3 @@ footer {
.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%;
}