🐛 Bug fixes

This commit is contained in:
LittleSheep 2024-01-22 11:43:07 +08:00
parent 235c556f3d
commit fd289d980e
9 changed files with 16 additions and 18 deletions

BIN
dist.zip Normal file

Binary file not shown.

View File

@ -1,8 +1,10 @@
---
import RootLayout from "./RootLayout.astro";
const { title } = Astro.props;
---
<RootLayout>
<RootLayout title={title}>
<main class="container mx-auto h-fullpage mt-header">
<slot />
</main>

View File

@ -13,7 +13,8 @@ const { title } = Astro.props;
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width" />
<meta name="generator" content={Astro.generator} />
<title>{title}</title>
{title && (<title>山羊寒舍 | {title}</title>)}
{!title && (<title>山羊寒舍</title>)}
<ViewTransitions />
</head>

View File

@ -45,7 +45,7 @@ const { posts } = (
).data;
---
<PageLayout>
<PageLayout title="分类检索">
<div class="max-w-[720px] mx-auto">
<div class="pt-16 pb-6 px-6">
<h1 class="text-4xl font-bold">分类检索</h1>

View File

@ -30,7 +30,7 @@ const { events } = (
).data;
---
<PageLayout>
<PageLayout title="活动">
<div class="max-w-[720px] mx-auto">
<div class="card w-full shadow-xl">
<div class="card-body">

View File

@ -13,8 +13,8 @@ const { slug } = Astro.params;
const { post } = (
await graphQuery(
`query Query($where: PostWhereInput!, $orderBy: [PostOrderByInput!]!) {
posts(where: $where, orderBy: $orderBy) {
`query Query($where: PostWhereUniqueInput!) {
post(where: $where) {
slug
type
title
@ -44,22 +44,17 @@ const { post } = (
}
}`,
{
orderBy: [
{
createdAt: "desc",
},
],
where: { slug },
}
)
).data;
---
<PageLayout>
<PageLayout title={post.title}>
<div class="wrapper">
<div class="card w-full shadow-xl">
{
post.cover != null && (
post.cover && (
<figure>
<img src={post.cover.image.url} alt={post.title} />
</figure>

View File

@ -36,7 +36,7 @@ const { posts } = (
).data;
---
<PageLayout>
<PageLayout title="记录">
<div class="max-w-[720px] mx-auto">
<div class="pt-16 pb-6 px-6">
<h1 class="text-4xl font-bold">记录</h1>

View File

@ -2,7 +2,7 @@
import PageLayout from "../../layouts/PageLayout.astro";
---
<PageLayout>
<PageLayout title="企划">
<div role="alert" class="alert alert-info">
<svg
xmlns="http://www.w3.org/2000/svg"

View File

@ -45,7 +45,7 @@ const { posts } = (
).data;
---
<PageLayout>
<PageLayout title="标签检索">
<div class="max-w-[720px] mx-auto">
<div class="pt-16 pb-6 px-6">
<h1 class="text-4xl font-bold">标签检索</h1>