From 1b686cca7e3d75a42ed5ca70cc9bdeddf17b9c15 Mon Sep 17 00:00:00 2001 From: Gus Date: Fri, 17 Oct 2025 11:47:50 +0800 Subject: [PATCH 1/4] Show sidebar avatar on all routes --- src/partials/SideNavPartial.vue | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/partials/SideNavPartial.vue b/src/partials/SideNavPartial.vue index 09a9bde..982129d 100644 --- a/src/partials/SideNavPartial.vue +++ b/src/partials/SideNavPartial.vue @@ -2,7 +2,7 @@
-
+
@@ -112,12 +112,6 @@ const navSocialLinks = useHeaderSocialLinks(social); const { tooltip, showTooltip, hideTooltip } = useTooltip(); -const isHome = computed(() => { - // `path` excludes query strings, ensuring the avatar is hidden on the homepage - // even when query parameters are present (e.g. `/?foo=bar`). - return currentRoute.path === '/'; -}); - const isAbout = computed(() => currentRoute.path === '/about'); const CONTENT_ALIGNED_ROUTES = new Set(['/about', '/projects', '/resume']); From 09b2aae9ba741378d9c9259152ac927ef80d9075 Mon Sep 17 00:00:00 2001 From: Gus Date: Fri, 17 Oct 2025 12:08:30 +0800 Subject: [PATCH 2/4] Update avatar visibility tests --- tests/partials/SideNavPartial.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/partials/SideNavPartial.test.ts b/tests/partials/SideNavPartial.test.ts index c84ee11..369f230 100644 --- a/tests/partials/SideNavPartial.test.ts +++ b/tests/partials/SideNavPartial.test.ts @@ -85,18 +85,18 @@ describe('SideNavPartial', () => { debugErrorMock.mockClear(); }); - it('hides the avatar on the home route', async () => { + it('shows the avatar on the home route', async () => { const { wrapper } = await mountSideNavAt('/'); - expect(wrapper.findComponent(AvatarPartial).exists()).toBe(false); + expect(wrapper.findComponent(AvatarPartial).exists()).toBe(true); wrapper.unmount(); }); - it('hides the avatar on the about route', async () => { + it('shows the avatar on the about route', async () => { const { wrapper } = await mountSideNavAt('/about'); - expect(wrapper.findComponent(AvatarPartial).exists()).toBe(false); + expect(wrapper.findComponent(AvatarPartial).exists()).toBe(true); wrapper.unmount(); }); From 22045ad4e7dc931bf3aa5110a0f358f50b9e301e Mon Sep 17 00:00:00 2001 From: Gus Date: Fri, 17 Oct 2025 12:15:59 +0800 Subject: [PATCH 3/4] Add top margin to side nav --- src/partials/SideNavPartial.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/partials/SideNavPartial.vue b/src/partials/SideNavPartial.vue index 982129d..0d4a8c3 100644 --- a/src/partials/SideNavPartial.vue +++ b/src/partials/SideNavPartial.vue @@ -10,7 +10,7 @@
-