This is an automated email from the git hooks/post-receive script. ebourg-guest pushed a commit to branch master in repository pkg-java-blog.
commit f4a4ffe86c969016b08584a300449a14a56fbd1e Author: Emmanuel Bourg <[email protected]> Date: Wed Apr 27 00:08:51 2016 +0200 Initial commit --- .gitignore | 2 + Makefile | 90 +++++++++++++++++ README.txt | 24 +++++ content/2016/.gitkeep | 0 content/images/.gitkeep | 0 content/pages/about.md | 20 ++++ develop_server.sh | 103 +++++++++++++++++++ pelicanconf.py | 51 ++++++++++ publishconf.py | 21 ++++ template.md | 32 ++++++ theme-bits/static/images/openlogo-nd-75.png | Bin 0 -> 1165 bytes theme-bits/static/images/openlogo-nd-75_ribbon.png | Bin 0 -> 4411 bytes theme-bits/static/images/rss.png | Bin 0 -> 896 bytes theme-bits/static/pygment.css | 50 +++++++++ theme-bits/static/style.css | 112 +++++++++++++++++++++ theme-bits/templates/archives.html | 24 +++++ theme-bits/templates/article.html | 19 ++++ theme-bits/templates/author.html | 5 + theme-bits/templates/base.html | 105 +++++++++++++++++++ theme-bits/templates/index.html | 23 +++++ theme-bits/templates/metadata.html | 19 ++++ theme-bits/templates/page.html | 19 ++++ theme-bits/templates/pagination.html | 15 +++ theme-bits/templates/tag.html | 6 ++ theme-bits/templates/tags.html | 15 +++ theme-bits/templates/translations.html | 8 ++ 26 files changed, 763 insertions(+) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..35f96ef --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.py[cod] +output diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f764bc6 --- /dev/null +++ b/Makefile @@ -0,0 +1,90 @@ +PY?=python +PELICAN?=pelican +PELICANOPTS=--ignore-cache + +BASEDIR=$(CURDIR) +INPUTDIR=$(BASEDIR)/content +OUTPUTDIR=$(BASEDIR)/output +CONFFILE=$(BASEDIR)/pelicanconf.py +PUBLISHCONF=$(BASEDIR)/publishconf.py + +SSH_HOST=alioth.debian.org +SSH_PORT=22 +SSH_USER= +SSH_TARGET_DIR=/srv/home/groups/pkg-java/htdocs/blog + +DEBUG ?= 0 +ifeq ($(DEBUG), 1) + PELICANOPTS += -D +endif + +RELATIVE ?= 0 +ifeq ($(RELATIVE), 1) + PELICANOPTS += --relative-urls +endif + +help: + @echo 'Makefile for a pelican Web site ' + @echo ' ' + @echo 'Usage: ' + @echo ' make html (re)generate the web site ' + @echo ' make clean remove the generated files ' + @echo ' make regenerate regenerate files upon modification ' + @echo ' make publish generate using production settings ' + @echo ' make serve [PORT=8000] serve site at http://localhost:8000' + @echo ' make serve-global [SERVER=0.0.0.0] serve (as root) to $(SERVER):80 ' + @echo ' make devserver [PORT=8000] start/restart develop_server.sh ' + @echo ' make stopserver stop local server ' + @echo ' make upload upload the web site via rsync+ssh ' + @echo ' ' + @echo 'Set the DEBUG variable to 1 to enable debugging, e.g. make DEBUG=1 html ' + @echo 'Set the RELATIVE variable to 1 to enable relative urls ' + @echo ' ' + +html: + $(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) + +clean: + [ ! -d $(OUTPUTDIR) ] || rm -rf $(OUTPUTDIR) + +regenerate: + $(PELICAN) -r $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) + +serve: +ifdef PORT + cd $(OUTPUTDIR) && $(PY) -m pelican.server $(PORT) +else + cd $(OUTPUTDIR) && $(PY) -m pelican.server +endif + +serve-global: +ifdef SERVER + cd $(OUTPUTDIR) && $(PY) -m pelican.server 80 $(SERVER) +else + cd $(OUTPUTDIR) && $(PY) -m pelican.server 80 0.0.0.0 +endif + + +devserver: +ifdef PORT + $(BASEDIR)/develop_server.sh restart $(PORT) +else + $(BASEDIR)/develop_server.sh restart +endif + +stopserver: + $(BASEDIR)/develop_server.sh stop + @echo 'Stopped Pelican and SimpleHTTPServer processes running in background.' + +publish: + $(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(PUBLISHCONF) $(PELICANOPTS) + +ssh_upload: publish + scp -P $(SSH_PORT) -r $(OUTPUTDIR)/* $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR) + +rsync_upload: publish + rsync -e "ssh -p $(SSH_PORT)" -P -rvzc --delete $(OUTPUTDIR)/ $(SSH_HOST):$(SSH_TARGET_DIR) --cvs-exclude + +upload: rsync_upload + +.PHONY: html help clean regenerate serve serve-global devserver publish ssh_upload rsync_upload upload diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..8ccff3a --- /dev/null +++ b/README.txt @@ -0,0 +1,24 @@ +Debian Java Blog +---------------- + +This repository contains the sources needed to maintain the Debian Java blog +http://java.debian.net/blog + +The blog uses the Pelican static site generator (apt-get install pelican). + + +Updating the blog +----------------- + +1. Copy and rename the template.md file at the root of the repository + into content/<year>/ + +2. Edit the content of the file + +3. Push the changes to the Git repository on Alioth + +4. Ask the other team members to review the article + +5. Change the status of the article from 'draft' to 'published' + +6. Publish the site with 'make upload' diff --git a/content/2016/.gitkeep b/content/2016/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/content/images/.gitkeep b/content/images/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/content/pages/about.md b/content/pages/about.md new file mode 100644 index 0000000..8214172 --- /dev/null +++ b/content/pages/about.md @@ -0,0 +1,20 @@ +Title: About + +This is the official blog of the Debian Java Packaging Team. + +This blog is powered by [Pelican][pelican]. You can find the templates and +theme used on this blog at [git.debian.org][gitdo]. Patches, new themes +proposals and constructive suggestions are welcome! + +This site is under the same license and copyright as the [Debian][debian] +website, see [Debian WWW pages license][wwwlicense]. + +If you want to contact us, please send an email to the [debian-java +mailing list][debian-java]. This is a publically archived list. + + +[pelican]: http://getpelican.com/ "Find out about Pelican" +[debian]: http://www.debian.org "Debian - The Universal Operating System" +[gitdo]: http://anonscm.debian.org/cgit/publicity/bits.git +[wwwlicense]: http://www.debian.org/license +[debian-java]: https://lists.debian.org/debian-java/ diff --git a/develop_server.sh b/develop_server.sh new file mode 100755 index 0000000..8c2f27f --- /dev/null +++ b/develop_server.sh @@ -0,0 +1,103 @@ +#!/usr/bin/env bash +## +# This section should match your Makefile +## +PY=${PY:-python} +PELICAN=${PELICAN:-pelican} +PELICANOPTS= + +BASEDIR=$(pwd) +INPUTDIR=$BASEDIR/content +OUTPUTDIR=$BASEDIR/output +CONFFILE=$BASEDIR/pelicanconf.py + +### +# Don't change stuff below here unless you are sure +### + +SRV_PID=$BASEDIR/srv.pid +PELICAN_PID=$BASEDIR/pelican.pid + +function usage(){ + echo "usage: $0 (stop) (start) (restart) [port]" + echo "This starts Pelican in debug and reload mode and then launches" + echo "an HTTP server to help site development. It doesn't read" + echo "your Pelican settings, so if you edit any paths in your Makefile" + echo "you will need to edit your settings as well." + exit 3 +} + +function alive() { + kill -0 $1 >/dev/null 2>&1 +} + +function shut_down(){ + PID=$(cat $SRV_PID) + if [[ $? -eq 0 ]]; then + if alive $PID; then + echo "Stopping HTTP server" + kill $PID + else + echo "Stale PID, deleting" + fi + rm $SRV_PID + else + echo "HTTP server PIDFile not found" + fi + + PID=$(cat $PELICAN_PID) + if [[ $? -eq 0 ]]; then + if alive $PID; then + echo "Killing Pelican" + kill $PID + else + echo "Stale PID, deleting" + fi + rm $PELICAN_PID + else + echo "Pelican PIDFile not found" + fi +} + +function start_up(){ + local port=$1 + echo "Starting up Pelican and HTTP server" + shift + $PELICAN --debug --autoreload -r $INPUTDIR -o $OUTPUTDIR -s $CONFFILE $PELICANOPTS & + pelican_pid=$! + echo $pelican_pid > $PELICAN_PID + cd $OUTPUTDIR + $PY -m pelican.server $port & + srv_pid=$! + echo $srv_pid > $SRV_PID + cd $BASEDIR + sleep 1 + if ! alive $pelican_pid ; then + echo "Pelican didn't start. Is the Pelican package installed?" + return 1 + elif ! alive $srv_pid ; then + echo "The HTTP server didn't start. Is there another service using port" $port "?" + return 1 + fi + echo 'Pelican and HTTP server processes now running in background.' +} + +### +# MAIN +### +[[ ($# -eq 0) || ($# -gt 2) ]] && usage +port='' +[[ $# -eq 2 ]] && port=$2 + +if [[ $1 == "stop" ]]; then + shut_down +elif [[ $1 == "restart" ]]; then + shut_down + start_up $port +elif [[ $1 == "start" ]]; then + if ! start_up $port; then + shut_down + fi +else + usage +fi diff --git a/pelicanconf.py b/pelicanconf.py new file mode 100644 index 0000000..db75cb2 --- /dev/null +++ b/pelicanconf.py @@ -0,0 +1,51 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- # +from __future__ import unicode_literals + +# Basic details +AUTHOR = u'Debian Java Maintainers' +SITENAME = u'Debian Java News' +SITEURL = 'http://java.debian.net/blog' + +# Configuration +PATH = 'content' +STATIC_PATHS = [ 'images' ] +TIMEZONE = 'Europe/Paris' +DEFAULT_LANG = u'en' +DELETE_OUTPUT_DIRECTORY = True +THEME = "theme-bits" +DEFAULT_PAGINATION = 10 +SUMMARY_MAX_LENGTH = None +LOCALE='C' +USE_FOLDER_AS_CATEGORY = False + +# URL settings +ARTICLE_URL = '{date:%Y}/{date:%m}/{slug}.html' +ARTICLE_SAVE_AS = '{date:%Y}/{date:%m}/{slug}.html' + +# Feed settings +FEED_DOMAIN = SITEURL +FEED_ALL_RSS = 'feed.rss' +FEED_ALL_ATOM = 'atom.xml' +CATEGORY_FEED_ATOM = None +CATEGORY_FEED_RSS = None +TRANSLATION_FEED_ATOM = None +AUTHOR_FEED_ATOM = None +AUTHOR_FEED_RSS = None + +# Links +MENUITEMS = (('Home', 'http://java.debian.net/blog'),) + +LINKS = (('Mailing List', 'https://lists.debian.org/debian-java/'), + ('IRC Channel', 'irc://irc.debian.org/debian-java'), + ('TODO List', 'https://udd.debian.org/dmd.cgi?email1=pkg-java-maintainers%40lists.alioth.debian.org#todo'), + ('Packages overview', 'https://qa.debian.org/developer.php?email=pkg-java-maintainers%40lists.alioth.debian.org'), + ('Reproducible Builds', 'https://reproducible.debian.net/unstable/amd64/pkg_set_maint_pkg-java-maintainers.html'),) + +# Social widget +#SOCIAL = (('You can add links in your config file', '#'), +# ('Another social link', '#'),) + + +# Uncomment following line if you want document-relative URLs when developing +#RELATIVE_URLS = True diff --git a/publishconf.py b/publishconf.py new file mode 100644 index 0000000..1174c33 --- /dev/null +++ b/publishconf.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- # +from __future__ import unicode_literals + +# This file is only used if you use `make publish` or +# explicitly specify it as your config file. + +import os +import sys +sys.path.append(os.curdir) +from pelicanconf import * + +SITEURL = 'http://java.debian.net/blog' +RELATIVE_URLS = False + +DELETE_OUTPUT_DIRECTORY = True + +# Following items are often useful when publishing + +#DISQUS_SITENAME = "" +#GOOGLE_ANALYTICS = "" diff --git a/template.md b/template.md new file mode 100644 index 0000000..1033e95 --- /dev/null +++ b/template.md @@ -0,0 +1,32 @@ +Title: This is my awesome news item +Date: YYYY-MM-DD HH:MM +Author: Name Surname(s) +Status: draft + + +We're excited to announce my awesome news item about [the Debian Project](https://www.debian.org) +and for that I'm writing this blog post in Markdown. + +My second parapgrah has text attributes in *italic*, **bold** and `monospace`. + +And I want to add a list: + + * foo + * bar + * baz + +## Subtitle + +> This is a quote + + :::Java + /** + * This is a code sample + */ + public static void main(String[] argv) throws Exception { + System.out.println("Hello World!"); + } + +<center></center> + +This is my last paragraph. 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/openlogo-nd-75_ribbon.png b/theme-bits/static/images/openlogo-nd-75_ribbon.png new file mode 100644 index 0000000..d0f693d Binary files /dev/null and b/theme-bits/static/images/openlogo-nd-75_ribbon.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/pygment.css b/theme-bits/static/pygment.css new file mode 100644 index 0000000..fa249d0 --- /dev/null +++ b/theme-bits/static/pygment.css @@ -0,0 +1,50 @@ +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #008800; font-style: italic } /* Comment */ +.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ +.highlight .k { color: #000080; font-weight: bold } /* Keyword */ +.highlight .ch { color: #008800; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #008800; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #008080 } /* Comment.Preproc */ +.highlight .cpf { color: #008800; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #008800; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #008800; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #aa0000 } /* Generic.Error */ +.highlight .gh { color: #999999 } /* Generic.Heading */ +.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #555555 } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #aaaaaa } /* Generic.Subheading */ +.highlight .gt { color: #aa0000 } /* Generic.Traceback */ +.highlight .kc { color: #000080; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #000080; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #000080; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #000080; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #000080; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #000080; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #0000FF } /* Literal.Number */ +.highlight .s { color: #0000FF } /* Literal.String */ +.highlight .na { color: #FF0000 } /* Name.Attribute */ +.highlight .nt { color: #000080; font-weight: bold } /* Name.Tag */ +.highlight .ow { font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #0000FF } /* Literal.Number.Bin */ +.highlight .mf { color: #0000FF } /* Literal.Number.Float */ +.highlight .mh { color: #0000FF } /* Literal.Number.Hex */ +.highlight .mi { color: #0000FF } /* Literal.Number.Integer */ +.highlight .mo { color: #0000FF } /* Literal.Number.Oct */ +.highlight .sb { color: #0000FF } /* Literal.String.Backtick */ +.highlight .sc { color: #800080 } /* Literal.String.Char */ +.highlight .sd { color: #0000FF } /* Literal.String.Doc */ +.highlight .s2 { color: #0000FF } /* Literal.String.Double */ +.highlight .se { color: #0000FF } /* Literal.String.Escape */ +.highlight .sh { color: #0000FF } /* Literal.String.Heredoc */ +.highlight .si { color: #0000FF } /* Literal.String.Interpol */ +.highlight .sx { color: #0000FF } /* Literal.String.Other */ +.highlight .sr { color: #0000FF } /* Literal.String.Regex */ +.highlight .s1 { color: #0000FF } /* Literal.String.Single */ +.highlight .ss { color: #0000FF } /* Literal.String.Symbol */ +.highlight .il { color: #0000FF } /* Literal.Number.Integer.Long */ diff --git a/theme-bits/static/style.css b/theme-bits/static/style.css new file mode 100644 index 0000000..3628a8a --- /dev/null +++ b/theme-bits/static/style.css @@ -0,0 +1,112 @@ +/* 2013 - Ana Guerrero Lopez <[email protected]> */ + +@import url("pygment.css"); + +body { + font-family: tahoma,verdana,sans-serif; + /*font-family: Verdana, Arial, Helvetica, sans-serif;*/ + font-size: 14px; +} + +p { + padding: 0.3em 0; +} + +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 +} + +blockquote { + font-style: italic; + color: #555555; + border-left: 3px solid #AAAAAA; + margin-left: 2em; + padding-left: 1em; +} + +pre { + margin-left: 2em; +} + +#wrapper { + margin: 0 auto; +} + +#header { + float: left; + height: 125px; +} + +/* This is for having "Bits from Debian" more aligned to the center */ +#header p { + font-size: 36px; + margin-left: 2.5cm; +} + +#content { + float: left; +} + +#rightcolumn { + background: #fff; + float: left; +} + +#footer { + height: 30px; + text-align:center; + clear: both; +} + +.article h1 { + color: #C70038; +} + + +.lateral h1 { + font-size: 15px; + padding-left: 1em; + padding-top: 0em; +} + +.nocss { + display: none; +} + +@media screen and (min-width: 940px) { + #wrapper { + width: 940px; + } + + #header { + width: 940px; + } + + #content { + width: 690px; + } + + #rightcolumn { + width: 250px; + } + + #footer { + width: 940px; + } +} diff --git a/theme-bits/templates/archives.html b/theme-bits/templates/archives.html new file mode 100644 index 0000000..7c3639f --- /dev/null +++ b/theme-bits/templates/archives.html @@ -0,0 +1,24 @@ +{% extends "base.html" %} + +{% block head %} +{{ super() }} + <title>{% block windowtitle %}{{ SITENAME }} - Archives{% endblock %}</title> +{% 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..521452e --- /dev/null +++ b/theme-bits/templates/article.html @@ -0,0 +1,19 @@ +{% extends "base.html" %} + +{% block head %} +{{ super() }} + <title>{% block windowtitle %}{{ SITENAME }} - {{ article.title }}{% endblock %}</title> +{% endblock %} + +{% block content %} + <div class='article' lang='{{ article.lang }}'> + <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..a4f8a2a --- /dev/null +++ b/theme-bits/templates/author.html @@ -0,0 +1,5 @@ +{% extends "index.html" %} +{% block head %} +{{ super() }} + <title>{% block windowtitle %}{{ SITENAME }} - {{ author }}{% endblock %}</title> +{% endblock %} diff --git a/theme-bits/templates/base.html b/theme-bits/templates/base.html new file mode 100644 index 0000000..9257ccf --- /dev/null +++ b/theme-bits/templates/base.html @@ -0,0 +1,105 @@ +<!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"> + <link rel="shortcut icon" href="https://www.debian.org/favicon.ico"/> + <link rel="alternate" type="application/atom+xml" title="{{ SITENAME }} Atom Feed" href="{{ SITEURL }}/atom.xml" /> + <link rel="alternate" type="application/rss+xml" title="{{ SITENAME }} RSS Feed" href="{{ SITEURL }}/feed.rss" /> +</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>{{ SITENAME }}</p> + </div> + + <hr class="nocss" /> + <div id="content"> + {% block content %}{% endblock %} + </div> + + <div id="rightcolumn"> + + + + <hr class="nocss" /> + <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="{{ 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 %} + <hr class="nocss" /> + <div class="lateral" style="padding: 8px 0;"> + <h1>Tags</h1> + <ul class="nav-list"> + {% for ta, articles in tags|sort %} + <li><a href="{{ SITEURL }}/{{ ta.url }}">{{ ta }}</a> ({{ articles|count }})</li> + {% endfor %} + </ul> + </div> + {% endif %} + + + {% if LINKS %} + <hr class="nocss" /> + <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 %} + <hr class="nocss" /> + <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> + + <hr class="nocss" /> + <div id="footer"> + <p><a href="{{ SITEURL }}">{{ SITENAME }}</a> is the official blog of the <a href="http://java.debian.net">Debian Java packaging team</a></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..e21aa76 --- /dev/null +++ b/theme-bits/templates/metadata.html @@ -0,0 +1,19 @@ +{{ article.locale_date }} + +{% if article.author %} +by <a class="url fn" href="{{ SITEURL }}/{{ article.author.url }}">{{ article.author }}</a> +{% endif %} + +{% if article.translator %} +(Translated by {{ article.translator }}) +{% endif %} + + + +{% if article.tags %} +with tags {% for tag in article.tags %}<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a> {% endfor %} +{% endif %} +<p> +{% import 'translations.html' as translations with context %} +{{ translations.translations_for(article) }} +</p> diff --git a/theme-bits/templates/page.html b/theme-bits/templates/page.html new file mode 100644 index 0000000..0d71c8c --- /dev/null +++ b/theme-bits/templates/page.html @@ -0,0 +1,19 @@ +{% extends "base.html" %} + +{% block head %} +{{ super() }} + <title>{% block windowtitle %}{{ SITENAME }} - {{ page.title }}{% endblock %}</title> +{% endblock %} +{% block content %} + +<section id="content" class="body" lang="{{ page.lang }}"> + <h2 class="content-title">{{ page.title }}</h2> + {% import 'translations.html' as translations with context %} + {{ translations.translations_for(page) }} + + + {% 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..7e2014f --- /dev/null +++ b/theme-bits/templates/tag.html @@ -0,0 +1,6 @@ +{% extends "index.html" %} + +{% block head %} +{{ super() }} + <title>{% block windowtitle %}{{ SITENAME }} - {{ tag }} {% endblock %}</title> +{% endblock %} diff --git a/theme-bits/templates/tags.html b/theme-bits/templates/tags.html new file mode 100644 index 0000000..77d737a --- /dev/null +++ b/theme-bits/templates/tags.html @@ -0,0 +1,15 @@ +{% extends "base.html" %} + +{% block head %} +{{ super() }} + <title>{% block windowtitle %}{{ SITENAME }} - Tags {% endblock %}</title> +{% endblock %} + +{% block content %} +<ul> +{% for tag, articles in tags|sort %} + <li><a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a> ({{ articles|count }})</li> +{% endfor %} + +</ul> +{% endblock %} diff --git a/theme-bits/templates/translations.html b/theme-bits/templates/translations.html new file mode 100644 index 0000000..425df4a --- /dev/null +++ b/theme-bits/templates/translations.html @@ -0,0 +1,8 @@ +{% macro translations_for(article) %} +{% if article.translations %} +Translations: +{% for translation in article.translations|sort(attribute='lang') %} +<a href="{{ SITEURL }}/{{ translation.url }}">{{ translation.lang }}</a> +{% endfor %} +{% endif %} +{% endmacro %} -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/pkg-java-blog.git _______________________________________________ pkg-java-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-commits

