diff --git a/css/article.css b/css/article.css index 5f6efe8..74cbec6 100644 --- a/css/article.css +++ b/css/article.css @@ -2,6 +2,13 @@ main { margin: 24px 0 48px; } +main h1 { + margin: 0 0 8px; + color: #bbb; + /* font-size: 24pt; */ + font-weight: bold; +} + main h2 { margin: 0 0 8px; color: #bbb; @@ -18,6 +25,20 @@ main p { font-weight: normal; } +main span { + font-size: 13pt; + font-weight: normal; +} +main li { + margin-left: 6%; + font-size: 13pt; + font-weight: normal; +} +main ul { + font-size: 13pt; + font-weight: normal; +} + main .footer { font-size: 10pt; text-align: center; @@ -86,6 +107,7 @@ main .heart { color: #e44078; } + @keyframes scroll-bg { 0% { background-position-x: 0; diff --git a/css/wynnstyles.css b/css/wynnstyles.css index db83240..6246932 100644 --- a/css/wynnstyles.css +++ b/css/wynnstyles.css @@ -141,43 +141,43 @@ Wynn-Related CSS color: rgb(255, 198, 85) } -.nDam, .Neutral { +.nDam, .Neutral, Neutral { color: #FFAA00; } -.nDam:before, .Neutral:before { +.nDam:before, .Neutral:before, Neutral:before { content: "\2724" ' '; } -.eDam, .Earth, .Earth_powder { +.eDam, .Earth, .Earth_powder, Earth { color: #00AA00; } -.eDam:before, .Earth:before, .Earth_powder:before { content: "\2724" ' '; } +.eDam:before, .Earth:before, .Earth_powder:before, Earth:before { content: "\2724" ' '; } -.tDam, .Thunder, .Thunder_powder { +.tDam, .Thunder, .Thunder_powder, Thunder{ color: #FFFF55; } -.tDam:before, .Thunder:before, .Thunder_powder:before { content: "\2726" ' '; } +.tDam:before, .Thunder:before, .Thunder_powder:before, Thunder:before { content: "\2726" ' '; } -.wDam, .Water, .Water_powder { +.wDam, .Water, .Water_powder, Water { color: #55FFFF } -.wDam:before, .Water:before, .Water_powder:before { content: "\2749" ' '; } +.wDam:before, .Water:before, .Water_powder:before, Water:before { content: "\2749" ' '; } -.fDam, .Fire, .Fire_powder { +.fDam, .Fire, .Fire_powder, Fire { color: #FF5555; } -.fDam:before, .Fire:before, .Fire_powder:before { content: "\2739" ' '; } +.fDam:before, .Fire:before, .Fire_powder:before, Fire:before { content: "\2739" ' '; } -.aDam, .Air, .Air_powder { +.aDam, .Air, .Air_powder, Air { color: #FFFFFF } -.aDam:before, .Air:before, .Air_powder:before { content: "\274b" ' '; } +.aDam:before, .Air:before, .Air_powder:before, Air:before { content: "\274b" ' '; } .restrict { color: #ff8180; diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index 8512092..0000000 --- a/docs/index.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - WynnDocs - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-

Welcome to the WynnBuilder Docs

-

Documentation Homepage - sections coming soon!

-
- -
- -
-
- - - diff --git a/items_adv/index.html b/items_adv/index.html index 9b2e660..fbbae9f 100644 --- a/items_adv/index.html +++ b/items_adv/index.html @@ -22,13 +22,13 @@ @@ -39,7 +39,7 @@ Additional credits
- Search Guide + Search Guide
Basic Item Search diff --git a/js/docs.js b/js/docs.js index e6561f3..6e57d15 100644 --- a/js/docs.js +++ b/js/docs.js @@ -1,32 +1,102 @@ /** Vanilla JS does not allow dynamically fetching files in a local directory. We have to hard code the list to loop over. * Each entry is the name of a subfolder in /docs/. */ -const docs_post_titles = [ +const docs_post_names = [ "items_adv_help", - "damage_calc" + "damage_calc", + "powders" ] +/** Map of + * Key: post_name - the subdirectory name also present in docs_post_names + * Value: [Title, Summary, Author(s)] + */ +docs_post_thumbnails = new Map(); +docs_post_thumbnails.set("items_adv_help", ["Advanced Item Search Help", "A practical guide on how to use WynnBuilder's advanced item search feature.", "Phanta"]); +docs_post_thumbnails.set("damage_calc", ["Damage Calculation", "All the ins and outs of Wynncraft damage calculation. Includes spells, powder specials, abilities, and major IDs!", "hppeng, ferricles"]); +docs_post_thumbnails.set("powders", ["Weapon Powder Application", "Read this to learn the mechanics of powder application on weapons!", "ferricles, hppeng"]); + /** Populates the HTML element with the id 'post-list' * */ function populate_post_previews() { post_list_parent = document.getElementById('post-list'); - docs_post_titles.forEach((post_title) => { + docs_post_names.forEach((post_name) => { post = document.createElement('article'); + post_info = docs_post_thumbnails.get(post_name); + console.log(post_info); + if (post_info == undefined) { + return; + } title = document.createElement('h2'); - title.innerHTML = post_title; + title.innerHTML = post_info[0]; post.appendChild(title); summary = document.createElement('p'); - summary.innerHTML = 'temporary content' + summary.innerHTML = post_info[1]; post.appendChild(summary); + authors = document.createElement('p'); + authors.innerHTML = "Author(s): " + post_info[2]; + post.appendChild(authors); + link = document.createElement("a"); - link.setAttribute('href', `/docs/${post_title}/`); + link.setAttribute('href', `/wynnfo/${post_name}/`); post.appendChild(link); post_list_parent.appendChild(post); }); +} + +function initDropdownSections() { + dropdowns = document.querySelectorAll('span.dropdown'); + for (const dropdown of dropdowns) { + let inner_content = dropdown.children[0] + + dropdown.classList.add("up", "row"); + let title = document.createElement("div"); + title.classList.add("col-10", "item-title", "text-start", "dropdown-title") + title.style.margin = "0 0 0"; + title.textContent = dropdown.title; + dropdown.textContent = ""; + let indicator = document.createElement("div"); + indicator.classList.add("col-auto", "fw-bold", "box-title"); + indicator.textContent = "+"; + dropdown.prepend(indicator); + dropdown.prepend(title); + dropdown.appendChild(inner_content); + inner_content.style.display = "none"; + + title.addEventListener("click", function(){ + if (dropdown.classList.contains("up")) { + dropdown.classList.remove("up"); + dropdown.classList.add("down"); + indicator.textContent = "-"; + + inner_content.style.display = ""; + } else { + dropdown.classList.remove("down"); + dropdown.classList.add("up"); + indicator.textContent = "+"; + + inner_content.style.display = "none"; + } + }); + title.addEventListener("mouseover", function(){ + title.style.color = "#ddd"; + title.style.fontWeight = "bold"; + indicator.style.color = "#ddd"; + indicator.style.fontWeight = "bold"; + }); + title.addEventListener("mouseleave", function(){ + title.style.color = ""; + title.style.fontWeight = "normal"; + indicator.style.color = ""; + indicator.style.fontWeight = "normal"; + }); + + + } } \ No newline at end of file diff --git a/thirdparty/katex.js b/thirdparty/katex.js index 5082799..1b5c7b9 100644 --- a/thirdparty/katex.js +++ b/thirdparty/katex.js @@ -16,7 +16,7 @@ function add_katex() { scr_2.setAttribute('integrity', "sha384-43gviWU0YVjaDtb/GhzOouOXtZMP/7XUzwPTstBeZFe/+rCMvRwr4yROQP43s0Xk") scr_2.setAttribute('crossorigin', "anonymous") scr_2.setAttribute('defer', '') - scr_2.setAttribute('onload', "renderMathInElement(document.body, {delimiters: [{left: '$$', right: '$$', display: true},{left: '\\[', right: '\\]', display: true},{left: '$', right: '$', display: false},{left: '\\(', right: '\\)', display: false}]});") + scr_2.setAttribute('onload', "renderMathInElement(document.body, {delimiters: [{left: '$$', right: '$$', display: true},{left: '$', right: '$', display: false}]});") head_elem.append(link, scr_1, scr_2); } diff --git a/docs/damage_calc/index.html b/wynnfo/damage_calc/index.html similarity index 100% rename from docs/damage_calc/index.html rename to wynnfo/damage_calc/index.html diff --git a/wynnfo/index.html b/wynnfo/index.html index cf9a6f1..fb4c57c 100644 --- a/wynnfo/index.html +++ b/wynnfo/index.html @@ -1,85 +1,58 @@ - WynnAtlas - - + WynnDocs + + + + + - - - + + + + + + + + - -