Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
A
ai-astro
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liubinyu
ai-astro
Commits
01f9081a
Commit
01f9081a
authored
May 07, 2025
by
liubinyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
亮色
parent
5ea9dc39
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
9 deletions
+38
-9
logo-color.png
public/img/logo-color.png
+0
-0
GHeader.vue
src/components/GHeader.vue
+37
-7
style.css
src/style.css
+1
-1
index.vue
src/views/index.vue
+0
-1
No files found.
public/img/logo-color.png
0 → 100644
View file @
01f9081a
12.7 KB
src/components/GHeader.vue
View file @
01f9081a
<
script
setup
>
import
{
reactive
,
ref
}
from
'vue'
import
{
reactive
,
ref
,
computed
}
from
'vue'
import
{
useRouter
}
from
'vue-router'
const
router
=
useRouter
()
...
...
@@ -27,16 +27,19 @@ function navClick(nav) {
}
navClick
(
navList
.
find
(
i
=>
i
.
route
===
router
.
currentRoute
.
value
.
name
))
const
isLight
=
computed
(()
=>
locale
.
value
!==
'En'
)
// function login() {
// router.push({ name: 'Login' })
// }
</
script
>
<
template
>
<div
class=
"gc-header"
>
<img
class=
"logo"
src=
"/img/logo.png"
alt=
""
>
<div
class=
"gc-header"
:class=
"
{ light: isLight }">
<img
v-if=
"isLight"
class=
"logo"
src=
"/img/logo-color.png"
alt=
""
>
<img
v-else
class=
"logo"
src=
"/img/logo.png"
alt=
""
>
<div
class=
"nav-list"
>
<div
v-for=
"nav in navList"
class=
"btn"
:class=
"
{ active: active === nav.route }" @click="navClick(nav, 1)">
<div
v-for=
"nav in navList"
class=
"btn
g-flex-center
"
:class=
"
{ active: active === nav.route }" @click="navClick(nav, 1)">
{{
$t
(
nav
.
name
)
}}
<Transition>
<div
v-show=
"active === nav.route"
class=
"line"
></div>
...
...
@@ -64,15 +67,16 @@ navClick(navList.find(i => i.route === router.currentRoute.value.name))
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
background
:
linear-gradient
(
180deg
,
rgba
(
14
,
0
,
85
,
0.71
)
0%
,
rgba
(
4
,
0
,
106
,
0
)
100%
);
}
.gc-header
.logo
{
/* width: 12vw; */
width
:
228px
;
height
:
60px
;
flex-shrink
:
0
;
}
.gc-header
.nav-list
{
height
:
100%
;
flex
:
1
;
margin
:
0
5vw
;
display
:
flex
;
...
...
@@ -80,7 +84,8 @@ navClick(navList.find(i => i.route === router.currentRoute.value.name))
}
.nav-list
.btn
{
padding
:
16px
2px
;
min-width
:
50px
;
height
:
100%
;
margin-right
:
5vw
;
font-family
:
Roboto-Regular
;
font-weight
:
400
;
...
...
@@ -95,6 +100,7 @@ navClick(navList.find(i => i.route === router.currentRoute.value.name))
.nav-list
.btn.active
{
font-family
:
Roboto-Bold
;
font-weight
:
bold
;
color
:
var
(
--theme-color
);
}
...
...
@@ -150,4 +156,28 @@ navClick(navList.find(i => i.route === router.currentRoute.value.name))
border-color
:
var
(
--theme-color
);
color
:
var
(
--theme-color
);
}
.gc-header.light
{
background
:
#FFFFFF
;
}
.gc-header.light
.nav-list
.btn
{
color
:
#666
;
}
.gc-header.light
.nav-list
.btn
:hover
{
color
:
#000000
;
}
.gc-header.light
.nav-list
.btn.active
{
color
:
#000000
;
}
.gc-header.light
.nav-list
.btn
.line
{
background-color
:
#503A9E
;
}
.gc-header.light
.right
.icon-lang
{
filter
:
contrast
(
0.1
);
}
</
style
>
\ No newline at end of file
src/style.css
View file @
01f9081a
...
...
@@ -2,7 +2,7 @@
color
:
#FFFFFF
;
background-color
:
#0F0C29
;
--theme-color
:
#FF8800
;
--layout-header-height
:
10
0px
;
--layout-header-height
:
8
0px
;
}
*
{
...
...
src/views/index.vue
View file @
01f9081a
...
...
@@ -21,7 +21,6 @@ import GHeader from '@/components/GHeader.vue'
right
:
0
;
margin
:
0
auto
;
height
:
var
(
--layout-header-height
);
background
:
linear-gradient
(
180deg
,
rgba
(
14
,
0
,
85
,
0.71
)
0%
,
rgba
(
4
,
0
,
106
,
0
)
100%
);
z-index
:
2
;
}
</
style
>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment