Redesign footer to fix layout and add visual hierarchy
The old flex layout with justify-content: space-between pushed its two children to the far edges on wide screens, leaving a large dead void in the middle. Replaced with a centered, max-width three-column grid (brand, contact, navigate) with a script wordmark, gold section labels, a divider separating it from the banner above, and a copyright line.
This commit is contained in:
@@ -1,13 +1,9 @@
|
||||
.footer {
|
||||
background: var(--color-charcoal);
|
||||
color: var(--color-cream);
|
||||
padding: var(--space-xl) var(--space-lg);
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
gap: var(--space-lg);
|
||||
font-family: var(--font-serif);
|
||||
font-size: 0.85rem;
|
||||
border-top: 1px solid rgba(176, 141, 87, 0.35);
|
||||
}
|
||||
|
||||
.footer a {
|
||||
@@ -15,10 +11,74 @@
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.footer a:hover {
|
||||
color: var(--color-gold);
|
||||
}
|
||||
|
||||
.inner {
|
||||
max-width: 1100px;
|
||||
margin: 0 auto;
|
||||
padding: var(--space-xl) var(--space-lg) var(--space-lg);
|
||||
display: grid;
|
||||
grid-template-columns: 1.4fr 1fr 1fr;
|
||||
gap: var(--space-xl);
|
||||
}
|
||||
|
||||
.wordmark {
|
||||
font-family: var(--font-script);
|
||||
font-size: 1.7rem;
|
||||
margin: 0 0 0.35rem;
|
||||
}
|
||||
|
||||
.tagline {
|
||||
font-size: 0.75rem;
|
||||
letter-spacing: 1px;
|
||||
color: rgba(247, 243, 236, 0.6);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.columnTitle {
|
||||
font-size: 0.7rem;
|
||||
letter-spacing: 2px;
|
||||
text-transform: uppercase;
|
||||
color: var(--color-gold);
|
||||
margin: 0 0 var(--space-sm);
|
||||
}
|
||||
|
||||
.column p,
|
||||
.column a {
|
||||
display: block;
|
||||
margin: 0 0 0.4rem;
|
||||
}
|
||||
|
||||
.links {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-sm);
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.copyright {
|
||||
max-width: 1100px;
|
||||
margin: 0 auto;
|
||||
padding: var(--space-md) var(--space-lg) var(--space-lg);
|
||||
border-top: 1px solid rgba(247, 243, 236, 0.12);
|
||||
font-size: 0.7rem;
|
||||
letter-spacing: 0.5px;
|
||||
color: rgba(247, 243, 236, 0.5);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.inner {
|
||||
grid-template-columns: 1fr;
|
||||
gap: var(--space-lg);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.links {
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import Footer from './Footer'
|
||||
describe('Footer', () => {
|
||||
it('renders contact info and quick links', () => {
|
||||
render(<MemoryRouter><Footer /></MemoryRouter>)
|
||||
expect(screen.getByText(/braids by mira/i)).toBeInTheDocument()
|
||||
expect(screen.getAllByText(/braids by mira/i).length).toBeGreaterThan(0)
|
||||
expect(screen.getByRole('link', { name: /shop/i })).toHaveAttribute('href', '/shop')
|
||||
expect(screen.getByRole('link', { name: /rules/i })).toHaveAttribute('href', '/rules')
|
||||
})
|
||||
|
||||
@@ -4,17 +4,30 @@ import styles from './Footer.module.css'
|
||||
function Footer() {
|
||||
return (
|
||||
<footer className={styles.footer}>
|
||||
<div>
|
||||
<p>Braids by Mira</p>
|
||||
<p>hello@braidsbymira.com</p>
|
||||
<p>Tue–Sat, 9am–6pm</p>
|
||||
<div className={styles.inner}>
|
||||
<div className={styles.brand}>
|
||||
<p className={styles.wordmark}>Braids by Mira</p>
|
||||
<p className={styles.tagline}>Your hair, your crown</p>
|
||||
</div>
|
||||
|
||||
<div className={styles.column}>
|
||||
<p className={styles.columnTitle}>Contact</p>
|
||||
<a href="mailto:hello@braidsbymira.com">hello@braidsbymira.com</a>
|
||||
<p>Tue–Sat, 9am–6pm</p>
|
||||
</div>
|
||||
|
||||
<div className={styles.column}>
|
||||
<p className={styles.columnTitle}>Navigate</p>
|
||||
<ul className={styles.links}>
|
||||
<li><Link to="/">Home</Link></li>
|
||||
<li><Link to="/shop">Shop</Link></li>
|
||||
<li><Link to="/book">Book</Link></li>
|
||||
<li><Link to="/rules">Rules</Link></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<ul className={styles.links}>
|
||||
<li><Link to="/">Home</Link></li>
|
||||
<li><Link to="/shop">Shop</Link></li>
|
||||
<li><Link to="/book">Book</Link></li>
|
||||
<li><Link to="/rules">Rules</Link></li>
|
||||
</ul>
|
||||
|
||||
<p className={styles.copyright}>© {new Date().getFullYear()} Braids by Mira. All rights reserved.</p>
|
||||
</footer>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user