diff --git a/CLAUDE.md b/CLAUDE.md index 8b804b6..17f6e1f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -54,4 +54,4 @@ See `.env.example` for all required variables. ## Module Path -`github.com/forgao/forgebucket` +`github.com/forgeo/forgebucket` diff --git a/cmd/forgebucket/main.go b/cmd/forgebucket/main.go index a514199..d114d34 100644 --- a/cmd/forgebucket/main.go +++ b/cmd/forgebucket/main.go @@ -14,9 +14,9 @@ import ( "github.com/joho/godotenv" _ "github.com/lib/pq" - "github.com/forgao/forgebucket/internal/api" - "github.com/forgao/forgebucket/internal/config" - "github.com/forgao/forgebucket/web" + "github.com/forgeo/forgebucket/internal/api" + "github.com/forgeo/forgebucket/internal/config" + "github.com/forgeo/forgebucket/web" ) func main() { diff --git a/frontend/src/index.css b/frontend/src/index.css index 5fb3313..46ba5be 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -1,111 +1,15 @@ -:root { - --text: #6b6375; - --text-h: #08060d; - --bg: #fff; - --border: #e5e4e7; - --code-bg: #f4f3ec; - --accent: #aa3bff; - --accent-bg: rgba(170, 59, 255, 0.1); - --accent-border: rgba(170, 59, 255, 0.5); - --social-bg: rgba(244, 243, 236, 0.5); - --shadow: - rgba(0, 0, 0, 0.1) 0 10px 15px -3px, rgba(0, 0, 0, 0.05) 0 4px 6px -2px; +@import "tailwindcss"; - --sans: system-ui, 'Segoe UI', Roboto, sans-serif; - --heading: system-ui, 'Segoe UI', Roboto, sans-serif; - --mono: ui-monospace, Consolas, monospace; - - font: 18px/145% var(--sans); - letter-spacing: 0.18px; - color-scheme: light dark; - color: var(--text); - background: var(--bg); - font-synthesis: none; - text-rendering: optimizeLegibility; +/* Reset #root to full viewport — Tailwind handles all layout via utility classes */ +body { + margin: 0; + font-family: system-ui, 'Segoe UI', Roboto, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; - - @media (max-width: 1024px) { - font-size: 16px; - } -} - -@media (prefers-color-scheme: dark) { - :root { - --text: #9ca3af; - --text-h: #f3f4f6; - --bg: #16171d; - --border: #2e303a; - --code-bg: #1f2028; - --accent: #c084fc; - --accent-bg: rgba(192, 132, 252, 0.15); - --accent-border: rgba(192, 132, 252, 0.5); - --social-bg: rgba(47, 48, 58, 0.5); - --shadow: - rgba(0, 0, 0, 0.4) 0 10px 15px -3px, rgba(0, 0, 0, 0.25) 0 4px 6px -2px; - } - - #social .button-icon { - filter: invert(1) brightness(2); - } + color: #172B4D; + background: #FAFBFC; } #root { - width: 1126px; - max-width: 100%; - margin: 0 auto; - text-align: center; - border-inline: 1px solid var(--border); - min-height: 100svh; - display: flex; - flex-direction: column; - box-sizing: border-box; -} - -body { - margin: 0; -} - -h1, -h2 { - font-family: var(--heading); - font-weight: 500; - color: var(--text-h); -} - -h1 { - font-size: 56px; - letter-spacing: -1.68px; - margin: 32px 0; - @media (max-width: 1024px) { - font-size: 36px; - margin: 20px 0; - } -} -h2 { - font-size: 24px; - line-height: 118%; - letter-spacing: -0.24px; - margin: 0 0 8px; - @media (max-width: 1024px) { - font-size: 20px; - } -} -p { - margin: 0; -} - -code, -.counter { - font-family: var(--mono); - display: inline-flex; - border-radius: 4px; - color: var(--text-h); -} - -code { - font-size: 15px; - line-height: 135%; - padding: 4px 8px; - background: var(--code-bg); + height: 100dvh; } diff --git a/internal/api/router.go b/internal/api/router.go index a45cbb7..c16afc5 100644 --- a/internal/api/router.go +++ b/internal/api/router.go @@ -10,9 +10,9 @@ import ( gcsrf "github.com/gorilla/csrf" "github.com/gorilla/sessions" - "github.com/forgao/forgebucket/internal/api/handlers" - "github.com/forgao/forgebucket/internal/api/middleware" - "github.com/forgao/forgebucket/internal/config" + "github.com/forgeo/forgebucket/internal/api/handlers" + "github.com/forgeo/forgebucket/internal/api/middleware" + "github.com/forgeo/forgebucket/internal/config" ) func New(cfg *config.Config, store sessions.Store, staticFiles fs.FS) http.Handler { diff --git a/internal/models/migrations/001_init.go b/internal/models/migrations/001_init.go index 8551403..c232806 100644 --- a/internal/models/migrations/001_init.go +++ b/internal/models/migrations/001_init.go @@ -1,7 +1,7 @@ package migrations import ( - "github.com/forgao/forgebucket/internal/models" + "github.com/forgeo/forgebucket/internal/models" "xorm.io/xorm" ) diff --git a/web/embed.go b/web/embed.go index ce50124..d61127f 100644 --- a/web/embed.go +++ b/web/embed.go @@ -3,18 +3,23 @@ package web import ( "embed" "io/fs" - "net/http" ) //go:embed all:dist var staticFiles embed.FS // FS returns the embedded frontend/dist subtree. -// Falls back to an empty FS during development (before `make build` runs). func FS() fs.FS { sub, err := fs.Sub(staticFiles, "dist") if err != nil { - return http.FS(http.Dir("")) + // dist not present (pre-build); return an empty FS so the server still starts + return emptyFS{} } return sub } + +type emptyFS struct{} + +func (emptyFS) Open(name string) (fs.File, error) { + return nil, &fs.PathError{Op: "open", Path: name, Err: fs.ErrNotExist} +}