Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
ai-box
Project
Project
Details
Activity
Releases
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
青山
ai-box
Commits
3238f139
Commit
3238f139
authored
Sep 10, 2024
by
fisherdaddy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feature: add website logo
parent
f819fc58
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
34 additions
and
11 deletions
+34
-11
index.html
index.html
+1
-1
favicon.ico
src/assets/favicon.ico
+0
-0
logo.png
src/assets/logo.png
+0
-0
Header.jsx
src/components/Header.jsx
+8
-3
i18n.js
src/js/i18n.js
+1
-1
Home.jsx
src/pages/Home.jsx
+1
-0
Header.css
src/styles/Header.css
+23
-0
main.css
src/styles/main.css
+0
-6
No files found.
index.html
View file @
3238f139
...
...
@@ -6,7 +6,7 @@
<meta
name=
"description"
content=
"AI工具箱 - 您的智能助手集合"
/>
<title>
AI工具箱 | 智能助手集合
</title>
<link
rel=
"stylesheet"
href=
"/src/styles/main.css"
/>
<link
rel=
"icon"
href=
"/favicon.ico"
type=
"image/x-icon"
/>
<link
rel=
"icon"
href=
"/
assets/
favicon.ico"
type=
"image/x-icon"
/>
<link
href=
"https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap"
rel=
"stylesheet"
>
</head>
<body>
...
...
src/assets/favicon.ico
0 → 100644
View file @
3238f139
15 KB
src/assets/logo.png
0 → 100644
View file @
3238f139
177 KB
src/components/Header.jsx
View file @
3238f139
...
...
@@ -3,6 +3,8 @@ import { Link } from 'react-router-dom';
import
LanguageSelector
from
'./LanguageSelector'
;
import
{
useTranslation
}
from
'../js/i18n'
;
import
'../styles/Header.css'
;
// 确保创建并导入这个CSS文件
// 导入 logo 图片
import
logo
from
'../assets/logo.png'
;
// 请确保路径正确
function
Header
()
{
const
{
t
}
=
useTranslation
();
...
...
@@ -10,9 +12,12 @@ function Header() {
return
(
<
header
>
<
nav
>
<
Link
to=
"/"
className=
"logo no-underline"
>
<
div
className=
"logo-title-container"
>
<
img
src=
{
logo
}
alt=
"Logo"
className=
"logo"
/>
<
Link
to=
"/"
className=
"title no-underline"
>
{
t
(
'title'
)
}
</
Link
>
</
div
>
<
LanguageSelector
/>
</
nav
>
</
header
>
...
...
src/js/i18n.js
View file @
3238f139
...
...
@@ -2,7 +2,7 @@ import { useState, useEffect } from 'react';
const
i18n
=
{
zh
:
{
title
:
'AI工具箱'
,
title
:
'AI
工具箱'
,
slogan
:
'您的智能助手集合,一站式解决各种AI需求。'
,
searchPlaceholder
:
'搜索工具...'
,
tools
:
{
...
...
src/pages/Home.jsx
View file @
3238f139
...
...
@@ -14,6 +14,7 @@ function Home() {
return
(
<
div
>
<
section
className=
"hero"
>
{
/* 添加 logo */
}
<
h1
>
{
t
(
'title'
)
}
</
h1
>
<
p
className=
"slogan"
>
{
t
(
'slogan'
)
}
</
p
>
</
section
>
...
...
src/styles/Header.css
View file @
3238f139
...
...
@@ -6,3 +6,26 @@
.no-underline
:hover
{
text-decoration
:
none
;
/* 确保悬停时也不会出现下划线 */
}
.logo
{
width
:
40px
;
/* 调整为适合你的 logo 大小 */
height
:
auto
;
margin-right
:
10px
;
}
.title
{
font-size
:
1.5rem
;
/* 调整为适合你的设计 */
white-space
:
nowrap
;
}
header
nav
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
padding
:
10px
20px
;
}
.logo-title-container
{
display
:
flex
;
align-items
:
center
;
}
\ No newline at end of file
src/styles/main.css
View file @
3238f139
...
...
@@ -52,12 +52,6 @@ nav {
width
:
100%
;
}
.logo
{
font-size
:
1.4rem
;
font-weight
:
600
;
color
:
var
(
--primary-color
);
}
main
{
max-width
:
1200px
;
width
:
100%
;
...
...
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