refactor: v2
This commit is contained in:
@@ -1,42 +1,48 @@
|
||||
---
|
||||
import "@/styles/global.css";
|
||||
|
||||
import BaseHeader from "@/components/BaseHeader.astro";
|
||||
import BaseFooter from "@/components/BaseFooter.astro";
|
||||
import BackTop from "@/components/BackTop.astro";
|
||||
|
||||
import { metadata } from "@/consts.ts";
|
||||
const { siteTitle } = metadata;
|
||||
import {siteConfig} from "@/consts.ts";
|
||||
const {siteTitle} = siteConfig;
|
||||
|
||||
interface Props {
|
||||
title?: string;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
const { title, description } = Astro.props;
|
||||
const {title, description} = Astro.props;
|
||||
const pageTitle = title ? `${title} - ${siteTitle}` : siteTitle;
|
||||
---
|
||||
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
|
||||
/>
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.ico" />
|
||||
<meta name="generator" content={Astro.generator} />
|
||||
<meta name="description" content={description} />
|
||||
<meta name="theme-color" content="#ffffff" />
|
||||
<title>{pageTitle}</title>
|
||||
</head>
|
||||
<body>
|
||||
<BaseHeader />
|
||||
<main class="main">
|
||||
<slot />
|
||||
</main>
|
||||
<BaseFooter />
|
||||
<BackTop />
|
||||
</body>
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
|
||||
/>
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.ico"/>
|
||||
<meta name="generator" content={Astro.generator}/>
|
||||
<meta name="description" content={description}/>
|
||||
<meta name="theme-color" content="#ffffff"/>
|
||||
<title>{pageTitle}</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<style>
|
||||
body {
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: var(--layout-width);
|
||||
margin: 0 auto;
|
||||
padding: 24px;
|
||||
height: 100%;
|
||||
min-height: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user