initialized go project

This commit is contained in:
Sven Vogel 2023-11-24 20:00:35 +01:00
parent c80e13b2e0
commit 6cc60cdd16
4 changed files with 216 additions and 0 deletions

3
go.mod Normal file
View File

@ -0,0 +1,3 @@
module Homelab/Errorpages
go 1.19

17
main.go Normal file
View File

@ -0,0 +1,17 @@
package main
import (
"fmt"
"log"
"net/http"
)
func handler(w http.ResponseWriter, r *http.Request) {
// url path: r.URL.Path[1:]
}
func main() {
http.HandleFunc("/", handler)
log.Fatal(http.ListenAndServe("127.0.0.1:8000", nil))
}

166
web/master.css Normal file
View File

@ -0,0 +1,166 @@
@font-face {
font-family: Mont;
src: url("res/font/Mont-Heavy.otf");
}
html, body, * {
margin: 0;
padding: 0;
color: #f2f3f4;
background-color: #333333;
font-family: Mont, sans-serif;
text-align: center;
}
h1 {
position: relative;
top: -1rem;
background: transparent;
font-weight: normal;
font-size: 3rem;
line-height: 3rem;
}
h2 {
position: relative;
top: -1rem;
font-weight: bold;
font-size: 9rem;
line-height: 9rem;
color: transparent;
opacity: 1;
background: repeating-linear-gradient(45deg, #f2f3f4, #f2f3f4 8px, rgba(242, 244, 245, 0.7) 8px, rgba(242, 244, 245, 0.7) 16px);
background-clip: text;
-webkit-background-clip: text;
background-size: 200% 200%;
animation: barberpole 50s linear infinite;
}
@keyframes barberpole {
100% {
background-position: 100% 100%;
}
}
h3 {
position: relative;
top: -1rem;
font-family: sans-serif;
font-weight: normal;
font-size: 1.5rem;
padding-bottom: 1.5rem;
width: calc(min(80%, 40rem));
margin-left: auto;
margin-right: auto;
}
#mountain {
width: 100%;
max-height: 30rem;
background-color: #4682b4;
border-top: 2rem solid #4682b4;
}
#rocks {
width: 100%;
height: 0.5rem;
position: relative;
top: -0.75rem;
background: transparent url("res/svg/rocks.svg") repeat-x;
background-size: contain;
}
.subtle {
padding-top: 2rem;
font-weight: normal;
font-family: sans-serif;
opacity: 0.5;
}
hr {
margin-top: 2.5rem;
width: calc(min(20rem, 80%));
margin-right: auto;
margin-left: auto;
opacity: 0.5;
}
a {
text-decoration: none;
background: #f2f3f4;
color: #333333;
border-radius: 0.5rem;
padding: 0.75rem;
}
div {
line-height: 1.5rem;
}
#cloud1 {
position: absolute;
top: 1rem;
width: 100%;
height: 4rem;
background: transparent url("res/svg/cloud.svg") no-repeat center;
background-size: contain;
opacity: 0.5;
background-position-x: -8rem;
animation: cloud-motion-1 30s linear infinite;
}
@keyframes cloud-motion-1 {
100% {
background-position: calc(100% + 8rem) 0;
}
}
#cloud2 {
position: absolute;
top: 10rem;
width: 100%;
height: 4rem;
background: transparent url("res/svg/cloud.svg") no-repeat center;
background-size: contain;
opacity: 0.5;
background-position-x: -8rem;
animation: cloud-motion-1 30s 15s linear infinite;
}
@keyframes cloud-motion-2 {
100% {
background-position: calc(100% + 8rem) 0;
}
}
#cloud3 {
top: 4rem;
position: absolute;
width: 100%;
height: 4rem;
background: transparent url("res/svg/cloud.svg") no-repeat center;
background-size: contain;
opacity: 0.5;
background-position-x: -8rem;
animation: cloud-motion-1 30s 20s linear infinite;
}
@keyframes cloud-motion-3 {
100% {
background-position: calc(100% + 8rem) 0;
}
}

30
web/page.html Normal file
View File

@ -0,0 +1,30 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Montehaselino - Automatic Status Response</title>
<link href="master.css" rel="stylesheet"/>
</head>
<body>
<div>
<div id="cloud1"></div>
<div id="cloud2"></div>
<div id="cloud3"></div>
<img id="mountain" src="res/svg/error-page-overlay.svg" alt="">
<div id="rocks"></div>
<h1>ERROR</h1>
<h1>404</h1>
<h2>Page ot found</h2>
<a href="javascript:window.history.back();">Go Back</a>
<hr>
<div class="subtle">
This is an automatically generated error response page. <br>
Please contact administration if you feel this shouldn't be here.
</div>
</div>
</body>
</html>