From: Leandro Lucarella Date: Wed, 13 Mar 2013 17:00:38 +0000 (+0100) Subject: Add Flattr buttons to blob and projects X-Git-Url: https://git.llucax.com/personal/website.git/commitdiff_plain/1453a4609aa57e8a23beae626e4416468436824d?ds=inline Add Flattr buttons to blob and projects --- diff --git a/source/_templates/layout.html b/source/_templates/layout.html index b72243a..4b4cfc4 100644 --- a/source/_templates/layout.html +++ b/source/_templates/layout.html @@ -1,8 +1,28 @@ {% extends "!layout.html" %} +{% block extrahead %} + +{% endblock %} + {% block header %}
Leandro Lucarella's Home Page +   + +
{% endblock %} diff --git a/source/blog/art_header.html b/source/blog/art_header.html new file mode 100644 index 0000000..01e71cc --- /dev/null +++ b/source/blog/art_header.html @@ -0,0 +1,23 @@ +
+

%(arttitle)s +   + %(flattrbtn)s +

+ + by %(author)s on + +%(cyear)04d- +%(cmonth)02d- +%(cday)02d + %(chour)02d:%(cminute)02d + (updated on +%(uyear)04d- +%(umonth)02d- +%(uday)02d + %(uhour)02d:%(uminute)02d)
+ tagged %(tags)s - + with %(comments)s + comment(s) +
+

+

diff --git a/source/blog/blog.cgi b/source/blog/blog.cgi index f59201a..ba9db9f 100755 --- a/source/blog/blog.cgi +++ b/source/blog/blog.cgi @@ -982,6 +982,7 @@ class Article (object): 'uuid': self.uuid, 'tags': self.get_tags_links(), 'comments': len(self.comments), + 'flattrbtn': self.get_flattr_btn(), 'created': self.created.isoformat(' '), 'ciso': self.created.isoformat(), @@ -1011,6 +1012,33 @@ class Article (object): (blog_url, urllib.quote(t), sanitize(t) )) return ', '.join(l) + def get_flattr_btn(self): + v = dict() + v['tags'] = ','.join([sanitize(tag) for tag in self.tags]) + v['tags'] = v['tags'].replace('"', '-').replace(':', '-') + v['tags'] = v['tags'].replace(';', '-') + v['title'] = sanitize(self.title) + v['qtitle'] = title.replace('"', '') + v['url'] = full_url + '/post/' + self.uuid + v['furl'] = 'https://flattr.com/submit/auto?' + urllib.urlencode( + dict(user_id='llucax', url=v['url'], + title=self.title, + description="Blog article titled: " + + self.title, + language='en', tags=','.join(self.tags), + category='text')) + return ''' + + +''' % v + class ArticleDB (object): def __init__(self, dbpath): diff --git a/source/blog/header.html b/source/blog/header.html new file mode 100644 index 0000000..3771a42 --- /dev/null +++ b/source/blog/header.html @@ -0,0 +1,36 @@ + + + + + + + +%(title)s + + + + + +

+ %(title)s +   + + +

+ +
diff --git a/source/proj/bacap b/source/proj/bacap index c830ac2..ce0d94d 160000 --- a/source/proj/bacap +++ b/source/proj/bacap @@ -1 +1 @@ -Subproject commit c830ac2bd3344cf0b4dca1dcd381b1c0f32f3191 +Subproject commit ce0d94d8448e25b18e3628265e612283c6932921 diff --git a/source/proj/dgc/index.rst b/source/proj/dgc/index.rst index ecf45b4..7025d00 100644 --- a/source/proj/dgc/index.rst +++ b/source/proj/dgc/index.rst @@ -1,4 +1,10 @@ +.. raw:: html + +
+ +
+ ===================================== D Concurrent Garbage Collector (CDGC) ===================================== diff --git a/source/proj/etherled/index.rst b/source/proj/etherled/index.rst index 8e9d6dd..b66c8be 100644 --- a/source/proj/etherled/index.rst +++ b/source/proj/etherled/index.rst @@ -1,4 +1,11 @@ +.. raw:: html + +
+ +
+ + ======== Etherled ======== diff --git a/source/proj/etherled/photos.rst b/source/proj/etherled/photos.rst index bd4e5e8..8099f2a 100644 --- a/source/proj/etherled/photos.rst +++ b/source/proj/etherled/photos.rst @@ -1,4 +1,10 @@ +.. raw:: html + +
+ +
+ Photos ====== diff --git a/source/proj/ev.d/index.rst b/source/proj/ev.d/index.rst index 34502af..c21c288 100644 --- a/source/proj/ev.d/index.rst +++ b/source/proj/ev.d/index.rst @@ -1,4 +1,11 @@ +.. raw:: html + +
+ +
+ + ==== ev.d ==== diff --git a/source/proj/eventxx b/source/proj/eventxx index 37861e1..6f8cd16 160000 --- a/source/proj/eventxx +++ b/source/proj/eventxx @@ -1 +1 @@ -Subproject commit 37861e1d6e11093b628afe7c4fbc9271c26eff8e +Subproject commit 6f8cd16a462861f35d97eb8ba6ee56f0333a5e21 diff --git a/source/proj/index.rst b/source/proj/index.rst index 82ed8a7..b41aa1a 100644 --- a/source/proj/index.rst +++ b/source/proj/index.rst @@ -19,47 +19,134 @@ not very well maintained :) eventxx_ A simple, direct, one-header inline C++ wrapper for libevent_. + |flattr-eventxx| + + .. |flattr-eventxx| raw:: html + +
+ + mutest_ A micro unit testing framework for C (with some C++ support). + |flattr-mutest| + + .. |flattr-mutest| raw:: html + +
+ + :doc:`etherled/index` A remote controlled, programable stroboscopic image projector using an 8051-family microcontroller. + |flattr-etherled| + + .. |flattr-etherled| raw:: html + +
+ + :doc:`ev.d/index` A low and high level libev_ bindings for the `D Programming Language`_. + |flattr-ev.d| + + .. |flattr-ev.d| raw:: html + +
+ + :doc:`pymin/index` A router administration tool. + |flattr-pymin| + + .. |flattr-pymin| raw:: html + +
+ + :doc:`dgc/index` Research on improvements to the `D Programming Language`_ `garbage collector`_ (my Informatics Engineer thesis). + |flattr-dgc| + + .. |flattr-dgc| raw:: html + +
+ + sphinxcontrib-aafig_ A Sphinx_ extension for embedding ASCII art that is rendered as nice looking images using aafigure_. + |flattr-sphinxcontrib-aafig| + + .. |flattr-sphinxcontrib-aafig| raw:: html + +
+ + sphinxcontrib-mscgen_ A Sphinx_ extension for embedding text-formatted :abbr:`MSC (Message Sequence Chart)` diagrams that are rendered as nice looking images using Mscgen_. + |flattr-sphinxcontrib-mscgen| + + .. |flattr-sphinxcontrib-mscgen| raw:: html + +
+ + :doc:`mutt-nntp-debian/index` Debian_ package for Mutt_ with the `NNTP support patch`__ applied. + |flattr-mutt-nntp-debian| + + .. |flattr-mutt-nntp-debian| raw:: html + +
+ + __ http://mutt.org.ua/download/mutt-1.5.20/ :doc:`bacap/index` A very simple script (~100 SLOC_ of Bash_) to do an incremental backup that saves space using rsync_ and hard-links. + |flattr-bacap| + + .. |flattr-bacap| raw:: html + +
+ + :doc:`sadba/index` A simple plugin for Maemo_\ 's Hildon_ status area to control display blanking. + |flattr-sadba| + + .. |flattr-sadba| raw:: html +
+ + .. _eventxx: eventxx/ .. _libevent: http://monkey.org/~provos/libevent/ diff --git a/source/proj/mutt-nntp-debian/index.rst b/source/proj/mutt-nntp-debian/index.rst index baabe08..f77f3ae 100644 --- a/source/proj/mutt-nntp-debian/index.rst +++ b/source/proj/mutt-nntp-debian/index.rst @@ -1,4 +1,11 @@ +.. raw:: html + +
+ +
+ + ======================================= Debian package for Mutt with NNTP patch ======================================= diff --git a/source/proj/pymin/index.rst b/source/proj/pymin/index.rst index 4a92b44..7a9b02d 100644 --- a/source/proj/pymin/index.rst +++ b/source/proj/pymin/index.rst @@ -1,4 +1,10 @@ +.. raw:: html + +
+ +
+ ===== Pymin ===== diff --git a/source/proj/sadba/index.rst b/source/proj/sadba/index.rst index e5a64cc..cf57c54 100644 --- a/source/proj/sadba/index.rst +++ b/source/proj/sadba/index.rst @@ -1,4 +1,10 @@ +.. raw:: html + +
+ +
+ ============================================= Status Area Display Blanking Applet for Maemo =============================================