Compare commits

...

5 commits

Author SHA1 Message Date
2dfce58c6d
chore: Change URL to mirror
Change to mirror site to avoid having the source code offline when the
main server is down.
2024-04-15 21:11:03 +02:00
29813a1697 Fix link 2023-08-04 18:08:11 +02:00
09b2de6e94 Merge pull request 'simpleButton' (#1) from simpleButton into main
Reviewed-on: #1
2023-08-04 17:11:30 +02:00
8aa281e1f4 Improve responsiveness 2023-08-04 16:45:20 +02:00
c020aacdce Add simple button to try again for now 2023-08-04 15:46:53 +02:00
3 changed files with 90 additions and 7 deletions

View file

@ -1,22 +1,33 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Service unavailable</title>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="robots" content="noindex">
<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 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/or 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>
<script src="script.js"></script>
<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>
</body>
</html>

View file

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

View file

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