Add Technical Kiwi website with Go, templ, and HTMX.

Single-page site with gallery by album and event, contact form over SMTP,
Docker dev/prod setup, and on-server image derivatives. Gallery photos stay
local (app/images/ is gitignored).

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
jimmyandCursor committed 2026-05-25 23:57:59 +12:00
1 parent c21be097b0
commit 509e7ccb43
33 files changed
+2635 -1

No files matched your search

+1
View File
@@ -0,0 +1 @@
var htmx=function(){"use strict";const Q={onLoad:null,process:null,on:null,off:null,trigger:null,ajax:null,find:null,findAll:null,closest:null,values:function(e,t){const n=cn(e,t||"post");return n.values},remove:null,addClass:null,removeClass:null,toggleClass:null,takeClass:null,swap:null,defineExtension:null,removeExtension:null,logAll:null,logNone:null,logger:null,config:{historyEnabled:true,historyCacheSize:10,refreshOnHistoryMiss:false,defaultSwapStyle:"innerHTML",defaultSwapDelay:0,defaultSettleDelay:20,includeIndicatorStyles:true,indicatorClass:"htmx-indicator",requestClass:"htmx-request",addedClass:"htmx-added",settlingClass:"htmx-settling",swappingClass:"htmx-swapping",allowEval:true,allowScriptTags:true,inlineScriptNonce:"",inlineStyleNonce:"",attributesToSettle:["class","style","width","height"],withCredentials:false,timeout:0,wsReconnectDelay:"full-jitter",wsBinaryType:"blob",disableSelector:"[hx-disable], [data-hx-disable]",scrollBehavior:"instant",defaultFocusScroll:false,getCacheBusterParam:false,globalViewTransitions:false,methodsThatUseUrlParams:["get","delete"],selfRequestsOnly:true,ignoreTitle:false,scrollIntoViewOnBoost:true,triggerSpecsCache:null,disableInheritance:false,responseHandling:[{code:"204",swap:false},{code:"[23]..",swap:true},{code:"[45]..",swap:false,error:true}],allowNestedOobSwaps:true},parseInterval:null,_:null,version:"2.0.4"};Q.onLoad=j;Q.process=kt;Q.on=ye;Q.off=be;Q.trigger=he;Q.ajax=Rn;Q.find=u;Q.findAll=x;Q.closest=g;Q.remove=z;Q.addClass=K;Q.removeClass=G;Q.toggleClass=W;Q.takeClass=Z;Q.swap=$e;Q.defineExtension=Fn;Q.removeExtension=Bn;Q.logAll=V;Q.logNone=_;Q.parseInterval=d;Q._=e;const n={addTriggerHandler:St,bodyContains:le,canAccessLocalStorage:B,findThisElement:Se,filterValues:hn,swap:$e,hasAttribute:s,getAttributeValue:te,getClosestAttributeValue:re,getClosestMatch:o,getExpressionVars:En,getHeaders:fn,getInputValues:cn,getInternalData:ie,getSwapSpecification:gn,getTriggerSpecs:st,getTarget:Ee,makeFragment:P,mergeObjects:ce,makeSettleInfo:xn,oobSwap:He,querySelectorExt:ae,settleImmediately:Kt,shouldCancel:ht,triggerEvent:he,triggerErrorEvent:fe,withExtensions:Ft};const r=["get","post","put","delete","patch"];const H=r.map(function(e){return"[hx-"+e+"], [data-hx-"+e+"]"}).join(", ");function d(e){if(e==undefined){return undefined}let t=NaN;if(e.slice(-2)=="ms"){t=parseFloat(e.slice(0,-2))}else if(e.slice(-1)=="s"){t=parseFloat(e.slice(0,-1))*1e3}else if(e.slice(-1)=="m"){t=parseFloat(e.slice(0,-1))*1e3*60}else{t=parseFloat(e)}return isNaN(t)?undefined:t}function ee(e,t){return e instanceof Element&&e.getAttribute(t)}function s(e,t){return!!e.hasAttribute&&(e.hasAttribute(t)||e.hasAttribute("data-"+t))}function te(e,t){return ee(e,t)||ee(e,"data-"+t)}function c(e){const t=e.parentElement;if(!t&&e.parentNode instanceof ShadowRoot)return e.parentNode;return t}function ne(){return document}function m(e,t){return e.getRootNode?e.getRootNode({composed:t}):ne()}function o(e,t){while(e&&!t(e)){e=c(e)}return e||null}function i(e,t,n){const r=te(t,n);const o=te(t,"hx-disinherit");var i=te(t,"hx-inherit");if(e!==t){if(Q.config.disableInheritance){if(i&&(i==="*"||i.split(" ").indexOf(n)>=0)){return r}else{return null}}if(o&&(o==="*"||o.split(" ").indexOf(n)>=0)){return"unset"}}return r}function re(t,n){let r=null;o(t,function(e){return!!(r=i(t,ue(e),n))});if(r!=="unset"){return r}}function h(e,t){const n=e instanceof Element&&(e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector);return!!n&&n.call(e,t)}function T(e){const t=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i;const n=t.exec(e);if(n){return n[1].toLowerCase()}else{return""}}function q(e){const t=new DOMParser;return t.parseFromString(e,"text/html")}function L(e,t){while(t.childNodes.length>0){e.append(t.childNodes[0])}}function A(e){const t=ne().createElement("script");se(e.attributes,function(e){t.setAttribute(e.name,e.value)});t.textContent=e.textContent;t.async=false;if(Q.config.inlineScriptNonce){t.nonce=Q.config.inlineScriptNonce}return t}function N(e){return e.matches("script")&&(e.type==="text/javascript"||e.type==="module"||e.type==="")}function I(e){Array.from(e.querySelectorAll("script")).forEach(e=>{if(N(e)){const t=A(e);const n=e.parentNode;try{n.insertBefore(t,e)}catch(e){O(e)}finally{e.remove()}}})}function P(e){const t=e.replace(/<head(\s[^>]*)?>[\s\S]*?<\/head>/i,"");const n=T(t);let r;if(n==="html"){r=new DocumentFragment;const i=q(e);L(r,i.body);r.title=i.title}else if(n==="body"){r=new DocumentFragment;const i=q(t);L(r,i.body);r.title=i.title}else{const i=q('<body><template class="internal-htmx-wrapper">'+t+"</template></body>");r=i.querySelector("template").content;r.title=i.title;var o=r.querySelector("title");if(o&&o.parentNode===r){o.remove();r.title=o.innerText}}if(r){if(Q.config.allowScriptTags){I(r)}else{r.querySelectorAll("script").forEach(e=>e.remove())}}return r}function oe(e){if(e){e()}}function t(e,t){return Object.prototype.toStrinLine truncated
+777
View File
@@ -0,0 +1,777 @@
:root {
--bg: #14100c;
--bg-elevated: #1f1812;
--surface: #2a2219;
--text: #f5efe6;
--text-muted: #b5a090;
--accent: #c47b3a;
--accent-soft: rgba(196, 123, 58, 0.2);
--border: rgba(245, 239, 230, 0.1);
--radius: 12px;
--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
--mono: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
}
*,
*::before,
*::after {
box-sizing: border-box;
}
html {
scroll-behavior: smooth;
color-scheme: dark;
}
body {
margin: 0;
font-family: var(--font);
background: var(--bg);
color: var(--text);
line-height: 1.6;
min-height: 100vh;
}
a {
color: var(--accent);
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
img {
max-width: 100%;
display: block;
}
.site-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1.5rem;
padding: 1.25rem clamp(1.25rem, 4vw, 3rem);
border-bottom: 1px solid var(--border);
position: sticky;
top: 0;
background: rgba(20, 16, 12, 0.92);
backdrop-filter: blur(10px);
z-index: 10;
}
.logo {
display: flex;
align-items: center;
gap: 0.75rem;
color: var(--text);
text-decoration: none;
font-weight: 600;
}
.logo:hover {
text-decoration: none;
}
.logo-mark {
width: 2.25rem;
height: 2.25rem;
border-radius: 50%;
background: radial-gradient(circle at 30% 30%, #e8c9a0, var(--accent) 55%, #6b3d1f);
color: #14100c;
display: grid;
place-items: center;
font-family: var(--mono);
font-weight: 700;
font-size: 1rem;
box-shadow: 0 0 24px var(--accent-soft);
}
.site-nav {
display: flex;
gap: 1.25rem;
flex-wrap: wrap;
}
.site-nav a {
color: var(--text-muted);
text-decoration: none;
font-size: 0.95rem;
}
.site-nav a:hover {
color: var(--text);
text-decoration: none;
}
main {
padding-bottom: 4rem;
}
.hero {
display: grid;
grid-template-columns: 1.1fr 0.9fr;
gap: 2.5rem;
align-items: center;
padding: clamp(2.5rem, 6vw, 5rem) clamp(1.25rem, 4vw, 3rem);
max-width: 1200px;
margin: 0 auto;
}
@media (max-width: 900px) {
.hero {
grid-template-columns: 1fr;
}
}
.eyebrow {
font-family: var(--mono);
font-size: 0.8rem;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--accent);
margin: 0 0 0.75rem;
}
.hero h1 {
font-size: clamp(2rem, 4.5vw, 3.25rem);
line-height: 1.15;
margin: 0 0 1rem;
font-weight: 700;
}
.lead {
color: var(--text-muted);
font-size: 1.1rem;
max-width: 38ch;
margin: 0 0 1.75rem;
}
.hero-actions {
display: flex;
gap: 0.75rem;
flex-wrap: wrap;
}
.btn {
display: inline-flex;
align-items: center;
padding: 0.7rem 1.25rem;
border-radius: 999px;
font-weight: 600;
text-decoration: none;
border: 1px solid transparent;
cursor: pointer;
}
.btn-primary {
background: var(--accent);
color: #14100c;
}
.btn-primary:hover {
filter: brightness(1.08);
text-decoration: none;
}
.btn-ghost {
border-color: var(--border);
color: var(--text);
}
.btn-ghost:hover {
background: var(--surface);
text-decoration: none;
}
.hero-visual {
margin: 0;
border-radius: var(--radius);
overflow: hidden;
border: 1px solid var(--border);
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 80px var(--accent-soft);
}
.hero-visual img {
width: 100%;
height: 100%;
object-fit: cover;
aspect-ratio: 4 / 5;
}
.services,
.code-section,
.gallery-section,
.contact {
max-width: 1200px;
margin: 0 auto;
padding: 3rem clamp(1.25rem, 4vw, 3rem);
}
.services h2,
.code-section h2,
.gallery-section h2,
.contact h2 {
font-size: 1.75rem;
margin: 0 0 1.5rem;
}
.service-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
gap: 1.25rem;
}
.service-card {
background: var(--bg-elevated);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 1.5rem;
}
.service-card h3 {
margin: 0 0 0.5rem;
font-size: 1.1rem;
}
.service-card p {
margin: 0;
color: var(--text-muted);
font-size: 0.95rem;
}
.section-head p {
color: var(--text-muted);
margin: -0.75rem 0 1.5rem;
max-width: 60ch;
}
.code-card {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 1.5rem;
padding: 1.75rem;
background: var(--bg-elevated);
border: 1px solid var(--border);
border-radius: var(--radius);
color: inherit;
text-decoration: none;
transition: border-color 0.2s ease, background 0.2s ease;
}
.code-card:hover {
text-decoration: none;
border-color: rgba(196, 123, 58, 0.45);
background: var(--surface);
}
.code-card h3 {
margin: 0 0 0.5rem;
font-family: var(--mono);
font-size: 1.1rem;
color: var(--accent);
}
.code-card p {
margin: 0;
color: var(--text-muted);
max-width: 50ch;
font-size: 0.95rem;
}
.gallery-controls {
display: flex;
gap: 0.5rem;
flex-wrap: wrap;
margin-bottom: 1.25rem;
align-items: center;
}
.gallery-controls-collections {
padding: 0.75rem 0 0;
margin-bottom: 1.25rem;
border-top: 1px solid var(--border);
}
.gallery-controls-label {
font-size: 0.8rem;
font-family: var(--mono);
color: var(--text-muted);
margin-right: 0.25rem;
width: 100%;
flex-basis: 100%;
}
@media (min-width: 600px) {
.gallery-controls-label {
width: auto;
flex-basis: auto;
}
}
.filter-btn {
font: inherit;
padding: 0.45rem 0.9rem;
border-radius: 999px;
border: 1px solid var(--border);
background: transparent;
color: var(--text-muted);
cursor: pointer;
}
.filter-btn:hover,
.filter-btn.active {
background: var(--accent-soft);
color: var(--text);
border-color: rgba(196, 123, 58, 0.45);
}
.gallery-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
gap: 0.75rem;
}
.gallery-item {
position: relative;
padding: 0;
border: none;
border-radius: var(--radius);
overflow: hidden;
cursor: pointer;
background: var(--surface);
aspect-ratio: 1;
}
.gallery-item img,
.gallery-placeholder {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.25s ease;
}
.gallery-placeholder {
display: block;
background: var(--surface);
}
.gallery-item:hover img {
transform: scale(1.04);
}
.gallery-album,
.gallery-date {
position: absolute;
left: 0.5rem;
font-size: 0.7rem;
font-family: var(--mono);
background: rgba(20, 16, 12, 0.8);
padding: 0.2rem 0.45rem;
border-radius: 4px;
max-width: calc(100% - 1rem);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.gallery-album {
top: 0.5rem;
}
.gallery-date {
bottom: 0.5rem;
}
.gallery-loading,
.gallery-empty {
color: var(--text-muted);
grid-column: 1 / -1;
}
.contact-intro,
.contact-unavailable {
color: var(--text-muted);
max-width: 50ch;
}
.contact-form {
max-width: 32rem;
display: flex;
flex-direction: column;
gap: 1.25rem;
margin-top: 1.5rem;
}
.contact-form .form-row {
display: flex;
flex-direction: column;
align-items: stretch;
gap: 0.4rem;
}
.contact-form .form-row label {
display: block;
font-size: 0.9rem;
font-weight: 500;
}
.contact-form .form-row input,
.contact-form .form-row textarea {
display: block;
width: 100%;
box-sizing: border-box;
font: inherit;
padding: 0.65rem 0.85rem;
border-radius: 8px;
border: 1px solid var(--border);
background: var(--bg-elevated);
color: var(--text);
-webkit-appearance: none;
appearance: none;
}
.contact-form .form-row input:focus,
.contact-form .form-row textarea:focus {
outline: 2px solid var(--accent-soft);
border-color: rgba(196, 123, 58, 0.45);
}
.contact-form .form-row textarea {
resize: vertical;
min-height: 8rem;
}
.contact-form .btn {
align-self: flex-start;
}
.hp-field {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
.contact-result {
margin-top: 1rem;
max-width: 32rem;
}
.alert {
padding: 1rem 1.15rem;
border-radius: var(--radius);
border: 1px solid var(--border);
}
.alert p {
margin: 0;
}
.alert ul {
margin: 0.5rem 0 0;
padding-left: 1.25rem;
}
.alert-success {
background: rgba(196, 123, 58, 0.12);
border-color: rgba(196, 123, 58, 0.35);
}
.alert-error {
background: rgba(120, 40, 40, 0.25);
border-color: rgba(180, 80, 80, 0.35);
}
.alert a {
color: var(--accent);
}
.site-footer {
border-top: 1px solid var(--border);
padding: 1.5rem clamp(1.25rem, 4vw, 3rem);
color: var(--text-muted);
font-size: 0.9rem;
}
.site-footer p {
margin: 0;
max-width: 1200px;
margin-inline: auto;
}
.site-footer a {
margin-left: 0.75rem;
}
/* Modal */
.modal-backdrop {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.82);
display: grid;
place-items: center;
padding: 1.5rem;
z-index: 100;
}
.modal {
position: relative;
max-width: min(960px, 100%);
width: 100%;
background: var(--bg-elevated);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 1rem;
}
.modal-close {
position: absolute;
top: 0.5rem;
right: 0.5rem;
width: 2.25rem;
height: 2.25rem;
border: none;
border-radius: 50%;
background: var(--surface);
color: var(--text);
font-size: 1.4rem;
line-height: 1;
cursor: pointer;
z-index: 2;
}
.modal-figure {
margin: 0;
}
.modal-figure img {
width: 100%;
max-height: 75vh;
object-fit: contain;
border-radius: 8px;
}
.modal-figure figcaption {
margin-top: 0.75rem;
color: var(--text-muted);
font-family: var(--mono);
font-size: 0.85rem;
}
.modal-nav {
display: flex;
justify-content: space-between;
gap: 1rem;
margin-top: 1rem;
}
.modal-nav-btn {
font: inherit;
padding: 0.5rem 0.9rem;
border-radius: 8px;
border: 1px solid var(--border);
background: transparent;
color: var(--text);
cursor: pointer;
}
.modal-nav-btn:hover {
background: var(--accent-soft);
}
.htmx-request.gallery-grid {
opacity: 0.6;
}
/* --- Mobile --- */
@media (max-width: 768px) {
.site-header {
flex-wrap: wrap;
gap: 0.75rem;
padding: 0.85rem 1rem;
}
.logo-text {
font-size: 0.95rem;
}
.site-nav {
width: 100%;
gap: 0.5rem 1rem;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
scrollbar-width: none;
padding-bottom: 0.15rem;
}
.site-nav::-webkit-scrollbar {
display: none;
}
.site-nav a {
font-size: 0.9rem;
white-space: nowrap;
padding: 0.35rem 0;
}
.hero {
gap: 1.5rem;
padding: 1.75rem 1rem 2rem;
}
.hero h1 {
font-size: clamp(1.65rem, 8vw, 2.25rem);
}
.lead {
font-size: 1rem;
max-width: none;
}
.hero-actions {
flex-direction: column;
align-items: stretch;
}
.hero-actions .btn {
justify-content: center;
min-height: 2.75rem;
}
.services,
.code-section,
.gallery-section,
.contact {
padding: 2rem 1rem;
}
.service-grid {
grid-template-columns: 1fr;
}
.code-card {
flex-direction: column;
align-items: stretch;
padding: 1.25rem;
}
.code-card .btn {
justify-content: center;
width: 100%;
min-height: 2.75rem;
pointer-events: none;
}
.gallery-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 0.5rem;
}
.filter-btn {
min-height: 2.5rem;
padding: 0.5rem 1rem;
}
.contact-form {
max-width: none;
}
.contact-form .btn {
width: 100%;
justify-content: center;
min-height: 2.75rem;
}
.site-footer {
padding: 1.25rem 1rem;
font-size: 0.85rem;
}
.site-footer p {
display: flex;
flex-wrap: wrap;
gap: 0.35rem 0.75rem;
}
.site-footer a {
margin-left: 0;
}
.modal-backdrop {
padding: 0;
align-items: stretch;
}
.modal {
display: flex;
flex-direction: column;
max-width: none;
width: 100%;
min-height: 100dvh;
max-height: 100dvh;
border-radius: 0;
border: none;
padding: max(0.75rem, env(safe-area-inset-top))
max(0.75rem, env(safe-area-inset-right))
max(0.75rem, env(safe-area-inset-bottom))
max(0.75rem, env(safe-area-inset-left));
}
.modal-close {
top: max(0.5rem, env(safe-area-inset-top));
right: max(0.5rem, env(safe-area-inset-right));
width: 2.75rem;
height: 2.75rem;
}
.modal-figure {
flex: 1;
display: flex;
flex-direction: column;
min-height: 0;
}
.modal-figure img {
flex: 1;
min-height: 0;
max-height: none;
object-fit: contain;
}
.modal-nav {
flex-shrink: 0;
gap: 0.5rem;
}
.modal-nav-btn {
flex: 1;
min-height: 2.75rem;
text-align: center;
}
}
@media (max-width: 380px) {
.gallery-grid {
grid-template-columns: 1fr 1fr;
}
}
@media (hover: hover) {
.gallery-item:hover img {
transform: scale(1.04);
}
}
@media (hover: none) {
.gallery-item:active img {
transform: scale(1.02);
}
}