]> git.ipfire.org Git - ipfire.org.git/commitdiff
Update planet to use the new layout.
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 19 Feb 2013 11:11:05 +0000 (12:11 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 19 Feb 2013 11:13:06 +0000 (12:13 +0100)
static/css/style.css
templates/modules/planet-entry.html
templates/planet-main.html [deleted file]
templates/planet-user.html [deleted file]
templates/planet/base.html [new file with mode: 0644]
templates/planet/index.html [new file with mode: 0644]
templates/planet/posting.html [moved from templates/planet-posting.html with 91% similarity]
templates/planet/user.html [new file with mode: 0644]
templates/rss.xml
webapp/handlers_planet.py

index 883e690735836f65746dbf8306a9d6e32d7e5f4c..69cde60988a8db7ddd884ccd647bdf3056861c55 100644 (file)
@@ -15,6 +15,18 @@ body {
        text-align: center;
 }
 
+.clear {
+       clear: both;
+}
+
+.separator {
+  margin: 40px 0 39px;
+}
+
+.img-padding {
+       padding: 10px;
+}
+
 table.table-fireinfo td.bar {
        width: 70%;
 }
index 6cd520f7a12ee9760cddac51437469068307f897..d71d7ee786bdb3628996a1f9dc858c975f68b02c 100644 (file)
@@ -1,22 +1,18 @@
-<div class="row">
-       <div class="span9">
-               {% if show_avatar %}
-                       <a class="pull-right" href="/user/{{ entry.author.uid }}">
-                               <img class="img-polaroid" src="{{ entry.author.gravatar_icon(96) }}" alt="{{ entry.author.cn }}" />
-                       </a>
-               {% end %}
+{% if show_avatar %}
+       <a class="pull-right" href="/user/{{ entry.author.uid }}">
+               <img class="img-rounded img-padding" src="{{ entry.author.gravatar_icon(96) }}" alt="{{ entry.author.cn }}" />
+       </a>
+{% end %}
 
-               <h2>
-                       <a href="/post/{{ entry.slug }}">{{ entry.title }}</a>
-               </h2>
+<h2>
+       <a href="/post/{{ entry.slug }}">{{ entry.title }}</a>
+</h2>
 
-               {% raw entry.text %}
+{% raw entry.text %}
 
-               <p class="pull-right" style="clear: both;">
-                       {{ _("Posted by") }} <a href="/user/{{ entry.author.uid }}">{{ entry.author.cn }}</a>
-                       {{ _("on") }} {{ locale.format_date(entry.published, shorter=True) }}
-               </p>
-       </div>
-</div>
+<p class="pull-right clear">
+       {{ _("Posted by") }} <a href="/user/{{ entry.author.uid }}">{{ entry.author.cn }}</a>
+       {{ _("on") }} {{ locale.format_date(entry.published, shorter=True) }}
+</p>
 
-<hr>
+<hr class="separator clear">
diff --git a/templates/planet-main.html b/templates/planet-main.html
deleted file mode 100644 (file)
index c124b6a..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-{% extends "base-2.html" %}
-
-{% block title %}{{ _("IPFire Planet") }}{% end block %}
-
-{% block bodyA %}
-       <div class="page-header">
-               <h1>{{ _("IPFire Planet") }}</h1>
-       </div>
-
-       <div class="row">
-               <div class="span9">
-                       {% if lang == "de" %}
-                               <p>
-                                       Der <strong>IPFire Planet</strong> ist eine Plattform für alle
-                                       Personen, die in das Projekt involviert sind um mit der
-                                       Community in Kontakt zu bleiben und sie über neue Entwicklungen
-                                       zu informieren.
-                               </p>
-                               <p>
-                                       Um den Aufwand für die Entwickler in Maßen zu halten sind
-                                       alle Einträge nur auf Englisch verfügbar.
-                               </p>
-                       {% else %}
-                               <p>
-                                       The <strong>IPFire Planet</strong> is a place for the people
-                                       who are involved in the project to tell the community about
-                                       new progress in the development or make some minor announcements.
-                               </p>
-                       {% end %}
-                       
-                       <hr>
-               </div>
-       </div>
-
-       {% for entry in entries %}
-               {% module PlanetEntry(entry) %}
-       {% end %}
-
-       <div class="row">
-               <div class="span9">
-                       <ul class="pager">
-                               <li class="previous">
-                                       <a href="?offset={{ offset }}">&larr; {{ _("Older posts") }}</a>
-                               </li>
-                               {% if offset - limit %}
-                                       <li class="next">
-                                               <a href="?offset={{ offset - (2 * limit) }}">{{ _("Newer posts") }} &rarr;</a>
-                                       </li>
-                               {% end %}
-                       </ul>
-               </div>
-       </div>
-{% end block %}
-
-{% block bodyB %}
-       <div class="row">
-               <div class="span3">
-                       <h3>{{ _("Subscribe") }}</h3>
-
-                       {% if lang == "de" %}
-                               XXX GERMAN TEXT MISSING
-                       {% else %}
-                               <p>
-                                       Click on the button below to subscribe to the IPFire planet feed.
-                                       Add it to you favourite news reader and you will see new
-                                       posts immediately.
-                               </p>
-                       {% end %}
-
-                       <p style="text-align: center;">
-                               <a class="btn" href="http://planet.ipfire.org/rss">
-                                       <i class="icon-globe"></i> {{ _("Feed") }}
-                               </a>
-                       </p>
-
-                       <hr>
-               </div>
-       </div>
-
-       <div class="row">
-               <div class="span3">
-                       <h4>{{ _("People on the IPFire planet") }}</h4>
-                       <ul>
-                               {% for author in authors %}
-                                       <li>
-                                               <a href="/user/{{ author.uid }}">{{ author.cn }}</a>
-                                       </li>
-                               {% end %}
-                       </ul>
-               </div>
-       </div>
-{% end %}
diff --git a/templates/planet-user.html b/templates/planet-user.html
deleted file mode 100644 (file)
index 1ba3f71..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-{% extends "base-2.html" %}
-
-{% block title %}{{ _("IPFire Planet") }} - {{ author.cn }}{% end block %}
-
-{% block bodyA %}
-       <div class="page-header">
-               <h1>{{ author.cn }}'s posts</h1>
-       </div>
-
-       {% if entries %}
-               {% for entry in entries %}
-                       {% module PlanetEntry(entry, show_avatar=False) %}
-               {% end %}
-
-               <div class="row">
-                       <div class="span9">
-                               <ul class="pager">
-                                       <li class="previous">
-                                               <a href="?offset={{ offset }}">&larr; {{ _("Older posts") }}</a>
-                                       </li>
-                                       {% if offset - limit %}
-                                               <li class="next">
-                                                       <a href="?offset={{ offset - (2 * limit) }}">{{ _("Newer posts") }} &rarr;</a>
-                                               </li>
-                                       {% end %}
-                               </ul>
-                       </div>
-               </div>
-       {% else %}
-                       <p>{{ _("%s did not write any posts, yet.") % author.cn }}</p>
-       {% end %}
-{% end block %}
-
-{% block bodyB %}
-       <div class="well">
-               <img class="img-rounded" src="{{ author.gravatar_icon(232) }}" alt="{{ author.cn }}" />
-               <hr>
-               <a href="/user/{{ author.uid }}">
-                       <i class="icon-user"></i>
-                       {{ escape(author.cn) }}
-               </a>
-               <hr>
-               <a href="mailto:{{ author.email }}">
-                       <i class="icon-envelope"></i> {{ _("Mail") }}
-               </a>
-       </div>
-{% end block %}
diff --git a/templates/planet/base.html b/templates/planet/base.html
new file mode 100644 (file)
index 0000000..be96d4f
--- /dev/null
@@ -0,0 +1,10 @@
+{% extends "../base.html" %}
+
+{% block header %}
+       <header class="jumbotron subhead" id="overview">
+               <div class="container">
+                       <h1>{{ _("IPFire Planet") }}</h1>
+                       <p class="lead">{{ _("The official blog of the IPFire team") }}</p>
+               </div>
+       </header>
+{% end header %}
diff --git a/templates/planet/index.html b/templates/planet/index.html
new file mode 100644 (file)
index 0000000..94dcabf
--- /dev/null
@@ -0,0 +1,40 @@
+{% extends "base.html" %}
+
+{% block title %}{{ _("IPFire Planet") }}{% end block %}
+
+{% block body %}
+       <div class="ac">
+               <p class="lead">
+                       The <strong>IPFire Planet</strong> is a place for the people
+                       who are involved in the project to tell the community about
+                       new progress in the development or make some minor announcements.
+               </p>
+
+               <p>
+                       <a class="btn btn-primary btn-large" href="http://planet.ipfire.org/rss">
+                               Subscribe to our RSS feed to stay up to date.
+                       </a>
+               </p>
+       </div>
+
+       <hr class="separator">
+
+       {% for entry in entries %}
+               {% module PlanetEntry(entry) %}
+       {% end %}
+
+       <div class="row">
+               <div class="span9">
+                       <ul class="pager">
+                               <li class="previous">
+                                       <a href="?offset={{ offset }}">&larr; {{ _("Older posts") }}</a>
+                               </li>
+                               {% if offset - limit %}
+                                       <li class="next">
+                                               <a href="?offset={{ offset - (2 * limit) }}">{{ _("Newer posts") }} &rarr;</a>
+                                       </li>
+                               {% end %}
+                       </ul>
+               </div>
+       </div>
+{% end block %}
similarity index 91%
rename from templates/planet-posting.html
rename to templates/planet/posting.html
index 4c0895008d5be45e9bd3411d36cea15d6e447e4f..c4e972425c3113c1ea438ca7545210582e866261 100644 (file)
@@ -1,12 +1,12 @@
-{% extends "planet-user.html" %}
+{% extends "user.html" %}
 
 {% block title %}{{ _("IPFire Planet") }} - {{ entry.title }}{% end block %}
 
 {% block bodyA %}
        <div class="page-header">
-               <h2>
+               <h1>
                        <a href="/post/{{ entry.slug }}">{{ entry.title }}</a>
-               </h2>
+               </h1>
        </div>
 
        <div class="row">
diff --git a/templates/planet/user.html b/templates/planet/user.html
new file mode 100644 (file)
index 0000000..82387c1
--- /dev/null
@@ -0,0 +1,53 @@
+{% extends "base.html" %}
+
+{% block title %}{{ _("IPFire Planet") }} - {{ author.cn }}{% end block %}
+
+{% block body %}
+       <div class="row">
+               <div class="span9">
+                       {% block bodyA %}
+                               <div class="page-header">
+                                       <h1>{{ author.cn }}'s posts</h1>
+                               </div>
+
+                               {% if entries %}
+                                       {% for entry in entries %}
+                                               {% module PlanetEntry(entry, show_avatar=False) %}
+                                       {% end %}
+
+                                       <div class="row">
+                                               <div class="span9">
+                                                       <ul class="pager">
+                                                               <li class="previous">
+                                                                       <a href="?offset={{ offset }}">&larr; {{ _("Older posts") }}</a>
+                                                               </li>
+                                                               {% if offset - limit %}
+                                                                       <li class="next">
+                                                                               <a href="?offset={{ offset - (2 * limit) }}">{{ _("Newer posts") }} &rarr;</a>
+                                                                       </li>
+                                                               {% end %}
+                                                       </ul>
+                                               </div>
+                                       </div>
+                               {% else %}
+                                               <p>{{ _("%s did not write any posts, yet.") % author.cn }}</p>
+                               {% end %}
+                       {% end block %}
+               </div>
+
+               <div class="span3">
+                       <div class="well">
+                               <img class="img-rounded" src="{{ author.gravatar_icon(232) }}" alt="{{ author.cn }}" />
+                               <hr>
+                               <a href="/user/{{ author.uid }}">
+                                       <i class="icon-user"></i>
+                                       {{ escape(author.cn) }}
+                               </a>
+                               <hr>
+                               <a href="mailto:{{ author.email }}">
+                                       <i class="icon-envelope"></i> {{ _("Mail") }}
+                               </a>
+                       </div>
+               </div>
+       </div>
+{% end block %}
index 67115358ef9ccf7586641c1404a178063f3bc341..1d6ee4b3c3e16a354163f8bc7eeee368f69b1e72 100644 (file)
@@ -16,7 +16,7 @@
                                <pubDate>{{ item.date.strftime("%a, %d %b %Y %H:%M:%S +0200") }}</pubDate>
                                <description>
                                        <![CDATA[
-                                               {{ item.text }}
+                                               {% raw item.text %}
                                        ]]>
                                </description>
                        </item>
index dcd82ec25e55487589ee1814ff5420da0bee9161..f3e27036617d44bb8ab8a507d290629991f773bd 100644 (file)
@@ -27,8 +27,7 @@ class PlanetMainHandler(PlanetBaseHandler):
 
                entries = self.planet.get_entries(offset=offset, limit=limit)
 
-               self.render("planet-main.html", entries=entries,
-                       authors=self.planet.get_authors(),
+               self.render("planet/index.html", entries=entries,
                        offset=offset + limit, limit=limit)
 
 
@@ -44,7 +43,7 @@ class PlanetUserHandler(PlanetBaseHandler):
                entries = self.planet.get_entries_by_author(author.uid,
                        offset=offset, limit=limit)
 
-               self.render("planet-user.html", author=author, entries=entries,
+               self.render("planet/user.html", author=author, entries=entries,
                        offset=offset + limit, limit=limit, rss_url="/user/%s/rss" % author.uid)
 
 
@@ -55,5 +54,5 @@ class PlanetPostingHandler(PlanetBaseHandler):
                if not entry:
                        raise tornado.web.HTTPError(404)
 
-               self.render("planet-posting.html",
+               self.render("planet/posting.html",
                        author=entry.author, entry=entry)