Skip to content

Commit 837e684

Browse files
committed
v 1.0.9.5 优化UI
1 parent 8504f72 commit 837e684

2 files changed

Lines changed: 95 additions & 15 deletions

File tree

frontend/src/assets/blog.css

Lines changed: 94 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,55 @@ body {
423423
align-items: start;
424424
}
425425

426+
/* 桌面端:中间正文单独滚动,左侧文章列表不随中间内容滚动 */
427+
@media (min-width: 1025px) {
428+
.blog-container.all-articles-page {
429+
/* 底部与顶部对称,避免整页再出一层滚动条 */
430+
padding-bottom: 26px;
431+
}
432+
433+
.blog-container.all-articles-page .all-layout-3 {
434+
align-items: stretch;
435+
/* 顶栏 + 容器上下 padding(与 .right-rail 的 sticky top 大致一致) */
436+
height: calc(100svh - 86px - 52px);
437+
min-height: 0;
438+
max-height: calc(100svh - 86px - 52px);
439+
}
440+
441+
.blog-container.all-articles-page .all-sidebar {
442+
position: relative;
443+
min-height: 0;
444+
max-height: 100%;
445+
display: flex;
446+
flex-direction: column;
447+
overflow: hidden;
448+
}
449+
450+
.blog-container.all-articles-page .sidebar-list {
451+
flex: 1 1 auto;
452+
min-height: 0;
453+
max-height: none;
454+
overflow-y: auto;
455+
-webkit-overflow-scrolling: touch;
456+
}
457+
458+
.blog-container.all-articles-page .all-main {
459+
min-height: 0;
460+
max-height: 100%;
461+
overflow-y: auto;
462+
-webkit-overflow-scrolling: touch;
463+
}
464+
465+
.blog-container.all-articles-page .right-rail {
466+
position: relative;
467+
top: auto;
468+
min-height: 0;
469+
max-height: 100%;
470+
overflow-y: auto;
471+
-webkit-overflow-scrolling: touch;
472+
}
473+
}
474+
426475
@media (max-width: 1024px) {
427476
.all-layout {
428477
grid-template-columns: 1fr;
@@ -597,11 +646,11 @@ body {
597646
text-decoration: none;
598647
font-weight: 750;
599648
font-size: 13px;
600-
color: var(--text);
649+
color: #fff;
601650
padding: 6px 10px;
602651
border-radius: 10px;
603-
border: 1px solid var(--border);
604-
background: transparent;
652+
border: 1px solid #111;
653+
background: #111;
605654
transition:
606655
background 0.15s ease,
607656
color 0.15s ease,
@@ -610,20 +659,30 @@ body {
610659
}
611660

612661
.profile-menu-item:hover {
613-
color: var(--text);
614-
border-color: var(--text);
615-
background: rgba(0, 0, 0, 0.05);
662+
color: #fff;
663+
border-color: #2a2a2a;
664+
background: #1a1a1a;
665+
}
666+
667+
.profile-menu-item.router-link-active {
668+
border-color: #000;
669+
background: #000;
616670
}
617671

618672
[data-theme='dark'] .profile-menu-item {
619-
color: var(--text);
620-
border-color: rgba(255, 255, 255, 0.22);
621-
background: transparent;
673+
color: #fff;
674+
border-color: #111;
675+
background: #111;
622676
}
623677

624678
[data-theme='dark'] .profile-menu-item:hover {
625-
border-color: rgba(255, 255, 255, 0.4);
626-
background: rgba(255, 255, 255, 0.06);
679+
border-color: #2a2a2a;
680+
background: #1a1a1a;
681+
}
682+
683+
[data-theme='dark'] .profile-menu-item.router-link-active {
684+
border-color: #000;
685+
background: #000;
627686
}
628687

629688
.blog-info-wrap {
@@ -781,11 +840,32 @@ body {
781840
gap: 8px;
782841
border-radius: 999px;
783842
padding: 8px 12px;
784-
border: 1px solid var(--border);
843+
border: 1px solid #111;
785844
text-decoration: none;
786845
font-weight: 700;
787-
color: var(--text);
788-
background: var(--surface);
846+
color: #fff;
847+
background: #111;
848+
transition:
849+
background 0.15s ease,
850+
border-color 0.15s ease,
851+
color 0.15s ease;
852+
}
853+
854+
.icon-link:hover {
855+
color: #fff;
856+
border-color: #2a2a2a;
857+
background: #1a1a1a;
858+
}
859+
860+
[data-theme='dark'] .icon-link {
861+
border-color: #111;
862+
background: #111;
863+
color: #fff;
864+
}
865+
866+
[data-theme='dark'] .icon-link:hover {
867+
border-color: #2a2a2a;
868+
background: #1a1a1a;
789869
}
790870

791871
.article-content {

frontend/src/views/AllArticlesView.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div class="blog-container">
2+
<div class="blog-container all-articles-page">
33
<div class="all-layout-3">
44
<!-- 左侧:头像 + 搜索 + 文章列表 -->
55
<aside class="all-sidebar">

0 commit comments

Comments
 (0)