Add icon to tags on notes.

This commit is contained in:
Matias De lellis
2020-05-26 23:31:02 -03:00
parent dbc36aebd4
commit 6a97bf0991
4 changed files with 12 additions and 5 deletions

View File

@@ -221,9 +221,16 @@ div[contenteditable="true"] {
.slim-tag {
display: inline-block;
padding: 3px 5px;
padding: 0px 6px 0 24px;
background-color: rgba(0,0,0,0.08);
border-radius: 12px;
background-position: 8px center;
opacity: 0.7;
border-radius: 10px;
font-size: 90%;
}
.note-tags {
margin-top: 10px;
}
/* Restore defaults select2 rules */

View File

@@ -675,7 +675,7 @@ View.prototype = {
modalTags.html('');
newTags.forEach(function (item, index) {
var noteId = parseInt(item.id) || -1;
var tag = $('<div class="slim-tag" tag-id="' + noteId + '">' + item.text + '</div>');
var tag = $('<div class="icon-tag slim-tag" tag-id="' + noteId + '">' + item.text + '</div>');
modalTags.append(tag);
});
}

View File

@@ -27,7 +27,7 @@
</div>
<div class='note-tags'>
{{#each tags}}
<div class="slim-tag" tag-id="{{ id }}">{{{ name }}}</div>
<div class="icon-tag slim-tag" tag-id="{{ id }}">{{{ name }}}</div>
{{/each}}
</div>
{{/if}}

View File

@@ -30,7 +30,7 @@
</div>
<div class='note-tags'>
{{#each tags}}
<div class='slim-tag' tag-id="{{ id }}">
<div class='icon-tag slim-tag' tag-id="{{ id }}">
{{{ name }}}
</div>
{{/each}}