Skip to content

Commit

Permalink
Merge branch 'main' into prod
Browse files Browse the repository at this point in the history
  • Loading branch information
Jazee6 committed Dec 28, 2024
2 parents 8bf424e + 837a906 commit c4107c4
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/components/BaseHead.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
import '../styles/global.css';
import '../global.css';
import {siteConfig} from "../config";
interface Props {
Expand Down
3 changes: 1 addition & 2 deletions src/styles/global.css → src/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,13 @@
@apply cursor-pointer hover:bg-hover transition-all rounded-lg py-1 line-clamp-1 active:bg-active
}

.article-container {
.base-card {
@apply bg-base transition-all rounded-xl p-4
}

.article {
@apply prose prose-neutral dark:prose-invert max-w-none
prose-img:rounded-xl prose-img:max-h-screen prose-pre:break-words prose-pre:whitespace-pre-wrap
prose-h1:pt-24 prose-h1:-mt-24
prose-h2:pt-24 prose-h2:-mt-[4.5rem]
}

Expand Down
2 changes: 1 addition & 1 deletion src/layouts/MainLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const {title, description, image} = Astro.props
<div class="container-global flex items-start">
<aside class="basis-[16rem] shrink-0 max-md:hidden sticky top-20 mr-4">
<slot name="aside">
<div class="bg-base transition-all rounded-xl p-4 flex flex-col">
<div class="base-card flex flex-col">
<img src={siteConfig.avatar} alt="avatar"
class="w-56 h-56 rounded-full dark:brightness-75 transition-all"/>
<div class="text-center font-bold text-xl mt-4">
Expand Down
2 changes: 1 addition & 1 deletion src/pages/about.astro
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const {data} = about;
const {Content} = await render(about);
---
<PageLayout title={getTitle('About')} description={getDesc('The About Page')}>
<article class="article-container article" data-pagefind-body>
<article class="base-card article" data-pagefind-body>
<h1>{data.title}</h1>
<Content/>
</article>
Expand Down
12 changes: 5 additions & 7 deletions src/pages/posts/[...slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ const haveToc = headings.some(heading => heading.depth === 2 || heading.depth ==
</aside>
}

<div class="grow article-container" data-pagefind-body>
<h1 class="text-4xl font-bold" id={data.title}>{data.title}</h1>
<article class="article base-card grow" data-pagefind-body>
<h1 id={data.title}>{data.title}</h1>

<div class="flex space-x-4 mt-4">
<div class="flex space-x-4 not-prose">
<Badge icon="material-symbols:edit-calendar-rounded">
{new Date(remarkPluginFrontmatter.lastModified).toLocaleDateString(siteConfig.language)}
</Badge>
Expand All @@ -63,10 +63,8 @@ const haveToc = headings.some(heading => heading.depth === 2 || heading.depth ==
</Badge>}
</div>

<article class="article">
<Content/>
</article>
</div>
<Content/>
</article>
</div>
</PageLayout>

Expand Down

0 comments on commit c4107c4

Please sign in to comment.