Skip to content

Commit 8a8a628

Browse files
authored
Merge pull request #526 from CivicDataLab/logo-update
Enhance HeroSection and Navigation Components
2 parents a9cc698 + b63655a commit 8a8a628

3 files changed

Lines changed: 18 additions & 11 deletions

File tree

app/[locale]/components/hero-section.tsx

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Image from 'next/image';
22
import { useTranslations } from 'next-intl';
3-
import { Text } from 'opub-ui';
3+
import { Divider, Text } from 'opub-ui';
44

55
import { heroBackground, heroForeground } from '@/config/site';
66
import { cn } from '@/lib/utils';
@@ -12,10 +12,14 @@ export const HeroSection = () => {
1212
return (
1313
<section
1414
className={cn(styles.HeroSection)}
15-
style={heroBackground ? { backgroundImage: `url(${heroBackground})` } : undefined}
15+
style={
16+
heroBackground
17+
? { backgroundImage: `url(${heroBackground})` }
18+
: undefined
19+
}
1620
aria-labelledby="hero-heading"
1721
>
18-
<div className=" container flex h-full w-full flex-col items-center justify-end self-center py-14">
22+
<div className=" container flex h-full w-full flex-col items-center justify-end self-center py-10">
1923
<Text
2024
id="hero-heading"
2125
className=" sr-only"
@@ -25,12 +29,15 @@ export const HeroSection = () => {
2529
{tSite('name')}
2630
</Text>
2731
{heroForeground && (
28-
<Image
29-
src={heroForeground}
30-
alt=""
31-
sizes={`(min-width: 1024px) ${heroForeground.width}px, 100vw`}
32-
className="block h-auto max-w-full lg:max-w-none"
33-
/>
32+
<div className="mb-4 flex w-fit max-w-full flex-col items-stretch gap-10">
33+
<Image
34+
src={heroForeground}
35+
alt=""
36+
sizes={`(min-width: 1024px) ${heroForeground.width}px, 100vw`}
37+
className="lg:max-w-90 block h-auto w-full max-w-full object-contain lg:h-40 lg:w-auto"
38+
/>
39+
<Divider className="h-1 w-full" />
40+
</div>
3441
)}
3542

3643
<Text

components/main-nav.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export function MainNav({ prefLangCookie }: { prefLangCookie: string }) {
3535
src={logo}
3636
alt={t('homeAlt', { name: tSite('name') })}
3737
priority
38-
className="h-6 w-auto"
38+
className="h-12 w-auto"
3939
/>
4040
)}
4141
<div className="flex flex-col gap-1"></div>

components/mobile-nav.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export function MobileNav({ prefLangCookie }: { prefLangCookie: string }) {
5353
<Image
5454
src={logo}
5555
alt={t('homeAlt', { name: tSite('name') })}
56-
className="h-6 w-auto"
56+
className="h-12 w-auto"
5757
/>
5858
)}
5959
<div className="flex flex-col gap-1"></div>

0 commit comments

Comments
 (0)