include flowbite js, update rental page gallery

This commit is contained in:
brooke 2024-06-10 19:21:08 -04:00
parent f5ba387e24
commit e86bfc4d49
5 changed files with 88 additions and 27 deletions

View file

@ -4,5 +4,4 @@ module.exports = {
theme: { theme: {
extend: {}, extend: {},
}, },
plugins: [],
}; };

View file

@ -1,9 +1,10 @@
<!doctype html> <!doctype html>
<html lang="en"> <html lang="en">
{{ partial "head.html" . }} {{ partial "head.html" . }}
<body class="bg-black text-white min-h-screen flex flex-col"> <body class="bg-black text-white min-h-screen flex flex-col">
{{ partial "nav.html" . }} {{ block "main" . {{ partial "nav.html" . }} {{ block "main" . }}{{ end }} {{ partial
}}{{ end }} {{ partial "footer.html" . }} "footer.html" . }}
<script src="https://cdnjs.cloudflare.com/ajax/libs/flowbite/2.3.0/flowbite.min.js"></script>
</body> </body>
</html> </html>

View file

@ -1,9 +1,12 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta
<link rel="stylesheet" type="text/css" href="/css/tailwind.min.css"> name="viewport"
<link rel="stylesheet" type="text/css" href="/css/style.css"> content="width=device-width, initial-scale=1, shrink-to-fit=no"
{{ $title := print .Site.Title " | " .Title }} />
{{ if .IsHome }}{{ $title = .Site.Title }}{{ end }} <link rel="stylesheet" type="text/css" href="/css/tailwind.min.css" />
<title>{{ $title }}</title> <link rel="stylesheet" type="text/css" href="/css/style.css" />
</head> {{ $title := print .Site.Title " | " .Title }} {{ if .IsHome }}{{ $title =
.Site.Title }}{{ end }}
<title>{{ $title }}</title>
</head>

View file

@ -11,7 +11,9 @@
{{ $uniqueCategories := slice }} {{ range .Params.catalog }} {{ if not (in {{ $uniqueCategories := slice }} {{ range .Params.catalog }} {{ if not (in
$uniqueCategories .cat) }} {{ $uniqueCategories = $uniqueCategories | append $uniqueCategories .cat) }} {{ $uniqueCategories = $uniqueCategories | append
.cat }} .cat }}
<div class="flex gap-2 items-center px-3 py-2 border border-gray-200 rounded-lg"> <div
class="flex gap-2 items-center px-3 py-2 border border-gray-200 rounded-lg"
>
<input <input
id="radio-button-{{ .cat }}" id="radio-button-{{ .cat }}"
type="radio" type="radio"
@ -67,7 +69,7 @@
</div> </div>
{{ end }} {{ if ne .deliveryPickup "" }} {{ end }} {{ if ne .deliveryPickup "" }}
<div class="flex flex-row justify-between"> <div class="flex flex-row justify-between">
<strong>+ Pickup & Delivery:</strong> <strong>+ Pickup & Delivery:</strong>
<span>{{ .deliveryPickup }}</span> <span>{{ .deliveryPickup }}</span>
</div> </div>
{{ end }} {{ if ne .installBreakdown "" }} {{ end }} {{ if ne .installBreakdown "" }}
@ -138,19 +140,75 @@
<strong>{{ .item }}</strong> <strong>{{ .item }}</strong>
</h3> </h3>
{{ if .gallery }} {{ if .gallery }}
<div <div id="gallery" class="relative w-full" data-carousel="slide">
class="mt-8 columns-1 gap-2 sm:columns-2 sm:gap-4 md:columns-3 lg:columns-4 [&>img:not(:first-child)]:mt-4" <div class="relative h-56 overflow-hidden rounded-lg md:h-96">
> {{ range .gallery }}
{{ range .gallery }} <div
<img class="hidden duration-700 ease-in-out"
loading="lazy" data-carousel-item
class="rounded-lg hover:scale-110 ease-in-out duration-300 transition-all shadow-xl hover:shadow-2xl" >
src="{{ .image }}" <img
/> src="{{ .image }}"
{{ end }} class="absolute block max-w-full h-auto -translate-x-1/2 -translate-y-1/2 top-1/2 left-1/2"
alt=""
/>
</div>
{{ end }}
</div>
<button
type="button"
class="absolute top-0 start-0 z-30 flex items-center justify-center h-full px-4 cursor-pointer group focus:outline-none"
data-carousel-prev
>
<span
class="inline-flex items-center justify-center w-10 h-10 rounded-full bg-white/30 dark:bg-gray-800/30 group-hover:bg-white/50 dark:group-hover:bg-gray-800/60 group-focus:ring-4 group-focus:ring-white dark:group-focus:ring-gray-800/70 group-focus:outline-none"
>
<svg
class="w-4 h-4 text-white dark:text-gray-800 rtl:rotate-180"
aria-hidden="true"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 6 10"
>
<path
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M5 1 1 5l4 4"
/>
</svg>
<span class="sr-only">Previous</span>
</span>
</button>
<button
type="button"
class="absolute top-0 end-0 z-30 flex items-center justify-center h-full px-4 cursor-pointer group focus:outline-none"
data-carousel-next
>
<span
class="inline-flex items-center justify-center w-10 h-10 rounded-full bg-white/30 dark:bg-gray-800/30 group-hover:bg-white/50 dark:group-hover:bg-gray-800/60 group-focus:ring-4 group-focus:ring-white dark:group-focus:ring-gray-800/70 group-focus:outline-none"
>
<svg
class="w-4 h-4 text-white dark:text-gray-800 rtl:rotate-180"
aria-hidden="true"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 6 10"
>
<path
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="m1 9 4-4-4-4"
/>
</svg>
<span class="sr-only">Next</span>
</span>
</button>
</div> </div>
{{ end }} {{ end }}
<div class="px-1 pt-4 w-full"> <div class="px-1 pt-4 w-full">
<div class="text-gray-800 text-base"> <div class="text-gray-800 text-base">
{{ if ne .quant "" }} {{ if ne .quant "" }}
@ -170,7 +228,7 @@
</div> </div>
{{ end }} {{ if ne .deliveryPickup "" }} {{ end }} {{ if ne .deliveryPickup "" }}
<div class="flex flex-row justify-between"> <div class="flex flex-row justify-between">
<strong>Pickup & Delivery:</strong> <strong>Pickup & Delivery:</strong>
<span>{{ .deliveryPickup }}</span> <span>{{ .deliveryPickup }}</span>
</div> </div>
{{ end }} {{ if ne .installBreakdown "" }} {{ end }} {{ if ne .installBreakdown "" }}

File diff suppressed because one or more lines are too long