Skip to content

Commit 9a96a16

Browse files
authored
fix: improve footer hero responsiveness and alignment
fix: improve footer hero responsiveness and alignment
2 parents c5e3673 + b0c75c5 commit 9a96a16

2 files changed

Lines changed: 76 additions & 21 deletions

File tree

src/theme/Footer/Layout/enhanced-footer.css

Lines changed: 71 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ html[data-theme="light"] .enhanced-footer.light-theme {
326326
}
327327

328328
.footer-logo-section {
329-
margin-bottom: 16px;
329+
margin-bottom: 8px;
330330
}
331331

332332
.footer-logo {
@@ -405,6 +405,7 @@ html[data-theme="light"] .enhanced-footer.light-theme {
405405
justify-content: flex-end;
406406
flex: 0 0 auto;
407407
margin-left: auto;
408+
align-self: flex-end;
408409
}
409410

410411
.footer-cta-buttons {
@@ -583,24 +584,57 @@ html[data-theme="light"] .enhanced-footer.light-theme {
583584
opacity: 0.82;
584585
}
585586

587+
.second-line {
588+
display: inline;
589+
}
590+
586591
@media (max-width: 880px) {
587592
.footer-hero-content {
588593
display: flex;
589594
flex-direction: column;
590-
align-items: flex-start;
591-
row-gap: 12px;
595+
align-items: center;
596+
text-align: center;
597+
gap: 16px;
592598
}
593599

594600
.footer-hero-right {
595601
width: 100%;
596602
display: flex;
597-
justify-content: flex-start;
598-
margin-top: 12px;
603+
justify-content: center;
604+
margin-top: 0;
599605
}
600606

601607
.footer-hero-left {
602608
width: 100%;
609+
flex: none;
610+
align-items: center;
611+
}
612+
.footer-logo {
613+
justify-content: center;
614+
}
615+
616+
.footer-brand-header {
617+
align-items: center;
603618
}
619+
620+
.footer-hero-text {
621+
text-align: center;
622+
}
623+
624+
.footer-hero-text h1 {
625+
text-align: center;
626+
margin: 0 auto;
627+
max-width: none;
628+
}
629+
630+
.second-line {
631+
display: block;
632+
}
633+
634+
.footer-cta-buttons {
635+
justify-content: center;
636+
}
637+
604638
}
605639

606640
/* Stats Section */
@@ -1606,23 +1640,41 @@ html[data-theme="light"] .enhanced-footer.light-theme {
16061640
}
16071641

16081642
@media (max-width: 1024px) {
1609-
.footer-hero-text h1 {
1610-
font-size: 32px;
1643+
.footer-hero-content {
1644+
display: flex;
1645+
flex-direction: column;
1646+
align-items: center;
1647+
text-align: center;
1648+
gap: 16px;
16111649
}
1612-
1613-
.footer-stats {
1614-
grid-template-columns: repeat(2, 1fr);
1615-
gap: 20px;
1650+
1651+
.footer-hero-left {
1652+
width: 100%;
1653+
flex: none;
1654+
align-items: center;
16161655
}
1617-
1618-
.footer-links-grid {
1619-
grid-template-columns: repeat(2, 1fr);
1620-
gap: 28px;
1656+
1657+
.footer-logo {
1658+
justify-content: center;
16211659
}
1622-
1623-
.newsletter-column {
1624-
grid-column: span 2;
1625-
margin-top: 20px;
1660+
1661+
.footer-brand-header {
1662+
align-items: center;
1663+
}
1664+
1665+
.footer-hero-right {
1666+
width: 100%;
1667+
justify-content: center;
1668+
margin-top: 0;
1669+
}
1670+
1671+
.footer-cta-buttons {
1672+
justify-content: center;
1673+
flex-wrap: wrap;
1674+
}
1675+
1676+
.second-line {
1677+
display: block;
16261678
}
16271679
}
16281680

src/theme/Footer/Layout/index.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,12 @@ export default function FooterLayout(): ReactNode {
170170
</div>
171171

172172
<div className="footer-hero-text">
173-
<h1>Collaboration first, Code second.</h1>
173+
<h1>
174+
Collaboration first,
175+
<span className="second-line">Code second.</span>
176+
</h1>
174177
</div>
175178
</div>
176-
177179
<div className="footer-hero-right">
178180
<div className="footer-cta-buttons">
179181
<Link
@@ -483,3 +485,4 @@ export default function FooterLayout(): ReactNode {
483485
</footer>
484486
);
485487
}
488+

0 commit comments

Comments
 (0)