INIT
This commit is contained in:
parent
9d22f59da2
commit
ccb33a2f85
17
Dockerfile
Normal file
17
Dockerfile
Normal file
@ -0,0 +1,17 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
FROM golang:1.22
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY go.mod ./
|
||||
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN go build -o /website
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD [ "/website" ]
|
||||
22
assets/main.css
Normal file
22
assets/main.css
Normal file
@ -0,0 +1,22 @@
|
||||
div {
|
||||
color: black;
|
||||
background: white;
|
||||
padding: 15px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
-ms-transform: translateX(-50%) translateY(-50%);
|
||||
-webkit-transform: translate(-50%,-50%);
|
||||
transform: translate(-50%,-50%);
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
font-size: 180pt;
|
||||
}
|
||||
|
||||
p {
|
||||
text-align: center;
|
||||
font-size: 40pt;
|
||||
font-stretch: expanded;
|
||||
}
|
||||
3
go.mod
Normal file
3
go.mod
Normal file
@ -0,0 +1,3 @@
|
||||
module git.neunzweinull.com/jan/neunzweinull.com
|
||||
|
||||
go 1.22.2
|
||||
14
index.html
Normal file
14
index.html
Normal file
@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>NeunZweiNull</title>
|
||||
<link rel="stylesheet" href="./assets/main.css">
|
||||
</head>
|
||||
<body>
|
||||
<div >
|
||||
<h1>920</h1>
|
||||
<p>NeunZweiNull</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
14
main.go
Normal file
14
main.go
Normal file
@ -0,0 +1,14 @@
|
||||
package main
|
||||
|
||||
import "net/http"
|
||||
|
||||
func main() {
|
||||
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||
http.ServeFile(w, r, "index.html")
|
||||
})
|
||||
|
||||
fs := http.FileServer(http.Dir("assets"))
|
||||
http.Handle("/assets/", http.StripPrefix("/assets/", fs))
|
||||
|
||||
http.ListenAndServe(":8080", nil)
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user