mirror of
https://github.com/rvtr/wiki.git
synced 2025-10-31 06:31:13 -04:00
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:
parent
a23167956e
commit
ab275368f0
@ -19,33 +19,36 @@ layout: compress
|
||||
<div class="rounded-3 border sidebar-container mb-3 p-3">
|
||||
{% assign items = site[page.collection] | where: "section", page.section | sort: "category" %}
|
||||
<ul class="list-unstyled">
|
||||
<!-- First check for index -->
|
||||
{% for item in items %}
|
||||
{% if item.url contains "index.html" %}
|
||||
<li {% unless item contains category %}class="li-bullet"{% endunless %}><a href="{{ item.url }}">{{ item.title }}</a></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% for item in items %}
|
||||
{% unless item.url contains "index.html" %}
|
||||
{% if item.category and category != item.category %}
|
||||
{% if category %}
|
||||
</ul>
|
||||
</li>
|
||||
</details>
|
||||
{% endif %}
|
||||
{% assign category = item.category %}
|
||||
<li>
|
||||
<details {% if page.category == category %}open{% endif %}>
|
||||
<summary>{{ category }}</summary>
|
||||
<ul>
|
||||
<!-- First check for index -->
|
||||
{% for item in items %}
|
||||
{% if item.url contains "index.html" %}
|
||||
<li {% unless item contains category %}class="li-bullet"{% endunless %}><a href="{{ item.url }}">{{ item.title }}</a></li>
|
||||
{% endif %}
|
||||
<li {% unless item contains category %}class="li-bullet"{% endunless %}><a href="{{ item.url }}">{{ item.title }}</a></li>
|
||||
{% endunless %}
|
||||
{% endfor %}
|
||||
{% if category %}
|
||||
</ul>
|
||||
</details>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<!-- Then the other pages -->
|
||||
{% for item in items %}
|
||||
{% unless item.url contains "index.html" %}
|
||||
{% if item.category and category != item.category %}
|
||||
{% if category %}
|
||||
</ul>
|
||||
</details>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% assign category = item.category %}
|
||||
<li>
|
||||
<details {% if page.category == category %}open{% endif %}>
|
||||
<summary>{{ category }}</summary>
|
||||
<ul>
|
||||
{% endif %}
|
||||
<li {% unless item contains category %}class="li-bullet"{% endunless %}><a href="{{ item.url }}">{{ item.title }}</a></li>
|
||||
{% endunless %}
|
||||
{% endfor %}
|
||||
{% if category %}
|
||||
</ul>
|
||||
</details>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
|
||||
@ -7,17 +7,15 @@ if(!languageID.match(/[a-z][a-z]-[A-Z][A-Z]/)) {
|
||||
if(languageID) {
|
||||
for(let language of document.getElementById("language-dropdown").children) {
|
||||
if(language.children[0].dataset.languageId == languageID && !language.children[0].classList.contains("active")) {
|
||||
console.log(languageID)
|
||||
for(let languageAlert of document.getElementsByClassName("language-alert")) {
|
||||
languageAlert.classList.remove("d-none");
|
||||
let a = document.createElement("a");
|
||||
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);
|
||||
|
||||
import(`./i18n/${languageID}.js`).then(obj => {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user