Merge pull request 'staticms' (#3) from staticms into main
Reviewed-on: https://git.myco.systems/mycosystems/gallowelds.com/pulls/3
This commit is contained in:
commit
ae6ddf4fc9
19 changed files with 221 additions and 122 deletions
|
@ -3,7 +3,7 @@ name: Hugo
|
|||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- staticms
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
@ -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
|
||||
```
|
||||
For dependancies just run the below command, this will install **tailwindcss**, **prettier**, and **prettier-plugin-go-template**
|
||||
```
|
||||
npm install
|
||||
make dev
|
||||
```
|
||||
2. Visit http://localhost:1313
|
|
@ -31,16 +31,16 @@ params:
|
|||
main:
|
||||
- url: 'mailto:iangalloart@gmail.com'
|
||||
icon: >
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16"
|
||||
height="16" fill="none" stroke="currentColor" stroke-linecap="round"
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24"
|
||||
height="24" fill="none" stroke="currentColor" stroke-linecap="round"
|
||||
stroke-linejoin="round" stroke-width="2">
|
||||
<circle cx="12" cy="12" r="4"></circle>
|
||||
<path d="M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-3.92 7.94"></path>
|
||||
</svg>
|
||||
- url: 'https://www.instagram.com/gallowelding/'
|
||||
icon: >
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16"
|
||||
height="16" fill="none" stroke="currentColor" stroke-linecap="round"
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24"
|
||||
height="24" fill="none" stroke="currentColor" stroke-linecap="round"
|
||||
stroke-linejoin="round" stroke-width="2">
|
||||
<rect height="20" rx="5" ry="5" width="20" x="2" y="2"></rect>
|
||||
<path d="M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z"></path>
|
||||
|
|
|
@ -4,5 +4,4 @@ module.exports = {
|
|||
theme: {
|
||||
extend: {},
|
||||
},
|
||||
plugins: [],
|
||||
};
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{{ 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>
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<p class="text-lg">{{ .Params.subTitle }}</p>
|
||||
{{ partial "metadata.html" . }}
|
||||
<div class="mt-2 flex flex-col gap-4">{{ .Content }}</div>
|
||||
{{ partial "buttons.html" . }}
|
||||
{{ partial "rental-catalog.html" . }}
|
||||
{{ partial "buttons.html" . }} {{ if .Params.catalog }} {{ partial
|
||||
"rental-catalog.html" . }} {{ end }}
|
||||
</div>
|
||||
|
||||
{{ partial "questions.html" . }} {{ partial "gallery.html" . }} {{ partial
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<a href="{{ .url }}"
|
||||
><button
|
||||
type="button"
|
||||
class="px-3 py-2 text-xs font-medium text-center text-white bg-black rounded-lg focus:ring-4 focus:outline-none hover:bg-gray-800 transition-all duration-200"
|
||||
class="px-4 py-4 sm:py-2 sm:px-3 text-xs font-medium text-center text-white bg-black rounded-lg focus:ring-4 focus:outline-none hover:bg-gray-800 transition-all duration-200"
|
||||
>
|
||||
{{ .text }}
|
||||
</button>
|
||||
|
|
|
@ -1,10 +1,19 @@
|
|||
<div class="flex flex-col bg-white font-bold">
|
||||
<div class="flex py-8 justify-center">
|
||||
<p class="border-gray-200 border rounded-xl w-full max-w-[1000px] mx-auto p-2 text-4xl text-center text-black">
|
||||
<section class="bg-white text-gray-600 body-font">
|
||||
<div class="container px-5 py-24 mx-auto">
|
||||
<div class="flex flex-col w-full mb-20">
|
||||
<h1
|
||||
class="lg:w-2/3 mx-auto text-3xl mx-auto text-left font-medium title-font mb-4 text-gray-900"
|
||||
>
|
||||
Rental Catalog
|
||||
</h1>
|
||||
<p class="lg:w-2/3 text-gray-600 mx-auto leading-relaxed text-base">
|
||||
Browse our extensive catalog of wedding structures to find the perfect
|
||||
setting for your special day. Our structures are designed to provide a stunning
|
||||
backdrop for your ceremony and reception, ensuring an unforgettable
|
||||
experience for you and your guests.
|
||||
</p>
|
||||
</div>
|
||||
<div class="pb-16 max-w-[1000px] grid grid-cols-3 gap-3 mx-auto">
|
||||
<div class="pb-16 max-w-[1000px] grid grid-cols-1 gap-4 mx-auto md:grid-cols-2 lg:grid-cols-3">
|
||||
{{ range .Site.Params.catalogButtons.home }}
|
||||
<a
|
||||
class="rounded-xl aspect-[3/2] overflow-hidden"
|
||||
|
@ -26,3 +35,4 @@
|
|||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<div class="w-9/12 flex flex-row justify-between">
|
||||
<div class="flex flex-row gap-8">
|
||||
{{ range .Site.Menus.main }}
|
||||
<a class="text-white hover:text-gray-400" href="{{ .URL }}">
|
||||
<a class="text-white hover:text-gray-400" href="{{ .URL | safeURL }}">
|
||||
{{ $text := .Name | safeHTML }} {{ $text }}
|
||||
</a>
|
||||
{{ end }}
|
||||
|
|
|
@ -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 }}
|
||||
<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,16 +1,13 @@
|
|||
<div
|
||||
style="
|
||||
background-blend-mode: multiply;
|
||||
background: url({{ .Site.Params.headerImg }}) rgba(0, 0, 0, 0.6);
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
"
|
||||
class="flex justify-start min-h-96"
|
||||
<section
|
||||
style="background-blend-mode: multiply; background: url({{ .Site.Params.headerImg }}) rgba(0, 0, 0, 0.75); background-position: center; background-size: cover;"
|
||||
class="flex justify-start py-36 px-5"
|
||||
>
|
||||
<div
|
||||
class="flex flex-col ml-16 mb-8 place-self-center text-white max-w-4xl gap-4"
|
||||
>
|
||||
<h1 class="text-3xl font-bold">{{ .Site.Params.headerTitle }}</h1>
|
||||
<p class="text-md">{{ .Site.Params.headerDesc }}</p>
|
||||
</div>
|
||||
<div class="flex flex-col w-full mx-auto container">
|
||||
<h1 class="lg:w-2/3 mx-auto text-3xl text-left font-bold title-font mb-4">
|
||||
{{ .Site.Params.headerTitle }}
|
||||
</h1>
|
||||
<p class="lg:w-2/3 text-md mx-auto leading-relaxed text-base">
|
||||
{{ .Site.Params.headerDesc }}
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -1,10 +1,19 @@
|
|||
<div
|
||||
class="mt-4 pb-2 flex flex-row gap-2 max-w-full overflow-x-auto whitespace-nowrap"
|
||||
>
|
||||
<button
|
||||
id="all"
|
||||
class="flex gap-2 items-center px-4 border border-gray-200 rounded-lg focus:outline-none"
|
||||
onclick="window.location.href = '/catalog'"
|
||||
>
|
||||
<span class="text-xs p-2 font-medium text-gray-900">All</span>
|
||||
</button>
|
||||
{{ $uniqueCategories := slice }} {{ range .Params.catalog }} {{ if not (in
|
||||
$uniqueCategories .cat) }} {{ $uniqueCategories = $uniqueCategories | append
|
||||
.cat }}
|
||||
<div class="flex gap-2 items-center px-4 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"
|
||||
|
@ -14,7 +23,7 @@
|
|||
/>
|
||||
<label
|
||||
for="radio-button-{{ .cat }}"
|
||||
class="noselect text-sm p-2 font-medium text-gray-900"
|
||||
class="noselect text-xs p-1 sm:p-0 font-medium text-gray-900"
|
||||
>{{ .cat }}</label
|
||||
>
|
||||
</div>
|
||||
|
@ -60,12 +69,12 @@
|
|||
</div>
|
||||
{{ end }} {{ if ne .deliveryPickup "" }}
|
||||
<div class="flex flex-row justify-between">
|
||||
<strong>+ Delivery/Pickup:</strong>
|
||||
<strong>+ Pickup & Delivery:</strong>
|
||||
<span>{{ .deliveryPickup }}</span>
|
||||
</div>
|
||||
{{ end }} {{ if ne .installBreakdown "" }}
|
||||
<div class="flex flex-row justify-between">
|
||||
<strong>+ Install/Breakdown:</strong>
|
||||
<strong>+ Setup & Breakdown:</strong>
|
||||
<span>{{ .installBreakdown }}</span>
|
||||
</div>
|
||||
{{ end }} {{ if ne .purchaseCost "" }}
|
||||
|
@ -131,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"
|
||||
>
|
||||
<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
|
||||
loading="lazy"
|
||||
class="rounded-lg hover:scale-110 ease-in-out duration-300 transition-all shadow-xl hover:shadow-2xl"
|
||||
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=""
|
||||
/>
|
||||
{{ end }}
|
||||
</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 "" }}
|
||||
|
@ -163,12 +228,12 @@
|
|||
</div>
|
||||
{{ end }} {{ if ne .deliveryPickup "" }}
|
||||
<div class="flex flex-row justify-between">
|
||||
<strong>Delivery/Pickup:</strong>
|
||||
<strong>Pickup & Delivery:</strong>
|
||||
<span>{{ .deliveryPickup }}</span>
|
||||
</div>
|
||||
{{ end }} {{ if ne .installBreakdown "" }}
|
||||
<div class="flex flex-row justify-between">
|
||||
<strong>Install/Breakdown:</strong>
|
||||
<strong>Setup & Breakdown:</strong>
|
||||
<span>{{ .installBreakdown }}</span>
|
||||
</div>
|
||||
{{ end }} {{ if ne .purchaseCost "" }}
|
||||
|
@ -276,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>
|
||||
|
|
|
@ -1,35 +1,29 @@
|
|||
---
|
||||
backend:
|
||||
name: gitea
|
||||
repo: mycosystems/gallowelds.com
|
||||
branch: main
|
||||
app_id: 8cf43676-cdba-4112-a981-9c1117b3d096
|
||||
api_root: https://git.myco.systems/api/v1
|
||||
base_url: https://git.myco.systems
|
||||
auth_endpoint: https://git.myco.systems/login/oauth/authorize
|
||||
commit_messages:
|
||||
create: Create {{collection}} {{slug}}
|
||||
update: Update {{collection}} {{slug}}
|
||||
delete: Delete {{collection}} {{slug}}
|
||||
uploadMedia: Upload {{path}}
|
||||
deleteMedia: Delete {{path}}
|
||||
openAuthoring: "{{message}}"
|
||||
# publish_mode: editorial_workflow
|
||||
media_folder: "static/img"
|
||||
media_folder: themes/gallo/static/img
|
||||
site_url: https://gallo.demo.myco.systems
|
||||
logo_url: https://gallo.demo.myco.systems/img/gallo_welding.svg
|
||||
locale: "en"
|
||||
logo_url: https://gallo.demo.myco.systems/img/gallo_welding_inverted.svg
|
||||
locale: en
|
||||
show_preview_links: false
|
||||
search: false
|
||||
|
||||
collections:
|
||||
- name: "about"
|
||||
label: "About"
|
||||
folder: "content/about"
|
||||
- name: about
|
||||
label: About
|
||||
folder: content/about
|
||||
create: false
|
||||
slug: "index.md"
|
||||
slug: index.md
|
||||
fields:
|
||||
- { label: "Title", name: "title", widget: "string" }
|
||||
- { label: "Date Last Edited", name: "date", widget: "datetime" }
|
||||
- { label: "Featured Image", name: "thumbnail", widget: "image" }
|
||||
- { label: "Body", name: "body", widget: "markdown" }
|
||||
- { label: "Gallery", name: "gallery", widget: "gallery" }
|
||||
- label: Title
|
||||
name: title
|
||||
widget: string
|
||||
- label: Date Last Edited
|
||||
name: date
|
||||
widget: datetime
|
||||
- label: Body
|
||||
name: body
|
||||
widget: markdown
|
||||
|
|
|
@ -3,10 +3,13 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta name="robots" content="noindex" />
|
||||
<link rel="stylesheet" href="https://unpkg.com/@staticcms/app@^4.0.0/dist/main.css" />
|
||||
<title>Content Manager</title>
|
||||
</head>
|
||||
<body>
|
||||
<script src="https://unpkg.com/decap-cms@latest/dist/decap-cms.js"></script>
|
||||
<script src="https://unpkg.com/@staticcms/app@^4.0.0/dist/static-cms-app.js"></script>
|
||||
<script>
|
||||
window.CMS.init();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
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
Binary file not shown.
Before Width: | Height: | Size: 418 KiB After Width: | Height: | Size: 80 KiB |
BIN
themes/gallo/static/img/wide_full.webp
Normal file
BIN
themes/gallo/static/img/wide_full.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 418 KiB |
Loading…
Add table
Reference in a new issue