From 4a6f54ec52c3a63cd243627f42031cb2bfaeb5be Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Mon, 16 Oct 2017 01:35:28 +0200 Subject: [PATCH] Improved tag rendering --- mixins/Input.pixy | 2 +- pages/soundtrack/soundtrack.pixy | 4 ++-- styles/tags.scarlet | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/mixins/Input.pixy b/mixins/Input.pixy index df1a39e8..a85ac9c2 100644 --- a/mixins/Input.pixy +++ b/mixins/Input.pixy @@ -23,7 +23,7 @@ component InputTags(id string, value []string, label string, tooltip string) label(for=id)= label + ":" .tags(id=id) 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 button.tag-remove.action(data-action="arrayRemove", data-trigger="click", data-field=id, data-index=index) RawIcon("trash") diff --git a/pages/soundtrack/soundtrack.pixy b/pages/soundtrack/soundtrack.pixy index 37640406..cbf7f071 100644 --- a/pages/soundtrack/soundtrack.pixy +++ b/pages/soundtrack/soundtrack.pixy @@ -24,9 +24,9 @@ component Track(track *arn.SoundTrack) .widget.mountable h3.widget-title Tags - ul + .tags each tag in track.Tags - li= tag + .tag= tag .footer.text-center.mountable if track.EditedBy != "" diff --git a/styles/tags.scarlet b/styles/tags.scarlet index 7c0638a1..7ddebfea 100644 --- a/styles/tags.scarlet +++ b/styles/tags.scarlet @@ -10,6 +10,8 @@ mixin tag-dimensions ui-element tag-dimensions margin-right 0 + +.tag-edit border-right none border-top-right-radius 0 border-bottom-right-radius 0