Skip to content

Commit

Permalink
Fix blog template indentation (spaces -> tabs). Fixes zotonic#329.
Browse files Browse the repository at this point in the history
Thanks, David Siegel

Squashed commit of the following:

commit cd9d553
Merge: 7e594c0 fa7d759
Author: David Siegel <david.siegel@artcom.de>
Date:   Mon May 14 17:49:48 2012 +0200

    Merge remote-tracking branch 'upstream/master' into fix_blog_template_indentation

commit 7e594c0
Author: David Siegel <david.siegel@artcom.de>
Date:   Mon May 14 17:45:27 2012 +0200

    clean up indentation

commit 60bb930
Author: David Siegel <david.siegel@artcom.de>
Date:   Sat May 12 21:43:47 2012 +0200

    Replace spaces with tabs in blog templates
  • Loading branch information
Arjan Scherpenisse committed Jul 10, 2012
1 parent 2e53316 commit 98f2172
Show file tree
Hide file tree
Showing 15 changed files with 204 additions and 204 deletions.
12 changes: 6 additions & 6 deletions priv/skel/blog/templates/_article_chapeau.tpl
@@ -1,12 +1,12 @@
{% with id|menu_trail as parents %}
{% if parents %}
<div class="span12">
<h5 class="chapeau">
{% for p in parents %}
<a href="{{ m.rsc[p].page_url }}">{{ m.rsc[p].title }}</a>
{% if not forloop.last %}&raquo;{% endif %}
{% endfor %}
</h5>
<h5 class="chapeau">
{% for p in parents %}
<a href="{{ m.rsc[p].page_url }}">{{ m.rsc[p].title }}</a>
{% if not forloop.last %}&raquo;{% endif %}
{% endfor %}
</h5>
</div>
{% endif %}
{% endwith %}
8 changes: 4 additions & 4 deletions priv/skel/blog/templates/_article_keywords.tpl
@@ -1,10 +1,10 @@
{% with id.o.subject as tags %}
{% if tags %}
<p class="keywords">
{_ Keywords _}:
{% for id in tags %}
<a class="label label-info" href="{{ m.rsc[id].page_url }}">{{ m.rsc[id].title }}</a>
{% endfor %}
{_ Keywords _}:
{% for id in tags %}
<a class="label label-info" href="{{ m.rsc[id].page_url }}">{{ m.rsc[id].title }}</a>
{% endfor %}
</p>
{% endif %}
{% endwith %}
20 changes: 10 additions & 10 deletions priv/skel/blog/templates/_article_prevnext.tpl
Expand Up @@ -2,17 +2,17 @@

<div class="prevnext">

{% for id in m.search[{next cat='article' id=id pagelen=1}] %}
<div class="next">
<a href="{{ m.rsc[id].page_url }}" title="{{ m.rsc[id].title }}">{_ Next post _} &raquo;</a>
</div>
{% endfor %}
{% for id in m.search[{next cat='article' id=id pagelen=1}] %}
<div class="next">
<a href="{{ m.rsc[id].page_url }}" title="{{ m.rsc[id].title }}">{_ Next post _} &raquo;</a>
</div>
{% endfor %}

{% for id in m.search[{previous cat='article' id=id pagelen=1}] %}
<div class="prev">
<a href="{{ m.rsc[id].page_url }}" title="{{ m.rsc[id].title }}">&laquo; {_ Previous post _}</a>
</div>
{% endfor %}
{% for id in m.search[{previous cat='article' id=id pagelen=1}] %}
<div class="prev">
<a href="{{ m.rsc[id].page_url }}" title="{{ m.rsc[id].title }}">&laquo; {_ Previous post _}</a>
</div>
{% endfor %}

</div>

Expand Down
18 changes: 9 additions & 9 deletions priv/skel/blog/templates/_article_sidebar.tpl
@@ -1,17 +1,17 @@
{% include "_article_keywords.tpl" %}

{% with m.rsc[id].media|without_embedded_media:id as media %}
{% with m.rsc[id].media|without_embedded_media:id as media %}
{% if media %}
<ul class="thumbnails">
{% for medium in media %}
<li>
<a href="{{ medium.id.page_url }}" class="thumbnail">
{% include "_body_media.tpl" width=300 align="block" id=medium %}
</a>
</li>
{% endfor %}
{% for medium in media %}
<li>
<a href="{{ medium.id.page_url }}" class="thumbnail">
{% include "_body_media.tpl" width=300 align="block" id=medium %}
</a>
</li>
{% endfor %}
</ul>
{% endif %}
{% endif %}
{% endwith %}

{% include "_edit_button.tpl" %}
1 change: 0 additions & 1 deletion priv/skel/blog/templates/_article_summary.tpl
Expand Up @@ -21,7 +21,6 @@
{{ id|summary:300 }} <a href="{{ m.rsc[id].page_url }}">{_ Read more _}&nbsp;&raquo;</a>
</p>


</section>

{% else %}
Expand Down
4 changes: 2 additions & 2 deletions priv/skel/blog/templates/_body_media.tpl
Expand Up @@ -6,8 +6,8 @@
{% else %}
<figure class="image-wrapper block-level-image">
{% media m.rsc[id].medium width=size.width|default:width height=size.height|default:height crop=crop class=align link=link alt=m.rsc[id].title %}
{% with id|summary as summary %}{% if summary %}<p class="image-caption">{{ summary }}</p>{% endif %}{% endwith %}
</figure>
{% with id|summary as summary %}{% if summary %}<p class="image-caption">{{ summary }}</p>{% endif %}{% endwith %}
</figure>
{% endifequal %}
{% else %}
{% media m.rsc[id].medium width=size.width|default:width height=size.height|default:height crop=crop class=align link=link alt=m.rsc[id].title %}
Expand Down
22 changes: 11 additions & 11 deletions priv/skel/blog/templates/_email_contact.tpl
@@ -1,16 +1,16 @@
<html>
<head>
<title>{{ name|escape }} - Contact form</title>
</head>
<body>
<p>Hello, the contact form of the site has been submitted.</p>
<head>
<title>{{ name|escape }} - Contact form</title>
</head>
<body>
<p>Hello, the contact form of the site has been submitted.</p>

<p>Name: {{ name|escape }}</p>
<p>E-mail: {{ mail|escape }}</p>
<p>Name: {{ name|escape }}</p>
<p>E-mail: {{ mail|escape }}</p>

<p>The contents of the message was this:</p>
<pre>{{ message|force_escape|linebreaksbr }}</pre>
<p>The contents of the message was this:</p>
<pre>{{ message|force_escape|linebreaksbr }}</pre>

<p>Regards, your website.</p>
</body>
<p>Regards, your website.</p>
</body>
</html>
4 changes: 2 additions & 2 deletions priv/skel/blog/templates/_listitem.tpl
@@ -1,4 +1,4 @@
<li class="listitem">
<h3><a href="{{ m.rsc[id].page_url }}">{{ m.rsc[id].title }}</a></h3>
{{ m.rsc[id].summary }}
<h3><a href="{{ m.rsc[id].page_url }}">{{ m.rsc[id].title }}</a></h3>
{{ m.rsc[id].summary }}
</li>
42 changes: 21 additions & 21 deletions priv/skel/blog/templates/_sidebar.tpl
@@ -1,8 +1,8 @@
{# Cache the sidebar, depending on the stuff in the 'article' category #}
{% cache 3600 cat='article' %}

{% if m.category.tweet %}

{% with m.search[{latest cat='tweet' pagelen=4}] as r %}
{% if r.result %}
<h2>Tweets</h2>
Expand All @@ -19,28 +19,28 @@
</ul>
{% endif %}
{% endwith %}

{% endif %}

<h2>{_ Archive _}</h2>
<ul class="simple-list">
<ul class="simple-list">
{% for year, months in m.search[{archive_year_month cat='article'}] %}
<li><a class="caption" href="{% url archives_y year=year %}">{{ year }}</a>
<ul>
{% for row in months %}
<li><a href="{% url archives_m year=year month=row.month %}">{{ row.month_as_date|date:"F" }}</a> ({{ row.count }}){% if not forloop.last %},{% else %}.{% endif %}</li>
{% endfor %}
</ul>
</li>
{% endfor %}
</ul>
<h2>{_ Keywords _}</h2>
<ul class="inline-list clearfix">
{% for id, count in m.search[{keyword_cloud cat='article'}] %}
<li><a href="{{ m.rsc[id].page_url }}">{{ m.rsc[id].title }}</a> ({{ count }}){% if not forloop.last %},{% else %}.{% endif %}</li>
{% endfor %}
</ul>
<li><a class="caption" href="{% url archives_y year=year %}">{{ year }}</a>
<ul>
{% for row in months %}
<li><a href="{% url archives_m year=year month=row.month %}">{{ row.month_as_date|date:"F" }}</a> ({{ row.count }}){% if not forloop.last %},{% else %}.{% endif %}</li>
{% endfor %}
</ul>
</li>
{% endfor %}
</ul>

<h2>{_ Keywords _}</h2>
<ul class="inline-list clearfix">
{% for id, count in m.search[{keyword_cloud cat='article'}] %}
<li><a href="{{ m.rsc[id].page_url }}">{{ m.rsc[id].title }}</a> ({{ count }}){% if not forloop.last %},{% else %}.{% endif %}</li>
{% endfor %}
</ul>

{% endcache %}

Expand Down
10 changes: 5 additions & 5 deletions priv/skel/blog/templates/archives.tpl
Expand Up @@ -7,15 +7,15 @@
{% endblock %}

{% block content %}

{% with m.search.paged[{query publication_year=q.year publication_month=q.month sort='-publication_start' cat=cat page=q.page pagelen=m.config.site.pagelen.value}] as result %}

{% for id in result %}

{% include "_article_summary.tpl" id=id %}

{% endfor %}

{% pager result=result dispatch=zotonic_dispatch year=q.year month=q.month %}

{% endwith %}
Expand Down

0 comments on commit 98f2172

Please sign in to comment.