feat: 修改部署方式
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
background-color: #1a1a1a;
|
||||
height: 70px;
|
||||
overflow: hidden;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.content {
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
top: 0;
|
||||
z-index: 99999;
|
||||
box-shadow: rgba(17, 17, 26, 0.1) 0px 1px 0px;
|
||||
flex-shrink: 0;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.main-nav {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
export default function HelloWorld() {
|
||||
return <div>Hello World!</div>;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,33 @@
|
||||
---
|
||||
import Layout from '@/layouts/Layout.astro';
|
||||
import Layout from "@/layouts/Layout.astro";
|
||||
|
||||
import Demo from '@/components/Demo.tsx';
|
||||
const posts = [
|
||||
{
|
||||
title: "First Post",
|
||||
date: "2024-01-01",
|
||||
summary: "This is the summary of the first post.",
|
||||
},
|
||||
];
|
||||
---
|
||||
|
||||
<Layout>
|
||||
<Demo client:only/>
|
||||
<div>
|
||||
{
|
||||
posts.map((post) => (
|
||||
<a href={`/posts/${post.title.replace(/\s+/g, "-").toLowerCase()}`}>
|
||||
<h2>{post.title}</h2>
|
||||
<p>{post.date}</p>
|
||||
<p class="summary">{post.summary}</p>
|
||||
</a>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
</Layout>
|
||||
|
||||
<style>
|
||||
.summary {
|
||||
line-height: 2;
|
||||
font-size: 16px;
|
||||
color: rgb(66, 63, 63);
|
||||
}
|
||||
</style>
|
||||
|
||||
9
src/pages/posts/[...slug].astro
Normal file
9
src/pages/posts/[...slug].astro
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
import Layout from "@/layouts/Layout.astro";
|
||||
|
||||
|
||||
---
|
||||
|
||||
<Layout>
|
||||
|
||||
</Layout>
|
||||
Reference in New Issue
Block a user