🐛 Bug fixes
This commit is contained in:
parent
235c556f3d
commit
fd289d980e
@ -1,9 +1,11 @@
|
|||||||
---
|
---
|
||||||
import RootLayout from "./RootLayout.astro";
|
import RootLayout from "./RootLayout.astro";
|
||||||
|
|
||||||
|
const { title } = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
<RootLayout>
|
<RootLayout title={title}>
|
||||||
<main class="container mx-auto h-fullpage mt-header">
|
<main class="container mx-auto h-fullpage mt-header">
|
||||||
<slot />
|
<slot />
|
||||||
</main>
|
</main>
|
||||||
</RootLayout>
|
</RootLayout>
|
||||||
|
@ -13,7 +13,8 @@ const { title } = Astro.props;
|
|||||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||||
<meta name="viewport" content="width=device-width" />
|
<meta name="viewport" content="width=device-width" />
|
||||||
<meta name="generator" content={Astro.generator} />
|
<meta name="generator" content={Astro.generator} />
|
||||||
<title>{title}</title>
|
{title && (<title>山羊寒舍 | {title}</title>)}
|
||||||
|
{!title && (<title>山羊寒舍</title>)}
|
||||||
|
|
||||||
<ViewTransitions />
|
<ViewTransitions />
|
||||||
</head>
|
</head>
|
||||||
|
@ -45,7 +45,7 @@ const { posts } = (
|
|||||||
).data;
|
).data;
|
||||||
---
|
---
|
||||||
|
|
||||||
<PageLayout>
|
<PageLayout title="分类检索">
|
||||||
<div class="max-w-[720px] mx-auto">
|
<div class="max-w-[720px] mx-auto">
|
||||||
<div class="pt-16 pb-6 px-6">
|
<div class="pt-16 pb-6 px-6">
|
||||||
<h1 class="text-4xl font-bold">分类检索</h1>
|
<h1 class="text-4xl font-bold">分类检索</h1>
|
||||||
|
@ -30,7 +30,7 @@ const { events } = (
|
|||||||
).data;
|
).data;
|
||||||
---
|
---
|
||||||
|
|
||||||
<PageLayout>
|
<PageLayout title="活动">
|
||||||
<div class="max-w-[720px] mx-auto">
|
<div class="max-w-[720px] mx-auto">
|
||||||
<div class="card w-full shadow-xl">
|
<div class="card w-full shadow-xl">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
@ -82,4 +82,4 @@ const { events } = (
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</PageLayout>
|
</PageLayout>
|
||||||
|
@ -13,8 +13,8 @@ const { slug } = Astro.params;
|
|||||||
|
|
||||||
const { post } = (
|
const { post } = (
|
||||||
await graphQuery(
|
await graphQuery(
|
||||||
`query Query($where: PostWhereInput!, $orderBy: [PostOrderByInput!]!) {
|
`query Query($where: PostWhereUniqueInput!) {
|
||||||
posts(where: $where, orderBy: $orderBy) {
|
post(where: $where) {
|
||||||
slug
|
slug
|
||||||
type
|
type
|
||||||
title
|
title
|
||||||
@ -44,22 +44,17 @@ const { post } = (
|
|||||||
}
|
}
|
||||||
}`,
|
}`,
|
||||||
{
|
{
|
||||||
orderBy: [
|
|
||||||
{
|
|
||||||
createdAt: "desc",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
where: { slug },
|
where: { slug },
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
).data;
|
).data;
|
||||||
---
|
---
|
||||||
|
|
||||||
<PageLayout>
|
<PageLayout title={post.title}>
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<div class="card w-full shadow-xl">
|
<div class="card w-full shadow-xl">
|
||||||
{
|
{
|
||||||
post.cover != null && (
|
post.cover && (
|
||||||
<figure>
|
<figure>
|
||||||
<img src={post.cover.image.url} alt={post.title} />
|
<img src={post.cover.image.url} alt={post.title} />
|
||||||
</figure>
|
</figure>
|
||||||
|
@ -36,7 +36,7 @@ const { posts } = (
|
|||||||
).data;
|
).data;
|
||||||
---
|
---
|
||||||
|
|
||||||
<PageLayout>
|
<PageLayout title="记录">
|
||||||
<div class="max-w-[720px] mx-auto">
|
<div class="max-w-[720px] mx-auto">
|
||||||
<div class="pt-16 pb-6 px-6">
|
<div class="pt-16 pb-6 px-6">
|
||||||
<h1 class="text-4xl font-bold">记录</h1>
|
<h1 class="text-4xl font-bold">记录</h1>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import PageLayout from "../../layouts/PageLayout.astro";
|
import PageLayout from "../../layouts/PageLayout.astro";
|
||||||
---
|
---
|
||||||
|
|
||||||
<PageLayout>
|
<PageLayout title="企划">
|
||||||
<div role="alert" class="alert alert-info">
|
<div role="alert" class="alert alert-info">
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
@ -45,7 +45,7 @@ const { posts } = (
|
|||||||
).data;
|
).data;
|
||||||
---
|
---
|
||||||
|
|
||||||
<PageLayout>
|
<PageLayout title="标签检索">
|
||||||
<div class="max-w-[720px] mx-auto">
|
<div class="max-w-[720px] mx-auto">
|
||||||
<div class="pt-16 pb-6 px-6">
|
<div class="pt-16 pb-6 px-6">
|
||||||
<h1 class="text-4xl font-bold">标签检索</h1>
|
<h1 class="text-4xl font-bold">标签检索</h1>
|
||||||
|
Loading…
Reference in New Issue
Block a user