🐛 Bug fixes
This commit is contained in:
parent
235c556f3d
commit
fd289d980e
@ -1,9 +1,11 @@
|
||||
---
|
||||
import RootLayout from "./RootLayout.astro";
|
||||
|
||||
const { title } = Astro.props;
|
||||
---
|
||||
|
||||
<RootLayout>
|
||||
<RootLayout title={title}>
|
||||
<main class="container mx-auto h-fullpage mt-header">
|
||||
<slot />
|
||||
</main>
|
||||
</RootLayout>
|
||||
</RootLayout>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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">
|
||||
@ -82,4 +82,4 @@ const { events } = (
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</PageLayout>
|
||||
</PageLayout>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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"
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user