initial commit

This commit is contained in:
Elizabeth Hunt 2024-03-25 12:08:35 -06:00
commit 27aab70386
Signed by untrusted user who does not match committer: simponic
GPG Key ID: 52B3774857EB24B1
7 changed files with 96 additions and 0 deletions

14
Dockerfile Normal file
View File

@ -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"]

3
go.mod Normal file
View File

@ -0,0 +1,3 @@
module hatecomputers.club/m
go 1.22.1

3
src/database/users.go Normal file
View File

@ -0,0 +1,3 @@
func getUsers() {
}

13
src/main.go Normal file
View File

@ -0,0 +1,13 @@
package server
import (
"fmt"
"net/http"
"github.com/joho/godotenv"
_ "github.com/mattn/go-sqlite3"
)
func main() {
err := godotenv.Load()
}

42
static/css/styles.css Normal file
View File

@ -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);
}

1
static/js/script.js Normal file
View File

@ -0,0 +1 @@
console.log("hello world");

20
templates/base.html Normal file
View File

@ -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 }}