diff --git a/redstring/parser.py b/redstring/parser.py index 40284ba..3215c25 100644 --- a/redstring/parser.py +++ b/redstring/parser.py @@ -130,9 +130,6 @@ class DocumentTab: self.tags: List[DocumentTag] = tags self.options: TabOptions = options - def __iter__(self): - return self.tags.__iter__() - class Document: """ diff --git a/redstring/templates/base.jinja b/redstring/templates/base.jinja index d34ef50..7a6c328 100644 --- a/redstring/templates/base.jinja +++ b/redstring/templates/base.jinja @@ -11,12 +11,12 @@ {% block page_scripts %}{% endblock %} diff --git a/redstring/templates/doc.jinja b/redstring/templates/doc.jinja index c73cdf0..eb45ec8 100644 --- a/redstring/templates/doc.jinja +++ b/redstring/templates/doc.jinja @@ -10,14 +10,14 @@ function selectTab(name) { if (tab) { // Unselect all tabs and content - Array.from(document.getElementsByClassName("tab")) - .forEach(e => e.classList.remove("tab-selected")); Array.from(document.getElementsByClassName("tab-content")) - .forEach(e => e.classList.remove("tab-selected-content")); + .forEach(e => e.classList.remove("tab-down")); + Array.from(document.getElementsByClassName("tab-page")) + .forEach(e => e.classList.remove("tab-page-selected")); // Select the new tab and content - tab.classList.add("tab-selected"); - let content = document.getElementById(name + "-content"); - content.classList.add("tab-selected-content"); + tab.classList.add("tab-down"); + let content = document.getElementById(name + "-page"); + content.classList.add("tab-page-selected"); } } @@ -30,24 +30,40 @@ window.onload = function () { {% endblock page_scripts %} -{% macro make_tab(tab, selected) -%} -
{{ tag.name }} | -{{ tag.value }} | +{{ make_tag_value(tag) }} |
{% if loop.last %}└{% else %}├{% endif %} {{ subtag.name }} | +{{ make_tag_value(subtag) }} | +