perf: 优化内容细节, 搜索框的过渡效果

This commit is contained in:
pengzhanbo 2024-02-04 10:33:09 +08:00
parent 526e8d13c1
commit fed4efb566
4 changed files with 30 additions and 17 deletions

View File

@ -1,8 +1,9 @@
---
home: true
banner: /images/bg-home.jpg
banner: http://file.mo7.cc/api/public/bz
bannerMask:
dark: 0.2
light: 0.1
dark: 0.3
hero:
name: 鹏展博
tagline: 前端开发工程师

View File

@ -10,8 +10,10 @@
.plume-content h6 {
position: relative;
font-weight: 600;
color: var(--vp-c-text-1);
overflow-wrap: break-word;
outline: none;
transition: color var(--t-color);
}
.plume-content h1 {
@ -27,6 +29,7 @@
line-height: 32px;
letter-spacing: -0.02em;
border-top: 1px solid var(--vp-c-divider);
transition: border-top var(--t-color);
}
.plume-content h2:first-of-type {
@ -51,6 +54,7 @@
font-size: 0.8em;
color: var(--vp-c-brand-1);
content: var(--vp-header-anchor-symbol);
transition: color var(--t-color);
}
&:focus-visible {
@ -93,6 +97,8 @@
.plume-content p,
.plume-content summary {
margin: 16px 0;
color: var(--vp-c-text-1);
transition: color var(--t-color);
}
.plume-content p {
@ -103,14 +109,14 @@
padding-left: 16px;
margin: 16px 0;
border-left: 2px solid var(--vp-c-divider);
transition: border-color 0.5s;
transition: border-color var(--t-color);
}
.plume-content blockquote > p {
margin: 0;
font-size: 16px;
color: var(--vp-c-text-2);
transition: color 0.5s;
transition: color var(--t-color);
}
.plume-content a {
@ -119,9 +125,9 @@
text-decoration: underline;
text-underline-offset: 2px;
transition:
color 0.25s,
opacity 0.25s,
text-underline-offset 0.25s;
color var(--t-color),
opacity var(--t-color),
text-underline-offset var(--t-color);
@media print {
&[href^="http://"],
@ -183,7 +189,8 @@
.plume-content tr {
background-color: var(--vp-c-bg);
border-top: 1px solid var(--vp-c-divider);
transition: background-color 0.5s;
transition: var(--t-color);
transition-property: background-color, border-top;
}
.plume-content tr:nth-child(2n) {
@ -194,6 +201,7 @@
.plume-content td {
padding: 8px 16px;
border: 1px solid var(--vp-c-divider);
transition: border var(--t-color);
}
.plume-content th {
@ -202,6 +210,8 @@
color: var(--vp-c-text-2);
text-align: left;
background-color: var(--vp-c-bg-soft);
transition: var(--t-color);
transition-property: color, background-color, border;
}
.plume-content td {
@ -216,6 +226,7 @@
margin: 16px 0;
border: none;
border-top: 1px solid var(--vp-c-divider);
transition: border-top var(--t-color);
}
/**
@ -226,6 +237,7 @@
.plume-content :not(pre, h1, h2, h3, h4, h5, h6) > code {
font-size: var(--vp-code-font-size);
color: var(--vp-code-color);
transition: color var(--t-color);
}
.plume-content :not(pre) > code {
@ -233,8 +245,8 @@
background-color: var(--vp-code-bg);
border-radius: 4px;
transition:
color 0.25s,
background-color 0.5s;
color var(--t-color),
background-color var(--t-color);
}
.plume-content h1 > code,
@ -245,6 +257,7 @@
.plume-content a > code {
color: var(--vp-code-link-color);
transition: color var(--t-color);
}
.plume-content a:hover > code {

View File

@ -55,8 +55,7 @@ html,
body {
color: var(--vp-c-text-1);
background-color: var(--vp-c-bg);
transition-timing-function: ease;
transition-duration: 0.25s;
transition: var(--t-color);
transition-property: color, background-color;
scrollbar-width: thin;

View File

@ -36,7 +36,7 @@
padding: 0;
margin: 0;
background: var(--docsearch-searchbox-background);
transition: border-color 0.25s;
transition: border-color var(--t-color), background var(--t-color);
}
.navbar-search .DocSearch-Button:hover {
@ -67,7 +67,7 @@
height: 16px;
color: var(--vp-c-text-1);
fill: currentcolor;
transition: color 0.5s;
transition: color var(--t-color);
}
.DocSearch-Button:hover .DocSearch-Search-Icon {
@ -81,7 +81,7 @@
font-size: 13px;
font-weight: 500;
color: var(--vp-c-text-2);
transition: color 0.5s;
transition: color var(--t-color);
}
.DocSearch-Button:hover .DocSearch-Button-Placeholder {
@ -115,8 +115,8 @@
border-right: none;
border-radius: 4px 0 0 4px;
transition:
color 0.5s,
border-color 0.5s;
color var(--t-color),
border-color var(--t-color);
}
.DocSearch-Button .DocSearch-Button-Key + .DocSearch-Button-Key {