summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElizabeth Hunt <elizabeth.hunt@simponic.xyz>2024-03-25 12:08:35 -0600
committerElizabeth Hunt <elizabeth.hunt@simponic.xyz>2024-03-25 12:08:35 -0600
commit27aab70386c68f3a0f22c52e72b91cf16b289100 (patch)
tree9194b74d8663cedf9d6677b5bd900404583139d4
downloadhatecomputers.club-27aab70386c68f3a0f22c52e72b91cf16b289100.tar.gz
hatecomputers.club-27aab70386c68f3a0f22c52e72b91cf16b289100.zip
initial commit
-rw-r--r--Dockerfile14
-rw-r--r--go.mod3
-rw-r--r--src/database/users.go3
-rw-r--r--src/main.go13
-rw-r--r--static/css/styles.css42
-rw-r--r--static/js/script.js1
-rw-r--r--templates/base.html20
7 files changed, 96 insertions, 0 deletions
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" }}
+
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>hatecomputers.club</title>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
+ <link rel="stylesheet" type="text/css" href="/static/css/styles.css">
+ </head>
+ <body>
+ <div id="content" class="container">
+ {{ template "content" . }}
+ </div>
+
+ <script src="/static/js/script.js"></script>
+ </body>
+</html>
+
+{{ end }}