[Debbits-commit] [SCM] Git repository for debbits branch, master, updated. e689282c5f7d7219cdf34f930b7831bd16cc8d5d

Ana Beatriz Guerrero ?==?UTF-8?Q?López ana at ekaia.org
Fri Mar 22 22:09:03 UTC 2013


The following commit has been merged in the master branch:
commit e689282c5f7d7219cdf34f930b7831bd16cc8d5d
Author: Ana Beatriz Guerrero López <ana at ekaia.org>
Date:   Fri Mar 22 23:10:28 2013 +0100

    Add the theme and templates used in the blog

diff --git a/README b/README
index e69de29..769d1db 100644
--- a/README
+++ b/README
@@ -0,0 +1,8 @@
+This repository contains all the sources needed to maintain the Debian blog
+http://bits.debian.org
+
+
+Contents
+--------
+theme-bits/ contains the blog's theme and the templates used.
+
diff --git a/theme-bits/static/images/openlogo-nd-75.png b/theme-bits/static/images/openlogo-nd-75.png
new file mode 100644
index 0000000..045f241
Binary files /dev/null and b/theme-bits/static/images/openlogo-nd-75.png differ
diff --git a/theme-bits/static/images/rss.png b/theme-bits/static/images/rss.png
new file mode 100644
index 0000000..7d4e85d
Binary files /dev/null and b/theme-bits/static/images/rss.png differ
diff --git a/theme-bits/static/style.css b/theme-bits/static/style.css
new file mode 100644
index 0000000..ecc3060
--- /dev/null
+++ b/theme-bits/static/style.css
@@ -0,0 +1,79 @@
+/* 2013 - Ana Guerrero Lopez <ana at debian.org> */
+
+body {
+    font-family: tahoma,verdana,sans-serif;
+    /*font-family: Verdana, Arial, Helvetica, sans-serif;*/
+    font-size: 14px;
+}
+
+p {
+    padding: 10px;
+}
+
+a:link {
+   color: #C70038;
+   text-decoration: none
+}
+
+a:active {
+   color: #000000;
+   text-decoration: none
+}
+
+a:visited {
+    color: #C70038;
+	text-decoration: none
+}
+
+a:hover {
+    color: #FF0000;
+	text-decoration: underline
+}
+
+
+#wrapper {
+    margin: 0 auto;
+    width: 940px;
+}
+
+#header {
+    float: left;
+    height: 125px;
+    width: 940px;
+}
+
+/* This is for having "Bits from Debian" more aligned to the center */
+#header p {
+    font-size: 36px;
+	margin-left: 2.5cm;
+}
+
+#content {
+    float: left;
+    width: 690px;
+}
+
+#rightcolumn {
+    background: #fff;
+    width: 250px;
+    float: left;
+}
+
+#footer {
+    height: 30px;
+    width: 940px;
+	text-align:center;
+    clear: both;
+}
+
+
+.article h1 {
+    color: #C70038;
+}
+
+
+.lateral h1 {
+    font-size: 15px;
+	padding-left: 1em;
+	padding-top: 0em;
+}
diff --git a/theme-bits/templates/archives.html b/theme-bits/templates/archives.html
new file mode 100644
index 0000000..1520943
--- /dev/null
+++ b/theme-bits/templates/archives.html
@@ -0,0 +1,19 @@
+{% extends "base.html" %}
+{% block title %}{{ SITENAME }} <small>[archive]</small>{% endblock %}
+{% block content %}
+
+<h1>Archives</h1>
+
+<table class="table">
+    <tbody>
+    {% for article in dates %}
+        <tr>
+        <td>{{ article.date.strftime("%d %b %Y") }}</td>
+        <td><a href='{{ article.url }}'>{{ article.title }}</a></td>
+        </tr>
+    {% endfor %}
+    </tbody>
+</table>
+
+
+{% endblock %}
diff --git a/theme-bits/templates/article.html b/theme-bits/templates/article.html
new file mode 100644
index 0000000..897c061
--- /dev/null
+++ b/theme-bits/templates/article.html
@@ -0,0 +1,13 @@
+{% extends "base.html" %}
+{% block content %}
+    <div class='article'>
+        <div class="content-title">
+            <h1>{{ article.title }}</h1>
+            {% include "metadata.html" %}
+        </div>
+
+        <div>{{ article.content }}</div>
+
+        <hr>
+    </div>
+{% endblock %}
diff --git a/theme-bits/templates/author.html b/theme-bits/templates/author.html
new file mode 100644
index 0000000..3d6a6e5
--- /dev/null
+++ b/theme-bits/templates/author.html
@@ -0,0 +1,2 @@
+{% extends "index.html" %}
+{% block title %}{{ SITENAME }} <small>{{ author }}</small>{% endblock %}
diff --git a/theme-bits/templates/base.html b/theme-bits/templates/base.html
new file mode 100644
index 0000000..6fab80c
--- /dev/null
+++ b/theme-bits/templates/base.html
@@ -0,0 +1,97 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="utf-8">
+    <title>{% block windowtitle %}{{ SITENAME }}{% endblock %}</title>
+    <meta name="description" content="">
+    <meta name="author" content="{{ AUTHOR }}">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+    <!--[if IE]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
+    <!-- Styles -->
+    <link href="{{ SITEURL }}/theme/style.css" rel="stylesheet">
+</head>
+
+<body>
+
+<div id="wrapper">
+    <div id="header">
+        <a href="{{ SITEURL }}"><img align="left" class="logo" src="{{ SITEURL }}/theme/images/openlogo-nd-75.png" alt="{{ SITENAME }}" align="left" style="margin-top: 20px;"></a>
+        <p>Bits from Debian</p>
+    </div>
+
+     <div id="content">
+        {% block content %}{% endblock %}
+    </div>
+
+    <div id="rightcolumn">
+
+
+
+            <div class="lateral" style="padding: 8px 0;">
+                <ul class="nav-list">
+
+                {% for title, link in MENUITEMS %}
+                <li><a href="{{ link }}">{{ title }}</a></li>
+                {% endfor %}
+
+                {% if DISPLAY_PAGES_ON_MENU %}
+                {% for page in PAGES %}
+                <li><a href="{{ SITEURL }}/{{ page.url }}">{{ page.title }}</a></li>
+                {% endfor %}
+                {% endif %}
+
+                <li><a href="{{ SITEURL }}/archives.html">Archives</a>
+                <li><a href="{{ SITEURL }}/tags.html">Tags</a>
+                <li><a href="{{ FEED_DOMAIN }}/{{ FEED_ATOM }}" rel="alternate">Atom feed</a></li>
+                {% if FEED_RSS %}
+                <li><a href="{{ FEED_DOMAIN }}/{{ FEED_RSS }}" rel="alternate">RSS feed</a></li>
+                {% endif %}
+                </ul>
+            </div>
+
+
+            {% if tags %}
+            <div class="lateral" style="padding: 8px 0;">
+            <h1>Tags</h1>
+                <ul class="nav-list">
+                {% for ta, null in tags %}
+                <li><a href="{{ SITEURL }}/{{ ta.url }}">{{ ta }}</a></li>
+                {% endfor %}
+                </ul>
+            </div>
+            {% endif %}
+
+
+            {% if LINKS %}
+            <div class="lateral" style="padding: 8px 0;">
+            <h1>Links</h1>
+                <ul class="nav-list">
+                {% for name, link in LINKS %}
+                <li><a href="{{ link }}">{{ name }}</a></li>
+                {% endfor %}
+                </ul>
+            </div>
+            {% endif %}
+
+
+            {% if SOCIAL %}
+            <div class="lateral" style="padding: 8px 0;">
+            <h1>More on Debian</h1>
+                <ul class="nav-list">
+                {% for name, link in SOCIAL %}
+                <li><a href="{{ link }}">{{ name }}</a></li>
+                {% endfor %}
+                </ul>
+            </div>
+            {% endif %}
+
+    </div>
+
+    <div id="footer">
+        <p><a href="{{ SITEURL }}">{{ SITENAME }}</a> © {{ AUTHOR }} 2013</p>
+    </div>
+
+</div>
+</body>
+</html>
diff --git a/theme-bits/templates/index.html b/theme-bits/templates/index.html
new file mode 100644
index 0000000..5e44b7c
--- /dev/null
+++ b/theme-bits/templates/index.html
@@ -0,0 +1,23 @@
+{% extends "base.html" %}
+{% block content_title %}{% endblock %}
+{% block content %}
+
+{% if articles %}
+{% for article in articles_page.object_list %}
+
+    <div class='article'>
+        <div class="content-title">
+            <a href="{{ SITEURL }}/{{ article.url }}"><h1>{{ article.title }}</h1></a>
+            {% include "metadata.html" %}
+        </div>
+
+        <div>{{ article.content }}</div>
+        <hr />
+    </div>
+
+{% endfor %} {# For article #}
+{% endif %} {# If articles #}
+
+{% include 'pagination.html' %}
+{% endblock content %}
+
diff --git a/theme-bits/templates/metadata.html b/theme-bits/templates/metadata.html
new file mode 100644
index 0000000..0eb9b30
--- /dev/null
+++ b/theme-bits/templates/metadata.html
@@ -0,0 +1,9 @@
+{{ article.locale_date }}
+
+{% if article.author %}
+by <a class="url fn" href="{{ SITEURL }}/{{ article.author.url }}">{{ article.author }}</a>
+{% endif %}
+
+{% if article.tags %}
+with tags {% for tag in article.tags %}<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a> {% endfor %}
+{% endif %}
diff --git a/theme-bits/templates/page.html b/theme-bits/templates/page.html
new file mode 100644
index 0000000..8ba396f
--- /dev/null
+++ b/theme-bits/templates/page.html
@@ -0,0 +1,11 @@
+{% extends "base.html" %}
+{% block title %} {% endblock %}
+{% block content %}
+
+<section id="content" class="body">
+    <h2 class="content-title">{{ page.title }}</h2>
+    {% if PDF_PROCESSOR %}<a href="{{ SITEURL }}/pdf/{{ page.slug }}.pdf">get the pdf</a>{% endif %} 
+	{{ page.content }}
+</section>
+
+{% endblock %}
diff --git a/theme-bits/templates/pagination.html b/theme-bits/templates/pagination.html
new file mode 100644
index 0000000..83c587a
--- /dev/null
+++ b/theme-bits/templates/pagination.html
@@ -0,0 +1,15 @@
+{% if DEFAULT_PAGINATION %}
+<p class="paginator">
+    {% if articles_page.has_previous() %}
+        {% if articles_page.previous_page_number() == 1 %}
+            <a href="{{ SITEURL }}/{{ page_name }}.html">«</a>
+        {% else %}
+            <a href="{{ SITEURL }}/{{ page_name }}{{ articles_page.previous_page_number() }}.html">«</a>
+        {% endif %}
+    {% endif %}
+    Page {{ articles_page.number }} / {{ articles_paginator.num_pages }}
+    {% if articles_page.has_next() %}
+        <a href="{{ SITEURL }}/{{ page_name }}{{ articles_page.next_page_number() }}.html">»</a>
+    {% endif %}
+</p>
+{% endif %}
diff --git a/theme-bits/templates/tag.html b/theme-bits/templates/tag.html
new file mode 100644
index 0000000..ce6dcb7
--- /dev/null
+++ b/theme-bits/templates/tag.html
@@ -0,0 +1,2 @@
+{% extends "index.html" %}
+{% block title %}{{ SITENAME }} <small>{{ tag }}</small>{% endblock %}
\ No newline at end of file
diff --git a/theme-bits/templates/tags.html b/theme-bits/templates/tags.html
new file mode 100644
index 0000000..db1c520
--- /dev/null
+++ b/theme-bits/templates/tags.html
@@ -0,0 +1,9 @@
+{% extends "base.html" %}
+{% block title %}{{ SITENAME }} <small>[tgs]</small>{% endblock %}
+{% block content %}
+<ul>
+{% for tag, articles in tags %}
+    <li><a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a></li>
+{% endfor %}
+</ul>
+{% endblock %}

-- 
Git repository for debbits



More information about the Debbits-commit mailing list