mirror of
https://github.com/acaloiaro/garbagespeak.com
synced 2026-07-21 18:29:08 +00:00
Boost everything
This commit is contained in:
parent
8056924f85
commit
532b1104dc
4 changed files with 10 additions and 7 deletions
|
|
@ -28,7 +28,7 @@ title: Create Account
|
||||||
|
|
||||||
<label for="password">Password</label>
|
<label for="password">Password</label>
|
||||||
<input
|
<input
|
||||||
id="password
|
id="password"
|
||||||
type="password"
|
type="password"
|
||||||
name="password"
|
name="password"
|
||||||
placeholder="desired password"
|
placeholder="desired password"
|
||||||
|
|
@ -39,7 +39,7 @@ title: Create Account
|
||||||
<label for="password_confirmation">Password Confirmation</label>
|
<label for="password_confirmation">Password Confirmation</label>
|
||||||
<input
|
<input
|
||||||
id="password_confirmation"
|
id="password_confirmation"
|
||||||
type="text"
|
type="password"
|
||||||
name="password_confirmation"
|
name="password_confirmation"
|
||||||
placeholder="desired password again"
|
placeholder="desired password again"
|
||||||
hx-post="{{ .Site.Params.apiBaseUrl }}/users/new_user_validation"
|
hx-post="{{ .Site.Params.apiBaseUrl }}/users/new_user_validation"
|
||||||
|
|
|
||||||
|
|
@ -94,12 +94,12 @@ enableInlineShortcodes = true
|
||||||
[[languages.en.menu.main]]
|
[[languages.en.menu.main]]
|
||||||
identifier = "dictionary"
|
identifier = "dictionary"
|
||||||
name = "Dictionary"
|
name = "Dictionary"
|
||||||
url = "/dictionary"
|
url = "/dictionary/"
|
||||||
|
|
||||||
[[languages.en.menu.main]]
|
[[languages.en.menu.main]]
|
||||||
identifier = "faq"
|
identifier = "faq"
|
||||||
name = "FAQ"
|
name = "FAQ"
|
||||||
url = "/faq"
|
url = "/faq/"
|
||||||
weight = 2
|
weight = 2
|
||||||
|
|
||||||
[module]
|
[module]
|
||||||
|
|
|
||||||
|
|
@ -184,7 +184,7 @@ func main() {
|
||||||
AllowCredentials: true,
|
AllowCredentials: true,
|
||||||
AllowedOrigins: []string{"http://localhost:1313", fmt.Sprintf("https://%s", os.Getenv("SITE_DOMAIN"))},
|
AllowedOrigins: []string{"http://localhost:1313", fmt.Sprintf("https://%s", os.Getenv("SITE_DOMAIN"))},
|
||||||
AllowedMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"},
|
AllowedMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"},
|
||||||
AllowedHeaders: []string{"Accept", "Cookie", "Authorization", "Content-Type", "X-CSRF-Token", "hx-target", "hx-current-url", "hx-request", "hx-trigger", "hx-trigger-name"},
|
AllowedHeaders: []string{"Accept", "Cookie", "Authorization", "Content-Type", "X-CSRF-Token", "hx-target", "hx-current-url", "hx-request", "hx-trigger", "hx-trigger-name", "hx-boosted"},
|
||||||
ExposedHeaders: []string{"Link", "HX-Location", "Vary", "Access-Control-Allow-Origin"},
|
ExposedHeaders: []string{"Link", "HX-Location", "Vary", "Access-Control-Allow-Origin"},
|
||||||
MaxAge: 300, // Maximum value not ignored by any of major browsers
|
MaxAge: 300, // Maximum value not ignored by any of major browsers
|
||||||
}))
|
}))
|
||||||
|
|
@ -481,7 +481,9 @@ func loginHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
// logoutHandler handles users logout requests
|
// logoutHandler handles users logout requests
|
||||||
func logoutHandler(w http.ResponseWriter, r *http.Request) {
|
func logoutHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
sessions.Destroy(r.Context())
|
sessions.Destroy(r.Context())
|
||||||
http.Redirect(w, r, appURL(), http.StatusFound)
|
|
||||||
|
w.Header().Add("hx-location", appURL())
|
||||||
|
w.WriteHeader(http.StatusOK)
|
||||||
}
|
}
|
||||||
|
|
||||||
// navUserItems returns a nav items depending on whether the user is logged in
|
// navUserItems returns a nav items depending on whether the user is logged in
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,8 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ partial "head.html" . }}
|
{{ partial "head.html" . }}
|
||||||
</head>
|
</head>
|
||||||
<body class="{{- ( or .Params.color $.Site.Params.ThemeColor ) -}}" hx-select-oob="#alert" hx-ext="remove-me">
|
<body class="{{- ( or .Params.color $.Site.Params.ThemeColor ) -}}" hx-select-oob="#alert" hx-ext="remove-me"
|
||||||
|
hx-boost="true">
|
||||||
{{ $container := cond ($.Site.Params.FullWidthTheme | default false) "container full" (cond ($.Site.Params.CenterTheme | default false) "container center" "container") }}
|
{{ $container := cond ($.Site.Params.FullWidthTheme | default false) "container full" (cond ($.Site.Params.CenterTheme | default false) "container center" "container") }}
|
||||||
|
|
||||||
<div class="{{- $container -}}{{- cond ($.Site.Params.oneHeadingSize | default true) " headings--one-size" "" }}">
|
<div class="{{- $container -}}{{- cond ($.Site.Params.oneHeadingSize | default true) " headings--one-size" "" }}">
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue