性能、逻辑、结构优化 ✅

This commit is contained in:
Han
2025-04-02 19:14:32 +08:00
parent 7dab27d0a3
commit f333964d10
50 changed files with 1674 additions and 1259 deletions
+132 -142
View File
@@ -1,138 +1,134 @@
section.vh-container {
&>section.vh-archive-main {
flex: 1;
padding: 2rem 1rem;
border-radius: 1rem;
background-color: #fff;
overflow: hidden;
section.vh-archive-main {
flex: 1;
padding: 2rem 1rem;
border-radius: 1rem;
background-color: var(--vh-white-color);
overflow: hidden;
&>.archive-list {
&>.archive-list {
display: flex;
flex-direction: column;
gap: 1rem;
&>.archive-list-item {
display: flex;
flex-direction: column;
gap: 1rem;
&>.archive-list-item {
&>p,
a {
display: flex;
flex-direction: column;
&>p,
a {
display: flex;
align-items: center;
width: 100%;
height: 2.5rem;
border-radius: 1rem;
font-size: var(--vh-size-p);
transition: background .16s;
align-items: center;
width: 100%;
height: 2.5rem;
border-radius: 1rem;
font-size: 1rem;
transition: background .18s;
&:not(.title) {
&:hover {
background-color: var(--vh-main-color);
&>i {
&::before {
height: 50.66%;
}
}
&>span {
padding-left: 0.28rem;
}
}
&>em {
color: var(--vh-black-38);
font-size: var(--vh-size-span);
font-weight: 500;
}
&:not(.title) {
&:hover {
background-color: #EEEFF3;
&>i {
&::before {
width: 0.25rem;
height: 0.25rem;
border: none;
border-radius: 0.25rem;
background-color: #4E667F;
}
&::after {
content: "";
position: absolute;
width: 0.125rem;
height: 1rem;
left: calc(50% - 0.0625rem);
transform: translateY(-50%);
border-left: 2px dashed rgba(0, 0, 0, .1);
pointer-events: none;
height: 50.66%;
}
}
&>span {
font-size: var(--vh-size-p);
color: var(--vh-black-100);
font-weight: 600;
padding-left: 0.28rem;
}
}
&>em {
flex-shrink: 0;
width: 5.05rem;
height: 3.75rem;
color: var(--vh-black-100);
font-size: 1.5rem;
font-weight: 600;
line-height: 3.75rem;
text-align: right;
font-style: normal;
color: var(--vh-font-28);
font-size: 0.875rem;
font-weight: 500;
}
&>i {
position: relative;
width: 2.5rem;
height: 100%;
&::before {
content: '';
width: 0.25rem;
height: 0.25rem;
border: none;
border-radius: 0.25rem;
background-color: #4E667F;
}
&::after {
content: "";
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
display: block;
width: 0.36rem;
height: 0.36rem;
border: solid 0.28rem #0000006D;
border-radius: 50%;
background-color: #fff;
transition: all .3s;
width: 0.125rem;
height: 1rem;
left: calc(50% - 0.0625rem);
transform: translateY(-50%);
border-left: 2px dashed rgba(0, 0, 0, .1);
pointer-events: none;
}
}
&>span {
flex: 1;
white-space: nowrap;
overflow: hidden;
color: var(--vh-black-66);
font-weight: 500;
text-overflow: ellipsis;
transition: all .16s;
}
&>cite {
margin-left: auto;
width: 7.8rem;
font-size: var(--vh-size-span);
color: var(--vh-black-66);
font-weight: 400;
font-style: normal;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
&>span {
font-size: 1rem;
color: var(--vh-font-color);
font-weight: 600;
}
}
&>em {
flex-shrink: 0;
width: 5.05rem;
height: 3.75rem;
color: var(--vh-font-color);
font-size: 1.5rem;
font-weight: 600;
line-height: 3.75rem;
text-align: right;
font-style: normal;
}
&>i {
position: relative;
width: 2.5rem;
height: 100%;
&::before {
content: '';
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
display: block;
width: 0.36rem;
height: 0.36rem;
border: solid 0.28rem #0000006D;
border-radius: 50%;
background-color: var(--vh-white-color);
transition: all .3s;
}
}
&>span {
flex: 1;
white-space: nowrap;
overflow: hidden;
color: var(--vh-font-66);
font-weight: 500;
text-overflow: ellipsis;
transition: all .18s;
}
&>cite {
margin-left: auto;
width: 7.8rem;
font-size: 0.875rem;
color: var(--vh-font-66);
font-weight: 400;
font-style: normal;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
}
@@ -140,18 +136,15 @@ section.vh-container {
@media screen and (max-width: 1198px) {
section.vh-container {
&>section.vh-archive-main {
&>.archive-list {
&>.archive-list-item {
section.vh-archive-main {
&>.archive-list {
&>.archive-list-item {
&>p,
a {
&>cite {
display: none;
}
&>p,
a {
&>cite {
display: none;
}
}
}
@@ -160,40 +153,37 @@ section.vh-container {
}
@media screen and (max-width: 888px) {
section.vh-container {
&>section.vh-archive-main {
padding: 0;
background-color: transparent;
section.vh-archive-main {
padding: 0;
background-color: transparent;
&>.archive-list {
&>.archive-list-item {
&>p,
a {
&:not(.title) {
&>em {
font-size: var(--vh-size-h3);
}
&>span {
font-size: var(--vh-size-h2);
}
}
&>.archive-list {
&>.archive-list-item {
&>p,
a {
&:not(.title) {
&>em {
width: 3rem;
font-size: 1.2rem;
}
&>i {
width: 1.8rem;
font-size: 0.8rem;
}
&>span {
font-size: var(--vh-size-h3);
font-size: 0.88rem;
}
}
&>em {
width: 3rem;
font-size: 1.2rem;
}
&>i {
width: 1.8rem;
}
&>span {
font-size: 0.8rem;
}
}
}
}