# HG changeset patch # User souliane # Date 1448407361 -3600 # Node ID 7390cba0bb44385d0ae962195c0e33a5bad1e13d # Parent 8eeb98659de27716bd509655bdfa350c497db4d9 browser_side: display tags with nice icons like for the static blog diff -r 8eeb98659de2 -r 7390cba0bb44 src/browser/public/libervia.css --- a/src/browser/public/libervia.css Tue Nov 24 23:28:55 2015 +0100 +++ b/src/browser/public/libervia.css Wed Nov 25 00:22:41 2015 +0100 @@ -956,6 +956,31 @@ left: -20px; } +/* START TAGS: styles are adapted from Dotclear */ +.mblog_tags { + background: #fbfbfb none repeat scroll 0% 0%; + padding: 5px; + margin: 8px 0px 0px; + overflow: hidden; + border-radius: 5px; +} + +.mblog_tags li { + display: inline; + font-size: small; +} + +.mblog_tags li a { + float: left; + padding: 2px 8px 2px 18px; + white-space: nowrap; + color: #005D99; + text-decoration: none; + background: transparent url("../themes/default/images/blueSilence/tag.png") no-repeat scroll 0px 0px; +} +/* END TAGS */ + + /* Chat & MUC Room */ .chatPanel { diff -r 8eeb98659de2 -r 7390cba0bb44 src/browser/sat_browser/richtext.py --- a/src/browser/sat_browser/richtext.py Tue Nov 24 23:28:55 2015 +0100 +++ b/src/browser/sat_browser/richtext.py Wed Nov 25 00:22:41 2015 +0100 @@ -323,11 +323,15 @@ content = self._original_content text = content['text'] if 'title' in content and content['title']: - text = '

%s

%s' % (html_tools.html_sanitize(content['title']), text) - tags = list(common.dict2iter('tag', content)) - if tags: # FIXME: display it more beautiful - text = '%s

%s %s

' % (text, _("Tags:"), html_tools.html_sanitize(", ".join(tags))) - self.display.setContent({'text': text}) + title = '

%s

' % html_tools.html_sanitize(content['title']) + + tags = "" + for tag in common.dict2iter('tag', content): + tags += "
  • %s
  • " % html_tools.html_sanitize(tag) + if tags: + tags = '' % tags + + self.display.setContent({'text': "%s%s%s" % (title, tags, text)}) def setFocus(self, focus): self.textarea.setFocus(focus) diff -r 8eeb98659de2 -r 7390cba0bb44 themes/default/styles/blog.css --- a/themes/default/styles/blog.css Tue Nov 24 23:28:55 2015 +0100 +++ b/themes/default/styles/blog.css Wed Nov 25 00:22:41 2015 +0100 @@ -135,7 +135,7 @@ white-space: nowrap; color: #005D99; text-decoration: none; - background: transparent url("../images/blueSilence/tag.png") no-repeat scroll 0px 0px; + background: transparent url("../images/blueSilence/tag.png") no-repeat scroll 0px 0px; } /* END TAGS */