Improved tag rendering

This commit is contained in:
Eduard Urbach 2017-10-16 01:35:28 +02:00
parent ed82c71220
commit 4a6f54ec52
3 changed files with 5 additions and 3 deletions

View File

@ -23,7 +23,7 @@ component InputTags(id string, value []string, label string, tooltip string)
label(for=id)= label + ":" label(for=id)= label + ":"
.tags(id=id) .tags(id=id)
for index, tag := range value for index, tag := range value
.tag .tag.tag-edit
span.tag-title.action(contenteditable="true", data-trigger="focusout", data-action="save", data-field=id + "[" + strconv.Itoa(index) + "]")= tag span.tag-title.action(contenteditable="true", data-trigger="focusout", data-action="save", data-field=id + "[" + strconv.Itoa(index) + "]")= tag
button.tag-remove.action(data-action="arrayRemove", data-trigger="click", data-field=id, data-index=index) button.tag-remove.action(data-action="arrayRemove", data-trigger="click", data-field=id, data-index=index)
RawIcon("trash") RawIcon("trash")

View File

@ -24,9 +24,9 @@ component Track(track *arn.SoundTrack)
.widget.mountable .widget.mountable
h3.widget-title Tags h3.widget-title Tags
ul .tags
each tag in track.Tags each tag in track.Tags
li= tag .tag= tag
.footer.text-center.mountable .footer.text-center.mountable
if track.EditedBy != "" if track.EditedBy != ""

View File

@ -10,6 +10,8 @@ mixin tag-dimensions
ui-element ui-element
tag-dimensions tag-dimensions
margin-right 0 margin-right 0
.tag-edit
border-right none border-right none
border-top-right-radius 0 border-top-right-radius 0
border-bottom-right-radius 0 border-bottom-right-radius 0