Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: more width on mobile #265

Merged
merged 1 commit into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions src/pages/blog/Blog.module.css

This file was deleted.

3 changes: 1 addition & 2 deletions src/pages/blog/[slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import { Root, Element } from "hast"
import { LadderlyPageWrapper } from "src/core/components/page-wrapper/LadderlyPageWrapper"

import "highlight.js/styles/github-dark.css"
import styles from "src/app/styles/Home.module.css"

const tipUrl =
"https://checkout.stripe.com/c/pay/cs_live_a10YyjvS4xEbZJ9Th74ZTitGd2NZoHBILwU0K8AdL1P5INh5a9ry7h1Bj9#fidkdWxOYHwnPyd1blppbHNgWlIzUk5qNVddT2AyYGM8PURQN01fTUFSYjU1bX9nPX1KZ1InKSd1aWxrbkB9dWp2YGFMYSc%2FJ2BTZDxAMjdgYmBpQ2NWYmNcXycpJ3dgY2B3d2B3SndsYmxrJz8nbXFxdXY%2FKipycnIraWRhYWB3aXwrbGoqJ3gl"
Expand All @@ -34,7 +33,7 @@ const sBlogCallToAction = `<p class="call-to-action"
const BlogPost = ({ title, content }: { title: string; content: string }) => {
return (
<LadderlyPageWrapper title={title}>
<main className="m-auto w-1/2">
<main className="m-auto w-full md:w-1/2">
<h1 className="p-4 text-3xl font-bold text-ladderly-violet-600">
{title}
</h1>
Expand Down
11 changes: 8 additions & 3 deletions src/pages/blog/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ const BlogIndex = ({
}) => {
return (
<LadderlyPageWrapper title="Blog">
<main>
<main className="m-auto w-full md:w-1/2">
{posts.map((post) => (
<div key={post.slug} className="border-ladderly-light-purple border-b p-4">
<div
key={post.slug}
className="border-ladderly-light-purple border-b p-4"
>
<Link
className="text-2xl text-ladderly-violet-600 hover:underline"
href={`/blog/${post.slug}`}
Expand All @@ -37,7 +40,9 @@ export const getStaticProps = async () => {
.filter((filename) => path.extname(filename) === ".md")
.map((filename) => {
const slug = filename.replace(".md", "")
const markdownWithMetadata = fs.readFileSync(path.join("src/pages/blog", filename)).toString()
const markdownWithMetadata = fs
.readFileSync(path.join("src/pages/blog", filename))
.toString()
const { data } = matter(markdownWithMetadata)
return {
slug,
Expand Down