From f626c86f8a93579b5e32fb7d6e2609812a1303c6 Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Fri, 12 Feb 2021 17:11:52 -0800 Subject: [PATCH] Implement private option as hide until auth is added --- redstring/templates/doc.jinja | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/redstring/templates/doc.jinja b/redstring/templates/doc.jinja index 27b11ea..0edfd3a 100644 --- a/redstring/templates/doc.jinja +++ b/redstring/templates/doc.jinja @@ -38,22 +38,26 @@ window.onload = function () {
{% for tag in tab.tags %} +{%- if not tag.options.private -%} +{%- endif -%} {% for subtag in tag.subtags %} +{%- if not tag.options.private and not subtag.options.private -%} +{%- endif -%} {% endfor %} {% endfor %}
{{ tag.name }} {{ make_tag_value(tag) }}
{% if loop.last %}└{% else %}├{% endif %} {{ subtag.name }} {{ make_tag_value(subtag) }}
{% endmacro %} -{# TODO: tag.interlink and tag.private support #} +{# TODO: tag.interlink #} {% macro make_tag_value(tag) -%} {%- if tag.options.hyperlink -%} {{ tag.value }} @@ -62,11 +66,13 @@ window.onload = function () { {%- endif -%} {%- endmacro %} -{# TODO: tab.priority and tab.private support #} +{# TODO: tab.priority support #} {% block page_content %}
{%- for tab in document -%} +{%- if not tab.options.private -%} {{ make_content_tab(tab, loop.first) }} +{%- endif -%} {%- endfor -%} {%- if not index -%}