mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-25 13:06:22 +00:00
bca74623a3
* perf(graph): initial canvas layout include nodes and links drawn Signed-off-by: Aaron Pham <contact@aarnphm.xyz> * fix(graph): update persistent for nodeGfx Signed-off-by: Aaron Pham <contact@aarnphm.xyz> * chore(graph): add canvas element to avoid rerendering glitch Signed-off-by: Aaron Pham <contact@aarnphm.xyz> * fix(spa): only render graph once in global Signed-off-by: Aaron Pham <contact@aarnphm.xyz> * fix(graph): change svg as button render global graph on toggle Signed-off-by: Aaron Pham <contact@aarnphm.xyz> * fix(graph): fix anchor position and zIndex behaviour Signed-off-by: Aaron Pham <contact@aarnphm.xyz> * chore(graph): increase linkDistance Signed-off-by: Aaron Pham <contact@aarnphm.xyz> * refactor * fmt * pkg --------- Signed-off-by: Aaron Pham <contact@aarnphm.xyz> Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
73 lines
1.4 KiB
SCSS
73 lines
1.4 KiB
SCSS
@use "../../styles/variables.scss" as *;
|
|
|
|
.graph {
|
|
& > h3 {
|
|
font-size: 1rem;
|
|
margin: 0;
|
|
}
|
|
|
|
& > .graph-outer {
|
|
border-radius: 5px;
|
|
border: 1px solid var(--lightgray);
|
|
box-sizing: border-box;
|
|
height: 250px;
|
|
margin: 0.5em 0;
|
|
position: relative;
|
|
overflow: hidden;
|
|
|
|
& > #global-graph-icon {
|
|
cursor: pointer;
|
|
background: none;
|
|
border: none;
|
|
color: var(--dark);
|
|
opacity: 0.5;
|
|
width: 24px;
|
|
height: 24px;
|
|
position: absolute;
|
|
padding: 0.2rem;
|
|
margin: 0.3rem;
|
|
top: 0;
|
|
right: 0;
|
|
border-radius: 4px;
|
|
background-color: transparent;
|
|
transition: background-color 0.5s ease;
|
|
cursor: pointer;
|
|
&:hover {
|
|
background-color: var(--lightgray);
|
|
}
|
|
}
|
|
}
|
|
|
|
& > #global-graph-outer {
|
|
position: fixed;
|
|
z-index: 9999;
|
|
left: 0;
|
|
top: 0;
|
|
width: 100vw;
|
|
height: 100%;
|
|
backdrop-filter: blur(4px);
|
|
display: none;
|
|
overflow: hidden;
|
|
|
|
&.active {
|
|
display: inline-block;
|
|
}
|
|
|
|
& > #global-graph-container {
|
|
border: 1px solid var(--lightgray);
|
|
background-color: var(--light);
|
|
border-radius: 5px;
|
|
box-sizing: border-box;
|
|
position: fixed;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
height: 80vh;
|
|
width: 80vw;
|
|
|
|
@media all and (max-width: $fullPageWidth) {
|
|
width: 90%;
|
|
}
|
|
}
|
|
}
|
|
}
|