Move web UI from /ui/ to /web/ path prefix
The web UI is now mounted at /web/ (previously /ui/) — cmd/server/main.go
wraps web.Server.Handler with http.StripPrefix("/web", ...), so
internal/web's own routes stay unprefixed (/, /login, /logout,
/shares/..., /static/...) and only the outer mux adds the prefix. All
templates, redirects, and cookie paths updated accordingly. The root '/'
route reverts to the original unauthenticated welcome page (linking to
/web/), and /cal/, /card/, /files/ are unaffected.
Also gitignore the bin/ build output directory.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -7,17 +7,17 @@ templ Layout(title string, username string) {
|
||||
<meta charset="UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<title>{ title } · nidus</title>
|
||||
<link rel="stylesheet" href="/ui/static/app.css"/>
|
||||
<script src="/ui/static/htmx.min.js" defer></script>
|
||||
<link rel="stylesheet" href="/web/static/app.css"/>
|
||||
<script src="/web/static/htmx.min.js" defer></script>
|
||||
</head>
|
||||
<body class="h-full text-gray-900">
|
||||
<nav class="bg-white border-b border-gray-200">
|
||||
<div class="max-w-4xl mx-auto px-4 py-3 flex items-center justify-between">
|
||||
<a href="/ui/" class="font-semibold text-lg tracking-tight">nidus</a>
|
||||
<a href="/web/" class="font-semibold text-lg tracking-tight">nidus</a>
|
||||
if username != "" {
|
||||
<div class="flex items-center gap-4 text-sm text-gray-600">
|
||||
<span>{ username }</span>
|
||||
<a href="/ui/logout" class="text-red-600 hover:underline">Logout</a>
|
||||
<a href="/web/logout" class="text-red-600 hover:underline">Logout</a>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user