diff options
-rwxr-xr-x | source/pyAggr3g470r.py | 6 | ||||
-rw-r--r-- | source/templates/base.html | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/source/pyAggr3g470r.py b/source/pyAggr3g470r.py index 5d9fc2f3..a399a23d 100755 --- a/source/pyAggr3g470r.py +++ b/source/pyAggr3g470r.py @@ -142,12 +142,6 @@ class pyAggr3g470r(object): nb_unread_articles = self.mongo.nb_unread_articles() nb_favorites = self.mongo.nb_favorites() nb_mail_notifications = self.mongo.nb_mail_notifications() - - # if there are unread articles, display the number in the tab of the browser - html = htmlheader((nb_unread_articles and \ - ['(' + str(nb_unread_articles) +')'] or \ - [""])[0]) - tmpl = lookup.get_template("index.html") return tmpl.render(feeds=feeds, nb_feeds=len(feeds), mongo=self.mongo, \ nb_favorites=nb_favorites, nb_unread_articles=nb_unread_articles, \ diff --git a/source/templates/base.html b/source/templates/base.html index 6b60703e..75776128 100644 --- a/source/templates/base.html +++ b/source/templates/base.html @@ -2,7 +2,13 @@ <!DOCTYPE html> <html> <head> - <title>pyAggr3g470r - News aggregator</title> + %if nb_unread_articles is UNDEFINED: + <title>pyAggr3g470r</title> + %elif nb_unread_articles == 0: + <title>pyAggr3g470r</title> + %else: + <title>${nb_unread_articles} - pyAggr3g470r</title> + %endif <link rel="stylesheet" type="text/css" href="/css/style.css" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script> @@ -11,7 +17,7 @@ <div class="right innerlogo"> <a href="/"><img src="/img/tuxrss.png" title="What's new today?"/></a> </div> - <a name="top"><a href="/"><h1>pyAggr3g470r - News aggregator</h1></a></a> + <a name="top"><a href="/"><h1>pyAggr3g470r</h1></a></a> ${self.body()} @@ -21,4 +27,4 @@ <a href="https://bitbucket.org/cedricbonhomme/pyaggr3g470r/" rel="noreferrer" target="_blank">Source code</a> of pyAggr3g470r.</p> </div> </body> -</html>
\ No newline at end of file +</html> |