-
Notifications
You must be signed in to change notification settings - Fork 4
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
4d642e8
commit 1861871
Showing
11 changed files
with
1,351 additions
and
243 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 |
---|---|---|
@@ -1,7 +1,10 @@ | ||
module.exports = { | ||
const withMDX = require('@next/mdx')() | ||
module.exports = withMDX({ | ||
pageExtensions: ['js', 'jsx', 'mdx', 'ts', 'tsx'], | ||
// Optionally, add any other Next.js config below | ||
reactStrictMode: true, | ||
compiler: { | ||
styledComponents: true, | ||
}, | ||
output: 'standalone', | ||
}; | ||
}) |
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,20 @@ | ||
import LayoutBlog from '@/components/layouts/layout-blog'; | ||
import Link from 'next/link'; | ||
|
||
const BlogPostPage = ({post}) => { | ||
return ( | ||
<LayoutBlog> | ||
<div> | ||
A blog post / article | ||
<div className="dark:bg-gray-900"> | ||
<Link href={'/blog'}> | ||
Back to list | ||
</Link> | ||
{JSON.stringify(post)} | ||
</div> | ||
</div> | ||
</LayoutBlog> | ||
) | ||
} | ||
|
||
export default BlogPostPage |
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,14 @@ | ||
import MdxLayout from '@/components/layouts/layout-blog' | ||
|
||
[//]: # (This is a comment. All of this is markdown) | ||
# Welcome to my MDX page! | ||
|
||
Bla **Bli** blub [Create stuff with Eden.Art](https://app.eden.art/) | ||
|
||
export default function MDXPage({ children }) { | ||
return ( | ||
<MdxLayout> | ||
{children} | ||
</MdxLayout> | ||
) | ||
} |
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,48 @@ | ||
import LayoutBlog from '@/components/layouts/layout-blog'; | ||
import BlogPostPreview from '@/components/BlogPostPreview'; | ||
|
||
export async function getStaticProps() { | ||
// const res = await fetch('https://.../posts') | ||
// const posts = await res.json() | ||
|
||
const posts = [{ | ||
id: '1', | ||
title: 'title', | ||
image: '/123.png', | ||
date: 'date', | ||
content: 'content content content', | ||
permalink: '/blog/1' | ||
}, | ||
{ | ||
id: '2', | ||
title: 'title', | ||
image: '/456.png', | ||
date: 'date', | ||
content: 'content content content', | ||
permalink: '/blog/2' | ||
}] | ||
|
||
return { | ||
props: { | ||
posts, | ||
}, | ||
} | ||
} | ||
|
||
const BlogIndexPage = ({posts}) => { | ||
return ( | ||
<LayoutBlog> | ||
<div> | ||
<h2>Blog</h2> | ||
<div> | ||
<h4>Posts</h4> | ||
<div className="flex flex-col gap-16"> | ||
{posts.map(post => (<BlogPostPreview post={post}/>))} | ||
</div> | ||
</div> | ||
</div> | ||
</LayoutBlog> | ||
) | ||
} | ||
|
||
export default BlogIndexPage |
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,30 @@ | ||
import Link from 'next/link'; | ||
|
||
const BlogPostPreview = ({post}) => { | ||
return ( | ||
<div className="flex flex-col items-center gap-4 w-2xl"> | ||
<Link href={post.permalink}> | ||
<img | ||
alt="By artists, for artists" | ||
src="/custom-models.jpg" | ||
className="rounded-2xl w-full h-72 object-cover object-top" | ||
/> | ||
</Link> | ||
<div className="w-full"> | ||
<p className="lg:mb-4 text-2xl font-bold lg:text-3xl md:text-xl sm:text-lg"> | ||
<Link href={'https://app.eden.art/'}> | ||
{post.title} | ||
</Link> | ||
</p> | ||
<p | ||
className="mt-2 md:mt-1 lg:mt-4 max-w-xl text-lg text-white lg:text-xl md:text-lg sm:text-xs font-extralight"> | ||
{post.content} | ||
</p> | ||
</div> | ||
|
||
<pre className="bg-gray-800 p-4 rounded-lg">{JSON.stringify(post, null, 2)}</pre> | ||
</div> | ||
) | ||
} | ||
|
||
export default BlogPostPreview |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { ReactNode } from 'react'; | ||
import Footer from '@/components/Footer'; | ||
import NavHeader from '@/components/navigation/NavHeader'; | ||
|
||
export default function LayoutBlog({ children }: { children: ReactNode }) { | ||
return ( | ||
<div className="bg-black"> | ||
<NavHeader/> | ||
<div className="relative min-h-screen flex flex-col "> | ||
<section className="flex-grow"> | ||
<div className="text-white flex px-4 xl:px-24 flex-col z-10 m-10 mt-32"> | ||
{children} | ||
</div> | ||
</section> | ||
<div className="mt-2"> | ||
<Footer/> | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
} |
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,204 @@ | ||
import Link from 'next/link'; | ||
import { ControlOutlined, FileTextOutlined, MenuOutlined } from '@ant-design/icons'; | ||
import { useState } from 'react'; | ||
import useWindowSize from '@/hooks/useWindowSize'; | ||
|
||
const NavHeader = () => { | ||
const [isMenuOpen, setIsMenuOpen] = useState(false) | ||
const size = useWindowSize() | ||
|
||
return ( | ||
<div | ||
className={`fixed z-50 w-full bg-black opacity-75 ${ | ||
isMenuOpen && size.width < 640 ? 'h-72' : 'h-16' | ||
} mt-8`} | ||
> | ||
{' '} | ||
<div className="flex justify-between"> | ||
<div className=" flex items-center"> | ||
<Link href="/"> | ||
<img | ||
src="/logo.png" | ||
alt="Eden Logo" | ||
className="cursor-pointer h-16 sm:h-16 pl-4 sm:pl-24 pt-3 pb-3 object-contain" | ||
/> | ||
</Link> | ||
<Link href="/"> | ||
<p className="text-xl pl-2 font-sarif font-light text-white sm:text-2xl"> | ||
eden.art | ||
</p> | ||
</Link> | ||
<Link href="https://app.eden.art/"> | ||
{size.width > 640 && ( | ||
<div className="flex"> | ||
<div className="border border-l-white h-8 ml-4 opacity-40"></div> | ||
|
||
<p className="text-xl mt-0.5 pl-4 font-sarif font-light text-white sm:text-lg"> | ||
Explore | ||
</p> | ||
</div> | ||
)} | ||
</Link> | ||
<Link href="https://docs.eden.art/"> | ||
{size.width > 640 && ( | ||
<div className="flex"> | ||
<div className="border border-l-white h-8 ml-4 opacity-40"></div> | ||
|
||
<p className="text-xl mt-0.5 pl-4 font-sarif font-light text-white sm:text-lg"> | ||
Docs | ||
</p> | ||
</div> | ||
)} | ||
</Link> | ||
</div> | ||
|
||
<div className="flex items-center pr-4 sm:pr-20"> | ||
<div className="sm:hidden text-white pb-1"> | ||
<button | ||
onClick={() => setIsMenuOpen(!isMenuOpen)} | ||
className="px-2 py-1" | ||
> | ||
<MenuOutlined/> | ||
</button> | ||
</div> | ||
<div className="hidden sm:flex"> | ||
<Link | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
href="https://github.com/edenartlab" | ||
> | ||
<img alt="Github Logo" src="/github.png" className="h-8 sm:h-10 object-contain"/> | ||
</Link> | ||
<Link | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
href="https://discord.com/invite/4dSYwDT" | ||
> | ||
<img | ||
alt="Discord Logo" | ||
src="/discord.png" | ||
className="h-8 ml-2 sm:h-10 sm:ml-4 object-contain" | ||
/> | ||
</Link> | ||
<Link | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
href="https://twitter.com/Eden_Art_" | ||
> | ||
<img | ||
alt="Twitter Logo" | ||
src="/twitter.png" | ||
className="h-8 ml-2 sm:h-10 sm:ml-4 object-contain" | ||
/> | ||
</Link> | ||
<Link | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
href="https://instagram.com/eden.art____" | ||
> | ||
<img | ||
alt="Instagram Logo" | ||
src="/instagram.png" | ||
className="h-8 ml-2 sm:h-10 sm:ml-4 object-contain" | ||
/> | ||
</Link> | ||
</div> | ||
</div> | ||
</div> | ||
{isMenuOpen && size.width < 640 && ( | ||
<div className="flex flex-col mt-1"> | ||
<Link | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
href="https://app.eden.art" | ||
> | ||
<div className="flex"> | ||
<ControlOutlined | ||
style={{ fontSize: '26px' }} | ||
className="text-white ml-5 mt-1 mb-2" | ||
/>{' '} | ||
<p className="text-white ml-2.5 mt-2 text-sm font-bold"> | ||
EXPLORE | ||
</p> | ||
</div> | ||
</Link> | ||
<Link | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
href="https://docs.eden.art" | ||
> | ||
<div className="flex"> | ||
<FileTextOutlined | ||
style={{ fontSize: '26px' }} | ||
className="text-white ml-5 mt-1 mb-2" | ||
/>{' '} | ||
<p className="text-white ml-2.5 mt-2 text-sm font-bold"> | ||
DOCS | ||
</p> | ||
</div> | ||
</Link> | ||
<div className="border border-b mx-5 opacity-40 "></div> | ||
<Link | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
href="https://github.com/edenartlab" | ||
> | ||
<div className="flex"> | ||
<img | ||
alt="Github Logo" | ||
src="/github.png" | ||
className="h-8 mt-1.5 ml-4 object-contain" | ||
/>{' '} | ||
<p className="text-white ml-2 mt-3 text-sm font-bold"> | ||
GITHUB | ||
</p> | ||
</div> | ||
</Link> | ||
|
||
<Link | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
href="https://discord.com/invite/4dSYwDT" | ||
> | ||
<div className="flex"> | ||
<img | ||
alt="Discord Logo" | ||
src="/discord.png" | ||
className="h-8 ml-4 mt-0.5 object-contain" | ||
/>{' '} | ||
<p className="text-white ml-2 mt-2 text-sm font-bold"> | ||
DISCORD | ||
</p> | ||
</div> | ||
</Link> | ||
<Link | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
href="https://twitter.com/Eden_Art_" | ||
> | ||
<div className="flex"> | ||
<img alt="Twitter Logo" src="/twitter.png" className="h-8 ml-4 object-contain"/>{' '} | ||
<p className="text-white ml-2 mt-2 text-sm font-bold"> | ||
</p> | ||
</div> | ||
</Link> | ||
<Link | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
href="https://instagram.com/eden.art____" | ||
> | ||
<div className="flex"> | ||
<img alt="Instagram Logo" src="/instagram.png" className="h-8 ml-4 object-contain"/>{' '} | ||
<p className="text-white ml-2 mt-2 text-sm font-bold"> | ||
</p> | ||
</div> | ||
</Link> | ||
</div> | ||
)} | ||
</div> | ||
) | ||
} | ||
|
||
export default NavHeader |
Oops, something went wrong.