[damned-lies] Convert base and index templates to HTML 5



commit 04fdb5f2c7a4b40f3ddbe0cb98a8c9a7945aff17
Author: Claude Paroz <claude 2xlibre net>
Date:   Sat Aug 20 22:48:37 2011 +0200

    Convert base and index templates to HTML 5

 media/css/layout.css |    4 +++
 media/css/main.css   |    6 ++++
 templates/base.html  |   30 ++++++++++------------
 templates/index.html |   65 +++++++++++++++++++++++++------------------------
 4 files changed, 57 insertions(+), 48 deletions(-)
---
diff --git a/media/css/layout.css b/media/css/layout.css
index 495cbfb..1fd824e 100644
--- a/media/css/layout.css
+++ b/media/css/layout.css
@@ -65,6 +65,10 @@ a:active {
   display: inline;
 }
 
+.reset {
+  clear: both;
+}
+
 /* Common page elements: Header, footer, etc. */
 
 #logo {
diff --git a/media/css/main.css b/media/css/main.css
index 4b242ec..bf3db11 100644
--- a/media/css/main.css
+++ b/media/css/main.css
@@ -1,3 +1,9 @@
+div.bloc50 {
+  width: 48%;
+  padding: 4px;
+  float:left;
+}
+
 pre {
   white-space: pre-wrap;
 }
diff --git a/templates/base.html b/templates/base.html
index 1ef1beb..b1e70db 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -1,18 +1,16 @@
 {% load i18n %}
 {% load stats_extras %}
-<!DOCTYPE html
-     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
-<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="{{ LANGUAGE_CODE }}" lang="{{ LANGUAGE_CODE }}">
+<!DOCTYPE html>
+<html lang="{{ LANGUAGE_CODE }}">
 <head>
-  <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+  <meta charset="UTF-8">
   <title>{% block title %}page title{% endblock %}</title>
-  <link rel="icon" type="image/png" href="/media/img/foot-16.png"/>
-  <link rel="stylesheet" href="/media/css/main.css"/>
-  <link rel="stylesheet" href="/media/css/layout.css"/>
-  <link rel="stylesheet" href="/media/css/style.css"/>
+  <link rel="icon" type="image/png" href="/media/img/foot-16.png">
+  <link rel="stylesheet" href="/media/css/main.css">
+  <link rel="stylesheet" href="/media/css/layout.css">
+  <link rel="stylesheet" href="/media/css/style.css">
 {% if LANGUAGE_BIDI %}
-  <link rel="stylesheet" href="/media/css/rtl.css"/>
+  <link rel="stylesheet" href="/media/css/rtl.css">
 {% endif %}
   <script type="text/javascript" src="{{ MEDIA_URL }}js/main.js"></script>
   <script type="text/javascript" src="{{ MEDIA_URL }}js/jquery.min.js"></script>
@@ -69,9 +67,9 @@
   <div id="authenticated">
     {% if user.is_authenticated %}
     <form action="{% url login %}" method="post">
-      <a href="{{ user.get_absolute_url }}"><img src="{{ MEDIA_URL }}img/nobody-16.png" alt="Person"/>&nbsp;{{ user.person }}</a> &bull;
-      <input type="hidden" name="logout" value="1" />
-      <input type="submit" value="{% trans 'Log out' %}" />
+      <a href="{{ user.get_absolute_url }}"><img src="{{ MEDIA_URL }}img/nobody-16.png" alt="Person">&nbsp;{{ user.person }}</a> &bull;
+      <input type="hidden" name="logout" value="1">
+      <input type="submit" value="{% trans 'Log out' %}">
     </form>
     {% else %}
     <a href="{% url login %}">{% trans "Log in" %}</a>
@@ -92,9 +90,9 @@
 
   <div id="footer">
     {% trans "Copyright &copy; 2006-2009" %} <a href="http://www.gnome.org/";>{% trans "The GNOME Project" %}</a>.
-    <br />
-{% trans "Maintained in the <a href='http://git.gnome.org/browse/damned-lies/'>damned-lies</a> module on <a href='http://git.gnome.org/'>git.gnome.org</a>" %}
- <br />
+    <br>
+    {% trans "Maintained in the <a href='http://git.gnome.org/browse/damned-lies/'>damned-lies</a> module on <a href='http://git.gnome.org/'>git.gnome.org</a>" %}
+    <br>
     {% blocktrans with "<a href='http://www.canonical.com/'>Canonical</a>" as link %}Hosted by {{ link }}.{% endblocktrans %}
   </div>
 
diff --git a/templates/index.html b/templates/index.html
index d9eb588..a91eff6 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -8,51 +8,52 @@
 
 <h1>{% trans "Damned Lies about GNOME" %}</h1>
 
-<table><tr><td width="50%" valign="top">
-
-<h2><a href="{% url teams %}">{% trans "Teams" %}</a></h2>
-<p>{% trans "List of all GNOME Translation Teams, with full information such as primary contact (coordinator), web pages and mailing list information." %}
+<div class="bloc50">
+  <h2><a href="{% url teams %}">{% trans "Teams" %}</a></h2>
+  <p>{% trans "List of all GNOME Translation Teams, with full information such as primary contact (coordinator), web pages and mailing list information." %}
   {% trans "If there is no team for your language, you can easily <a href='http://live.gnome.org/TranslationProject/StartingATeam/'>start your own team</a>." %}
-{% if user_language %}
-  {% with user_language.get_team_url as team_url %}
-  {% with user_language.get_name as language_name %}
-  <br /><strong>{% blocktrans %}Go to the <a href='{{ team_url }}'>{{ language_name }} team page</a> and help us to translate GNOME!{% endblocktrans %}</strong>
-  {% endwith %}
-  {% endwith %}
-{% endif %}
-</p>
-
-</td><td valign="top">
+  {% if user_language %}
+    {% with user_language.get_team_url as team_url %}
+    {% with user_language.get_name as language_name %}
+    <br><strong>{% blocktrans %}Go to the <a href='{{ team_url }}'>{{ language_name }} team page</a> and help us to translate GNOME!{% endblocktrans %}</strong>
+    {% endwith %}
+    {% endwith %}
+  {% endif %}
+  </p>
+</div>
 
-<h2><a href="{% url languages %}">{% trans "Languages" %}</a></h2>
-{% url teams as teams_url %}
-<p>{% blocktrans %}List of all languages there are <a href='{{ teams_url }}'>Translation Teams</a> for.{% endblocktrans %}
+<div class="bloc50">
+  <h2><a href="{% url languages %}">{% trans "Languages" %}</a></h2>
+  {% url teams as teams_url %}
+  <p>{% blocktrans %}List of all languages there are <a href='{{ teams_url }}'>Translation Teams</a> for.{% endblocktrans %}
   {% trans "Some teams manage more than one language (usually just simple variants), and here you can see all the languages GNOME is being translated to." %}</p>
+</div>
 
-</td></tr><tr><td valign="top">
-
-<h2><a href="{% url releases %}">{% trans "Release Sets" %}</a></h2>
-<p>{% trans "List of all GNOME release sets and releases we gather stats for." %}</p>
+<div class="bloc50 reset">
+  <h2><a href="{% url releases %}">{% trans "Release Sets" %}</a></h2>
+  <p>{% trans "List of all GNOME release sets and releases we gather stats for." %}</p>
 
-<p>{% trans "Examples of release sets are &quot;GNOME Infrastructure&quot; or &quot;GNOME 2.26&quot;." %}
+  <p>{% trans "Examples of release sets are &quot;GNOME Infrastructure&quot; or &quot;GNOME 2.26&quot;." %}
   {% trans "Official GNOME release sets are further divided into categories such as &quot;Desktop Applications&quot; and &quot;Developer Platform&quot;." %}</p>
 
-<p>{% trans "Look here if you want to compare language support in any of these release sets." %}</p>
-</td><td valign="top">
+  <p>{% trans "Look here if you want to compare language support in any of these release sets." %}</p>
+</div>
 
-<h2><a href="{% url modules %}">{% trans "Modules" %}</a></h2>
-<p>{% trans "List of all modules with statistics in here." %}</p>
+<div class="bloc50">
+  <h2><a href="{% url modules %}">{% trans "Modules" %}</a></h2>
+  <p>{% trans "List of all modules with statistics in here." %}</p>
 
-<p>{% trans "Modules are separate libraries or applications, with one or more branches of development included." %}
+  <p>{% trans "Modules are separate libraries or applications, with one or more branches of development included." %}
   {% trans "They are usually taken from the Git repository, and we keep all relevant information on them (Bugzilla details, web page, maintainer information,...)." %}</p>
+</div>
 
-</td></tr></table>
-
+<div class="reset">
 {% if translator_credits %}
-<p class="footnote">
-  {% trans "Translated by:" %} {{ translator_credits|join:", " }}
-</p>
+  <p class="footnote">
+    {% trans "Translated by:" %} {{ translator_credits|join:", " }}
+  </p>
 {% endif %}
+</div>
 
 </div>
 {% endblock %}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]