Store YAML frontmatter in notes.

This commit is contained in:
2025-07-06 22:29:13 +02:00
parent d28c7bc83e
commit 9113dc1a69
11 changed files with 946 additions and 23 deletions

View File

@@ -15,10 +15,24 @@
{% if note.updated_at > note.created_at %}
<span class="date">· Updated {{ note.updated_at|format_date }}</span>
{% endif %}
{% if note.is_pinned %}
<span class="pin-badge">📌 Pinned</span>
{% endif %}
</div>
</div>
<div class="note-actions">
<a href="{{ url_for('view_note_mindmap', slug=note.slug) }}" class="btn btn-info">
<svg width="16" height="16" fill="currentColor" viewBox="0 0 16 16" style="vertical-align: -2px; margin-right: 4px;">
<circle cx="8" cy="8" r="2"/>
<circle cx="3" cy="3" r="1.5"/>
<circle cx="13" cy="3" r="1.5"/>
<circle cx="3" cy="13" r="1.5"/>
<circle cx="13" cy="13" r="1.5"/>
<path d="M6.5 6.5L4 4M9.5 6.5L12 4M6.5 9.5L4 12M9.5 9.5L12 12" stroke="currentColor" fill="none"/>
</svg>
Mind Map
</a>
{% if note.can_user_edit(g.user) %}
<a href="{{ url_for('edit_note', slug=note.slug) }}" class="btn btn-primary">Edit</a>
<form method="POST" action="{{ url_for('delete_note', slug=note.slug) }}" style="display: inline;"
@@ -57,7 +71,7 @@
<div class="association-item">
<span class="association-label">Tags:</span>
<span class="association-value">
{% for tag in note.tags %}
{% for tag in note.get_tags_list() %}
<a href="{{ url_for('notes_list', tag=tag) }}" class="tag-badge">{{ tag }}</a>
{% endfor %}
</span>
@@ -429,6 +443,15 @@
font-style: italic;
}
.pin-badge {
background: #fff3cd;
color: #856404;
padding: 0.2rem 0.5rem;
border-radius: 4px;
font-size: 0.85rem;
font-weight: 500;
}
/* Modal styles */
.modal-content {
max-width: 500px;