Add edit tab

This commit is contained in:
Tim Van Baak 2021-02-17 20:50:41 -08:00
parent faea8ccc72
commit 583881927b
3 changed files with 5 additions and 1 deletions

View File

@ -58,6 +58,9 @@
div.tab-right {
margin-left: auto;
}
div.tab-right ~ div.tab-right {
margin: 0 4px;
}
div.tab-page {
width: 100%;
border-top: 2px solid #bbb;

View File

@ -75,6 +75,7 @@ window.onload = function () {
{%- endif -%}
{%- endfor -%}
{%- if not index -%}
<div id="edit" class="tab tab-right"><a href="/edit/{{ document.get_tag_value('id') }}">edit</a></div>
<div id="index" class="tab tab-right"><a href="/index/">index</a></div>
{%- endif -%}
</div>

View File

@ -156,7 +156,7 @@ window.onload = function () {
{% for tag in tab.tags %}
<tr class="edit-tag" data-tag="{{ tag.name }}" >
<td><div class="edit-tag-name"{% if tag.name != 'id' %} contenteditable{% endif %}>{{ tag.name }}</div></td>
<td><div class="edit-tag-value" contenteditable>{{ tag.value }}</div></td>
<td><div class="edit-tag-value" contenteditable>{{ tag.value|e }}</div></td>
</tr>
{%- if tag.name != 'id' -%}