feat: Show note tags.
This commit is contained in:
parent
2a90ea8a26
commit
856ae09b16
@ -393,6 +393,11 @@ def render(headline, doc, headlineLevel):
|
|||||||
else:
|
else:
|
||||||
todo_state = "done"
|
todo_state = "done"
|
||||||
|
|
||||||
|
tag_list = []
|
||||||
|
for tag in headline.shallow_tags:
|
||||||
|
tag_list.append(f'<span class="tag">{html.escape(tag)}</span>')
|
||||||
|
tags = f'<span class="tags">{"".join(tag_list)}</span>'
|
||||||
|
|
||||||
# display_state = 'collapsed'
|
# display_state = 'collapsed'
|
||||||
# if headlineLevel < MIN_HIDDEN_HEADLINE_LEVEL:
|
# if headlineLevel < MIN_HIDDEN_HEADLINE_LEVEL:
|
||||||
# display_state = 'expanded'
|
# display_state = 'expanded'
|
||||||
@ -405,6 +410,7 @@ def render(headline, doc, headlineLevel):
|
|||||||
<a href=\"javascript:toggle_expand('{html.escape(headline.id)}')\">
|
<a href=\"javascript:toggle_expand('{html.escape(headline.id)}')\">
|
||||||
{render_inline(headline.title, render_tag)}
|
{render_inline(headline.title, render_tag)}
|
||||||
</a>
|
</a>
|
||||||
|
{tags}
|
||||||
</h1>
|
</h1>
|
||||||
<div class='contents'>
|
<div class='contents'>
|
||||||
{''.join(content)}
|
{''.join(content)}
|
||||||
|
@ -69,6 +69,22 @@ h1.title .state {
|
|||||||
h1.title .state.state-TODO {
|
h1.title .state.state-TODO {
|
||||||
background-color: rgba(255,0,0,0.5);
|
background-color: rgba(255,0,0,0.5);
|
||||||
}
|
}
|
||||||
|
h1.title .state.state-DONE {
|
||||||
|
background-color: rgba(0,255,0,0.25);
|
||||||
|
}
|
||||||
|
|
||||||
|
h1.title .tags {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
h1.title .tags .tag {
|
||||||
|
font-size: 50%;
|
||||||
|
vertical-align: middle;
|
||||||
|
/* background-color: rgba(255,255,255,0.3); */
|
||||||
|
background-color: rgba(0,0,0,0.1);
|
||||||
|
padding: 4px;
|
||||||
|
margin-left: 2px;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
/* Lists */
|
/* Lists */
|
||||||
li .tag {
|
li .tag {
|
||||||
|
Loading…
Reference in New Issue
Block a user