generated from Blazity/next-enterprise
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
82e6b18
commit cfbe294
Showing
14 changed files
with
131 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
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
"use client" | ||
import React from "react" | ||
import { useTina } from "tinacms/dist/react" | ||
import { FooterRenderer } from "./Renderer" | ||
import { FooterProps } from "./types" | ||
|
||
export const FooterClient: React.FC<FooterProps> = ({ nav, content }) => { | ||
const _nav = useTina({ | ||
query: nav.query, | ||
variables: nav.variables, | ||
data: nav.data, | ||
}) | ||
const _content = useTina({ | ||
query: content.query, | ||
variables: content.variables, | ||
data: content.data, | ||
}) | ||
|
||
return ( | ||
// @ts-ignore | ||
<FooterRenderer nav={_nav} content={_content} /> | ||
) | ||
} |
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,38 @@ | ||
import React from "react" | ||
import { TinaMarkdown } from "tinacms/dist/rich-text" | ||
import { FooterProps } from "./types" | ||
|
||
export const FooterRenderer: React.FC<FooterProps> = ({ nav, content }) => { | ||
const column1 = content.data.page.sections.find((section: any) => section.title === "column1") | ||
const column2 = content.data.page.sections.find((section: any) => section.title === "column2") | ||
return ( | ||
<footer className="prose max-w-none bg-theme-navy-500 text-white"> | ||
{/* three columns 40 / 40 / 20 */} | ||
{/* one col on mobile */} | ||
<div className="grid grid-cols-1 gap-4 p-4 md:grid-cols-6"> | ||
<div className="col-span-1 md:col-span-2"> | ||
<h1 className="text-white">Grocery Gap Atlas</h1> | ||
<TinaMarkdown content={content.data.page.body} /> | ||
</div> | ||
<div className="col-span-1 md:col-span-2"> | ||
<TinaMarkdown content={column1.body} /> | ||
</div> | ||
<div className="col-span-1 md:col-span-2"> | ||
<TinaMarkdown content={column2.body} /> | ||
</div> | ||
</div> | ||
<div className="bg-white/25"> | ||
{/* horizontal ul of nav.data.links */} | ||
<ul className="flex list-none space-x-4 py-2 pl-4 text-white "> | ||
{nav.data.nav.links.map((link: any) => ( | ||
<li key={link.title}> | ||
<a href={link.path} className="text-white"> | ||
{link.title} | ||
</a> | ||
</li> | ||
))} | ||
</ul> | ||
</div> | ||
</footer> | ||
) | ||
} |
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,16 @@ | ||
import React from "react" | ||
import { getMdxContent } from "hooks/useMdxContent" | ||
import { FooterClient } from "./Client" | ||
import { FooterRenderer } from "./Renderer" | ||
import { FooterProps } from "./types" | ||
|
||
const Rendererer = process.env.NODE_ENV === "development" ? FooterClient : FooterRenderer | ||
|
||
const Footer: React.FC = async () => { | ||
const footerNav = await getMdxContent<FooterProps["footerNav"]>("nav", "footer-nav.mdx") | ||
const footerContent = await getMdxContent<FooterProps["footerContent"]>("page", "footer.mdx") | ||
// @ts-ignore | ||
return <Rendererer nav={footerNav} content={footerContent} /> | ||
} | ||
|
||
export default Footer |
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 @@ | ||
export type FooterProps = any |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
title: Footer | ||
links: | ||
- title: Home | ||
path: / | ||
- title: County | ||
path: /county | ||
- title: State | ||
path: /state | ||
- title: National | ||
path: /national | ||
- title: Case Studies | ||
path: /posts | ||
- title: About | ||
path: /about | ||
- title: Contact | ||
path: /contact | ||
--- | ||
|
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,18 @@ | ||
--- | ||
sections: | ||
- title: column2 | ||
body: | | ||
Funding provided in part by: | ||
[![](</uploads/Artboard 1.png>)](https://www.rwjf.org/) | ||
- title: column1 | ||
body: | | ||
Feeding Fairness is a collaboration of: | ||
[![](/uploads/rafi-logo.png)](https://www.rafiusa.org/) | ||
[![](/uploads/dsilogo.png)](https://datascience.uchicago.edu/) | ||
--- | ||
|
||
Understanding the impacts of structural racism & unfair markets on food access. | ||
|
||
This tool enables advocates, analytics, and decision-makers to unravel the landscape of inequitable access to food across the US. Use this tool to find opportunities to improve access, break down potential relationships of factors driving inequity, and utilize our data for further analysis and research. |
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
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,3 @@ | ||
footer img { | ||
max-width: 50%; | ||
} |