fix: no proper loading feedback on forms
This commit is contained in:
parent
cbb14ffba2
commit
d224f5a10a
27 changed files with 192 additions and 57 deletions
|
|
@ -56,6 +56,8 @@ templ Base(props ...SEOProps) {
|
|||
@smoothScrollScript()
|
||||
// HTMX CSRF configuration
|
||||
@htmxCSRFScript()
|
||||
// Form submit spinner for non-HTMX forms
|
||||
@formSubmitScript()
|
||||
// Google Analytics
|
||||
if cfg := ctxkeys.Config(ctx); cfg != nil && cfg.GoogleMeasuringID != "" {
|
||||
@googleAnalyticsScript(cfg.GoogleMeasuringID)
|
||||
|
|
@ -118,6 +120,10 @@ templ htmxCSRFScript() {
|
|||
<script src="/assets/js/htmx-csrf.js"></script>
|
||||
}
|
||||
|
||||
templ formSubmitScript() {
|
||||
<script src="/assets/js/form-submit.js"></script>
|
||||
}
|
||||
|
||||
templ googleAnalyticsScript(id string) {
|
||||
<script async src={ "https://www.googletagmanager.com/gtag/js?id=" + id }></script>
|
||||
<script type="text/javascript">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue