mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 07:33:07 +08:00
refactor: improve semantic by replacing decorative hr with borders (#597)
Replace decorative usage of Hr component with borders to improve semantic. - remove Hr component - replace decorative hr elements with borders - introduce app-layout utility class - update layout and spacing - update docs about border css custom property
This commit is contained in:
@@ -18,7 +18,7 @@ const { frontmatter } = Astro.props;
|
||||
<Layout title={`${frontmatter.title} | ${SITE.title}`}>
|
||||
<Header />
|
||||
<Breadcrumb />
|
||||
<main id="main-content">
|
||||
<main id="main-content" class="app-layout">
|
||||
<section id="about" class="app-prose mb-28 max-w-app prose-img:border-0">
|
||||
<h1 class="text-2xl tracking-wider sm:text-3xl">{frontmatter.title}</h1>
|
||||
<slot />
|
||||
|
||||
@@ -21,11 +21,7 @@ const backUrl = SITE.showBackButton ? Astro.url.pathname : "/";
|
||||
---
|
||||
|
||||
<Breadcrumb />
|
||||
<main
|
||||
data-backUrl={backUrl}
|
||||
id="main-content"
|
||||
class="mx-auto w-full max-w-app px-4 pb-4"
|
||||
>
|
||||
<main data-backUrl={backUrl} id="main-content" class="app-layout pb-4">
|
||||
{
|
||||
"titleTransition" in props ? (
|
||||
<h1 class="text-2xl font-semibold sm:text-3xl">
|
||||
|
||||
@@ -87,10 +87,7 @@ const nextPost =
|
||||
<BackButton />
|
||||
<main
|
||||
id="main-content"
|
||||
class:list={[
|
||||
"mx-auto w-full max-w-app px-4 pb-12",
|
||||
{ "mt-8": !SITE.showBackButton },
|
||||
]}
|
||||
class:list={["app-layout pb-12", { "mt-8": !SITE.showBackButton }]}
|
||||
data-pagefind-body
|
||||
>
|
||||
<h1
|
||||
@@ -112,7 +109,7 @@ const nextPost =
|
||||
</div>
|
||||
<article
|
||||
id="article"
|
||||
class="app-prose mx-auto mt-8 max-w-app prose-pre:bg-(--shiki-light-bg) dark:prose-pre:bg-(--shiki-dark-bg)"
|
||||
class="app-prose mt-8 w-full max-w-app prose-pre:bg-(--shiki-light-bg) dark:prose-pre:bg-(--shiki-dark-bg)"
|
||||
>
|
||||
<Content />
|
||||
</article>
|
||||
|
||||
Reference in New Issue
Block a user