Skip to content

Commit 290a1d1

Browse files
authored
Web 44 - fixed header/footer for overflowing issues
2 parents 5f920a8 + 59d7c62 commit 290a1d1

3 files changed

Lines changed: 18 additions & 13 deletions

File tree

sga-puck/components/puck/Footer.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ export const Footer: React.FC<FooterProps> = ({
5252
mediaInquiriesEmail,
5353
mediaInquiriesLabel,
5454
}) => (
55-
<footer className="bg-black relative bottom-0 left-0 w-screen text-center overflow-hidden mx-0 px-0">
55+
<footer className="bg-black w-full text-center overflow-x-hidden">
56+
<div className="max-w-7xl mx-auto px-6 text-center">
57+
5658
{showActionButtons && (
5759
<div className="flex justify-center items-center pt-10 gap-5">
5860
<button className="button bg-black text-white border-2 p-5 border-white transition-all duration-350 ease-in-out hover:bg-white hover:text-black">{actionButton1Text}</button>
@@ -62,7 +64,7 @@ export const Footer: React.FC<FooterProps> = ({
6264
)}
6365

6466
{showSocialMedia && (
65-
<div className="flex justify-center items-center gap-5 py-6">
67+
<div className="flex flex-wrap justify-center items-center gap-8 py-6 px-4">
6668
<div className="flex flex-col items-center px-5">
6769
<p className="text-white font-light pb-3">{socialMedia1Label}</p>
6870
{socialMedia1LogoSrc ? (
@@ -93,23 +95,24 @@ export const Footer: React.FC<FooterProps> = ({
9395
<div className="pb-10">
9496
<p className="text-white font-light pb-4">{organizationName}</p>
9597
<p className="text-white font-light pb-4">{organizationAddress}</p>
96-
<p className="text-white font-light pb-4">{webmasterLabel}&nbsp;
98+
<p className="text-white font-light pb-4 break-words">{webmasterLabel}&nbsp;
9799
<a
98100
href={`mailto:${webmasterEmail}`}
99-
className="underline text-white font-light hover:text-gray-300"
101+
className="underline text-white font-light hover:text-gray-300 wrap-break-word"
100102
>
101103
{webmasterEmail}
102104
</a>
103105
</p>
104-
<p className="text-white font-light pb-4">{mediaInquiriesLabel}&nbsp;
106+
<p className="text-white font-light pb-4 break-words">{mediaInquiriesLabel}&nbsp;
105107
<a
106108
href={`mailto:${mediaInquiriesEmail}`}
107-
className="underline text-white font-light hover:text-gray-300 transition duration-300"
109+
className="underline text-white font-light hover:text-gray-300 transition duration-300 wrap-break-word"
108110
>
109111
{mediaInquiriesEmail}
110112
</a>
111113
</p>
112114
</div>
115+
</div>
113116
</footer>
114117
);
115118

sga-puck/components/puck/HeaderContent.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,18 @@ export const HeaderContent: React.FC<HeaderContentProps> = ({
3333
dividerHeight,
3434
dividerMargin
3535
}) => (
36-
<div className="relative w-screen">
36+
<div className="relative w-full overflow-x-hidden">
3737
<header
38-
className={`flex flex-col justify-center items-center h-auto w-screen relative top-0 ${padding}`}
38+
className={`flex flex-col justify-center items-center h-auto w-full relative ${padding}`}
3939
style={{ backgroundColor }}
4040
>
41-
<div className="flex items-center">
41+
<div className="flex flex-wrap items-center justify-center gap-4 text-center max-w-full">
4242
<h1 className={`${titleSize} font-bold ${titleColor} text-center`}>
4343
{titleText}
4444
</h1>
45-
<div className={`inline-block ${dividerHeight} min-h-[1em] ${dividerWidth} self-stretch ${dividerColor} ${dividerMargin}`}></div>
45+
<div className={` ${dividerHeight} ${dividerWidth} ${dividerColor} ${dividerMargin} shrink-0`}></div>
4646
{logoSrc ? (
47-
<img src={logoSrc} alt={logoAltText} className={`${logoWidth} ${logoHeight}`} />
47+
<img src={logoSrc} alt={logoAltText} className={`${logoWidth} ${logoHeight} object-contain`} />
4848
) : (
4949
<div className="text-white font-semibold">Header</div>
5050
)}
@@ -91,6 +91,7 @@ export const HeaderContentConfig: ComponentConfig<HeaderContentProps> = {
9191
logoWidth: {
9292
type: "select",
9393
options: [
94+
{ label: "Responsive (Mobile to Desktop)", value: "w-24 sm:w-32 md:w-40 lg:w-48 xl:w-52" },
9495
{ label: "Small (w-32)", value: "w-32" },
9596
{ label: "Medium (w-40)", value: "w-40" },
9697
{ label: "Large (w-48)", value: "w-48" },
@@ -102,6 +103,7 @@ export const HeaderContentConfig: ComponentConfig<HeaderContentProps> = {
102103
type: "select",
103104
options: [
104105
{ label: "Auto", value: "h-auto" },
106+
{ label: "Responsive (Mobile to Desktop)", value: "sm:h-16 md:h-20 lg:h-24 xl:h-32" },
105107
{ label: "Small (h-16)", value: "h-16" },
106108
{ label: "Medium (h-20)", value: "h-20" },
107109
{ label: "Large (h-24)", value: "h-24" },
@@ -154,7 +156,7 @@ export const HeaderContentConfig: ComponentConfig<HeaderContentProps> = {
154156
titleColor: "text-sga-red",
155157
logoSrc: "",
156158
logoAltText: "SGA Logo",
157-
logoWidth: "w-52",
159+
logoWidth: "w-24 sm:w-32 md:w-40 lg:w-48 xl:w-52",
158160
logoHeight: "h-auto",
159161
dividerColor: "bg-black",
160162
dividerWidth: "w-1",

sga-puck/components/puck/Navigation.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const Navigation: React.FC<NavigationProps> = ({
4040
absolute left-0
4141
md:left-auto
4242
md:right-0
43-
z-10 w-auto origin-top-right rounded-md bg-black ring-1 shadow-lg ring-black/5
43+
z-50 w-auto origin-top-right rounded-md bg-black ring-1 shadow-lg ring-black/5
4444
">
4545
<div className="py-1">
4646
{group.items.map((item, itemIdx) => (

0 commit comments

Comments
 (0)