diff --git a/apps/main/templates/base.html b/apps/main/templates/base.html index bce7da29e6..d611749921 100644 --- a/apps/main/templates/base.html +++ b/apps/main/templates/base.html @@ -41,6 +41,66 @@ right: 20px; left: auto; } + + .tags { + margin: 0; + padding: 0; + right: 24px; + bottom: -12px; + list-style: none; + } + + .tags li { + float:left; + height: 18px; + line-height: 18px; + position:relative; + font-size: 11px; + margin-left: 15px; + padding: 0 5px 0 15px; + background: #0089e0; + color: black; + text-decoration: none; + -moz-border-radius-bottomright: 4px; + -webkit-border-bottom-right-radius: 4px; + border-bottom-right-radius: 4px; + -moz-border-radius-topright: 4px; + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + + border-top-left-radius: 12px; + -moz-border-radius-topleft: 12px; + -webkit-border-top-left-radius: 12px; + + border-bottom-left-radius: 12px; + -moz-border-radius-bottomleft: 12px; + -webkit-border-bottom-left-radius: 12px; + + /*border:1px solid #ccc;*/ + border: 1px solid rgba(0, 0, 0, 0.4); + -moz-box-shadow: 1px 1px 2px #888; + -webkit-box-shadow: 1px 1px 2px #888; + box-shadow: 1px 1px 2px #888; + + text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #fff, 0 0 40px #fff, 0 0 70px #fff, 0 0 80px #fff, 0 0 100px #fff, 0 0 150px #fff; + } + + .tags li:after { + content: ""; + position: absolute; + top: 7px; + left: 5px; + float: left; + width: 4px; + height: 4px; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + border-radius: 2px; + background: #fff; + -moz-box-shadow: -1px -1px 2px #004977; + -webkit-box-shadow: -1px -1px 2px #004977; + box-shadow: -1px -1px 2px #004977; + } {% block stylesheets %}{% endblock %} {% endblock %} diff --git a/apps/tags/widgets.py b/apps/tags/widgets.py index b73184dac3..571a462d8e 100644 --- a/apps/tags/widgets.py +++ b/apps/tags/widgets.py @@ -7,7 +7,6 @@ def get_tags_inline_widget(document): A tag widget that includes the total tag count for a given document """ tags_template = [] - tag_block_template = u'
%s
' tag_count = document.tags.count() if tag_count: tags_template.append(u'
') @@ -15,8 +14,9 @@ def get_tags_inline_widget(document): 'tag_string': _(u'Tags'), 'tag_count': tag_count}) for tag in document.tags.all(): - tags_template.append(tag_block_template % (tag.tagproperties_set.get().get_color_code(), tag.name)) - + tags_template.append(u'' % (tag.tagproperties_set.get().get_color_code(), tag.name)) + + tags_template.append(u'
') tags_template.append(u'
') return mark_safe(u''.join(tags_template)) @@ -27,15 +27,15 @@ def get_tags_inline_widget_simple(document): given document """ tags_template = [] - tag_block_template = u'
%s
' + tag_count = document.tags.count() if tag_count: - tags_template.append(u'
') - + tags_template.append('') - tags_template.append(u'
') return mark_safe(u''.join(tags_template))