Permalink
Browse files

Fix blog skel indentation. Fixes #329

  • Loading branch information...
1 parent 4f2e654 commit 7603ac659acf63c592c5668a8eeecae998565b13 @arjan arjan committed Jul 10, 2012
@@ -1,10 +1,12 @@
{% with id|menu_trail as parents %}
{% if parents %}
-<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 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>
+</div>
{% endif %}
{% endwith %}
@@ -1,10 +1,10 @@
-{% with m.rsc[id].o.subject as tags %}
- {% if tags %}
- <p class="keywords">
- {_ Keywords _}:
- {% for id in tags %}
- <a href="{{ m.rsc[id].page_url }}">{{ m.rsc[id].title }}</a>{% if not forloop.last %},{% endif %}
- {% endfor %}
- </p>
- {% endif %}
+{% 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 %}
+</p>
+{% endif %}
{% endwith %}
@@ -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>
@@ -1,15 +1,17 @@
{% include "_article_keywords.tpl" %}
-{% with m.rsc[id].media|without_embedded_media:id as media %}
- {% if media %}
- <ul class="images-list">
- {% for medium in media %}
- <li>
- {% include "_body_media.tpl" width=315 align="block" id=medium %}
- </li>
- {% endfor %}
- </ul>
- {% endif %}
+{% 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 %}
+</ul>
+{% endif %}
{% endwith %}
{% if m.rsc[id].is_editable %}
@@ -21,7 +21,6 @@
{{ id|summary:300 }} <a href="{{ m.rsc[id].page_url }}">{_ Read more _}&nbsp;&raquo;</a>
</p>
-
</section>
{% else %}
@@ -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 %}
@@ -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>
@@ -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>
@@ -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>
@@ -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 %}
@@ -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 %}
@@ -26,10 +26,14 @@
<a href="#content-area" title="Go directly to page content">Go to page content</a>
</section>
- <section class="zp-wrapper">
+ <section class="zp-wrapper">
<header class="clearfix">
- <h1 class="left"><a href="/">{{ m.config.site.title.value }} {% if m.config.site.subtitle.value %}<span>{{ m.config.site.subtitle.value }}</span>{% endif %}</a></h1>
+ <h1 class="left">
+ <a href="/">
+ {{ m.config.site.title.value }} {% if m.config.site.subtitle.value %}<span>{{ m.config.site.subtitle.value }}</span>{% endif %}
+ </a>
+ </h1>
</header>
<nav class="clearfix">
{% menu id=id %}
@@ -88,4 +92,4 @@
{% all include "_html_body.tpl" %}
</body>
-</html>
+=</html>
@@ -9,13 +9,13 @@
{% block content %}
{% with m.search.paged[{referrers id=q.id page=q.page pagelen=m.config.site.pagelen.value}] as result %}
-
+
{% for id, predicate in result %}
{% include "_article_summary.tpl" id=id %}
{% endfor %}
-
+
{% pager result=result dispatch='keyword' id=id slug=m.rsc[id].slug %}
-
+
{% endwith %}
{% endblock %}
@@ -5,25 +5,24 @@
{% wire id="contact-form" type="submit" postback={contact} delegate="resource_default_contact" %}
<form id="contact-form" method="post" action="postback">
- <div class="form-item">
+ <div class="form-item">
<label for="name">Name</label>
- <input type="text" name="name" id="name" />
- </div>
+ <input type="text" name="name" id="name" />
+ </div>
<div class="form-item">
<label for="email">E-mail</label>
- <input type="text" name="mail" id="mail" />
- {% validate id="mail" type={email} type={presence} %}
+ <input type="text" name="mail" id="mail" />
+ {% validate id="mail" type={email} type={presence} %}
</div>
<div class="form-item">
- <label for="message">Message</label>
- <textarea name="message" id="message" cols="60" rows="8"></textarea>
- {% validate id="message" type={presence} %}
+ <label for="message">Message</label>
+ <textarea name="message" id="message" cols="60" rows="8"></textarea>
+ {% validate id="message" type={presence} %}
</div>
<button type="submit">Send</button>
</form>
-
-{% endblock %}
+{% endblock %}
@@ -5,12 +5,12 @@
{% block content %}
{% if m.rsc[id].is_featured %}
-
+
<h1>{{ m.rsc[id].title }}</h1>
<p class="summary">{{ id|summary }}</p>
-
+
{% for id in m.rsc[id].media %}
- {% include "_body_media.tpl" width=445 crop=1 align="block" %}
+ {% include "_body_media.tpl" width=445 crop=1 align="block" %}
{% endfor %}
{% endif %}
@@ -23,10 +23,10 @@
{% endfor %}
</div>
- {% ifequal m.config.site.pagelen.value result|length %}
+ {% ifequal m.config.site.pagelen.value result|length %}
{% wire id="more-results" action={moreresults result=result target="list-articles" template="_article_summary.tpl"} %}
<p><a href="javascript:void(0);" id="more-results">More results...</a></p>
- {% endifequal %}
+ {% endifequal %}
{% endwith %}
{% endblock %}
@@ -3,16 +3,16 @@
{% block below_body %}
{% with m.search.paged[{query query_id=id page=q.page pagelen=6}] as result %}
-
+
<ul class="list query-list clearfix">
-
- {% for id in result %}
- {% catinclude "_listitem.tpl" id %}
- {% endfor %}
+
+ {% for id in result %}
+ {% catinclude "_listitem.tpl" id %}
+ {% endfor %}
</ul>
{% pager result=result dispatch="page" id=id %}
{% endwith %}
-{% endblock %}
+{% endblock %}

0 comments on commit 7603ac6

Please sign in to comment.