Skip to content

Commit d039a87

Browse files
yyyCodeclaude
andcommitted
fix(home): revert sidebar, apply dark top-bar style to right dock button instead
- Revert page-grid.home-grid back to single column - Remove home-profile-widget sidebar CSS and HomeView sidebar markup - Style .right-dock-btn with top bar's #0f1114 dark background (dark mode) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 3c7905a commit d039a87

2 files changed

Lines changed: 8 additions & 51 deletions

File tree

vue/src/assets/blog.css

Lines changed: 8 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -384,9 +384,9 @@ body {
384384
top: 86px;
385385
}
386386

387-
/* 首页:更接近封面 + 精选文章”的布局 */
387+
/* 首页:更接近封面 + 精选文章”的布局 */
388388
.page-grid.home-grid {
389-
grid-template-columns: 1fr 320px;
389+
grid-template-columns: 1fr;
390390
}
391391

392392
.home-hero {
@@ -446,40 +446,6 @@ body {
446446
object-fit: cover;
447447
}
448448

449-
/* 首页:右侧深色个人信息挂件(继承顶部栏深色风格) */
450-
.home-profile-widget {
451-
background: #ffffff;
452-
border: 1px solid var(--border);
453-
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
454-
}
455-
456-
[data-theme='dark'] .home-profile-widget {
457-
background: #0f1114;
458-
border-color: rgba(255, 255, 255, 0.06);
459-
}
460-
461-
.home-profile-widget .profile-card {
462-
border: none;
463-
box-shadow: none;
464-
background: transparent;
465-
overflow: visible;
466-
}
467-
468-
.home-profile-widget .profile-card-body {
469-
padding: 24px 20px;
470-
}
471-
472-
.home-profile-widget .profile-name {
473-
color: var(--text);
474-
}
475-
476-
.home-profile-widget .profile-signature {
477-
color: var(--muted);
478-
}
479-
480-
[data-theme='dark'] .home-profile-widget .profile-menu-item {
481-
background: #3370ff;
482-
}
483449

484450
.home-featured {
485451
padding: 18px;
@@ -2319,6 +2285,12 @@ body {
23192285
justify-content: flex-start;
23202286
}
23212287

2288+
/* 深色挂件风格(继承顶部栏深色) */
2289+
[data-theme='dark'] .right-dock-btn {
2290+
background: #0f1114;
2291+
border-color: rgba(255, 255, 255, 0.1);
2292+
}
2293+
23222294
.right-dock-btn:hover {
23232295
border-color: rgba(0, 0, 0, 0.12);
23242296
box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);

vue/src/views/HomeView.vue

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,6 @@
9393
</section>
9494
</div>
9595
</div>
96-
97-
<!-- 右侧:个人信息挂件 -->
98-
<div class="right-rail">
99-
<div class="home-profile-widget card">
100-
<ProfileCard :profile="profile" />
101-
</div>
102-
</div>
10396
</div>
10497
</div>
10598
</template>
@@ -108,10 +101,8 @@
108101
import { computed, inject, onMounted, ref } from 'vue'
109102
110103
import { fetchArticles, fetchArticleDetail, coverUrl } from '../api/article'
111-
import { fetchPublicProfile } from '../api/profile'
112104
import { useRouter } from 'vue-router'
113105
import { showMessage } from '../utils/message'
114-
import ProfileCard from '../components/ProfileCard.vue'
115106
116107
const router = useRouter()
117108
const siteConfig = inject('siteConfig')
@@ -142,15 +133,9 @@ const loading = ref(true)
142133
const featuredArticle = ref({})
143134
const latestArticles = ref([])
144135
const email = ref('')
145-
const profile = ref(null)
146136
147137
onMounted(async () => {
148138
loading.value = true
149-
try {
150-
profile.value = await fetchPublicProfile()
151-
} catch {
152-
profile.value = null
153-
}
154139
try {
155140
const list = await fetchArticles({ page: 0, size: 8 })
156141
const items = list?.items || []

0 commit comments

Comments
 (0)