Use balancer, add centering & border for post titles on ultra low width viewports

This commit is contained in:
2024-05-27 02:35:39 -05:00
parent bbbaf8e348
commit e5ac7ddb2b
2 changed files with 26 additions and 24 deletions

View File

@@ -3,6 +3,7 @@ import General from "@layouts/General.astro";
import Time from "@components/Time.tsx";
import { type CollectionEntry } from "astro:content";
import type { Props as SEOProps } from "astro-seo";
import Balancer from "react-wrap-balancer";
interface Props {
post: CollectionEntry<"blog">;
@@ -80,9 +81,9 @@ const ogp: SEOProps = {
<General title={title} ogp={ogp}>
<div>
<h1 class="max-md:text-lg">
<h1 class="max-md:text-lg max-sm:text-center max-sm:border-b border-zinc-700">
<a href={post.slug}>
{title}
<Balancer>{title}</Balancer>
</a>
</h1>
<p class="mt-0 text-sm ml-5">