first initial commit
This commit is contained in:
299
assets/css/global.css
Normal file
299
assets/css/global.css
Normal file
@@ -0,0 +1,299 @@
|
||||
:root {
|
||||
/* 定义一个衬线字体栈 */
|
||||
--font-serif-zh: "SimSun","Noto Serif SC", "Georgia", "STSong", "Songti SC", serif;
|
||||
}
|
||||
|
||||
body {
|
||||
/* 全站应用 */
|
||||
font-family: var(--font-serif-zh);
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
color: #262626; /* 衬线体配合深灰色阅读感更好 */
|
||||
}
|
||||
|
||||
/* ========== 强制隐藏模板容器 ========== */
|
||||
#mobile-drawer-template {
|
||||
display: none !important;
|
||||
visibility: hidden !important;
|
||||
position: absolute !important;
|
||||
pointer-events: none !important;
|
||||
}
|
||||
|
||||
/* ========== 桌面端导航样式 ========== */
|
||||
@media (min-width: 768px) {
|
||||
/* 强制隐藏移动端元素 */
|
||||
#mobile-menu-trigger,
|
||||
#mobile-sidebar-overlay,
|
||||
#mobile-sidebar-overlay-active {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* 桌面端导航居中 */
|
||||
nav .hidden.md\\:flex.items-center.justify-center nav,
|
||||
nav .hidden.md\\:flex.items-center.justify-center .nav {
|
||||
display: flex !important;
|
||||
justify-content: center !important;
|
||||
align-items: center !important;
|
||||
gap: 2rem !important;
|
||||
}
|
||||
|
||||
nav .hidden.md\\:flex.items-center.justify-center ul {
|
||||
display: flex !important;
|
||||
flex-direction: row !important;
|
||||
gap: 2rem !important;
|
||||
list-style: none !important;
|
||||
padding: 0 !important;
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
nav .hidden.md\\:flex.items-center.justify-center li {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
nav .hidden.md\\:flex.items-center.justify-center a {
|
||||
text-decoration: none !important;
|
||||
color: #374151 !important;
|
||||
font-weight: 500 !important;
|
||||
font-size: 0.875rem !important;
|
||||
transition: color 0.2s !important;
|
||||
}
|
||||
|
||||
nav .hidden.md\\:flex.items-center.justify-center a:hover {
|
||||
color: #2563eb !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* ========== 移动端抽屉基础样式 ========== */
|
||||
#mobile-sidebar-overlay-active {
|
||||
display: none; /* 默认隐藏,通过 JS 控制显示 */
|
||||
}
|
||||
|
||||
/* ========== 抽屉导航网格布局 ========== */
|
||||
.mobile-nav-grid {
|
||||
display: grid !important;
|
||||
grid-template-columns: repeat(2, 1fr) !important;
|
||||
gap: 0.75rem !important;
|
||||
}
|
||||
|
||||
.mobile-nav-grid nav,
|
||||
.mobile-nav-grid .nav {
|
||||
display: contents !important;
|
||||
}
|
||||
|
||||
.mobile-nav-grid ul {
|
||||
display: contents !important;
|
||||
list-style: none !important;
|
||||
padding: 0 !important;
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.mobile-nav-grid li {
|
||||
display: block !important;
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.mobile-nav-grid a {
|
||||
display: flex !important;
|
||||
align-items: center !important;
|
||||
justify-content: center !important;
|
||||
padding: 0.75rem !important;
|
||||
border-radius: 0.5rem !important;
|
||||
background-color: #f9fafb !important;
|
||||
color: #4b5563 !important;
|
||||
font-weight: 500 !important;
|
||||
text-decoration: none !important;
|
||||
border: 1px solid #e5e7eb !important;
|
||||
transition: all 0.2s !important;
|
||||
font-size: 0.875rem !important;
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
.mobile-nav-grid a:hover,
|
||||
.mobile-nav-grid a:active {
|
||||
background-color: #eff6ff !important;
|
||||
color: #2563eb !important;
|
||||
border-color: #3b82f6 !important;
|
||||
transform: scale(0.95);
|
||||
}
|
||||
|
||||
/* ========== 动画和过渡 ========== */
|
||||
.drawer-backdrop {
|
||||
transition: opacity 300ms ease-out;
|
||||
}
|
||||
|
||||
.drawer-panel {
|
||||
transition: transform 300ms ease-out;
|
||||
}
|
||||
|
||||
/* ========== 通用优化 ========== */
|
||||
#mobile-menu-trigger {
|
||||
cursor: pointer;
|
||||
background: none;
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* 平滑滚动 */
|
||||
.drawer-panel {
|
||||
overscroll-behavior: contain;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
/* 防止内容抖动 */
|
||||
body.drawer-open {
|
||||
overflow: hidden !important;
|
||||
position: fixed !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
/* 确保抽屉在最顶层 */
|
||||
#mobile-sidebar-overlay-active {
|
||||
z-index: 9999 !important;
|
||||
}
|
||||
|
||||
#welcome-ip-location-info b {
|
||||
color: #2563eb; /* 对应 Tailwind 的 blue-600 */
|
||||
font-weight: 700;
|
||||
}
|
||||
/* 默认模糊状态 */
|
||||
#welcome-ip-location-info .ip-mask {
|
||||
filter: blur(5px);
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
display: inline-block;
|
||||
background-color: rgba(0, 0, 0, 0.05);
|
||||
padding: 0 4px;
|
||||
border-radius: 4px;
|
||||
user-select: none; /* 防止未解锁前被选中复制 */
|
||||
}
|
||||
|
||||
/* 鼠标悬停时轻微减少模糊(给予视觉反馈) */
|
||||
#welcome-ip-location-info .ip-mask:hover {
|
||||
filter: blur(3px);
|
||||
background-color: rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
/* 点击或被激活时完全显示 */
|
||||
#welcome-ip-location-info .ip-mask.unmask,
|
||||
#welcome-ip-location-info .ip-mask:active {
|
||||
filter: blur(0);
|
||||
background-color: transparent;
|
||||
user-select: auto;
|
||||
}
|
||||
|
||||
.site-footer {
|
||||
padding: 60px 20px;
|
||||
background: #f9f9f9; /* 浅灰背景,简洁干净 */
|
||||
color: #555;
|
||||
font-size: 0.9rem;
|
||||
border-top: 1px solid #eee;
|
||||
margin-top: 80px;
|
||||
}
|
||||
|
||||
.footer-content {
|
||||
max-width: 1000px;
|
||||
margin: 0 auto;
|
||||
display: grid;
|
||||
grid-template-columns: 2fr 1fr 1fr; /* 三栏布局 */
|
||||
gap: 40px;
|
||||
}
|
||||
|
||||
.footer-column h3, .footer-column h4 {
|
||||
color: #111;
|
||||
margin-bottom: 15px;
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
.footer-column p { line-height: 1.6; }
|
||||
|
||||
/* 微信公众号悬浮交互 */
|
||||
.wechat-trigger {
|
||||
color: #1a73e8;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
border-bottom: 1px dashed #1a73e8;
|
||||
}
|
||||
|
||||
/* 弹出层容器 */
|
||||
.wechat-qr {
|
||||
display: none;
|
||||
position: absolute;
|
||||
bottom: 35px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%); /* 配合 left: 50% 实现相对于文字水平居中 */
|
||||
background: white;
|
||||
padding: 12px;
|
||||
box-shadow: 0 4px 20px rgba(0,0,0,0.15);
|
||||
border-radius: 8px;
|
||||
z-index: 100;
|
||||
|
||||
width: 140px;
|
||||
text-align: center !important;
|
||||
box-sizing: border-box; /* 确保 padding 不撑破宽度 */
|
||||
}
|
||||
|
||||
/* 二维码图片 */
|
||||
.wechat-qr img {
|
||||
width: 100% !important;
|
||||
height: auto !important;
|
||||
display: block;
|
||||
margin: 0 auto 10px; /* 这里的 auto 确保图片在容器内水平居中 */
|
||||
}
|
||||
|
||||
/* 下方的文字 */
|
||||
.wechat-qr p {
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
display: block;
|
||||
width: 100%;
|
||||
text-align: center; /* 确保文字在 p 标签内居中 */
|
||||
line-height: 1.2;
|
||||
white-space: nowrap; /* 避免文字太长换行导致视觉偏移 */
|
||||
}
|
||||
.wechat-trigger:hover .wechat-qr { display: block; }
|
||||
|
||||
/* 次级导航样式 */
|
||||
.footer-nav ul { list-style: none; padding: 0; }
|
||||
.footer-nav ul li { margin-bottom: 8px; }
|
||||
.footer-nav a { color: #555; text-decoration: none; }
|
||||
.footer-nav a:hover { color: #1a73e8; }
|
||||
|
||||
/* 移动端适配 */
|
||||
@media (max-width: 768px) {
|
||||
.footer-content {
|
||||
grid-template-columns: 1fr;
|
||||
text-align: center;
|
||||
}
|
||||
.wechat-qr { left: 50%; }
|
||||
}
|
||||
|
||||
/* 确保整个头部在滚动时固定 */
|
||||
.site-header-container {
|
||||
position: sticky !important;
|
||||
top: 0 !important;
|
||||
z-index: 1000 !important;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* 公告栏样式优化 */
|
||||
.gh-announcement {
|
||||
background-color: var(--ghost-accent-color, #3eb0ef);
|
||||
color: #fff;
|
||||
padding: 10px 24px;
|
||||
text-align: center;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 500;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.gh-announcement a {
|
||||
color: #fff;
|
||||
text-decoration: underline;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
/* 修复移动端抽屉层级,确保在 header 之上 */
|
||||
#mobile-sidebar-overlay {
|
||||
z-index: 10001 !important;
|
||||
}
|
||||
4337
assets/css/index.css
Normal file
4337
assets/css/index.css
Normal file
File diff suppressed because it is too large
Load Diff
1
assets/css/input.css
Normal file
1
assets/css/input.css
Normal file
@@ -0,0 +1 @@
|
||||
@import "tailwindcss";
|
||||
153
assets/css/post.css
Normal file
153
assets/css/post.css
Normal file
@@ -0,0 +1,153 @@
|
||||
/* 1. 标题和元数据美化 */
|
||||
.gh-article-title {
|
||||
margin-bottom: 1.5rem;
|
||||
line-height: 1.1;
|
||||
font-weight: 800;
|
||||
letter-spacing: -0.02em;
|
||||
}
|
||||
|
||||
.gh-article-meta-modern {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
margin-top: 2rem;
|
||||
margin-bottom: 3rem;
|
||||
padding-bottom: 2rem;
|
||||
border-bottom: 1px solid rgba(0,0,0,0.05);
|
||||
}
|
||||
|
||||
.gh-author-avatar img {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
border-radius: 50%;
|
||||
border: 2px solid #fff;
|
||||
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
|
||||
transition: transform 0.2s ease;
|
||||
}
|
||||
|
||||
.gh-author-avatar:hover img {
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.gh-article-meta-text {
|
||||
line-height: 1.4;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
.gh-author-name {
|
||||
font-weight: 700;
|
||||
color: var(--ghost-accent-color);
|
||||
}
|
||||
|
||||
.gh-article-meta-sub {
|
||||
opacity: 0.6;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
/* 2. 封面图圆角与阴影 */
|
||||
.gh-feature-image-wrapper img {
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 20px 40px rgba(0,0,0,0.08);
|
||||
}
|
||||
|
||||
/* 3. 正文排版优化 */
|
||||
.gh-content {
|
||||
font-size: 1.15rem;
|
||||
line-height: 1.75;
|
||||
}
|
||||
|
||||
.gh-content p {
|
||||
margin-bottom: 0.8em;
|
||||
text-indent: 2em;
|
||||
}
|
||||
|
||||
.gh-content figure p,
|
||||
.gh-content blockquote p {
|
||||
text-indent: 0;
|
||||
}
|
||||
|
||||
/* 4. 底部标签样式 */
|
||||
.gh-post-tags a {
|
||||
display: inline-block;
|
||||
padding: 4px 12px;
|
||||
margin: 4px;
|
||||
background: #f0f0f0;
|
||||
border-radius: 20px;
|
||||
font-size: 0.8rem;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.gh-post-tags a:hover {
|
||||
background: var(--ghost-accent-color);
|
||||
color: #fff !important;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* 5. 阅读更多部分的卡片提升 */
|
||||
.gh-feed {
|
||||
gap: 2rem;
|
||||
}
|
||||
|
||||
.post-card {
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
.post-card:hover {
|
||||
transform: translateY(-5px);
|
||||
}
|
||||
|
||||
/* 3.5 分割线美化 */
|
||||
.gh-content hr {
|
||||
margin: 3rem 0; /* 上下留出一定间距,让页面有呼吸感 */
|
||||
border: 0; /* 去除默认的凹凸边框 */
|
||||
border-top: 1px solid rgba(0, 0, 0, 0.1); /* 使用带透明度的黑色,形成优雅的灰色 */
|
||||
/* 或者使用具体的十六进制色值: border-top: 1px solid #e0e0e0; */
|
||||
}
|
||||
|
||||
/* 标题样式美化 */
|
||||
.gh-content h1,
|
||||
.gh-content h2,
|
||||
.gh-content h3 {
|
||||
color: #1a1a1a;
|
||||
line-height: 1.3;
|
||||
margin: 2.5rem 0 1rem; /* 增加上方间距,减少下方间距 */
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.gh-content h1 { font-size: 2rem; }
|
||||
.gh-content h2 { font-size: 1.65rem; }
|
||||
.gh-content h3 { font-size: 1.35rem; }
|
||||
|
||||
/* 重点:标题不需要首行缩进 */
|
||||
.gh-content h1, .gh-content h2, .gh-content h3 {
|
||||
text-indent: 0 !important;
|
||||
}
|
||||
|
||||
/* 引文样式优化 */
|
||||
.gh-content blockquote {
|
||||
margin: 2rem 0;
|
||||
padding: 0.5rem 1.5rem;
|
||||
border-left: 4px solid var(--ghost-accent-color, #15171a); /* 使用主题色或深色作为边框 */
|
||||
background: rgba(0, 0, 0, 0.02); /* 极淡的背景色 */
|
||||
font-style: italic;
|
||||
color: #444;
|
||||
}
|
||||
|
||||
/* 引文内的段落不需要缩进 */
|
||||
.gh-content blockquote p {
|
||||
text-indent: 0 !important;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
|
||||
/* 宽屏图片样式示例 */
|
||||
.kg-width-wide .kg-image {
|
||||
max-width: 1200px;
|
||||
margin: 2em auto;
|
||||
}
|
||||
|
||||
/* 全屏图片样式示例 */
|
||||
.kg-width-full .kg-image {
|
||||
max-width: 100vw;
|
||||
margin: 2em auto;
|
||||
}
|
||||
13
assets/css/screen.css
Normal file
13
assets/css/screen.css
Normal file
@@ -0,0 +1,13 @@
|
||||
@keyframes marquee-custom {
|
||||
0% { transform: translateX(0); }
|
||||
100% { transform: translateX(-100%); }
|
||||
}
|
||||
.animate-marquee-custom { animation: marquee-custom 20s linear infinite; }
|
||||
@keyframes slide-down {
|
||||
from { opacity: 0; transform: translateY(-10px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
|
||||
.animate-slide-down {
|
||||
animation: slide-down 0.2s ease-out forwards;
|
||||
}
|
||||
Reference in New Issue
Block a user