diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..3f03919 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +themes/*.css linguist-detectable=false \ No newline at end of file diff --git a/TODO.md b/TODO.md index 13fffbb..233dcb6 100644 --- a/TODO.md +++ b/TODO.md @@ -3,3 +3,4 @@ - [ ] View incidents - [ ] Latency graphs? - [ ] README +- [ ] Site metadata diff --git a/go.mod b/go.mod index 251bd2a..342bb2e 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module status-page +module statsys go 1.25.4 diff --git a/src/config.go b/internal/config.go similarity index 99% rename from src/config.go rename to internal/config.go index cecf405..8cfbb18 100644 --- a/src/config.go +++ b/internal/config.go @@ -1,4 +1,4 @@ -package main +package internal import ( "log" diff --git a/src/database.go b/internal/database.go similarity index 99% rename from src/database.go rename to internal/database.go index 7dfd24d..95eae4f 100644 --- a/src/database.go +++ b/internal/database.go @@ -1,4 +1,4 @@ -package main +package internal import ( "database/sql" @@ -12,7 +12,7 @@ import ( var STATUS_PRIORITY = map[string]int{"Offline": 2, "Degraded": 1, "Online": 0} var db *sql.DB -func InitializeDatabase() { +func InitDatabase() { // open/create database var err error db, err = sql.Open("sqlite", "status.db") diff --git a/src/http.go b/internal/http.go similarity index 99% rename from src/http.go rename to internal/http.go index d11239d..d05e283 100644 --- a/src/http.go +++ b/internal/http.go @@ -1,4 +1,4 @@ -package main +package internal import ( "html/template" diff --git a/src/statuses.go b/internal/statuses.go similarity index 99% rename from src/statuses.go rename to internal/statuses.go index 4d0922f..dac4195 100644 --- a/src/statuses.go +++ b/internal/statuses.go @@ -1,4 +1,4 @@ -package main +package internal import ( "log" diff --git a/main.go b/main.go new file mode 100644 index 0000000..3f45b66 --- /dev/null +++ b/main.go @@ -0,0 +1,11 @@ +package main + +import "statsys/internal" + +func main() { + internal.LoadConfig() + internal.InitDatabase() + defer internal.CloseDatabase() + internal.StartCheckingStatuses() + internal.StartHttpServer() +} diff --git a/src/main.go b/src/main.go deleted file mode 100644 index ce7e1b7..0000000 --- a/src/main.go +++ /dev/null @@ -1,9 +0,0 @@ -package main - -func main() { - LoadConfig() - InitializeDatabase() - defer CloseDatabase() - StartCheckingStatuses() - StartHttpServer() -} diff --git a/www/index.html b/www/index.html index 780c670..9621402 100644 --- a/www/index.html +++ b/www/index.html @@ -18,6 +18,7 @@ flex-direction: column; width: 100%; height: max-content; + min-height: 100%; max-width: 40rem; padding: 4rem 2rem 1.5rem; background-color: white; diff --git a/www/themes/color.css b/www/themes/color.css index 98e10de..e16ad46 100644 --- a/www/themes/color.css +++ b/www/themes/color.css @@ -86,7 +86,7 @@ hr { } .status-bar.Unknown { - background: radial-gradient(circle at center, #94a3b8 3px, transparent 3px); + background: radial-gradient(circle at center, rgba(0, 0, 0, 0.1) 3px, transparent 3px); } .bars-footer { @@ -111,7 +111,7 @@ footer a:hover { } .combobox-trigger { - background-color: white; + background-color: #f8fafc; border: 1px solid rgba(15, 23, 42, 0.4); } @@ -124,7 +124,7 @@ footer a:hover { } .combobox-dropdown { - background-color: white; + background-color: #f8fafc; border: 1px solid rgba(15, 23, 42, 0.4); }