Skip to content

Commit

Permalink
docs: simple docs footer (#3240)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebald authored Aug 7, 2023
1 parent cf3b8c1 commit 502a64a
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
11 changes: 11 additions & 0 deletions docs/app/_components/SiteFooter.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { siteConfig } from '@/lib/config';
import { Logo } from './Logo';

export const SiteFooter = () => (
<footer className="border-secondary-200 prose mt-28 flex flex-col items-center justify-between gap-8 border-t py-4 md:flex-row">
<div className="flex items-center gap-[0.5ch] text-xs">
Build with 🥵, 🧡 and <Logo className="h-3 w-3" />
</div>
<div className="text-xs">v{siteConfig.version}</div>
</footer>
);
5 changes: 3 additions & 2 deletions docs/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { fontSans } from '@/theme/fonts';
import { Analytics } from './_components/Analytics';
import { Navigation } from './_components/Navigation';
import { SiteHeader } from './_components/SiteHeader';
import { SiteFooter } from './_components/SiteFooter';

// Metadata
// ---------------
Expand Down Expand Up @@ -45,8 +46,8 @@ const Layout = ({ children }: { children: React.ReactNode }) => {
<Navigation />
</aside>
<div className="md:pl-60 lg:pl-72">
<main className="max-w-3xl">{children}</main>
<footer>Marigold Footer</footer>
<main>{children}</main>
<SiteFooter />
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions docs/lib/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export const siteConfig = {
version: process.env.version,
navigation: [
{
name: 'Introduction',
Expand Down
4 changes: 4 additions & 0 deletions docs/next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { withContentlayer } = require('next-contentlayer');
const pkg = require('./package.json');

/** @type {import('next').NextConfig} */
const nextConfig = {
Expand All @@ -16,6 +17,9 @@ const nextConfig = {
'@marigold/system',
'@marigold/theme-preset',
],
env: {
version: pkg.version,
},
async redirects() {
return [
{
Expand Down

2 comments on commit 502a64a

@vercel
Copy link

@vercel vercel bot commented on 502a64a Aug 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

marigold-storybook – ./

marigold-storybook-git-main-marigold.vercel.app
marigold-latest.vercel.app
marigold-storybook-marigold.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 502a64a Aug 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

marigold-docs – ./

marigold-docs-git-main-marigold.vercel.app
marigold-docs.vercel.app
marigold-docs-marigold.vercel.app

Please sign in to comment.