Skip to content

Commit

Permalink
修改头像为名字
Browse files Browse the repository at this point in the history
  • Loading branch information
buyfakett committed Nov 29, 2024
1 parent c2ab884 commit 26540fa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 deletions.
1 change: 0 additions & 1 deletion src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ const App = () => {
<div className="bg-gray-900 text-gray-300">
<NavBar
skipUrl={Config.skipUrl}
headPortrait={Config.imgUrl.headPortrait}
/>
<Routes>
<Route path="/" element={
Expand Down
27 changes: 11 additions & 16 deletions src/components/NavBar.jsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
import React, {useContext} from "react";
import React from "react";
import {FaGithub} from "react-icons/fa";
import {FaBilibili} from "react-icons/fa6";
// import {ThemeContext} from "../util/ThemeContext";
import {CiShare1} from "react-icons/ci";
import {Link} from "react-router-dom";
import {Divider} from '@douyinfe/semi-ui';

const NavBar = ({skipUrl, headPortrait}) => {
// const { theme, toggleTheme } = useContext(ThemeContext);
const NavBar = ({skipUrl}) => {
return (
<nav className="dark:bg-gray-800 dark:text-white px-4 py-2 shadow-md">
<div className="container mx-auto flex justify-between items-center">
{/* 左侧 */}
<div className="flex items-center space-x-10">
{/* 头像 */}
<Link to="/" className="img-box">
<img
className="w-10 h-10 object-cover"
src={headPortrait}
alt="head portrait"
/>
<Link to="/">
<span className="font-bold text-lg">
buyfakett
</span>
</Link>

{/*分割线*/}
<Divider layout="vertical" margin='20px' className="bg-white"/>

{/* 链接 */}
{/*<Link*/}
{/* to="/tools"*/}
Expand Down Expand Up @@ -71,12 +72,6 @@ const NavBar = ({skipUrl, headPortrait}) => {
>
<FaBilibili size={24}/>
</a>
{/*<button*/}
{/* onClick={toggleTheme}*/}
{/* className="mt-1 px-4 py-2 bg-blue-500 dark:text-white rounded hover:bg-blue-600 dark:bg-yellow-500 dark:hover:bg-yellow-600"*/}
{/*>*/}
{/* 切换主题*/}
{/*</button>*/}
</div>
</div>
</nav>
Expand Down

0 comments on commit 26540fa

Please sign in to comment.