Skip to content

Commit

Permalink
center footer on landing page
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo committed Sep 10, 2024
1 parent d5ff060 commit ee57710
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/components/Layout/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@

.container footer {
position: relative;
text-align: left;
z-index: 1;
padding: 1rem;
padding-top: 4rem;
color: #aaa;
display: flex;
width: 100%;
gap: 1rem;
}

Expand Down
15 changes: 10 additions & 5 deletions app/components/Layout/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { NavLink } from "@remix-run/react";
import { NavLink, useLocation } from "@remix-run/react";
import classes from "./index.module.css";

interface Props extends React.HTMLAttributes<HTMLDivElement> {
Expand All @@ -7,17 +7,22 @@ interface Props extends React.HTMLAttributes<HTMLDivElement> {
}

export const Layout: React.FC<Props> = ({ type, children, ...props }) => {
const { pathname } = useLocation();
return (
<div className={classes.container} data-layout-type={type ?? "black"}>
<main {...props}>{children}</main>
{!props.noFooter && (
<footer>
<footer
style={{ justifyContent: pathname === "/" ? "center" : "start" }}
>
<NavLink prefetch="intent" to="/legal">
legal notice
</NavLink>
<NavLink prefetch="intent" to="/past-shows">
past shows
</NavLink>
{pathname === "/" && (
<NavLink prefetch="intent" to="/past-shows">
past shows
</NavLink>
)}
</footer>
)}
</div>
Expand Down

0 comments on commit ee57710

Please sign in to comment.