rentease/internal/view/bookings_list.templ
Ruidy 584d81f7bd
Some checks failed
CI / checks (push) Has been cancelled
feat(i18n): add language toggle and localize views
2026-01-09 16:09:20 -04:00

28 lines
927 B
Text

package view
import (
"github.com/rjNemo/rentease/internal/i18n"
"github.com/rjNemo/rentease/internal/view/layout"
)
templ ListBookings(bookings []*ListBookingsViewModel) {
@layout.BaseLayout() {
<section class="flex flex-col md:flex-row justify-between items-start md:items-center gap-4 mb-4 p-4 w-[98%] mx-auto">
<hgroup class="flex-shrink-0">
<h1 class="text-3xl font-bold text-primary tracking-tight">{ i18n.Localize(ctx, "bookings.heading") }</h1>
<h2 class="text-muted text-lg font-normal">{ i18n.Localize(ctx, "bookings.subheading") }</h2>
</hgroup>
<input
type="search"
name="search"
placeholder={ i18n.Localize(ctx, "search.bookings.placeholder") }
hx-get="/bookings"
hx-target="#booking-cards"
hx-swap="outerHTML"
hx-trigger="keyup changed delay:500ms"
class="input input-bordered input-primary w-full md:w-96"
/>
</section>
@BookingLines(bookings)
}
}