Compare commits
5 commits
c56a9dd2ff
...
19a06e408b
Author | SHA1 | Date | |
---|---|---|---|
19a06e408b | |||
6a3a6f7dc7 | |||
e86bfc4d49 | |||
f5ba387e24 | |||
30f4bdf116 |
9 changed files with 131 additions and 43 deletions
|
@ -14,6 +14,8 @@ jobs:
|
|||
submodules: 'true'
|
||||
- name: Run build task
|
||||
run: hugo --minify
|
||||
- name: pre-compress
|
||||
run: find ./public/* -type f \( -name '*.html' -o -name '*.js' -o -name '*.css'\) -exec gzip -v -k -f --best {} \\;
|
||||
- name: Deploy to Server
|
||||
uses: https://git.myco.systems/mirrors/ssh-deploy@main
|
||||
env:
|
||||
|
|
8
Makefile
Normal file
8
Makefile
Normal file
|
@ -0,0 +1,8 @@
|
|||
.PHONY: setup dev
|
||||
|
||||
setup:
|
||||
npm install
|
||||
|
||||
dev:
|
||||
hugo server --disableFastRender & \
|
||||
tailwindcss -i ./themes/gallo/src/input.css -o ./themes/gallo/static/css/tailwind.min.css --watch --minify
|
11
README.md
11
README.md
|
@ -1,12 +1,11 @@
|
|||
# gallowelds.com
|
||||
|
||||
0. Install dependancies this will install **tailwindcss**, **prettier**, and **prettier-plugin-go-template**
|
||||
```
|
||||
git clone https://git.myco.systems/mycosystems/gallowelds.com.git
|
||||
make setup
|
||||
```
|
||||
1. Start hugo server and tailwindcss cli
|
||||
```
|
||||
git submodule update --init --recursive
|
||||
make dev
|
||||
```
|
||||
For dependancies just run the below command, this will install **tailwindcss**, **prettier**, and **prettier-plugin-go-template**
|
||||
```
|
||||
npm install
|
||||
```
|
||||
2. Visit http://localhost:1313
|
|
@ -4,5 +4,4 @@ module.exports = {
|
|||
theme: {
|
||||
extend: {},
|
||||
},
|
||||
plugins: [],
|
||||
};
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<html lang="en">
|
||||
{{ partial "head.html" . }}
|
||||
|
||||
<body class="bg-black text-white min-h-screen flex flex-col">
|
||||
{{ partial "nav.html" . }} {{ block "main" .
|
||||
}}{{ end }} {{ partial "footer.html" . }}
|
||||
{{ partial "nav.html" . }} {{ block "main" . }}{{ end }} {{ partial
|
||||
"footer.html" . }}
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<link rel="stylesheet" type="text/css" href="/css/tailwind.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="/css/style.css">
|
||||
{{ $title := print .Site.Title " | " .Title }}
|
||||
{{ if .IsHome }}{{ $title = .Site.Title }}{{ end }}
|
||||
<title>{{ $title }}</title>
|
||||
</head>
|
||||
<meta charset="utf-8" />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1, shrink-to-fit=no"
|
||||
/>
|
||||
<link rel="stylesheet" type="text/css" href="/css/tailwind.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/css/style.css" />
|
||||
{{ $title := print .Site.Title " | " .Title }} {{ if .IsHome }}{{ $title =
|
||||
.Site.Title }}{{ end }}
|
||||
<title>{{ $title }}</title>
|
||||
</head>
|
||||
|
|
|
@ -1,20 +1,13 @@
|
|||
<div class="p-4 min-h-[40.27px] flex flex-row w-full justify-between bg-black">
|
||||
<a href="/"><img class="w-44 h-auto" src="{{ .Site.Params.logo }}" /></a>
|
||||
<a href="/"><img class="w-44 h-[40.2667px]" src="{{ .Site.Params.logo }}" /></a>
|
||||
<nav class="place-self-center h-8 flex justify-end gap-2 text-white pr-6">
|
||||
{{ range .Site.Menus.main }} {{ if $.IsMenuCurrent .Menu . }}
|
||||
<a
|
||||
class="ml-2 underline underline-offset-0 decoration-2 decoration-transparent decoration-white underline-offset-2 place-self-center"
|
||||
href="{{ .URL }}"
|
||||
>
|
||||
{{ $text := print .Name | safeHTML }} {{ $text }}
|
||||
</a>
|
||||
{{ else }}
|
||||
{{ range .Site.Menus.main }}
|
||||
<a
|
||||
class="ml-2 underline underline-offset-0 decoration-2 decoration-transparent hover:decoration-white hover:underline-offset-2 ease-in-out duration-300 place-self-center"
|
||||
href="{{ .URL }}"
|
||||
>
|
||||
{{ $text := print .Name | safeHTML }} {{ $text }}
|
||||
</a>
|
||||
{{ end }} {{ end }}
|
||||
{{ end }}
|
||||
</nav>
|
||||
</div>
|
||||
|
|
|
@ -11,7 +11,9 @@
|
|||
{{ $uniqueCategories := slice }} {{ range .Params.catalog }} {{ if not (in
|
||||
$uniqueCategories .cat) }} {{ $uniqueCategories = $uniqueCategories | append
|
||||
.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
|
||||
id="radio-button-{{ .cat }}"
|
||||
type="radio"
|
||||
|
@ -67,7 +69,7 @@
|
|||
</div>
|
||||
{{ end }} {{ if ne .deliveryPickup "" }}
|
||||
<div class="flex flex-row justify-between">
|
||||
<strong>+ Pickup & Delivery:</strong>
|
||||
<strong>+ Pickup & Delivery:</strong>
|
||||
<span>{{ .deliveryPickup }}</span>
|
||||
</div>
|
||||
{{ end }} {{ if ne .installBreakdown "" }}
|
||||
|
@ -138,19 +140,75 @@
|
|||
<strong>{{ .item }}</strong>
|
||||
</h3>
|
||||
{{ if .gallery }}
|
||||
<div
|
||||
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"
|
||||
>
|
||||
{{ range .gallery }}
|
||||
<img
|
||||
loading="lazy"
|
||||
class="rounded-lg hover:scale-110 ease-in-out duration-300 transition-all shadow-xl hover:shadow-2xl"
|
||||
src="{{ .image }}"
|
||||
/>
|
||||
{{ end }}
|
||||
<div id="gallery" class="relative w-full" data-carousel="slide">
|
||||
<div class="relative h-56 overflow-hidden rounded-lg md:h-96">
|
||||
{{ range .gallery }}
|
||||
<div
|
||||
class="hidden duration-700 ease-in-out"
|
||||
data-carousel-item
|
||||
>
|
||||
<img
|
||||
src="{{ .image }}"
|
||||
class="absolute block rounded-lg 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>
|
||||
{{ end }}
|
||||
|
||||
<div class="px-1 pt-4 w-full">
|
||||
<div class="text-gray-800 text-base">
|
||||
{{ if ne .quant "" }}
|
||||
|
@ -170,7 +228,7 @@
|
|||
</div>
|
||||
{{ end }} {{ if ne .deliveryPickup "" }}
|
||||
<div class="flex flex-row justify-between">
|
||||
<strong>Pickup & Delivery:</strong>
|
||||
<strong>Pickup & Delivery:</strong>
|
||||
<span>{{ .deliveryPickup }}</span>
|
||||
</div>
|
||||
{{ end }} {{ if ne .installBreakdown "" }}
|
||||
|
@ -283,4 +341,30 @@
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
const gallery = document.getElementById("gallery");
|
||||
const carouselItems = gallery.querySelectorAll("[data-carousel-item]");
|
||||
const prevButton = gallery.querySelector("[data-carousel-prev]");
|
||||
const nextButton = gallery.querySelector("[data-carousel-next]");
|
||||
let currentItemIndex = 0;
|
||||
function showItem() {
|
||||
carouselItems.forEach((item, index) => {
|
||||
item.classList.add("hidden");
|
||||
if (index === currentItemIndex) {
|
||||
item.classList.remove("hidden");
|
||||
}
|
||||
});
|
||||
}
|
||||
function prevItem() {
|
||||
currentItemIndex =
|
||||
(currentItemIndex - 1 + carouselItems.length) % carouselItems.length;
|
||||
showItem();
|
||||
}
|
||||
function nextItem() {
|
||||
currentItemIndex = (currentItemIndex + 1) % carouselItems.length;
|
||||
showItem();
|
||||
}
|
||||
prevButton.addEventListener("click", prevItem);
|
||||
nextButton.addEventListener("click", nextItem);
|
||||
showItem();
|
||||
</script>
|
||||
|
|
2
themes/gallo/static/css/tailwind.min.css
vendored
2
themes/gallo/static/css/tailwind.min.css
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue