Skip to content

Commit

Permalink
Merge pull request #41 from ctbwx/newsletter
Browse files Browse the repository at this point in the history
adds mailchimp integration script, adds subscribe page
  • Loading branch information
ctbwx authored Mar 2, 2024
2 parents 21f48ce + 421dcd7 commit 52a0206
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 1 deletion.
23 changes: 23 additions & 0 deletions components/Subscribe.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import * as React from 'react'

import * as types from '@/lib/types'

import { PageHead } from './PageHead'

import styles from './styles.module.css'

export const Subscribe: React.FC<types.PageProps> = ({ site }) => {
const title = site?.name || 'Subscribe'

return (
<>
<PageHead site={site} title={title} />

<div className={styles.container}>
<main className={styles.main}>
<h1>Subscribe To The Blog!</h1>
</main>
</div>
</>
)
}
18 changes: 17 additions & 1 deletion pages/_document.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as React from 'react'
import Document, { Head, Html, Main, NextScript } from 'next/document'
import Script from 'next/script'

import { IconContext } from '@react-icons/all-files'

Expand All @@ -16,8 +17,22 @@ export default class MyDocument extends Document {
sizes='32x32'
href='favicon.png'
/>

<link rel='manifest' href='/manifest.json' />

<script
id='mcjs'
dangerouslySetInnerHTML={{
__html: ` !function(c,h,i,m,p)
{
((m = c.createElement(h)),
(p = c.getElementsByTagName(h)[0]),
(m.async = 1),
(m.src = i),
p.parentNode.insertBefore(m, p))
}
(document,"script","https://chimpstatic.com/mcjs-connected/js/users/b54d459eba797b47a6f48e4a4/5b20a99202f7d45b1bee288c2.js");`
}}
></script>
</Head>

<body>
Expand Down Expand Up @@ -62,6 +77,7 @@ export default class MyDocument extends Document {
}}
/>
<Main />
{/* <Script src='https://chimpstatic.com/mcjs-connected/js/users/b54d459eba797b47a6f48e4a4/5b20a99202f7d45b1bee288c2.js' /> */}
<NextScript />
</body>
</Html>
Expand Down
3 changes: 3 additions & 0 deletions pages/subscribe.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { Subscribe } from '@/components/Subscribe'

export default Subscribe

0 comments on commit 52a0206

Please sign in to comment.