Skip to content

Commit 36bf14d

Browse files
authored
Refactor index.html for better UX and share options
Updated meta descriptions and improved accessibility comments. Enhanced share functionality with new buttons and improved copy link functionality.
1 parent 5012483 commit 36bf14d

File tree

1 file changed

+125
-59
lines changed

1 file changed

+125
-59
lines changed

index.html

Lines changed: 125 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
<meta charset="UTF-8" />
77
<meta name="viewport" content="width=device-width,initial-scale=1" />
88
<meta name="robots" content="noindex, nofollow" />
9-
<meta name="description" content="We’re enhancing our platform to deliver innovative web experiences, AI-driven automation, and premium branding. We’ll be back online shortly." />
9+
<meta name="description" content="Brittek Digital is upgrading our platform: leaner architecture, sharper UX, and automation that drives outcomes. Back online shortly—contact [email protected]." />
1010
<meta name="theme-color" content="#0a0a0a" />
1111
<meta name="color-scheme" content="dark light" />
1212
<title>Brittek Digital — Platform Under Refinement</title>
1313

1414
<!-- Open Graph / Twitter -->
1515
<meta property="og:title" content="Brittek Digital — Platform Under Refinement" />
16-
<meta property="og:description" content="We’re enhancing our platform to deliver innovative web experiences, AI-driven automation, and premium branding. We’ll be back online shortly." />
16+
<meta property="og:description" content="Leaner architecture. Sharper UX. Automation that moves the needle. Back online shortly—contact [email protected]." />
1717
<meta property="og:type" content="website" />
1818
<meta property="og:locale" content="en_AU" />
1919
<meta property="og:image" content="https://assets.codepen.io/9806267/2_5.png" />
@@ -91,7 +91,6 @@
9191
font-family: var(--font-headline);
9292
}
9393

94-
/* Focus visibility for a11y */
9594
:focus {
9695
outline: none;
9796
}
@@ -204,7 +203,7 @@
204203
gap: 1rem;
205204
}
206205

207-
/* Items (now interactive buttons, not links) */
206+
/* Items (interactive buttons; have optional accordion detail) */
208207
.modal-item {
209208
width: 100%;
210209
text-align: left;
@@ -246,7 +245,7 @@
246245
color: var(--primary);
247246
}
248247

249-
/* Accordion content that expands under each item */
248+
/* Accordion content */
250249
.accordion-content {
251250
max-height: 0;
252251
overflow: hidden;
@@ -265,23 +264,51 @@
265264
line-height: 1.55;
266265
}
267266

268-
/* Expanded state controlled by aria-expanded + JS */
269267
.accordion-trigger[aria-expanded="true"]+.accordion-content {
270-
max-height: 240px;
271-
/* ample for 2–3 lines */
268+
max-height: 260px;
272269
opacity: 1;
273270
padding-top: .75rem;
274271
}
275272

276-
/* Desktop hover also expands (progressive enhancement) */
277273
@media (hover: hover) and (pointer: fine) {
278274
.accordion-trigger:hover+.accordion-content {
279-
max-height: 240px;
275+
max-height: 260px;
280276
opacity: 1;
281277
padding-top: .75rem;
282278
}
283279
}
284280

281+
/* Inline action buttons inside accordion */
282+
.inline-actions {
283+
display: flex;
284+
flex-wrap: wrap;
285+
gap: .5rem;
286+
margin-top: .5rem;
287+
}
288+
289+
.btn {
290+
appearance: none;
291+
border: 1px solid var(--border);
292+
background: #1a1a1a;
293+
color: var(--fg);
294+
padding: .5rem .75rem;
295+
border-radius: .5rem;
296+
font-size: .875rem;
297+
font-weight: 700;
298+
letter-spacing: .04em;
299+
cursor: pointer;
300+
transition: border-color .2s ease, background-color .2s ease, transform .1s ease;
301+
}
302+
303+
.btn:hover {
304+
border-color: var(--primary);
305+
background: #222;
306+
}
307+
308+
.btn:active {
309+
transform: translateY(1px);
310+
}
311+
285312
/* ------------------------------- Main stage -------------------------------- */
286313
.main-content {
287314
position: relative;
@@ -471,7 +498,7 @@
471498
position: absolute;
472499
bottom: 4rem;
473500
left: 2rem;
474-
max-width: 36rem;
501+
max-width: 40rem;
475502
}
476503

477504
.bottom-text h2 {
@@ -684,13 +711,8 @@
684711

685712
<div class="container" id="root">
686713
<!-- Top Navigation -->
687-
<button class="nav-button left" id="menuButton" type="button" aria-haspopup="dialog" aria-controls="menuModal" aria-expanded="false">
688-
Menu
689-
</button>
690-
691-
<button class="nav-button right" id="shareButton" type="button" aria-haspopup="dialog" aria-controls="shareModal" aria-expanded="false">
692-
Share
693-
</button>
714+
<button class="nav-button left" id="menuButton" type="button" aria-haspopup="dialog" aria-controls="menuModal" aria-expanded="false">Menu</button>
715+
<button class="nav-button right" id="shareButton" type="button" aria-haspopup="dialog" aria-controls="shareModal" aria-expanded="false">Share</button>
694716

695717
<!-- Share Modal -->
696718
<div id="shareModal" class="modal" role="dialog" aria-modal="true" aria-labelledby="shareTitle" aria-hidden="true">
@@ -699,37 +721,60 @@
699721
<h2 id="shareTitle" class="modal-title font-head">Share</h2>
700722
<button class="close-button" type="button" data-close="shareModal" aria-label="Close share dialog"></button>
701723
</div>
724+
725+
<!-- Quick row (native share if available) -->
726+
<div class="inline-actions" style="margin:0 0 1rem 0;">
727+
<button id="btnWebShare" class="btn" type="button" hidden>System Share</button>
728+
<button id="btnCopyLinkTop" class="btn" type="button">Copy Link</button>
729+
</div>
730+
702731
<div class="modal-list">
732+
<!-- X -->
703733
<button class="modal-item accordion-trigger" type="button" aria-expanded="false" aria-controls="share-x">
704734
<h3>X (Twitter)</h3>
705735
<p>Post the current page</p>
706736
</button>
707737
<div id="share-x" class="accordion-content" hidden>
708738
<p>Open an X share dialog pre-filled with the current page title and URL.</p>
739+
<div class="inline-actions">
740+
<button id="btnShareX" class="btn" type="button" aria-label="Share to X">Share to X</button>
741+
</div>
709742
</div>
710743

744+
<!-- LinkedIn -->
711745
<button class="modal-item accordion-trigger" type="button" aria-expanded="false" aria-controls="share-li">
712746
<h3>LinkedIn</h3>
713747
<p>Share professionally</p>
714748
</button>
715749
<div id="share-li" class="accordion-content" hidden>
716-
<p>Share this page on your LinkedIn feed to reach your professional network.</p>
750+
<p>Publish to your LinkedIn feed to reach your professional network.</p>
751+
<div class="inline-actions">
752+
<button id="btnShareLinkedIn" class="btn" type="button" aria-label="Share to LinkedIn">Share to LinkedIn</button>
753+
</div>
717754
</div>
718755

756+
<!-- Facebook -->
719757
<button class="modal-item accordion-trigger" type="button" aria-expanded="false" aria-controls="share-fb">
720758
<h3>Facebook</h3>
721759
<p>Share socially</p>
722760
</button>
723761
<div id="share-fb" class="accordion-content" hidden>
724-
<p>Publish the link to your Facebook timeline or share via Messenger.</p>
762+
<p>Publish the link to your Facebook timeline or send via Messenger.</p>
763+
<div class="inline-actions">
764+
<button id="btnShareFacebook" class="btn" type="button" aria-label="Share to Facebook">Share to Facebook</button>
765+
</div>
725766
</div>
726767

768+
<!-- Copy -->
727769
<button class="modal-item accordion-trigger" type="button" aria-expanded="false" aria-controls="share-copy">
728770
<h3>Copy Link</h3>
729771
<p>Copy the direct URL</p>
730772
</button>
731773
<div id="share-copy" class="accordion-content" hidden>
732774
<p>Copies the page URL to your clipboard for quick pasting anywhere.</p>
775+
<div class="inline-actions">
776+
<button id="btnCopyLink" class="btn" type="button" aria-label="Copy link">Copy URL</button>
777+
</div>
733778
</div>
734779
</div>
735780
</div>
@@ -759,7 +804,7 @@ <h3>Services</h3>
759804
<p>Web design, AI automation, custom software</p>
760805
</button>
761806
<div id="acc-services" class="accordion-content" hidden role="region" aria-label="Services details">
762-
<p>End-to-end delivery: responsive design, Next.js/TypeScript builds, AI workflows and RPA, brand/visual identity, integrations, and scalable platforms engineered for speed and security.</p>
807+
<p>End-to-end delivery: responsive design, Next.js/TypeScript builds, AI workflows & RPA, visual identity, integrations, and scalable platforms engineered for speed and security.</p>
763808
</div>
764809

765810
<!-- PROJECTS -->
@@ -768,7 +813,7 @@ <h3>Projects</h3>
768813
<p>Case studies and portfolio work</p>
769814
</button>
770815
<div id="acc-projects" class="accordion-content" hidden role="region" aria-label="Projects details">
771-
<p>A selection of high-performance sites, automation deployments, and identity systems — benchmarked, measured, and iterated for real-world results.</p>
816+
<p>High-performance sites, automation deployments, and identity systems — benchmarked, measured, and iterated for real results.</p>
772817
</div>
773818

774819
<!-- INSIGHTS -->
@@ -777,7 +822,7 @@ <h3>Insights</h3>
777822
<p>Technical articles and industry perspectives</p>
778823
</button>
779824
<div id="acc-insights" class="accordion-content" hidden role="region" aria-label="Insights details">
780-
<p>Written for operators: SOPs, playbooks, optimization guides, and hard data from the field — no fluff, just what ships.</p>
825+
<p>SOPs, playbooks, optimisation guides, and hard data from the field — no fluff, just what ships.</p>
781826
</div>
782827

783828
<!-- CONTACT -->
@@ -879,18 +924,15 @@ <h3>Contact</h3>
879924
<div class="x-mark top" aria-hidden="true">✕✕</div>
880925
<div class="x-mark bottom" aria-hidden="true">✕✕</div>
881926

882-
<div class="digital-label" aria-hidden="true">
883-
<span>Digital</span>
884-
</div>
885-
927+
<div class="digital-label" aria-hidden="true"><span>Digital</span></div>
886928
<div class="dotted-line line-1" aria-hidden="true"></div>
887929
<div class="dotted-line line-2" aria-hidden="true"></div>
888930
</main>
889931

890932
<!-- Bottom Left Text -->
891933
<section class="bottom-text" id="about" aria-label="Brittek mission statement">
892-
<h2 class="font-head">Where Tech Meets Truth</h2>
893-
<p>We’re enhancing our platform to deliver innovative web experiences, AI-driven automation, and premium branding. We’ll be back online shortly.</p>
934+
<h2 class="font-head">Build Right. Ship Faster.</h2>
935+
<p>We’re refactoring the platform for speed, clarity, and control: lean architecture, cleaner UX, and automation that actually moves the needle. Back online soon. Need something now? <strong>[email protected]</strong>.</p>
894936
</section>
895937

896938
<!-- Portfolio Grid -->
@@ -928,10 +970,7 @@ <h2 class="font-head">Where Tech Meets Truth</h2>
928970
const shareModal = $("#shareModal");
929971
// Focus trap
930972
function trapFocus(modal) {
931-
const focusable = $$(
932-
'a[href], area[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',
933-
modal
934-
);
973+
const focusable = $$('a[href], area[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])', modal);
935974
if (focusable.length === 0) return () => {};
936975
const first = focusable[0];
937976
const last = focusable[focusable.length - 1];
@@ -957,10 +996,7 @@ <h2 class="font-head">Where Tech Meets Truth</h2>
957996
modal.removeAttribute("aria-hidden");
958997
triggerBtn?.setAttribute("aria-expanded", "true");
959998
body.classList.add("no-scroll");
960-
const focusable = $$(
961-
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])',
962-
modal
963-
).filter(el => !el.hasAttribute("disabled"));
999+
const focusable = $$('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])', modal).filter(el => !el.hasAttribute("disabled"));
9641000
(focusable[0] || modal).focus();
9651001
releaseFocus = trapFocus(modal);
9661002
}
@@ -976,17 +1012,15 @@ <h2 class="font-head">Where Tech Meets Truth</h2>
9761012
}
9771013
// Toggle handlers
9781014
menuButton.addEventListener("click", () => {
979-
if (menuModal.classList.contains("active")) {
980-
closeModal(menuModal, menuButton);
981-
} else {
1015+
if (menuModal.classList.contains("active")) closeModal(menuModal, menuButton);
1016+
else {
9821017
if (shareModal.classList.contains("active")) closeModal(shareModal, shareButton);
9831018
openModal(menuModal, menuButton);
9841019
}
9851020
});
9861021
shareButton.addEventListener("click", () => {
987-
if (shareModal.classList.contains("active")) {
988-
closeModal(shareModal, shareButton);
989-
} else {
1022+
if (shareModal.classList.contains("active")) closeModal(shareModal, shareButton);
1023+
else {
9901024
if (menuModal.classList.contains("active")) closeModal(menuModal, menuButton);
9911025
openModal(shareModal, shareButton);
9921026
}
@@ -1016,7 +1050,7 @@ <h2 class="font-head">Where Tech Meets Truth</h2>
10161050
if (shareModal.classList.contains("active")) closeModal(shareModal, shareButton);
10171051
}
10181052
});
1019-
// -------- Accordion behaviour (mobile tap; desktop click/hover) --------
1053+
// -------- Accordion behaviour --------
10201054
const isDesktop = window.matchMedia('(hover:hover) and (pointer:fine)').matches;
10211055
const triggers = $$(".accordion-trigger");
10221056

@@ -1027,57 +1061,89 @@ <h2 class="font-head">Where Tech Meets Truth</h2>
10271061
content.hidden = !expanded;
10281062
}
10291063
}
1030-
// Ensure all contents are initially hidden
1064+
// Initialise hidden
10311065
triggers.forEach(t => {
10321066
const c = t.nextElementSibling;
10331067
if (c && c.classList.contains("accordion-content")) c.hidden = true;
10341068
});
1035-
// Click toggles on all devices
1069+
// Click toggles (single-open)
10361070
triggers.forEach(trigger => {
10371071
trigger.addEventListener("click", () => {
10381072
const expanded = trigger.getAttribute("aria-expanded") === "true";
1039-
// Close others (accordion single-open) — optional. Comment out to allow multi-open.
10401073
triggers.forEach(t => {
10411074
if (t !== trigger) setExpanded(t, false);
10421075
});
10431076
setExpanded(trigger, !expanded);
10441077
});
10451078
});
1046-
// Desktop hover: open on mouseenter, close on mouseleave
1079+
// Desktop hover open/close
10471080
if (isDesktop) {
10481081
triggers.forEach(trigger => {
10491082
trigger.addEventListener("mouseenter", () => setExpanded(trigger, true));
10501083
trigger.addEventListener("mouseleave", () => setExpanded(trigger, false));
1051-
// Also collapse when mouse leaves the content area
10521084
const content = trigger.nextElementSibling;
10531085
if (content && content.classList.contains("accordion-content")) {
10541086
content.addEventListener("mouseleave", () => setExpanded(trigger, false));
10551087
content.addEventListener("mouseenter", () => setExpanded(trigger, true));
10561088
}
10571089
});
10581090
}
1059-
// -------- Share actions --------
1091+
// -------- Share actions (external + native) --------
1092+
const openPopup = (url) => {
1093+
window.open(url, "_blank", "noopener,noreferrer,width=700,height=600");
1094+
};
1095+
const getEncoded = () => ({
1096+
url: encodeURIComponent(location.href),
1097+
text: encodeURIComponent(document.title)
1098+
});
1099+
// Native Share availability
1100+
const webShareBtn = $("#btnWebShare");
1101+
if (navigator.share) {
1102+
webShareBtn.hidden = false;
1103+
webShareBtn.addEventListener("click", async () => {
1104+
try {
1105+
await navigator.share({
1106+
title: document.title,
1107+
url: location.href
1108+
});
1109+
} catch (e) {
1110+
// User cancelled or not allowed — no-op
1111+
}
1112+
});
1113+
}
1114+
// X
10601115
$("#btnShareX")?.addEventListener("click", () => {
1061-
const url = encodeURIComponent(location.href);
1062-
const text = encodeURIComponent(document.title);
1063-
window.open(`https://x.com/intent/tweet?url=${url}&text=${text}`, "_blank", "noopener");
1116+
const {
1117+
url,
1118+
text
1119+
} = getEncoded();
1120+
openPopup(`https://x.com/intent/tweet?url=${url}&text=${text}`);
10641121
});
1122+
// LinkedIn
10651123
$("#btnShareLinkedIn")?.addEventListener("click", () => {
1066-
const url = encodeURIComponent(location.href);
1067-
window.open(`https://www.linkedin.com/sharing/share-offsite/?url=${url}`, "_blank", "noopener");
1124+
const {
1125+
url
1126+
} = getEncoded();
1127+
openPopup(`https://www.linkedin.com/sharing/share-offsite/?url=${url}`);
10681128
});
1129+
// Facebook
10691130
$("#btnShareFacebook")?.addEventListener("click", () => {
1070-
const url = encodeURIComponent(location.href);
1071-
window.open(`https://www.facebook.com/sharer/sharer.php?u=${url}`, "_blank", "noopener");
1131+
const {
1132+
url
1133+
} = getEncoded();
1134+
openPopup(`https://www.facebook.com/sharer/sharer.php?u=${url}`);
10721135
});
1073-
$("#btnCopyLink")?.addEventListener("click", async () => {
1136+
// Copy
1137+
async function copyLink() {
10741138
try {
10751139
await navigator.clipboard.writeText(location.href);
10761140
alert("Link copied to clipboard!");
10771141
} catch (err) {
10781142
console.error("Failed to copy link:", err);
10791143
}
1080-
});
1144+
}
1145+
$("#btnCopyLink")?.addEventListener("click", copyLink);
1146+
$("#btnCopyLinkTop")?.addEventListener("click", copyLink);
10811147
</script>
10821148
</body>
10831149

0 commit comments

Comments
 (0)