From 27aab70386c68f3a0f22c52e72b91cf16b289100 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Mon, 25 Mar 2024 12:08:35 -0600 Subject: [PATCH] initial commit --- Dockerfile | 14 ++++++++++++++ go.mod | 3 +++ src/database/users.go | 3 +++ src/main.go | 13 +++++++++++++ static/css/styles.css | 42 ++++++++++++++++++++++++++++++++++++++++++ static/js/script.js | 1 + templates/base.html | 20 ++++++++++++++++++++ 7 files changed, 96 insertions(+) create mode 100644 Dockerfile create mode 100644 go.mod create mode 100644 src/database/users.go create mode 100644 src/main.go create mode 100644 static/css/styles.css create mode 100644 static/js/script.js create mode 100644 templates/base.html diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..728ff30 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM golang:1.22 + +WORKDIR /app + +COPY go.mod go.sum ./ +RUN go mod download + +COPY *.go ./ + +RUN go build -o /app/hatecomputers + +EXPOSE 8080 + +CMD ["/app/hatecomputers", "--port", "8080", "--template-path", "/app/templates", "--database-path", "/app/db/hatecomputers.db", "--static-path", "/app/static"] diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..a3e9fb8 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module hatecomputers.club/m + +go 1.22.1 diff --git a/src/database/users.go b/src/database/users.go new file mode 100644 index 0000000..06e5808 --- /dev/null +++ b/src/database/users.go @@ -0,0 +1,3 @@ +func getUsers() { + +} diff --git a/src/main.go b/src/main.go new file mode 100644 index 0000000..f5ba944 --- /dev/null +++ b/src/main.go @@ -0,0 +1,13 @@ +package server + +import ( + "fmt" + "net/http" + + "github.com/joho/godotenv" + _ "github.com/mattn/go-sqlite3" +) + +func main() { + err := godotenv.Load() +} diff --git a/static/css/styles.css b/static/css/styles.css new file mode 100644 index 0000000..3b2f447 --- /dev/null +++ b/static/css/styles.css @@ -0,0 +1,42 @@ +:root { + /* Light theme colors */ + --background-color: #F4E8E9; /* Soft pink background */ + --text-color: #333; /* Dark text for contrast */ + --link-color: #D291BC; /* Retro pink for links */ + --container-bg: #FFF7F8; /* Very light pink for containers */ +} + +.dark-mode { + /* Dark theme colors */ + --background-color: #333; /* Dark background */ + --text-color: #F4E8E9; /* Light text for contrast */ + --link-color: #B86B77; /* Soft pink for links */ + --container-bg: #424242; /* Darker shade for containers */ +} + +body { + font-family: 'ComicSans', sans-serif; + background-color: var(--background-color); + color: var(--text-color); + padding: 20px; + text-align: center; +} + +a { + color: var(--link-color); + text-decoration: none; + font-weight: bold; +} + +a:hover { + text-decoration: underline; +} + +.container { + max-width: 600px; + margin: auto; + background-color: var(--container-bg); + padding: 20px; + border-radius: 8px; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); +} diff --git a/static/js/script.js b/static/js/script.js new file mode 100644 index 0000000..6b2b3db --- /dev/null +++ b/static/js/script.js @@ -0,0 +1 @@ +console.log("hello world"); diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..d855b51 --- /dev/null +++ b/templates/base.html @@ -0,0 +1,20 @@ +{{ define "base" }} + + + + + hatecomputers.club + + + + + +
+ {{ template "content" . }} +
+ + + + + +{{ end }}