fixes
This commit is contained in:
parent
babe977b5d
commit
0f5c93a68c
@ -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"
|
||||
|
@ -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") {
|
||||
|
@ -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",
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div class="grid gap-4">
|
||||
{{range .Posts}}
|
||||
<a href="/blog/{{.Meta.Slug}}"
|
||||
class="card posts-item bg-base-100 border-[2px] border-base-300 shadow-xl cursor-pointer">
|
||||
class="card posts-item bg-base-100 border-[2px] border-base-300 hover:bg-base-300 shadow-xl cursor-pointer">
|
||||
<div class="card-body">
|
||||
<header class="card-title">
|
||||
<h2 class="card-title text-2xl">{{.Meta.Title}}</h2>
|
||||
|
@ -0,0 +1 @@
|
||||
<button class="btn">Hello Button</button>
|
@ -1,5 +1,5 @@
|
||||
<nav hx-boost="true" class="z-[100] flex fixed mx-auto w-full md:w-[80%] lg:w-[75%]">
|
||||
<div class="mt-4 mx-4 rounded-2xl shadow-xl bg-base-100 border-base-300 border-[2px] navbar">
|
||||
<nav hx-boost="true" class="flex fixed mx-auto w-full md:w-[80%] lg:w-[75%] z-[102]">
|
||||
<div class="mt-4 mx-4 rounded-2xl shadow-xl bg-base-100 border-base-300 border-[2px] navbar z-[103]">
|
||||
<div class="flex-1">
|
||||
<a href="/" class="btn btn-ghost font-mono text-xl">tijl.dev</a>
|
||||
</div>
|
||||
@ -13,9 +13,9 @@
|
||||
</svg>
|
||||
</summary>
|
||||
<ul
|
||||
class="mt-2 z-[101] menu dropdown-content bg-base-100 border-2 border-base-300 border-t-none rounded-t-none rounded-box w-52 p-3 shadow-xl gap-1">
|
||||
class="menu dropdown-content bg-base-100 border-2 border-base-300 rounded-t-none rounded-box w-52 p-3 shadow-xl gap-1 mt-2">
|
||||
<li>
|
||||
<a class='flex gap-4 {{if eq .Path "/"}}active{{end}}' href="/">
|
||||
<a class='hover:bg-base-300 flex gap-4 {{if eq .Path "/"}}active{{end}}' href="/">
|
||||
<span class="w-5 text-center">
|
||||
{{icon "home" }}
|
||||
</span>
|
||||
@ -23,7 +23,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class='flex gap-4 {{if eq .Path "/blog"}}active{{end}}' href="/blog">
|
||||
<a class='hover:bg-base-300 flex gap-4 {{if eq .Path "/blog"}}active{{end}}' href="/blog">
|
||||
<span class=" w-5 text-center">
|
||||
{{icon "blog"}}
|
||||
</span>
|
||||
@ -31,7 +31,8 @@
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class='flex gap-4 {{if eq .Path "/projects"}}active{{end}}' href="/projects">
|
||||
<a class='hover:bg-base-300 flex gap-4 {{if eq .Path "/projects"}}active{{end}}'
|
||||
href="/projects">
|
||||
<span class="w-5 text-center">
|
||||
{{icon "projects"}}
|
||||
</span>
|
||||
@ -40,7 +41,8 @@
|
||||
</li>
|
||||
{{if .SignedIn}}
|
||||
<li>
|
||||
<a class='flex gap-4 {{if eq .Path "/services"}}active{{end}}' href="/services">
|
||||
<a class='hover:bg-base-300 flex gap-4 {{if eq .Path "/services"}}active{{end}}'
|
||||
href="/services">
|
||||
<span class="w-5 text-center">
|
||||
{{icon "services"}}
|
||||
</span>
|
||||
@ -49,16 +51,17 @@
|
||||
</li>
|
||||
{{end}}
|
||||
<li>
|
||||
<a class='flex gap-4 {{if eq .Path "/about"}}active{{end}}' href="/about">
|
||||
<a class='hover:bg-base-300 flex gap-4 {{if eq .Path "/about"}}active{{end}}' href="/about">
|
||||
<span class="w-5 text-center">
|
||||
{{icon "about"}}
|
||||
</span>
|
||||
<span class="text-base">{{.T.about}}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="flex-none">
|
||||
<details class="dropdown">
|
||||
<summary><button type="menu" class="flex gap-4">
|
||||
<li>
|
||||
<details>
|
||||
<summary class="hover:bg-base-300">
|
||||
<button class="flex gap-4">
|
||||
<span class="w-5 text-center">
|
||||
{{icon "language"}}
|
||||
</span>
|
||||
@ -66,10 +69,9 @@
|
||||
</button>
|
||||
</summary>
|
||||
|
||||
<ul
|
||||
class="menu dropdown-content z-[102] bg-base-100 border-2 border-base-300 rounded-box w-48 p-3 shadow-xl gap-1">
|
||||
<ul>
|
||||
<li>
|
||||
<a class='flex gap-4 {{if eq .Language "en"}}active{{end}}'
|
||||
<a class='mt-1 gap-4 hover:bg-base-300 flex {{if eq .Language "en"}}active{{end}}'
|
||||
href="/settings?lang=en&redirect={{.Path}}">
|
||||
<span class="w-5 h-5 text-center">
|
||||
🇬🇧
|
||||
@ -80,7 +82,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class='flex gap-4 {{if eq .Language "nl"}}active{{end}}'
|
||||
<a class='mt-1 gap-4 hover:bg-base-300 flex {{if eq .Language "nl"}}active{{end}}'
|
||||
href="/settings?lang=nl&redirect={{.Path}}">
|
||||
<span class="w-5 h-5 text-center">
|
||||
🇳🇱
|
||||
@ -89,13 +91,12 @@
|
||||
{{.T.dutch}}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</details>
|
||||
</li>
|
||||
<li>
|
||||
{{if .SignedIn}}
|
||||
<a class='flex gap-4 {{if eq .Path "/account"}}active{{end}}' href="/account">
|
||||
<a class='hover:bg-base-300 flex gap-4 {{if eq .Path "/account"}}active{{end}}' href="/account">
|
||||
<span class="w-5 text-center">
|
||||
{{icon "login"}}
|
||||
</span>
|
||||
|
@ -65,6 +65,9 @@
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
window.location = window.location + "#" + `{{.DefaultService}}`
|
||||
hashChange()
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user