feat: clickable username with context menu

This commit is contained in:
julius 2025-03-06 09:28:55 +01:00
parent 854bd03c40
commit 99e80c8077
Signed by: julius
GPG Key ID: C80A63E6A5FD7092
4 changed files with 36 additions and 31 deletions

View File

@ -29,7 +29,6 @@ footer {
left: 8px; left: 8px;
} }
/*=========Network Controls=========*/ /*=========Network Controls=========*/
.infobutton { .infobutton {
@ -367,7 +366,11 @@ button,
position: relative; position: relative;
text-align: center; text-align: center;
height: 140px; height: 140px;
margin-bottom: 20px;
span {
display: block;
margin: 2px;
}
img { img {
display: block; display: block;
@ -390,6 +393,14 @@ button,
} }
} }
.avatar {
background-color: lightsteelblue;
padding: 2px 8px;
width: fit-content;
margin: auto;
z-index: 3;
}
.networkroute { .networkroute {
z-index: 10; z-index: 10;
position: absolute; position: absolute;

View File

@ -7,34 +7,25 @@ import { BrowserRouter, Routes, Route } from "react-router";
import { SessionProvider } from "./Session"; import { SessionProvider } from "./Session";
import { GraphComponent } from "./Network"; import { GraphComponent } from "./Network";
import MVPChart from "./MVPChart"; import MVPChart from "./MVPChart";
import Avatar from "./Avatar";
function App() { function App() {
return ( return (
<BrowserRouter> <BrowserRouter>
<SessionProvider>
<Header /> <Header />
<Avatar />
<Routes> <Routes>
<Route index element={<Rankings />} /> <Route index element={<Rankings />} />
<Route path="/network" element={ <Route path="/network" element={<GraphComponent />} />
<SessionProvider>
<GraphComponent />
</SessionProvider>
} />
<Route path="/analysis" element={ <Route path="/analysis" element={<Analysis />} />
<SessionProvider>
<Analysis />
</SessionProvider>
} />
<Route path="/mvp" element={
<SessionProvider>
<MVPChart />
</SessionProvider>
} />
<Route path="/mvp" element={<MVPChart />} />
</Routes> </Routes>
<Footer /> <Footer />
</SessionProvider>
</BrowserRouter> </BrowserRouter>
); );
} }

View File

@ -1,9 +1,11 @@
export default function Header() { export default function Header() {
return <div className="logo" id="logo"> return (
<div className="logo" id="logo">
<a href={"/"}> <a href={"/"}>
<img alt="logo" height="66%" src="logo.svg" /> <img alt="logo" height="66%" src="logo.svg" />
<h3 className="centered">cutt</h3> <h3 className="centered">cutt</h3>
</a> </a>
<span className="grey">cool ultimate team tool</span> <span className="grey">cool ultimate team tool</span>
</div> </div>
);
} }

View File

@ -49,7 +49,8 @@ export const GraphComponent = () => {
} }
const footer = document.getElementsByTagName("footer"); const footer = document.getElementsByTagName("footer");
if (footer) { if (footer) {
(footer.item(0) as HTMLElement).className = "fixed-footer"; footer.length &&
((footer.item(0) as HTMLElement).className = "fixed-footer");
} }
async function loadData() { async function loadData() {