style: 优化移动端ui
This commit is contained in:
@@ -4,6 +4,7 @@ import "@/styles/github-markdown-reset.css";
|
||||
import "photoswipe/dist/photoswipe.css";
|
||||
|
||||
import Layout from '@/layouts/Layout.astro';
|
||||
import PageHeader from '@/components/PageHeader.astro';
|
||||
import {createHttp} from "@/lib/request.ts";
|
||||
import type {Post} from "@/types";
|
||||
import {processHtmlWithJsdom} from "@/lib/processHtml.ts";
|
||||
@@ -31,10 +32,7 @@ const published_at = formatDatetime(data.published_at, "YYYY.MM.DD");
|
||||
|
||||
<Layout title={data.title} description="">
|
||||
<div class="page-container">
|
||||
<nav class="nav">
|
||||
<a class="nav-title" href="/">{siteTitle}</a>
|
||||
<a href="/">← 返回首页</a>
|
||||
</nav>
|
||||
<PageHeader />
|
||||
|
||||
<article>
|
||||
<div class="meta">
|
||||
@@ -69,39 +67,18 @@ const published_at = formatDatetime(data.published_at, "YYYY.MM.DD");
|
||||
|
||||
<style>
|
||||
.page-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
min-height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.nav {
|
||||
flex-shrink: 0;
|
||||
margin: 0 auto;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: 13px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.nav a {
|
||||
color: #999;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.nav-title {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.nav a:hover {
|
||||
color: #24292e;
|
||||
}
|
||||
|
||||
article {
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
padding: 48px 0 0;
|
||||
padding: 24px 0 24px 0;
|
||||
flex: 1;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
@@ -125,7 +102,7 @@ const published_at = formatDatetime(data.published_at, "YYYY.MM.DD");
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 32px;
|
||||
font-size: 28px;
|
||||
line-height: 1.4;
|
||||
font-weight: 400;
|
||||
margin: 20px 0 20px;
|
||||
@@ -149,7 +126,7 @@ const published_at = formatDatetime(data.published_at, "YYYY.MM.DD");
|
||||
}
|
||||
|
||||
.tags {
|
||||
margin-top: 44px;
|
||||
margin-top: 24px;
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
flex-wrap: wrap;
|
||||
@@ -166,7 +143,7 @@ const published_at = formatDatetime(data.published_at, "YYYY.MM.DD");
|
||||
footer{
|
||||
flex-shrink: 0;
|
||||
width: 100%;
|
||||
margin-top: 44px;
|
||||
margin-top: 24px;
|
||||
border-top: var(--border-secondary);
|
||||
height: 66px;
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user