Fix invalid HTML

wiki.html:29 is a total mess because it opens and closes tags in weird places...
Good enough tho ¯\_(ツ)_/¯
This commit is contained in:
Pk11 2020-12-21 22:41:50 -06:00
parent a23167956e
commit ab275368f0
2 changed files with 30 additions and 29 deletions

View File

@ -25,13 +25,14 @@ layout: compress
<li {% unless item contains category %}class="li-bullet"{% endunless %}><a href="{{ item.url }}">{{ item.title }}</a></li> <li {% unless item contains category %}class="li-bullet"{% endunless %}><a href="{{ item.url }}">{{ item.title }}</a></li>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
<!-- Then the other pages -->
{% for item in items %} {% for item in items %}
{% unless item.url contains "index.html" %} {% unless item.url contains "index.html" %}
{% if item.category and category != item.category %} {% if item.category and category != item.category %}
{% if category %} {% if category %}
</ul> </ul>
</li>
</details> </details>
</li>
{% endif %} {% endif %}
{% assign category = item.category %} {% assign category = item.category %}
<li> <li>
@ -45,7 +46,9 @@ layout: compress
{% if category %} {% if category %}
</ul> </ul>
</details> </details>
</li>
{% endif %} {% endif %}
</ul>
</div> </div>
</div> </div>
<div class="col-sm-9"> <div class="col-sm-9">

View File

@ -7,17 +7,15 @@ if(!languageID.match(/[a-z][a-z]-[A-Z][A-Z]/)) {
if(languageID) { if(languageID) {
for(let language of document.getElementById("language-dropdown").children) { for(let language of document.getElementById("language-dropdown").children) {
if(language.children[0].dataset.languageId == languageID && !language.children[0].classList.contains("active")) { if(language.children[0].dataset.languageId == languageID && !language.children[0].classList.contains("active")) {
console.log(languageID)
for(let languageAlert of document.getElementsByClassName("language-alert")) { for(let languageAlert of document.getElementsByClassName("language-alert")) {
languageAlert.classList.remove("d-none"); languageAlert.classList.remove("d-none");
let a = document.createElement("a"); let a = document.createElement("a");
a.href = `${languageID == "en-US" ? "" : ("/" + languageID)}${window.location.pathname.replace(/[a-z][a-z]-[A-Z][A-Z]\//, "")}`; a.href = `${languageID == "en-US" ? "" : ("/" + languageID)}${window.location.pathname.replace(/[a-z][a-z]-[A-Z][A-Z]\//, "")}`;
console.log(a.href);
languageAlert.prepend(a); languageAlert.prepend(a);
import(`./i18n/${languageID}.js`).then(obj => { import(`./i18n/${languageID}.js`).then(obj => {
a.innerHTML = obj.default.pageIsInYourLanguage; a.innerHTML = obj.default.pageIsInYourLanguage;
}).catch((err) => {console.log(err); a.innerHTML = "This page is available in your language!"}); }).catch(() => a.innerHTML = "This page is available in your language!");
break; break;
} }
} }