From 67ec0bffee49f84ec737588da1d2e825af92fef0 Mon Sep 17 00:00:00 2001
From: xy <10816187@qq.com>
Date: Sun, 2 Aug 2026 11:49:08 +0800
Subject: [PATCH] feat: add github entry
---
src/assets/icon/github.svg | 1 +
src/components/BaseHeader.astro | 19 +++++++++++++++++--
2 files changed, 18 insertions(+), 2 deletions(-)
create mode 100644 src/assets/icon/github.svg
diff --git a/src/assets/icon/github.svg b/src/assets/icon/github.svg
new file mode 100644
index 0000000..91ade14
--- /dev/null
+++ b/src/assets/icon/github.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/components/BaseHeader.astro b/src/components/BaseHeader.astro
index e3ddada..73f3fc7 100644
--- a/src/components/BaseHeader.astro
+++ b/src/components/BaseHeader.astro
@@ -1,6 +1,7 @@
---
import {metadata} from "../consts";
import ThemeIcon from './ThemeIcon.astro'
+import GitHubIcon from '@/assets/icon/github.svg?url'
---
@@ -13,7 +14,9 @@ import ThemeIcon from './ThemeIcon.astro'
@@ -72,7 +75,15 @@ import ThemeIcon from './ThemeIcon.astro'
}
.menu-item {
- text-align: center;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+
+ .github-icon {
+ width: 18px;
+ height: 18px;
+ display: block;
}
.main-nav .menu-item a {
@@ -95,4 +106,8 @@ import ThemeIcon from './ThemeIcon.astro'
:global(.dark) .main-nav .menu-item a:hover {
color: rgba(255, 255, 255, .8);
}
+
+ :global(.dark) .github-icon {
+ filter: invert(1);
+ }