rentease/internal/view/index.templ

35 lines
652 B
Text

package view
import "github.com/rjNemo/rentease/config"
func makeItems() []string {
host := config.NewHost()
items := make([]string, 0, 2)
for _, i := range host.Items {
if i.Name == "T2" || i.Name == "T3" {
items = append(items, i.Name)
}
}
return items
}
var items = makeItems()
templ Index() {
@PublicLayout() {
<section>
<h1>Reserver votre sejour des maintenant</h1>
<article>
@RequestBookingForm(&RequestBookingViewModel{
Item: "T2",
From: "",
To: "",
Name: "",
PhoneNumber: "",
Email: "",
Errors: nil,
})
</article>
</section>
}
}