From 2b2fd3a36472f673cd98a35e291e5c18899e4b74 Mon Sep 17 00:00:00 2001 From: yodalightsabr <76178582+YodaLightsabr@users.noreply.github.com> Date: Mon, 30 Sep 2024 22:42:34 -0700 Subject: [PATCH] sizing improvements --- components/Header.js | 8 ++++-- components/Post.js | 7 ++---- content/index.js | 25 +++++++++++++++++-- content/posts/august-2024-newsletter/post.mdx | 9 +++---- content/posts/demo/post.mdx | 24 ++++++++++++++++++ content/posts/posts.js | 3 ++- jsconfig.json | 4 +-- pages/index.js | 16 ++++++++---- pages/posts/[slug].js | 17 +++++++++---- 9 files changed, 85 insertions(+), 28 deletions(-) create mode 100644 content/posts/demo/post.mdx diff --git a/components/Header.js b/components/Header.js index 36e010b..ab33016 100644 --- a/components/Header.js +++ b/components/Header.js @@ -11,7 +11,7 @@ function UnstyledLink({ children, ...props }) { export default function Header({ concise }) { return ( - + HCB Logo ({ +const posts = Object.entries(rawPosts).map(([_, { meta, default: rawComponent }]) => ({ meta, - component + rawComponent, + component: props => { + const Component = rawComponent; + return { + return ( + <> + +
+ + ) + }, + h2: props => , + h3: props => , + h4: props => , + h5: props => , + a: props => , + p: props => , + }} {...props} />; + } })); export { diff --git a/content/posts/august-2024-newsletter/post.mdx b/content/posts/august-2024-newsletter/post.mdx index 530b663..5cf970d 100644 --- a/content/posts/august-2024-newsletter/post.mdx +++ b/content/posts/august-2024-newsletter/post.mdx @@ -1,4 +1,4 @@ -import { Post, Author } from '@/components/Post.js' +import { Post, Author, Preview } from '@/components/Post.js' import Image from 'next/image' export const meta = { @@ -10,8 +10,7 @@ export const meta = { }; - - + Welcome to the newly revamped HCB monthly newsletter... we got word your inbox was feeling lonely, so we're here to spice things up! @@ -33,7 +32,7 @@ Need to get some where quickly in HCB? Try hitting Ctrl / ⌘ +  From there you can navigate to all of your organizations or search HCB for a specific transaction, card, or reimbursement. Let us know what you think! - + ## 🙏 Allow donors to cover fiscal sponsorship fees. @@ -102,4 +101,4 @@ All the best, - \ No newline at end of file + diff --git a/content/posts/demo/post.mdx b/content/posts/demo/post.mdx new file mode 100644 index 0000000..b5a4bf0 --- /dev/null +++ b/content/posts/demo/post.mdx @@ -0,0 +1,24 @@ +import Post from '@/components/Post.js' + +export const meta = { + title: "🔧 Typography & style demo", + slug: "demo", + category: "new", + tags: [ + "receipts", + ], + author: "team", + date: new Date() +}; + + + +# Heading 1 +## Heading 2 +### Heading 3 +#### Heading 4 +##### Heading 5 + +This is a paragraph. It's a bit longer than the others. + + diff --git a/content/posts/posts.js b/content/posts/posts.js index 2fb66e6..2a871ea 100644 --- a/content/posts/posts.js +++ b/content/posts/posts.js @@ -1,3 +1,4 @@ // export all posts from this file export * as a from "./same-day-ach/post.mdx"; -export * as b from "./august-2024-newsletter/post.mdx"; \ No newline at end of file +export * as b from "./august-2024-newsletter/post.mdx"; +export * as c from "./demo/post.mdx"; \ No newline at end of file diff --git a/jsconfig.json b/jsconfig.json index 369f89d..357036c 100644 --- a/jsconfig.json +++ b/jsconfig.json @@ -2,9 +2,7 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "@/styles/*": ["styles/*"], - "@/content/*": ["content/*"], - "@/components/*": ["components/*"] + "@/*": ["*"], } } } \ No newline at end of file diff --git a/pages/index.js b/pages/index.js index 2acf607..e00f767 100644 --- a/pages/index.js +++ b/pages/index.js @@ -1,6 +1,6 @@ import { useEffect, useState } from "react"; import { posts } from "../content"; -import { Box, Card, Container, Grid, Heading, Image, Link, Text } from "theme-ui"; +import { Box, Card, Container, Flex, Grid, Heading, Image, Link, Text } from "theme-ui"; import Header from "../components/Header"; import Footer from "@/components/Footer"; @@ -22,22 +22,28 @@ export default function Home() { - + {posts.toReversed().map((post) => ( ))} - + Filter TODO: add search and filters - +