Initial
This commit is contained in:
216
public/css/admin.css
Normal file
216
public/css/admin.css
Normal file
@@ -0,0 +1,216 @@
|
||||
* { box-sizing: border-box; }
|
||||
body {
|
||||
margin: 0;
|
||||
color: #2f2926;
|
||||
background: #f6f0ea;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
line-height: 1.5;
|
||||
}
|
||||
a { color: #7d3f45; }
|
||||
button, .button {
|
||||
border: 0;
|
||||
border-radius: 8px;
|
||||
background: #7d3f45;
|
||||
color: white;
|
||||
padding: .72rem .95rem;
|
||||
text-decoration: none;
|
||||
font-weight: 800;
|
||||
cursor: pointer;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 42px;
|
||||
}
|
||||
.button.secondary, .link-button {
|
||||
background: transparent;
|
||||
color: #7d3f45;
|
||||
box-shadow: inset 0 0 0 1px #7d3f45;
|
||||
}
|
||||
.danger { background: #9b2f2f; }
|
||||
input, textarea, select {
|
||||
width: 100%;
|
||||
border: 1px solid rgba(47,41,38,.22);
|
||||
border-radius: 8px;
|
||||
padding: .7rem .8rem;
|
||||
font: inherit;
|
||||
background: white;
|
||||
}
|
||||
label { display: grid; gap: .35rem; font-weight: 800; }
|
||||
.checkbox { display: flex; gap: .55rem; align-items: flex-start; }
|
||||
.checkbox input { width: auto; margin-top: .35rem; }
|
||||
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
|
||||
outline: 3px solid #7a8f73;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
.skip-link {
|
||||
position: absolute;
|
||||
top: -100px;
|
||||
left: 1rem;
|
||||
background: #7d3f45;
|
||||
color: white;
|
||||
padding: .75rem 1rem;
|
||||
z-index: 20;
|
||||
}
|
||||
.skip-link:focus { top: 1rem; }
|
||||
.admin-sidebar {
|
||||
position: fixed;
|
||||
inset: 0 auto 0 0;
|
||||
width: 260px;
|
||||
overflow: auto;
|
||||
padding: 1rem;
|
||||
background: #2f2926;
|
||||
color: white;
|
||||
}
|
||||
.admin-sidebar a { color: white; }
|
||||
.admin-brand {
|
||||
display: block;
|
||||
font-family: Georgia, "Times New Roman", serif;
|
||||
font-size: 1.3rem;
|
||||
text-decoration: none;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
.admin-brand span { font-family: Arial, Helvetica, sans-serif; font-size: .9rem; opacity: .8; }
|
||||
.admin-sidebar nav {
|
||||
display: grid;
|
||||
gap: .25rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
.admin-sidebar nav a, .admin-sidebar > a, .link-button {
|
||||
border-radius: 8px;
|
||||
padding: .58rem .7rem;
|
||||
text-decoration: none;
|
||||
text-align: left;
|
||||
}
|
||||
.admin-sidebar nav a.active { background: rgba(255,255,255,.16); }
|
||||
.admin-main {
|
||||
margin-left: 260px;
|
||||
padding: clamp(1rem, 4vw, 2rem);
|
||||
}
|
||||
.admin-top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
.eyebrow {
|
||||
color: #7a8f73;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: .08em;
|
||||
font-weight: 900;
|
||||
font-size: .75rem;
|
||||
}
|
||||
h1, h2, h3 {
|
||||
font-family: Georgia, "Times New Roman", serif;
|
||||
line-height: 1.12;
|
||||
letter-spacing: 0;
|
||||
}
|
||||
h1 { margin: .2rem 0; font-size: clamp(2rem, 5vw, 3.5rem); }
|
||||
.panel, .table-list article, .stats-grid article, .auth-card, .section-editor {
|
||||
background: white;
|
||||
border: 1px solid rgba(47,41,38,.12);
|
||||
border-radius: 8px;
|
||||
padding: 1rem;
|
||||
}
|
||||
.stats-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
|
||||
gap: 1rem;
|
||||
}
|
||||
.stats-grid strong {
|
||||
display: block;
|
||||
font-size: 1.8rem;
|
||||
color: #7d3f45;
|
||||
}
|
||||
.quick-actions, .toolbar {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: .75rem;
|
||||
margin: 1rem 0;
|
||||
align-items: center;
|
||||
}
|
||||
.two-column {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
||||
gap: 1rem;
|
||||
}
|
||||
.table-list {
|
||||
display: grid;
|
||||
gap: 1rem;
|
||||
}
|
||||
.editor-form {
|
||||
display: grid;
|
||||
gap: 1rem;
|
||||
max-width: 940px;
|
||||
}
|
||||
.editor-form.nested {
|
||||
margin-top: 1rem;
|
||||
max-width: none;
|
||||
}
|
||||
.inline-form, .inline-grid {
|
||||
display: grid;
|
||||
gap: .75rem;
|
||||
margin: 1rem 0;
|
||||
}
|
||||
.inline-grid {
|
||||
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
|
||||
align-items: end;
|
||||
}
|
||||
.section-editor {
|
||||
margin: .75rem 0;
|
||||
}
|
||||
.section-editor summary {
|
||||
cursor: pointer;
|
||||
font-weight: 900;
|
||||
}
|
||||
.media-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
|
||||
gap: 1rem;
|
||||
margin: 1rem 0;
|
||||
}
|
||||
.media-card img {
|
||||
width: 100%;
|
||||
aspect-ratio: 4 / 3;
|
||||
object-fit: cover;
|
||||
border-radius: 8px;
|
||||
background: #efe3da;
|
||||
}
|
||||
.media-card {
|
||||
background: white;
|
||||
border-radius: 8px;
|
||||
padding: .75rem;
|
||||
display: grid;
|
||||
gap: .4rem;
|
||||
}
|
||||
.message-detail pre {
|
||||
white-space: pre-wrap;
|
||||
background: #f6f0ea;
|
||||
padding: 1rem;
|
||||
border-radius: 8px;
|
||||
}
|
||||
.auth-page {
|
||||
min-height: 100vh;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
padding: 1rem;
|
||||
}
|
||||
.auth-card {
|
||||
width: min(100%, 460px);
|
||||
}
|
||||
.auth-card form {
|
||||
display: grid;
|
||||
gap: 1rem;
|
||||
}
|
||||
@media (max-width: 860px) {
|
||||
.admin-sidebar {
|
||||
position: static;
|
||||
width: auto;
|
||||
}
|
||||
.admin-main {
|
||||
margin-left: 0;
|
||||
}
|
||||
.admin-sidebar nav {
|
||||
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
|
||||
}
|
||||
}
|
||||
320
public/css/site.css
Normal file
320
public/css/site.css
Normal file
@@ -0,0 +1,320 @@
|
||||
* { box-sizing: border-box; }
|
||||
html { scroll-behavior: smooth; }
|
||||
body {
|
||||
margin: 0;
|
||||
color: var(--text);
|
||||
background: var(--bg);
|
||||
font-family: var(--body-font);
|
||||
line-height: 1.6;
|
||||
font-size: 17px;
|
||||
}
|
||||
img { max-width: 100%; display: block; }
|
||||
a { color: var(--link); }
|
||||
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
|
||||
outline: 3px solid var(--accent);
|
||||
outline-offset: 3px;
|
||||
}
|
||||
.skip-link {
|
||||
position: absolute;
|
||||
top: -100px;
|
||||
left: 1rem;
|
||||
background: var(--button);
|
||||
color: var(--button-text);
|
||||
padding: .75rem 1rem;
|
||||
z-index: 20;
|
||||
}
|
||||
.skip-link:focus { top: 1rem; }
|
||||
.site-header {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
padding: .85rem clamp(1rem, 4vw, 2.5rem);
|
||||
background: color-mix(in srgb, var(--bg) 94%, white);
|
||||
border-bottom: 1px solid rgba(52,43,40,.12);
|
||||
backdrop-filter: blur(12px);
|
||||
}
|
||||
.brand {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: .65rem;
|
||||
text-decoration: none;
|
||||
color: var(--heading);
|
||||
font-family: var(--heading-font);
|
||||
font-weight: 700;
|
||||
}
|
||||
.brand-mark {
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
border: 2px solid var(--accent);
|
||||
border-radius: 50%;
|
||||
background:
|
||||
linear-gradient(90deg, transparent 47%, var(--accent) 48% 52%, transparent 53%),
|
||||
radial-gradient(circle at 50% 50%, var(--bg-alt) 0 38%, transparent 39%);
|
||||
}
|
||||
.site-nav {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: .35rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.site-nav a, .site-footer nav a {
|
||||
text-decoration: none;
|
||||
padding: .5rem .7rem;
|
||||
border-radius: var(--radius);
|
||||
}
|
||||
.site-nav a.active { background: var(--bg-alt); }
|
||||
.nav-cta, .button, button {
|
||||
appearance: none;
|
||||
border: 0;
|
||||
border-radius: var(--radius);
|
||||
background: var(--button);
|
||||
color: var(--button-text);
|
||||
padding: .78rem 1rem;
|
||||
text-decoration: none;
|
||||
font-weight: 700;
|
||||
cursor: pointer;
|
||||
}
|
||||
.button.secondary, .site-nav .nav-cta.secondary {
|
||||
background: transparent;
|
||||
color: var(--button);
|
||||
box-shadow: inset 0 0 0 1px var(--button);
|
||||
}
|
||||
.button.small { padding: .55rem .7rem; font-size: .92rem; }
|
||||
.text-button { font-weight: 700; }
|
||||
.menu-toggle { display: none; }
|
||||
.hero {
|
||||
min-height: min(760px, 92vh);
|
||||
display: grid;
|
||||
align-items: center;
|
||||
padding: clamp(4rem, 10vw, 8rem) clamp(1rem, 5vw, 4rem);
|
||||
background-repeat: no-repeat;
|
||||
position: relative;
|
||||
}
|
||||
.hero::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: rgba(255,250,245,var(--overlay-opacity));
|
||||
}
|
||||
.hero.dark::before { background: rgba(0,0,0,var(--overlay-opacity)); }
|
||||
.hero.none::before { opacity: 0; }
|
||||
.hero-inner {
|
||||
position: relative;
|
||||
max-width: 720px;
|
||||
}
|
||||
.eyebrow {
|
||||
text-transform: uppercase;
|
||||
letter-spacing: .08em;
|
||||
color: var(--accent);
|
||||
font-size: .78rem;
|
||||
font-weight: 800;
|
||||
}
|
||||
h1, h2, h3 {
|
||||
font-family: var(--heading-font);
|
||||
color: var(--heading);
|
||||
line-height: 1.1;
|
||||
letter-spacing: 0;
|
||||
}
|
||||
h1 { font-size: clamp(2.4rem, 8vw, 5.8rem); margin: .25rem 0 1rem; }
|
||||
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
|
||||
h3 { font-size: 1.35rem; }
|
||||
.hero p { font-size: clamp(1.05rem, 2vw, 1.32rem); max-width: 58ch; }
|
||||
.hero-contact { font-weight: 700; }
|
||||
.button-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
|
||||
.showcase, .content-section, .filters, .cards-grid, .detail-layout, .gallery, .equipment, .contact-details, .contact-form-section {
|
||||
padding: clamp(2.5rem, 6vw, 5rem) clamp(1rem, 5vw, 3rem);
|
||||
}
|
||||
.section-heading { max-width: var(--site-width); margin: 0 auto 1.5rem; }
|
||||
.section-heading p { max-width: 68ch; }
|
||||
.cards-grid {
|
||||
max-width: var(--site-width);
|
||||
margin: 0 auto;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
||||
gap: 1rem;
|
||||
}
|
||||
.item-card, .service-card {
|
||||
background: rgba(255,255,255,.72);
|
||||
border: 1px solid rgba(52,43,40,.12);
|
||||
border-radius: var(--radius);
|
||||
overflow: hidden;
|
||||
min-width: 0;
|
||||
}
|
||||
.item-card img, .service-card img, .image-placeholder {
|
||||
width: 100%;
|
||||
aspect-ratio: 4 / 3;
|
||||
object-fit: cover;
|
||||
background:
|
||||
repeating-linear-gradient(45deg, rgba(122,143,115,.18) 0 9px, rgba(125,63,69,.12) 9px 18px),
|
||||
var(--bg-alt);
|
||||
}
|
||||
.image-placeholder.thread {
|
||||
background:
|
||||
radial-gradient(circle at 30% 35%, rgba(125,63,69,.25) 0 16%, transparent 17%),
|
||||
radial-gradient(circle at 70% 60%, rgba(122,143,115,.28) 0 18%, transparent 19%),
|
||||
var(--bg-alt);
|
||||
}
|
||||
.card-body { padding: 1rem; }
|
||||
.badges { display: flex; flex-wrap: wrap; gap: .35rem; min-height: 1.7rem; }
|
||||
.badges span, .status {
|
||||
display: inline-block;
|
||||
border-radius: 999px;
|
||||
background: var(--bg-alt);
|
||||
padding: .2rem .55rem;
|
||||
font-size: .8rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
.price, .pricing-note { font-weight: 800; color: var(--button); }
|
||||
.card-actions { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }
|
||||
.content-section {
|
||||
max-width: var(--site-width);
|
||||
margin: 0 auto;
|
||||
}
|
||||
.content-section.split {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
|
||||
gap: clamp(1rem, 4vw, 3rem);
|
||||
align-items: center;
|
||||
}
|
||||
.content-section.split.reverse { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
|
||||
.content-section img, .detail-image, .gallery img {
|
||||
border-radius: var(--radius);
|
||||
border: 1px solid rgba(52,43,40,.12);
|
||||
}
|
||||
.contact-callout {
|
||||
background: var(--button);
|
||||
color: var(--button-text);
|
||||
border-radius: var(--radius);
|
||||
}
|
||||
.contact-callout h2 { color: var(--button-text); }
|
||||
.page-hero {
|
||||
padding: clamp(3rem, 8vw, 6rem) clamp(1rem, 5vw, 3rem);
|
||||
background: var(--bg-alt);
|
||||
}
|
||||
.page-hero > * { max-width: var(--site-width); margin-left: auto; margin-right: auto; }
|
||||
.page-hero.compact h1 { font-size: clamp(2.1rem, 6vw, 4.2rem); }
|
||||
.filters form {
|
||||
max-width: var(--site-width);
|
||||
margin: 0 auto;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
|
||||
gap: 1rem;
|
||||
align-items: end;
|
||||
}
|
||||
label { display: grid; gap: .35rem; font-weight: 700; }
|
||||
input, textarea, select {
|
||||
width: 100%;
|
||||
border: 1px solid rgba(52,43,40,.24);
|
||||
border-radius: var(--radius);
|
||||
padding: .75rem .85rem;
|
||||
font: inherit;
|
||||
background: white;
|
||||
}
|
||||
.alphabet {
|
||||
max-width: var(--site-width);
|
||||
margin: 1rem auto 0;
|
||||
display: flex;
|
||||
gap: .3rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.alphabet a {
|
||||
background: white;
|
||||
border-radius: var(--radius);
|
||||
padding: .35rem .55rem;
|
||||
}
|
||||
.detail-layout {
|
||||
max-width: var(--site-width);
|
||||
margin: 0 auto;
|
||||
display: grid;
|
||||
grid-template-columns: minmax(260px, .9fr) minmax(0, 1.1fr);
|
||||
gap: clamp(1.5rem, 5vw, 4rem);
|
||||
}
|
||||
.gallery {
|
||||
max-width: var(--site-width);
|
||||
margin: 0 auto;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
|
||||
gap: 1rem;
|
||||
}
|
||||
.contact-details {
|
||||
max-width: var(--site-width);
|
||||
margin: 0 auto;
|
||||
}
|
||||
.contact-details dl {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
|
||||
gap: .75rem;
|
||||
}
|
||||
.contact-details div {
|
||||
background: white;
|
||||
border-radius: var(--radius);
|
||||
padding: 1rem;
|
||||
border: 1px solid rgba(52,43,40,.12);
|
||||
}
|
||||
dt { font-weight: 800; }
|
||||
dd { margin: .25rem 0 0; }
|
||||
.contact-form-section {
|
||||
background: var(--bg-alt);
|
||||
}
|
||||
.contact-form {
|
||||
max-width: 780px;
|
||||
margin: 0 auto;
|
||||
display: grid;
|
||||
gap: 1rem;
|
||||
}
|
||||
.checkbox { display: flex; align-items: flex-start; gap: .6rem; }
|
||||
.checkbox input { width: auto; margin-top: .35rem; }
|
||||
.hp { position: absolute; left: -9999px; }
|
||||
.notice.success {
|
||||
background: #e7f2e4;
|
||||
border: 1px solid #9abb91;
|
||||
padding: .75rem 1rem;
|
||||
border-radius: var(--radius);
|
||||
}
|
||||
.site-footer {
|
||||
display: grid;
|
||||
grid-template-columns: 1.2fr 1fr 1fr;
|
||||
gap: 1.5rem;
|
||||
padding: 2rem clamp(1rem, 5vw, 3rem);
|
||||
border-top: 1px solid rgba(52,43,40,.12);
|
||||
background: color-mix(in srgb, var(--bg-alt) 80%, white);
|
||||
}
|
||||
.site-footer nav { display: grid; align-content: start; }
|
||||
.copyright { grid-column: 1 / -1; font-size: .9rem; }
|
||||
.maintenance {
|
||||
min-height: 70vh;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
text-align: center;
|
||||
padding: 3rem 1rem;
|
||||
}
|
||||
.maintenance img { max-width: 360px; border-radius: var(--radius); }
|
||||
@media (max-width: 760px) {
|
||||
.menu-toggle { display: inline-flex; }
|
||||
.site-header { align-items: flex-start; }
|
||||
.site-nav {
|
||||
display: none;
|
||||
width: 100%;
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
background: var(--bg);
|
||||
padding: .75rem;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 100%;
|
||||
border-bottom: 1px solid rgba(52,43,40,.12);
|
||||
}
|
||||
.site-nav.open { display: flex; }
|
||||
.content-section.split, .content-section.split.reverse, .detail-layout, .site-footer {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
.hero { min-height: 82vh; }
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
* { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
|
||||
}
|
||||
25
public/js/admin.js
Normal file
25
public/js/admin.js
Normal file
@@ -0,0 +1,25 @@
|
||||
document.querySelectorAll("form").forEach((form) => {
|
||||
form.addEventListener("submit", (event) => {
|
||||
const danger = event.submitter?.classList.contains("danger");
|
||||
if (danger && !confirm("Please confirm this permanent action.")) {
|
||||
event.preventDefault();
|
||||
return;
|
||||
}
|
||||
const button = event.submitter;
|
||||
if (button && button.tagName === "BUTTON") {
|
||||
button.dataset.originalText = button.textContent;
|
||||
button.textContent = "Saving...";
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
document.querySelectorAll("input[type='file']").forEach((input) => {
|
||||
input.addEventListener("change", () => {
|
||||
const existing = input.parentElement.querySelector(".file-hint");
|
||||
existing?.remove();
|
||||
const hint = document.createElement("small");
|
||||
hint.className = "file-hint";
|
||||
hint.textContent = `${input.files.length} selected`;
|
||||
input.parentElement.appendChild(hint);
|
||||
});
|
||||
});
|
||||
19
public/js/site.js
Normal file
19
public/js/site.js
Normal file
@@ -0,0 +1,19 @@
|
||||
document.addEventListener("click", (event) => {
|
||||
const toggle = event.target.closest("[data-menu-toggle]");
|
||||
if (!toggle) return;
|
||||
const menu = document.getElementById(toggle.getAttribute("aria-controls"));
|
||||
const open = toggle.getAttribute("aria-expanded") === "true";
|
||||
toggle.setAttribute("aria-expanded", String(!open));
|
||||
menu?.classList.toggle("open", !open);
|
||||
});
|
||||
|
||||
document.querySelectorAll("form").forEach((form) => {
|
||||
form.addEventListener("submit", () => {
|
||||
const button = form.querySelector("button[type='submit'], button:not([type])");
|
||||
if (button && !button.dataset.keepEnabled) {
|
||||
button.dataset.originalText = button.textContent;
|
||||
button.textContent = "Sending...";
|
||||
button.disabled = true;
|
||||
}
|
||||
});
|
||||
});
|
||||
1
public/uploads/.gitkeep
Normal file
1
public/uploads/.gitkeep
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
BIN
public/uploads/sample-hero.png
Normal file
BIN
public/uploads/sample-hero.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.1 MiB |
Reference in New Issue
Block a user