feat: 样式调整
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
|
||||
:global(.dark) footer {
|
||||
background: var(--background);
|
||||
box-shadow: rgba(255, 255, 255, .3) 0px -1px 3px 0px;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
:global(.dark) .content {
|
||||
|
||||
@@ -84,7 +84,7 @@ import ThemeIcon from './ThemeIcon.astro'
|
||||
|
||||
:global(.dark) header {
|
||||
background: var(--background);
|
||||
box-shadow: rgba(255, 255, 255, .3) 0px 1px 2px 0px;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
:global(.dark) .main-nav h1 {
|
||||
|
||||
@@ -151,7 +151,7 @@ posts.map((post) => {
|
||||
}
|
||||
|
||||
:global(.dark) .post {
|
||||
background: #1f2937;
|
||||
background: #171717;
|
||||
}
|
||||
|
||||
:global(.dark) .published-at {
|
||||
@@ -159,6 +159,7 @@ posts.map((post) => {
|
||||
}
|
||||
|
||||
:global(.dark) .category-name {
|
||||
background: #374151;
|
||||
background: #e5e5e5;
|
||||
color: #0a0a0a;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -26,6 +26,7 @@ const published_at = formatDatetime(data.published_at, 'YYYY 年 M 月 D 日')
|
||||
---
|
||||
|
||||
<Layout title={data.title} description={data.summary}>
|
||||
<div class="post">
|
||||
<h1 class="post-title">{data.title}</h1>
|
||||
|
||||
<div class="post-meta">
|
||||
@@ -59,16 +60,26 @@ const published_at = formatDatetime(data.published_at, 'YYYY 年 M 月 D 日')
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="post markdown-body"
|
||||
class="markdown-body"
|
||||
data-color-mode="dark"
|
||||
set:html={content}
|
||||
></div>
|
||||
</div>
|
||||
</Layout>
|
||||
|
||||
<style>
|
||||
.post {
|
||||
background: #fff;
|
||||
border-radius: 12px;
|
||||
overflow: auto;
|
||||
padding: 24px;
|
||||
box-shadow: rgba(149, 157, 165, 0.2) 0 2px 14px -4px;
|
||||
border: 1px solid #e7e8ec;
|
||||
}
|
||||
|
||||
.post-title {
|
||||
margin-bottom: 16px;
|
||||
font-size: 24px;
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
.post-meta {
|
||||
@@ -91,17 +102,10 @@ const published_at = formatDatetime(data.published_at, 'YYYY 年 M 月 D 日')
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
.post {
|
||||
background: #fff;
|
||||
border-radius: 16px;
|
||||
overflow: auto;
|
||||
padding: 24px;
|
||||
box-shadow: rgba(149, 157, 165, 0.2) 0 2px 14px -4px;
|
||||
}
|
||||
|
||||
:global(.post.markdown-body img) {
|
||||
:global(.markdown-body img) {
|
||||
object-fit: contain;
|
||||
height: auto !important;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.post-view {
|
||||
@@ -131,8 +135,9 @@ const published_at = formatDatetime(data.published_at, 'YYYY 年 M 月 D 日')
|
||||
}
|
||||
|
||||
:global(.dark) .post {
|
||||
background: #090b0c;
|
||||
box-shadow: rgba(255, 255, 255, 0.5) 0 0px 10px -4px;
|
||||
background: #171717;
|
||||
box-shadow: none;
|
||||
border: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
margin: 0;
|
||||
font-weight: var(--base-text-weight-normal, 400);
|
||||
color: var(--fgColor-default);
|
||||
background-color: var(--bgColor-default);
|
||||
/*background-color: var(--bgColor-default);*/
|
||||
font-family: var(--fontStack-sansSerif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji");
|
||||
font-size: 16px;
|
||||
line-height: 1.5;
|
||||
|
||||
@@ -13,12 +13,12 @@
|
||||
html,
|
||||
body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
min-height: 100vh;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
html {
|
||||
background: #fafafa;
|
||||
background: #f8fafc;
|
||||
}
|
||||
|
||||
html.dark {
|
||||
@@ -26,7 +26,6 @@ html.dark {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
||||
body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
Reference in New Issue
Block a user