local and global graph

This commit is contained in:
Jacky Zhao
2023-06-18 10:47:07 -07:00
parent 8bfee04c8c
commit c4cf0dcb02
23 changed files with 1288 additions and 110 deletions

View File

@ -1,8 +1,7 @@
.darkmode {
float: right;
padding: 1rem;
min-width: 30px;
position: relative;
width: 20px;
height: 20px;
& > .toggle {
display: none;
@ -16,7 +15,6 @@
width: 20px;
height: 20px;
top: calc(50% - 10px);
margin: 0 7px;
fill: var(--darkgray);
transition: opacity 0.1s ease;
}

View File

@ -0,0 +1,68 @@
.graph {
& > h3 {
font-size: 1rem;
margin: 0
}
& > .graph-outer {
border-radius: 5px;
border: 1px solid var(--lightgray);
box-sizing: border-box;
height: 250px;
width: 300px;
margin: 0.5em 0;
position: relative;
& > #global-graph-icon {
color: var(--dark);
opacity: 0.5;
width: 18px;
height: 18px;
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);
}
}
& > #graph-container > svg {
margin-bottom: -5px;
}
}
& > #global-graph-outer {
position: fixed;
z-index: 9999;
left: 0;
top: 0;
width: 100vw;
height: 100%;
overflow: scroll;
backdrop-filter: blur(4px);
display: none;
&.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: 60vh;
width: 50vw;
}
}
}

View File

@ -3,7 +3,7 @@
opacity: 0;
visibility: hidden;
}
50% {
1% {
opacity: 0;
}
100% {
@ -15,21 +15,24 @@
.popover {
z-index: 999;
position: absolute;
overflow: scroll;
width: 30rem;
height: 20rem;
padding: 0 1rem;
margin-top: -1rem;
border: 1px solid var(--lightgray);
background-color: var(--light);
border-radius: 5px;
box-shadow: 6px 6px 36px 0 rgba(0,0,0,0.25);
overflow: visible;
padding: 1rem;
font-weight: initial;
& > .popover-inner {
width: 30rem;
height: 20rem;
padding: 0 1rem 1rem 1rem;
font-weight: initial;
border: 1px solid var(--gray);
background-color: var(--light);
border-radius: 5px;
box-shadow: 6px 6px 36px 0 rgba(0,0,0,0.25);
overflow: scroll;
}
visibility: hidden;
opacity: 0;
transition: opacity 0.2s ease, visibility 0.2s ease;
transition: opacity 0.3s ease, visibility 0.3s ease;
@media all and (max-width: 600px) {
display: none !important;
@ -37,7 +40,7 @@
}
a:hover .popover, .popover:hover {
animation: dropin 0.5s ease;
opacity: 1;
visibility: visible;
animation: dropin 0.3s ease;
animation-fill-mode: forwards;
animation-delay: 0.2s;
}

View File

@ -30,6 +30,7 @@ button#toc {
overflow: hidden;
max-height: none;
transition: max-height 0.3s ease;
font-size: 0.9rem;
& ul {
list-style: none;
@ -38,7 +39,7 @@ button#toc {
& > li > a {
color: var(--dark);
opacity: 0.35;
transition: 0.5s ease opacity;
transition: 0.5s ease opacity, 0.3s ease color;
&.in-view {
opacity: 0.75;
}