Update all the shit
This commit is contained in:
@ -3,6 +3,7 @@ package home
|
||||
import "gitea.henriburau.de/haw-lan/cod4watcher/views/layouts"
|
||||
import "gitea.henriburau.de/haw-lan/cod4watcher/models"
|
||||
import "gitea.henriburau.de/haw-lan/cod4watcher/views/components"
|
||||
import "gitea.henriburau.de/haw-lan/cod4watcher/views/capture"
|
||||
import "gitea.henriburau.de/haw-lan/cod4watcher/views"
|
||||
|
||||
templ Index(captures []models.Capture) {
|
||||
@ -14,10 +15,9 @@ templ Index(captures []models.Capture) {
|
||||
}
|
||||
</a>
|
||||
}
|
||||
|
||||
<div class="flex gap-3 flex-wrap">
|
||||
for _, capture := range captures {
|
||||
@components.CaptureCard(capture)
|
||||
for _, currentCapture := range captures {
|
||||
@capture.CaptureCard(currentCapture)
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
@ -13,6 +13,7 @@ import "bytes"
|
||||
import "gitea.henriburau.de/haw-lan/cod4watcher/views/layouts"
|
||||
import "gitea.henriburau.de/haw-lan/cod4watcher/models"
|
||||
import "gitea.henriburau.de/haw-lan/cod4watcher/views/components"
|
||||
import "gitea.henriburau.de/haw-lan/cod4watcher/views/capture"
|
||||
import "gitea.henriburau.de/haw-lan/cod4watcher/views"
|
||||
|
||||
func Index(captures []models.Capture) templ.Component {
|
||||
@ -35,7 +36,7 @@ func Index(captures []models.Capture) templ.Component {
|
||||
defer templ.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
}
|
||||
if views.Username(ctx) != "" {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<a href=\"/new/capture\" class=\"mb-8 block\">")
|
||||
templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 1)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@ -45,7 +46,7 @@ func Index(captures []models.Capture) templ.Component {
|
||||
templ_7745c5c3_Buffer = templ.GetBuffer()
|
||||
defer templ.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("Create new Capture")
|
||||
templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 2)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@ -58,22 +59,22 @@ func Index(captures []models.Capture) templ.Component {
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</a>")
|
||||
templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 3)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" <div class=\"flex gap-3 flex-wrap\">")
|
||||
templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 4)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
for _, capture := range captures {
|
||||
templ_7745c5c3_Err = components.CaptureCard(capture).Render(ctx, templ_7745c5c3_Buffer)
|
||||
for _, currentCapture := range captures {
|
||||
templ_7745c5c3_Err = capture.CaptureCard(currentCapture).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div>")
|
||||
templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 5)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
|
||||
5
views/home/index_templ.txt
Normal file
5
views/home/index_templ.txt
Normal file
@ -0,0 +1,5 @@
|
||||
<a href=\"/new/capture\" class=\"mb-8 block\">
|
||||
Create new Capture
|
||||
</a>
|
||||
<div class=\"flex gap-3 flex-wrap\">
|
||||
</div>
|
||||
Reference in New Issue
Block a user