This commit is contained in:
Eden Kirin
2024-01-21 21:50:04 +01:00
parent abde90ee33
commit 725e127881
4 changed files with 10 additions and 10 deletions

View File

@ -13,7 +13,7 @@ templ interactiveButtonsSection() {
</h3> </h3>
<button <button
type="button" type="button"
class="btn btn-primary mb-3" class="btn btn-info mb-3"
hx-get="/interactive/swap-content?content=1" hx-get="/interactive/swap-content?content=1"
hx-target="#swap-content-target" hx-target="#swap-content-target"
> >
@ -21,7 +21,7 @@ templ interactiveButtonsSection() {
</button> </button>
<button <button
type="button" type="button"
class="btn btn-primary mb-3" class="btn btn-warning mb-3"
hx-get="/interactive/swap-content?content=2" hx-get="/interactive/swap-content?content=2"
hx-target="#swap-content-target" hx-target="#swap-content-target"
> >
@ -29,7 +29,7 @@ templ interactiveButtonsSection() {
</button> </button>
<button <button
type="button" type="button"
class="btn btn-primary mb-3" class="btn btn-danger mb-3"
hx-get="/interactive/swap-content?content=3" hx-get="/interactive/swap-content?content=3"
hx-target="#swap-content-target" hx-target="#swap-content-target"
> >

View File

@ -39,7 +39,7 @@ func interactiveButtonsSection() templ.Component {
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h3><button type=\"button\" class=\"btn btn-primary mb-3\" hx-get=\"/interactive/swap-content?content=1\" hx-target=\"#swap-content-target\">") _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h3><button type=\"button\" class=\"btn btn-info mb-3\" hx-get=\"/interactive/swap-content?content=1\" hx-target=\"#swap-content-target\">")
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
@ -48,7 +48,7 @@ func interactiveButtonsSection() templ.Component {
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</button> <button type=\"button\" class=\"btn btn-primary mb-3\" hx-get=\"/interactive/swap-content?content=2\" hx-target=\"#swap-content-target\">") _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</button> <button type=\"button\" class=\"btn btn-warning mb-3\" hx-get=\"/interactive/swap-content?content=2\" hx-target=\"#swap-content-target\">")
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
@ -57,7 +57,7 @@ func interactiveButtonsSection() templ.Component {
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</button> <button type=\"button\" class=\"btn btn-primary mb-3\" hx-get=\"/interactive/swap-content?content=3\" hx-target=\"#swap-content-target\">") _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</button> <button type=\"button\" class=\"btn btn-danger mb-3\" hx-get=\"/interactive/swap-content?content=3\" hx-target=\"#swap-content-target\">")
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }

View File

@ -13,8 +13,8 @@ templ baseLayout(pc PageContext) {
</head> </head>
<body> <body>
<div class="container"> <div class="container">
<h1 class="mb-3"> <h1 class="mt-3 mb-3 text-center">
Go + templ demo Go + templ + htmx demo
</h1> </h1>
<ul class="nav nav-pills mb-5"> <ul class="nav nav-pills mb-5">
<li class="nav-item"> <li class="nav-item">

View File

@ -45,11 +45,11 @@ func baseLayout(pc PageContext) templ.Component {
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</title></head><body><div class=\"container\"><h1 class=\"mb-3\">") _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</title></head><body><div class=\"container\"><h1 class=\"mt-3 mb-3 text-center\">")
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
templ_7745c5c3_Var4 := `Go + templ demo` templ_7745c5c3_Var4 := `Go + templ + htmx demo`
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var4) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var4)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err