-
Notifications
You must be signed in to change notification settings - Fork 324
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dynamic Product Swimlane & Mobile Layouts (#1412)
* Product Swimlane now works with product recommendations * Updates Header for mobile * Mobile layout for header, footer, and key layout components * Adds expanding menus to footer * Adds mobile layout for search
- Loading branch information
1 parent
636481a
commit 0c456db
Showing
19 changed files
with
297 additions
and
125 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
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
65 changes: 65 additions & 0 deletions
65
templates/demo-store-neue/src/components/sections/Footer.client.jsx
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,65 @@ | ||
import {Link} from '@shopify/hydrogen'; | ||
import {CountrySelector} from '~/components/blocks'; | ||
import {Heading} from '../elements'; | ||
import {footer as mockData} from '~/lib/placeholders'; | ||
import Section from './Section'; | ||
import {Disclosure} from '@headlessui/react'; | ||
|
||
/** | ||
* A server component that specifies the content of the footer on the website | ||
*/ | ||
|
||
export default function Footer({menus = mockData}) { | ||
const styles = { | ||
footer: | ||
'grid items-start w-full grid-flow-row grid-cols-1 gap-6 py-8 border-b md:gap-8 lg:gap-12 md:grid-cols-2 lg:grid-cols-4 bg-primary dark:bg-contrast dark:text-primary text-contrast', | ||
section: 'grid gap-4', | ||
nav: 'grid gap-2 pb-6', | ||
}; | ||
|
||
return ( | ||
<Section | ||
as="footer" | ||
role="contentinfo" | ||
divider="top" | ||
className={styles.footer} | ||
> | ||
{menus.map((menu) => ( | ||
<section key={menu.id} className={styles.section}> | ||
<Disclosure> | ||
{({open}) => ( | ||
<> | ||
<Disclosure.Button className="text-left md:cursor-default"> | ||
<Heading size="lead" as="h4"> | ||
{menu.title} | ||
</Heading> | ||
</Disclosure.Button> | ||
<div className={open ? `block` : `hidden md:block`}> | ||
<Disclosure.Panel static> | ||
<nav className={styles.nav}> | ||
{menu.links.map((link) => ( | ||
<Link key={link.id} to={link.url}> | ||
{link.title} | ||
</Link> | ||
))} | ||
</nav> | ||
</Disclosure.Panel> | ||
</div> | ||
</> | ||
)} | ||
</Disclosure> | ||
</section> | ||
))} | ||
<section className={styles.section}> | ||
<Heading size="lead" className="cursor-default" as="h4"> | ||
Country | ||
</Heading> | ||
<CountrySelector /> | ||
</section> | ||
<div className="pt-8 opacity-50 md:col-span-2 lg:col-span-4"> | ||
© {new Date().getFullYear()} / Shopify, Inc. Hydrogen is an MIT | ||
Licensed Open Source project. This website is carbon neutral. | ||
</div> | ||
</Section> | ||
); | ||
} |
49 changes: 0 additions & 49 deletions
49
templates/demo-store-neue/src/components/sections/Footer.server.jsx
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.