e.id = h;
dom.thumb_layer.appendChild(e);
- let d = document.createElement("div");
- d.classList.add("section-holder");
- e.appendChild(d);
-
let t = document.createElement("div");
t.innerText = n;
t.classList.add("section-text");
- d.appendChild(t);
+ e.appendChild(t);
let u = document.createElement("ul");
u.classList.add("section-list");
u.id = h + "-list";
- d.appendChild(u);
- // 2em+1vh + n *
+ e.appendChild(u);
let g = document.createElement("div");
g.classList.add("grid");
dom.finishSections = (l) =>
{
- for (let section of document.getElementsByClassName("section-holder")) {
- let height = section.offsetHeight;
+ for (let section of document.getElementsByClassName("section")) {
let list = section.childNodes[1];
let name = section.childNodes[0].innerText;
- for (let n of l) {
+ for (let n of l.reverse()) {
let h = n.toLowerCase().replace(" ","-");
let l = document.createElement("li");
list.appendChild(l);
l.appendChild(a);
if (n === name) {
- console.log("Setting <" + n + "> top to: -" + height + "px");
- list.style.top = "-" + height + "px";
+ a.style.color = "var(--fg-col)";
}
- height += a.offsetHeight;
}
}
}
--gutter-width: calc(10px + 7vw);
}
+html {
+ scroll-behavior: smooth;
+}
body {
background-color: var(--bg-col);
color: var(--fg-col);
margin: 5%;
- font-size: calc(2em + 0.5vw);
font-family: sans-serif;
}
#logo {
display: flex;
- padding-bottom: 3vh;
+ margin-bottom: 3vh;
justify-content: center;
}
}
.section {
- display: flex;
- padding-bottom: 3vh;
- justify-content: center;
+ background-color: var(--bg-lite-col);
+ border-radius: 1vw;
+ margin-bottom: 3vh;
}
.section-text {
- background-color: var(--bg-lite-col);
- border-radius: 2vw;
- padding: 1vw;
+ font-size: calc(2em + 0.5vw);
+ padding-top: .75vw;
+ padding-bottom: .25vw;
text-align: center;
visibility: visible;
opacity: 1;
}
.section-list {
- background-color: var(--bg-lite-col);
- border-radius: 2vw;
- position: relative;
text-align: center;
- list-style: none;
margin: 0;
- padding: 1vw;
+ padding-left: 0;
+ padding-bottom: .5vw;
+ overflow: hidden;
visibility: hidden;
opacity: 0;
transition: visibility 300ms, opacity 300ms;
.section-list a {
text-decoration: none;
- color: var(--fg-col);
- display: block;
- padding: .3vw;
+ font-size: 12pt;
+ color: var(--fg-mute-col);
+ white-space: nowrap;
}
-.section-holder {
- height: calc(2em + 1vh);
-
+.section-list a:hover {
+ color: var(--fg-emph-col);
+ transition: color 500ms;
}
-.section-holder:hover .section-text {
- visibility: hidden;
- opacity: 0;
- transition: visibility 300ms, opacity 300ms;
+.section-list li {
+ display: inline;
+ padding-left: 1vw;
+ padding-right: 1vw;
}
-.section-holder:hover .section-list {
+.section:hover .section-list {
visibility: visible;
opacity: 1;
transition: visibility 500ms, opacity 500ms;
.grid {
display: flex;
- padding-bottom: 3vh;
+ margin-bottom: 3vh;
flex-wrap: wrap;
justify-content: center;
}