Skip to content

Commit

Permalink
chore: add powered by netlify (#724)
Browse files Browse the repository at this point in the history
* chore: add powered by netlify

* build: move redirects of netlify to public dir
  • Loading branch information
unix authored Feb 9, 2022
1 parent 65e0978 commit 8fd8731
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 5 deletions.
2 changes: 2 additions & 0 deletions lib/components/layout/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, { useEffect, useState } from 'react'
import PageHeader from './header'
import { useTheme } from 'components'
import Sidebar from './sidebar'
import PoweredBy from './powered-by'

export interface Meta {
title: string
Expand Down Expand Up @@ -41,6 +42,7 @@ export const Layout: React.FC<React.PropsWithChildren<LayoutProps>> = React.memo
</aside>
<main className="main">
<div>{children}</div>
<PoweredBy />
</main>
<style jsx global>{`
.layout h3 {
Expand Down
30 changes: 30 additions & 0 deletions lib/components/layout/powered-by.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import React from 'react'
import { Text, Link } from 'components'

const PoweredBy: React.FC<unknown> = () => {
return (
<div className="powered-by">
<Text mb={0} font="14px" type="secondary">
Geist is an open source project from the community.
</Text>
<Text mt={0} font="14px" type="secondary">
And is powered by{' '}
<Link color target="_blank" rel="noreferrer nofollow" href="/powered-by-netlify">
Netlify
</Link>
.
</Text>
<style jsx>{`
.powered-by {
width: 100%;
display: flex;
flex-direction: column;
align-items: flex-end;
margin-top: 30px;
}
`}</style>
</div>
)
}

export default PoweredBy
5 changes: 0 additions & 5 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ const nextConfig = {
permanent: true,
destination: '/en-us/components/icons',
},
{
source: '/move-to-core',
destination: 'https://github.com/geist-org/geist-ui/discussions/677',
permanent: true,
},
{
source: '/en-us/customization',
destination: '/en-us',
Expand Down
2 changes: 2 additions & 0 deletions public/_redirects
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/powered-by-netlify https://www.netlify.com/?utm_source=github&utm_medium=geist-ui
/move-to-core https://github.com/geist-org/geist-ui/discussions/677

0 comments on commit 8fd8731

Please sign in to comment.