mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 11:29:33 +08:00
feat: upgrade to astro v3
Upgrade to astro v3. Update dependencies. Fix codes and features due to migration. BREAKING CHANGE: Astro v3 resolve #111
This commit is contained in:
@@ -16,7 +16,7 @@ breadcrumbList[0] === "posts" &&
|
||||
<ul>
|
||||
<li>
|
||||
<a href="/">Home</a>
|
||||
<span aria-hidden="true">></span>
|
||||
<span aria-hidden="true"> > </span>
|
||||
</li>
|
||||
{
|
||||
breadcrumbList.map((breadcrumb, index) =>
|
||||
@@ -33,7 +33,7 @@ breadcrumbList[0] === "posts" &&
|
||||
) : (
|
||||
<li>
|
||||
<a href={`/${breadcrumb}`}>{breadcrumb}</a>
|
||||
<span aria-hidden="true">></span>
|
||||
<span aria-hidden="true"> > </span>
|
||||
</li>
|
||||
)
|
||||
)
|
||||
|
||||
+2
-15
@@ -10,21 +10,8 @@ export interface Props {
|
||||
export default function Card({ href, frontmatter, secHeading = true }: Props) {
|
||||
const { title, pubDatetime, description } = frontmatter;
|
||||
return (
|
||||
<li className="my-6">
|
||||
<a
|
||||
href={href}
|
||||
className="inline-block text-lg font-medium text-skin-accent decoration-dashed underline-offset-4 focus-visible:no-underline focus-visible:underline-offset-0"
|
||||
>
|
||||
{secHeading ? (
|
||||
<h2 className="text-lg font-medium decoration-dashed hover:underline">
|
||||
{title}
|
||||
</h2>
|
||||
) : (
|
||||
<h3 className="text-lg font-medium decoration-dashed hover:underline">
|
||||
{title}
|
||||
</h3>
|
||||
)}
|
||||
</a>
|
||||
<li className="list-card">
|
||||
<a href={href}>{secHeading ? <h2>{title}</h2> : <h3>{title}</h3>}</a>
|
||||
<Datetime datetime={pubDatetime} />
|
||||
<p>{description}</p>
|
||||
</li>
|
||||
|
||||
@@ -3,9 +3,6 @@ import { LOGO_IMAGE, SITE } from "@config";
|
||||
import Hr from "./Hr.astro";
|
||||
import LinkButton from "./LinkButton.astro";
|
||||
|
||||
import logoPNG from "/assets/logo.png";
|
||||
import logoSVG from "/assets/logo.svg";
|
||||
|
||||
export interface Props {
|
||||
activeNav?: "posts" | "tags" | "about" | "search";
|
||||
}
|
||||
@@ -21,8 +18,8 @@ const { activeNav } = Astro.props;
|
||||
{
|
||||
LOGO_IMAGE.enable ? (
|
||||
<img
|
||||
src={LOGO_IMAGE.svg ? logoSVG : logoPNG}
|
||||
alt="AstroPaper Logo"
|
||||
src={`/assets/${LOGO_IMAGE.svg ? "logo.svg" : "logo.png"}`}
|
||||
alt={SITE.title}
|
||||
width={LOGO_IMAGE.width}
|
||||
height={LOGO_IMAGE.height}
|
||||
/>
|
||||
@@ -78,7 +75,7 @@ const { activeNav } = Astro.props;
|
||||
href="/search"
|
||||
className={`focus-outline p-3 sm:p-1 ${
|
||||
activeNav === "search" ? "active" : ""
|
||||
}`}
|
||||
} flex`}
|
||||
ariaLabel="search"
|
||||
title="Search"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user