diff options
-rwxr-xr-x | css/style.css | 36 | ||||
-rwxr-xr-x | pyAggr3g470r.py | 24 |
2 files changed, 51 insertions, 9 deletions
diff --git a/css/style.css b/css/style.css index 295ea3c0..ffc43543 100755 --- a/css/style.css +++ b/css/style.css @@ -341,4 +341,38 @@ blockquote.right { max-height: 300px; overflow: scroll; margin-top: 0.5em; -}
\ No newline at end of file +} + +/* CSS ToolTips */ +.tooltip { + color: #000000; outline: none; + text-decoration: none; + position: relative; + } + .tooltip span { + margin-left: -999em; + position: absolute; + } + .tooltip:hover span { + border-radius: 5px 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.1); -webkit-box-shadow: 5px 5px rgba(0, 0, 0, 0.1); -moz-box-shadow: 5px 5px rgba(0, 0, 0, 0.1); + font-family: Calibri, Tahoma, Geneva, sans-serif; + position: absolute; left: 1em; top: 2em; z-index: 99; + margin-left: 0; width: 250px; + } + .tooltip:hover img { + border: 0; margin: -10px 0 0 -55px; + float: left; position: absolute; + } + .tooltip:hover em { + font-family: Candara, Tahoma, Geneva, sans-serif; font-size: 1.2em; font-weight: bold; + display: block; padding: 0.2em 0 0.6em 0; + } + .classic { padding: 0.8em 1em; } + .custom { padding: 0.5em 0.8em 0.8em 2em; } + * html a:hover { background: transparent; } + .classic {background: #FFFFAA; border: 1px solid #FFAD33; } + .critical { background: #FFCCAA; border: 1px solid #FF3334; } + .help { background: #9FDAEE; border: 1px solid #2BB0D7; } + .info { background: #9FDAEE; border: 1px solid #2BB0D7; } + .warning { background: #FFFFAA; border: 1px solid #FFAD33;
\ No newline at end of file diff --git a/pyAggr3g470r.py b/pyAggr3g470r.py index 31c1c875..15353150 100755 --- a/pyAggr3g470r.py +++ b/pyAggr3g470r.py @@ -131,7 +131,7 @@ class Root: if self.articles: html += '<a href="/management/"><img src="/css/img/management.png" title="Management" /></a>\n' html += '<a href="/history/"><img src="/css/img/history.png" title="History" /></a>\n' - html += ' | ' + html += ' ' html += """<a href="/list_favorites/"><img src="/css/img/heart-22x22.png" title="Your favorites (%s)" /></a>\n""" % \ (self.nb_favorites,) @@ -139,7 +139,7 @@ class Root: html += """<a href="/list_notification/"><img src="/css/img/email-follow.png" title="Active e-mail notifications (%s)" /></a>\n""" % \ (self.nb_mail_notifications,) - html += ' | ' + html += ' ' html += '<a href="/mark_as_read/All"><img src="/css/img/mark-as-read.png" title="Mark articles as read" /></a>\n' if self.nb_unread_articles != 0: html += """<a href="/unread/All"><img src="/css/img/email-unread.png" title="Unread article(s): %s" /></a>\n""" % \ @@ -175,12 +175,20 @@ class Root: else: like = "" - # title of the article - html += article[1].encode('utf-8') + \ - " - " + not_read_begin + \ - """<a href="/description/%s:%s" rel="noreferrer" target="_blank">%s</a>""" % \ - (rss_feed_id, article[0].encode('utf-8'), article[2].encode('utf-8')[:150]) + \ - not_read_end + like + \ + # descrition for the CSS ToolTips + article_content = utils.clear_string(article[4].encode('utf-8')) + if article_content: + description = " ".join(article_content[:500].split(' ')[:-1]) + else: + description = "No description." + + # a description line per article (date, title of the article and + # CSS description tooltips on mouse over) + html += article[1].encode('utf-8') + " - " + \ + """<a class="tooltip" href="/description/%s:%s" rel="noreferrer" target="_blank">%s%s%s<span class="classic">%s</span></a>""" % \ + (rss_feed_id, article[0].encode('utf-8'), not_read_begin, \ + " ".join(article[2].encode('utf-8')[:150].split(' ')[:-1]), \ + not_read_end, description) + like + \ "<br />\n" html += "<br />\n" |