diff --git a/internal/apps/uploader/main.go b/internal/apps/uploader/main.go index 05b4aa1..dcdc24f 100644 --- a/internal/apps/uploader/main.go +++ b/internal/apps/uploader/main.go @@ -33,7 +33,7 @@ func Setup() { a.Get("/app/uploader", func(c *fiber.Ctx) error { _, err := user.GetSession(c) if err != nil { - return c.Redirect("/auth?redirect=/app/uploader", http.StatusUnauthorized) + return c.Redirect("/auth?redirect=" + c.Path()) } data := *web.Common(c) data["Title"] = "tmp" diff --git a/internal/handlers/services.go b/internal/handlers/services.go index c3829c4..0725215 100644 --- a/internal/handlers/services.go +++ b/internal/handlers/services.go @@ -59,16 +59,21 @@ var services = []Service{ } func servicesHandler(c *fiber.Ctx) error { + _, err := user.GetSession(c) + if err != nil { + return c.Redirect("/auth?redirect=" + c.Path()) + } data := *web.Common(c) data["Title"] = i18n.Translate(c, "services") data["Services"] = services + data["DefaultService"] = "element" return c.Render("services", data, "layouts/base") } func serviceHandler(c *fiber.Ctx) error { _, err := user.GetSession(c) if err != nil { - return c.Next() + return c.Redirect("/auth?redirect=" + c.Path()) } for _, service := range services { if service.Slug == c.Params("service") { @@ -81,7 +86,7 @@ func serviceHandler(c *fiber.Ctx) error { func serviceInfoHandler(c *fiber.Ctx) error { _, err := user.GetSession(c) if err != nil { - return c.Next() + return c.Redirect("/auth?redirect=" + c.Path()) } for _, service := range services { if service.Slug == c.Params("service") { diff --git a/tailwind.config.ts b/tailwind.config.ts index 6c92f84..06a6ebb 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -14,11 +14,11 @@ module.exports = { primary: "#f7931a", secondary: "#804df3", // #804df3 accent: "#66c4fa", // #66c4fa - neutral: "#f7931a", // #212121 + neutral: "#212121", // #212121 //"base-100": "#181818", // previously 171717 "base-100": "#0B0908", "base-200": "#0B0908", // previously 151515 - "base-300": "#121212", // previously 121212 + "base-300": "#151515", // previously 121212 info: "#0ea5e9", success: "#22c55e", warning: "#FBBD23", diff --git a/web/lib/main.css b/web/lib/main.css index a45e637..09c0bad 100644 --- a/web/lib/main.css +++ b/web/lib/main.css @@ -4,7 +4,16 @@ @layer components { .btn:not(.btn-ghost) { - @apply border-base-300 border-2 ; + @apply border-base-300 border-2; + } + .btn:not(.btn-primary) { + @apply hover:bg-base-300; + } + .input { + @apply border-2 border-base-300; + } + .active { + @apply !bg-primary !text-black; } } @@ -25,11 +34,12 @@ } @font-face { - font-family: 'CantarellVF'; + font-family: 'Cantarell', sans-serif; src: url('/static/fonts/Cantarell-VF.woff2'), format('woff2'); font-weight: Regular; font-style: normal; font-display: swap; + font-weight: 1 1000; } diff --git a/web/views/blog.html b/web/views/blog.html index d2b0aad..0b3a072 100644 --- a/web/views/blog.html +++ b/web/views/blog.html @@ -2,7 +2,7 @@
{{range .Posts}} + class="card posts-item bg-base-100 border-[2px] border-base-300 hover:bg-base-300 shadow-xl cursor-pointer">

{{.Meta.Title}}

diff --git a/web/views/index.html b/web/views/index.html index e69de29..a7effc8 100644 --- a/web/views/index.html +++ b/web/views/index.html @@ -0,0 +1 @@ + diff --git a/web/views/partials/menu.html b/web/views/partials/menu.html index 3c0c236..052a460 100644 --- a/web/views/partials/menu.html +++ b/web/views/partials/menu.html @@ -1,5 +1,5 @@ -