feat: init my blog
This commit is contained in:
commit
e30934c198
14 files changed
+719
No files matched your search
@@ -0,0 +1,116 @@
|
||||
/* 列表页的背景与文章页不同,导航栏跟随当前页面配色。 */
|
||||
.list {
|
||||
--nav-background: var(--code-bg);
|
||||
}
|
||||
|
||||
[data-theme="dark"] .list {
|
||||
--nav-background: var(--theme);
|
||||
}
|
||||
|
||||
/* 窄屏时整栏吸顶;宽屏时仅站名与主题按钮固定在正文左侧。 */
|
||||
.header {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
background: var(--nav-background, var(--theme));
|
||||
}
|
||||
|
||||
.header-nav {
|
||||
max-width: calc(var(--nav-width) + var(--gap) * 2);
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.logo {
|
||||
flex-wrap: nowrap;
|
||||
min-height: var(--header-height);
|
||||
}
|
||||
|
||||
.logo a {
|
||||
font-size: 24px;
|
||||
font-weight: 700;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.logo-switches {
|
||||
align-items: center;
|
||||
min-height: 0;
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
|
||||
#theme-toggle {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
min-height: 44px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
#theme-toggle svg {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.menu a {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
.header {
|
||||
position: static;
|
||||
}
|
||||
|
||||
.header-nav {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.logo {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: calc((100% + var(--main-width)) / 2 + var(--gap));
|
||||
z-index: 10;
|
||||
background: var(--nav-background, var(--theme));
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 599px) {
|
||||
.header-nav {
|
||||
column-gap: 12px;
|
||||
}
|
||||
|
||||
.menu {
|
||||
max-width: 100%;
|
||||
column-gap: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
/* 锚点跳转时为窄屏吸顶导航留出空间(菜单可能换到第二行)。 */
|
||||
@media (max-width: 1199px) {
|
||||
html {
|
||||
scroll-padding-top: calc(var(--header-height) * 2 + var(--gap));
|
||||
}
|
||||
}
|
||||
|
||||
/* 控制首页欢迎模块(Home-Info)与上下元素的距离 */
|
||||
.first-entry.home-info {
|
||||
/* 1. 取消主题默认的 320px 最小高度限制,让上下间距完全由 margin 控制 */
|
||||
min-height: auto;
|
||||
|
||||
/* 2. 与上方导航栏的距离(默认约为 24px,数值越大离导航栏越远) */
|
||||
margin-top: 40px;
|
||||
|
||||
/* 3. 与下方第一篇文章的距离(默认约为 48px,数值越小文章越往上靠) */
|
||||
margin-bottom: 40px;
|
||||
|
||||
/* 4. 欢迎模块内部上下的内边距(按需保留或设为 0) */
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
/* 数学公式排版优化:确保超长公式可平滑横向滚动,不溢出容器 */
|
||||
.katex-display {
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
padding: 0.5rem 0;
|
||||
}
|
||||
Reference in new issue
Block a user