diff --git a/css/global.css b/css/global.css index d764610..40e43a0 100644 --- a/css/global.css +++ b/css/global.css @@ -6,6 +6,7 @@ --light-dark-color: #252525; --lighter-dark-color: #2D2D2D; --flair-color: #E65632; + --main-text-color: #fff; } * @@ -14,10 +15,11 @@ margin: 0; } +a { + color: var(--main-text-color); cursor: pointer; position: relative; - text-decoration: none; } a::after { @@ -52,25 +54,39 @@ header background-color: var(--lighter-dark-color); align-items: center; display: flex; - height: fit-content; -} + height: 4vw; + left: 0; + position: fixed; + right: 0; + top: 0; + transition: all 0.2s; +} +header:hover +{ + height: 5vw; +} header img { - margin: 0.75vw 1vw 0.75vw 2vw; + margin: 0 1vw 0 2vw; height: 2.5vw; } header h3 { color: var(--flair-color); - width: 20%; } -header .items +header #header-title +{ + align-items: center; + display: flex; + width: 30%; +} +header #header-items { text-align: left; width: 100%; } -header .items * +header #header-items * { margin: 0 1vw; } @@ -100,6 +116,11 @@ main .para margin-top: 7.5vw; } +.nounderline +{ + text-decoration: none; +} + .title { background-color: var(--light-dark-color); diff --git a/images/favicon.ico b/images/favicon.ico new file mode 100644 index 0000000..ebaba00 Binary files /dev/null and b/images/favicon.ico differ diff --git a/images/icon.png b/images/icon.png new file mode 100644 index 0000000..5c52492 Binary files /dev/null and b/images/icon.png differ diff --git a/images/logo.webp b/images/logo.webp deleted file mode 100644 index 1ec6901..0000000 Binary files a/images/logo.webp and /dev/null differ diff --git a/index.html b/index.html index 797dbf4..98b1011 100644 --- a/index.html +++ b/index.html @@ -2,32 +2,69 @@ - + + - Welcome to SuperNOVA! + 4472 SuperNOVA +
+
+ +

4472 SuperNOVA

+
+ +
+ Home + Another +
+
-

Welcome to SuperNOVA!

+

4472 SuperNOVA

-

- SuperNOVA is the name for the First Robotics Competition team 4472. - This is the online documentation website for SuperNOVA. This website will include - everything documented by the SuperNOVA team, including parts of WPILib, methods of - programming certain things, and more! -

+
+

About SuperNOVA

+

+ SuperNOVA is a team that has participated in the + First Robotics Competition + every year since 2013 and has been given the team number 4472. + SuperNOVA has members from around most of Prince William County, including + the following schools: +

+ + + +

+ Since 2018, SuperNOVA has qualified for the FRC world championships every year. +

+
-

Something

+

About the Docs

- Put something here. I don't care what. + In the programming division of SuperNOVA, there is a group that is tasked with + writing the documentation for the active project and everything about it. For + several years, while SuperNOVA was using GitLab to host their codebase, + SuperNOVA used the built-in wiki to help design their documentation. However in + 2023, SuperNOVA switched from using GitLab to GitHub, and unlike GitLab, GitHub + prohibits making wikis on private repositories without paying premium. As a + solution, this website was made. This website serves as a public wikipedia on + SuperNOVA's current ideas and innovations, as well as anything else worth + documenting. This website will be updated as the season progresses.

@@ -35,5 +72,5 @@ - + diff --git a/js/global.js b/js/global.js index ca3e8c1..c451115 100644 --- a/js/global.js +++ b/js/global.js @@ -3,11 +3,13 @@ const internet = new XMLHttpRequest(); var htmlStr = document.documentElement.innerHTML; // Insert site parts -insertHeader(); -insertFooter(); +//insertHeader(); +insertContents(); +//insertFooter(); // Update page document.documentElement.innerHTML = htmlStr; +alert("test"); // ----- Begin function declarations @@ -24,6 +26,38 @@ function insertHeader() while (htmlStr.includes(headerReplace)) htmlStr = htmlStr.replace(headerReplace, header); } } +function insertContents() +{ + const tableReplace = ""; + + var table = document.createElement("div"); + table.setAttribute("id", "table-of-contents"); + + var title = document.createElement("h2"); + title.textContent = "Table of Contents"; + + table.appendChild(title); + + var list = document.createElement("ul"); + + var titleObjects = document.getElementsByClassName("para-title"); + for (var i = 0; i < titleObjects.length; i++) + { + var appendLink = document.createElement("a"); + appendLink.setAttribute("class", "nounderline"); + appendLink.setAttribute("href", "#" + titleObjects[i].id); + appendLink.textContent = titleObjects[i].textContent; + + var append = document.createElement("li"); + append.appendChild(appendLink); + + list.appendChild(append); + } + + table.appendChild(list); + + while (htmlStr.includes(tableReplace)) htmlStr = htmlStr.replace(tableReplace, table.outerHTML); +} function insertFooter() { const footerUrl = "/partial/footer.html" diff --git a/partial/header.html b/partial/header.html index c5fdcf3..10d238a 100644 --- a/partial/header.html +++ b/partial/header.html @@ -1,9 +1,11 @@
- -

4472 SuperNOVA

+
+ +

4472 SuperNOVA

+
-
- Home - Another +
\ No newline at end of file