Skip to content

Commit 6202da5

Browse files
author
brittneypostma
committed
temp fix for blog before trying to add prism
1 parent 30affa1 commit 6202da5

2 files changed

Lines changed: 32 additions & 11 deletions

File tree

frontend/main/src/components/PostLayout.tsx

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ export default function PostLayout({
170170
{`Latest Courses`}
171171
</h2>
172172

173-
<ul className="mx-4 space-y-2">
173+
<ul className="grid grid-cols-1 gap-2 px-4 py-2">
174174
<RecentPostsList
175175
posts={recentPosts[PostType.course]}
176176
/>
@@ -180,7 +180,7 @@ export default function PostLayout({
180180
<h2 className="p-2 m-0 text-2xl font-bold xl:p-4 rounded-t-md xl:flex-shrink-0 bg-secondary-600 dark:bg-secondary-600 text-basics-50 dark:text-basics-50">
181181
{`Latest Tutorials`}
182182
</h2>
183-
<ul className="mx-4 space-y-2">
183+
<ul className="grid grid-cols-1 gap-2 px-4 py-2">
184184
<RecentPostsList
185185
posts={recentPosts[PostType.tutorial]}
186186
/>
@@ -190,7 +190,7 @@ export default function PostLayout({
190190
<h2 className="p-2 m-0 text-2xl font-bold xl:p-4 rounded-t-md xl:flex-shrink-0 bg-secondary-600 dark:bg-secondary-600 text-basics-50 dark:text-basics-50">
191191
{`Latest Podcasts`}
192192
</h2>
193-
<ul className="mx-4 space-y-2">
193+
<ul className="grid grid-cols-1 gap-2 px-4 py-2">
194194
<RecentPostsList
195195
posts={recentPosts[PostType.podcast]}
196196
/>
@@ -200,7 +200,7 @@ export default function PostLayout({
200200
<h2 className="p-2 m-0 text-2xl font-bold xl:p-4 rounded-t-md xl:flex-shrink-0 bg-secondary-600 dark:bg-secondary-600 text-basics-50 dark:text-basics-50">
201201
{`Latest Blog`}
202202
</h2>
203-
<ul className="mx-4 space-y-2">
203+
<ul className="grid grid-cols-1 gap-2 px-4 py-2">
204204
<RecentPostsList posts={recentPosts[PostType.post]} />
205205
</ul>
206206
</div>
@@ -238,17 +238,26 @@ export default function PostLayout({
238238
</section>
239239
)}
240240
{/* Main Blog Area */}
241-
<section className="w-full max-w-5xl p-4 px-4 pt-4 mx-auto xl:px-10">
241+
<section className="w-full max-w-5xl p-4 mx-auto xl:px-10 bg-basics-50">
242242
{/* BLOG POST */}
243-
{/* <h2 className="m-0 vertical-text-clip">{post.title}</h2> */}
244243
<article className="relative grid grid-cols-1 gap-4 leading-relaxed top-2 text-basics-900">
245244
{content}
246245
</article>
247246
</section>
248247
</div>
249248
<style global jsx>{`
249+
article {
250+
font-size: clamp(1rem, 1rem + 1vw, 1.5rem);
251+
margin: 0 auto;
252+
max-width: 65ch;
253+
}
254+
blockquote {
255+
padding: 1rem 2rem;
256+
border-left: 5px solid #4b0a75;
257+
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
258+
}
250259
main a {
251-
text-decoration: underline;
260+
border-bottom: 2px solid #bc2261;
252261
}
253262
254263
main h1,
@@ -270,18 +279,26 @@ export default function PostLayout({
270279
main h5,
271280
main h6 {
272281
font-family: 'Nunito', sans-serif;
273-
margin: 1rem 0;
282+
margin: 4rem 0 2rem;
283+
width: fit-content;
274284
}
275-
main article p:first-child a img {
285+
img {
276286
width: 100%;
277287
}
278288
main p {
279-
margin: 1rem 0;
289+
margin: 0 0 3rem;
280290
}
281291
main ul li {
282292
margin-left: 2rem;
283293
list-style-type: circle;
284294
}
295+
pre {
296+
background: #333034;
297+
color: #fbfbfb;
298+
border-radius: 0.5rem;
299+
padding: 0.5rem 1rem;
300+
width: fit-content;
301+
}
285302
`}</style>
286303
</Layout>
287304
);

frontend/main/tailwind.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,9 @@ module.exports = {
99
},
1010
},
1111

12-
plugins: [require('@tailwindcss/forms'), require('nightwind')],
12+
plugins: [
13+
require('@tailwindcss/forms'),
14+
require('nightwind'),
15+
require('@tailwindcss/typography'),
16+
],
1317
};

0 commit comments

Comments
 (0)