From 66dbdc5f79c4b03c3788b231c7453d0450676abf Mon Sep 17 00:00:00 2001 From: Vicente Ferrari Smith Date: Wed, 26 Mar 2025 21:34:26 +0000 Subject: [PATCH] git-svn-id: svn://losandesgames.com/alfheim-website@42 15359d88-9307-4e75-a9c1-e5686e5897df --- .vscode/launch.json | 6 ++++++ Makefile | 4 ++++ bin/linux_amd64/static/style.css | 2 +- bin/static/style.css | 2 +- go.mod | 2 +- handlers.go | 10 +++++----- static/style.css | 19 ++++++++++--------- 7 files changed, 28 insertions(+), 17 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 40428f1..87c8edd 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -4,6 +4,12 @@ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ + { + "name": "Launch", + "type": "go", + "request": "launch", + "program": "${workspaceFolder}" + }, { "name": "Attach to Remote", "type": "go", diff --git a/Makefile b/Makefile index 1d78da6..fef4c3f 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,10 @@ build: cp -r static bin/linux_amd64 cp favicon.ico bin/linux_amd64 +run: + @echo "Running the website..." + go run ./*.go + .PHONY: deploy deploy: rsync -rP --delete bin/linux_amd64 alfheim@alfheimgame.com:/home/alfheim diff --git a/bin/linux_amd64/static/style.css b/bin/linux_amd64/static/style.css index 9f503cf..151d90d 100644 --- a/bin/linux_amd64/static/style.css +++ b/bin/linux_amd64/static/style.css @@ -172,7 +172,7 @@ input { } footer { - margin-top: auto; + /*margin-top: auto;*/ width: 100%; background-color: #132123; color: white; diff --git a/bin/static/style.css b/bin/static/style.css index 9f503cf..151d90d 100644 --- a/bin/static/style.css +++ b/bin/static/style.css @@ -172,7 +172,7 @@ input { } footer { - margin-top: auto; + /*margin-top: auto;*/ width: 100%; background-color: #132123; color: white; diff --git a/go.mod b/go.mod index fc1848c..e879a5c 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module alfheimgame +module alfheimgame.com/alfheim go 1.22.2 diff --git a/handlers.go b/handlers.go index ca514c6..0471d12 100644 --- a/handlers.go +++ b/handlers.go @@ -214,12 +214,12 @@ func register(w http.ResponseWriter, r *http.Request) { } id := authenticated_user(w, r) - account, err := users.GetAccount(id) + account, _ := users.GetAccount(id) - if err != nil { - http.Error(w, "Internal Server Error", 500) - log.Println(err) - } + // if err != nil { + // http.Error(w, "Internal Server Error", 500) + // log.Println(err) + // } switch r.Method { case http.MethodGet: diff --git a/static/style.css b/static/style.css index 9f503cf..8044bd1 100644 --- a/static/style.css +++ b/static/style.css @@ -1,29 +1,29 @@ html { - height: 100%; - padding: 8px; /*background: no-repeat url(/static/image.png); background-size: cover; background-position: center;*/ + height: 100vh; background-color: black; box-sizing: border-box; } body { + display: flex; + flex-direction: column; + justify-content: space-between; background-color: #3475CB; font-family: "Vollkorn"; color: white; margin-top: 0px; + margin-bottom: 0px; margin-left: auto; margin-right: auto; - margin-bottom: 0px; - display: flex; - flex-direction: column; - min-height: 100%; max-width: 900px; + min-height: 100%; } header { - max-width: 100%; + } nav { @@ -65,7 +65,8 @@ nav { } main { - padding: 5px; + padding: 8px; + flex: 1; display: flex; flex-direction: column; justify-content: center; @@ -172,7 +173,7 @@ input { } footer { - margin-top: auto; + /*margin-top: auto;*/ width: 100%; background-color: #132123; color: white;