Italicize private information when visible

This commit is contained in:
Tim Van Baak 2021-02-19 00:28:41 -08:00
parent fc87b86dc1
commit 6cddcbbc1b
2 changed files with 15 additions and 3 deletions

View File

@ -70,6 +70,9 @@
display: block;
-padding: 5px;
}
div.tab-private {
font-style: italic;
}
/* Content tables */
table.page-table {
@ -93,6 +96,9 @@
table.page-table tr.hide-tag-name td:nth-child(1) {
display: none;
}
table.page-table tr.private-tag td:nth-child(1) {
font-style: italic;
}
table.page-table td {
padding: 5px;
}

View File

@ -31,7 +31,7 @@ window.onload = function () {
{% endblock page_scripts %}
{% macro make_content_tab(tab, selected) -%}
<div id="{{ tab.name }}" class="tab tab-content{% if selected %} tab-down{% endif %}{% if index %} tab-right{% endif %}" onclick="javascript:selectTab('{{ tab.name }}')">{{ tab.name }}</div>
<div id="{{ tab.name }}" class="tab tab-content{% if selected %} tab-down{% endif %}{% if index %} tab-right{% endif %}{% if tab.options.private and edit %} tab-private{% endif %}" onclick="javascript:selectTab('{{ tab.name }}')">{{ tab.name }}</div>
{%- endmacro %}
{% macro make_tab_page(tab, selected) %}
@ -39,14 +39,20 @@ window.onload = function () {
<table id="{{ tab.name }}-page-table" class="page-table">
{% for tag in tab.tags %}
{%- if not tag.options.private or edit -%}
<tr {% if tab.options.hide_names %}class="hide-tag-name"{% endif %}>
{% set classes = [] %}
{% if tab.options.hide_names %}{% set classes = classes + ['hide-tag-name'] %}{% endif %}
{% if tag.options.private and edit %}{% set classes = classes + ['private-tag'] %}{% endif %}
<tr{% if classes %} class="{{ ' '.join(classes) }}"{% endif %}>
<td>{{ tag.name }}</td>
<td>{{ make_tag_value(tag) }}</td>
</tr>
{%- endif -%}
{% for subtag in tag.subtags %}
{%- if (not tag.options.private and not subtag.options.private) or edit -%}
<tr {% if tab.options.hide_names %}class="hide-tag-name"{% endif %}>
{% set classes = [] %}
{% if tab.options.hide_names %}{% set classes = classes + ['hide-tag-name'] %}{% endif %}
{% if (tag.options.private or subtag.options.private) and edit %}{% set classes = classes + ['private-tag'] %}{% endif %}
<tr{% if classes %} class="{{ ' '.join(classes) }}"{% endif %}>
<td>{% if loop.last %}&#9492;{% else %}&#9500;{% endif %} {{ subtag.name }}</td>
<td>{{ make_tag_value(subtag) }}</td>
</tr>