feat: Added personal website
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import React, { useContext } from "react";
|
||||
|
||||
import "./Navbar.css";
|
||||
import { headerData } from "../../data/headerData";
|
||||
import { ThemeContext } from "../../contexts/ThemeContext";
|
||||
|
||||
function Navbar() {
|
||||
const { theme } = useContext(ThemeContext);
|
||||
|
||||
const shortname = (name) => {
|
||||
if (name.length > 12) {
|
||||
return name.split(" ")[0];
|
||||
} else {
|
||||
return name;
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="navbar">
|
||||
<div className="navbar--container">
|
||||
<h1 style={{ color: theme.secondary }}>{shortname(headerData.name)}</h1>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Navbar;
|
||||
Reference in New Issue
Block a user