MASCOT UPDATE

Package Release Number

better licence image

Shrunk image

Fixed size
This commit is contained in:
riomoo 2026-01-25 17:36:35 -05:00
parent 05a1723805
commit c88cebd8b1
Signed by: riomoo
SSH key fingerprint: SHA256:dP5B5iLpXU5V8aBA8eGm9tN5YtxXJybnv4McyltPyzM
10 changed files with 42 additions and 6 deletions

View file

@ -21,6 +21,7 @@ import (
"regexp"
"sort"
"strings"
"io/fs"
"sync"
"time"
"runtime"
@ -39,6 +40,9 @@ import (
//go:embed templates/index.html
var templateFS embed.FS
//go:embed all:static
var staticFS embed.FS
// ComicInfo represents the standard ComicInfo.xml metadata
type ComicInfo struct {
XMLName xml.Name `xml:"ComicInfo"`
@ -135,6 +139,14 @@ func main() {
loadUsers()
initWatchFolders()
// Create static sub-filesystem once
staticSubFS, err := fs.Sub(staticFS, "static")
if err != nil {
log.Fatal(fmt.Errorf("failed to create static sub-filesystem: %w", err))
}
// Create handlers once and reuse
staticHandler := http.FileServer(http.FS(staticSubFS))
http.HandleFunc("/api/register", handleRegister)
http.HandleFunc("/api/login", handleLogin)
@ -154,6 +166,7 @@ func main() {
http.HandleFunc("/api/admin/delete-comic/", authMiddleware(handleDeleteComic))
http.HandleFunc("/api/watch-folder", authMiddleware(handleWatchFolder))
http.HandleFunc("/", serveUI)
http.Handle("/static/", http.StripPrefix("/static/", staticHandler))
go func() {
for {

BIN
app/gopherbook/static/images/favicon/favicon.ico (Stored with Git LFS) Normal file

Binary file not shown.

View file

@ -3,6 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="/static/images/favicon/favicon.ico" rel="shortcut icon" type="image/x-icon">
<title>Gopherbook</title>
<style>
* {