-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Joe Fusco <[email protected]>
- Loading branch information
1 parent
e5a7819
commit 94ad529
Showing
11 changed files
with
149 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { gql } from '@apollo/client' | ||
import clsx from 'clsx' | ||
import Link from 'next/link' | ||
import * as React from 'react' | ||
import styles from '@/styles/footer-navigation.module.css'; | ||
|
||
export function FooterNavigation({ navigation }) { | ||
return ( | ||
<> | ||
{navigation.map((item) => ( | ||
<Link | ||
className={clsx( | ||
styles.socialIconLink, | ||
'gap-4', | ||
)} | ||
href={item.href} | ||
key={item.id} | ||
target={item.target}> | ||
{item.label} | ||
</Link> | ||
))} | ||
</> | ||
) | ||
} | ||
|
||
FooterNavigation.fragment = gql` | ||
fragment FooterNavigationFragment on RootQuery { | ||
footerMenuItems: menuItems(first: 100, where: { location: FOOTER }) { | ||
nodes { | ||
id | ||
label | ||
title: label | ||
href: uri | ||
parentId | ||
target | ||
} | ||
} | ||
} | ||
` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
import clsx from 'clsx' | ||
import { Container } from '@/components/Container' | ||
import { FooterNavigation } from '@/components/FooterNavigation' | ||
|
||
export function SiteFooter({ navigation }) { | ||
// eslint-disable-next-line no-console | ||
console.log({ navigation }) | ||
return ( | ||
<footer | ||
className={clsx( | ||
'flex flex-wrap items-center justify-between bg-white px-4 py-5 shadow-md shadow-slate-900/5 transition duration-500 dark:shadow-none sm:px-6 lg:px-8', | ||
)} | ||
> | ||
<p>Footer</p> | ||
<footer className="py-6 md:px-8 md:py-0"> | ||
<Container> | ||
<div className="flex flex-col items-center justify-between gap-4 md:h-24 md:flex-row"> | ||
<p className="text-center text-sm leading-loose text-muted-foreground md:text-left"> | ||
© 2023 WPGraphQL. All rights reserved. | Development sponsored by <a href="https://www.wpengine.com/atlas" target="_blank" rel="noreferrer" className="font-medium underline underline-offset-4">WP Engine</a> | ||
</p> | ||
<div className="text-muted-foreground flex flex-row gap-4"> | ||
<FooterNavigation navigation={navigation} /> | ||
</div> | ||
</div> | ||
</Container> | ||
</footer> | ||
) | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
.socialIconLink { | ||
color: transparent; | ||
display: inline-flex; | ||
margin-left: 0.8rem; | ||
overflow: hidden; | ||
position: relative; | ||
text-align: center; | ||
text-decoration: none; | ||
width: 24px; | ||
height: 24px; | ||
line-height: 24px; | ||
} | ||
|
||
.socialIconLink::after { | ||
background-color: hsl(var(--muted-foreground)); | ||
content: ""; | ||
height: 100%; | ||
left: 0; | ||
opacity: 0.8; | ||
position: absolute; | ||
top: 0; | ||
width: 24px; | ||
height: 24px; | ||
} | ||
|
||
.socialIconLink:hover::after, | ||
.socialIconLink:focus::after { | ||
opacity: 1; | ||
} | ||
|
||
.socialIconLink[href*="github.com"]::after { | ||
mask: url("/social-icons/github.svg"); | ||
} | ||
|
||
.socialIconLink[href*="slack.com"]::after { | ||
mask: url("/social-icons/slack.svg"); | ||
} | ||
|
||
.socialIconLink[href*="twitter.com"]::after, | ||
.socialIconLink[href*="x.com"]::after { | ||
mask: url("/social-icons/twitter.svg"); | ||
} | ||
|
||
.socialIconLink[href*="wordpress.org"]::after { | ||
mask: url("/social-icons/wordpress.svg"); | ||
} | ||
|
||
.socialIconLink[href*="youtube.com"]::after { | ||
mask: url("/social-icons/youtube.svg"); | ||
} |