Skip to content

Commit 3d543a8

Browse files
authored
WEB-53 Feat: nav mobile (#383)
* add contact us on mobile view * add missing Doug image
1 parent 2228d5e commit 3d543a8

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed
9.31 KB
Loading

apps/website/src/components/cto/Values.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ import InfoBlock from "./InfoBlock.astro";
9090
</p>
9191
<img src="/quotes.svg" class="hidden md:block" />
9292
<div class="flex gap-3 col-span-2">
93-
<img src="/" class="h-[72px] w-[72px]" alt="Douglas Barr" />
93+
<img src="/douglas-icon.png" class="h-[72px] w-[72px]" alt="Douglas Barr" />
9494
<p class="text-xl text-secondary">
9595
<strong>Douglas Barr</strong>
9696
<br />

apps/website/src/components/navigation.astro

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
md:rounded-r-lg
3131
md:overflow-hidden
3232
relative
33-
gap-24
33+
gap:12
34+
md:gap-24
3435
md:has-[img[data-navhidden='false']]:gap-7
3536
max-md:has-[input:checked]:bg-secondary"
3637
>
@@ -53,6 +54,17 @@
5354
data-navhidden
5455
/>
5556
</a>
57+
<ul id="mobile-contact" class="flex 2max-md:flex max-md:ml-auto max-md:mr-4 md:hidden">
58+
<li>
59+
<a class="flex font-medium w-fit h-[45px] items-center px-4 py-2 rounded-md text-base text-center whitespace-nowrap bg-crocoder-yellow text-contrast hover:opacity-90"
60+
href="/contact">
61+
Contact us
62+
</a>
63+
</li>
64+
</ul>
65+
66+
67+
5668
<input
5769
id="nav-menu-toggle"
5870
type="checkbox"
@@ -140,6 +152,8 @@
140152
const allDataHidden = document.querySelectorAll("[data-navhidden]");
141153
const bookACallAction = document.getElementById("book-a-call-action");
142154
const navMenuToggle = document.getElementById("nav-menu-toggle");
155+
const mobileContact = document.getElementById("mobile-contact");
156+
143157

144158
function onScroll() {
145159
const currentScrollTop =
@@ -184,6 +198,10 @@
184198
});
185199
}
186200

201+
navMenuToggle.addEventListener("change", () => {
202+
mobileContact.classList.toggle("hidden", navMenuToggle.checked);
203+
});
204+
187205
function handleBookACall() {
188206
navMenuToggle.checked = false;
189207
window.navScroll = true;

0 commit comments

Comments
 (0)