Skip to content

Commit

Permalink
apply tile styling to markdown, maybe fix #26
Browse files Browse the repository at this point in the history
  • Loading branch information
Tschonti committed Feb 5, 2024
1 parent 76f87c2 commit e9d7cfb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
9 changes: 6 additions & 3 deletions src/app/giveaway/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import ReactMarkdown from 'react-markdown';
import remarkGfm from 'remark-gfm';

import { GiveawayTile } from '@/components/tiles/giveaway-tile';
import { Tile } from '@/components/tiles/tile';
import { getIndexData } from '@/models/get-index-data';

export default async function Giveaway() {
Expand All @@ -15,9 +16,11 @@ export default async function Giveaway() {
<h1 className='col-span-6'>Nyereményjáték</h1>
<GiveawayTile data={data.giveaway} showLink={false} />

<div className='tile col-span-6 markdown'>
<ReactMarkdown children={data.giveaway.rules} remarkPlugins={[remarkGfm]} />
</div>
<Tile className='col-span-6'>
<Tile.Body className='markdown'>
<ReactMarkdown children={data.giveaway.rules} remarkPlugins={[remarkGfm]} />
</Tile.Body>
</Tile>
</div>
);
}
8 changes: 8 additions & 0 deletions src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ h2 {
@apply underline;
}

.markdown h2 {
@apply my-2;
}

.markdown h1 {
@apply mb-4;
}

.planet {
@apply absolute hidden xl:block select-none pointer-events-none;
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default function RootLayout({ children }: { children: React.ReactNode })
return (
<html lang='hu'>
<body className={`${raleway.variable} ${recharge.variable}`}>
<main className='flex flex-col min-h-screen'>
<main className='flex flex-col min-h-screen overflow-hidden'>
<Navbar />
<div className='flex-grow relative flex flex-col justify-center items-center'>{children}</div>
<Footer />
Expand Down

0 comments on commit e9d7cfb

Please sign in to comment.