Merge pull request #112 from singingwolfboy/close-li-tags

Close <li> tags
This commit is contained in:
David Baumgold 2016-07-22 12:03:10 -04:00 committed by GitHub
commit 88582f3029
40 changed files with 55 additions and 48 deletions

View File

@ -38,15 +38,18 @@ text:
<li><a href="https://twitter.com/getlektor" <li><a href="https://twitter.com/getlektor"
class="twitter-follow-button" data-show-count="false" class="twitter-follow-button" data-show-count="false"
data-size="large" data-dnt="true">Follow @getlektor</a> data-size="large" data-dnt="true">Follow @getlektor</a>
</li>
<li><a class="github-button" href="https://github.com/lektor/lektor" <li><a class="github-button" href="https://github.com/lektor/lektor"
data-style="mega" data-count-href="/lektor/lektor/stargazers" data-style="mega" data-count-href="/lektor/lektor/stargazers"
data-count-api="/repos/lektor/lektor#stargazers_count" data-count-api="/repos/lektor/lektor#stargazers_count"
data-count-aria-label="# stargazers on GitHub" data-count-aria-label="# stargazers on GitHub"
aria-label="Star lektor/lektor on GitHub">Star</a> aria-label="Star lektor/lektor on GitHub">Star</a>
</li>
<li><a href="https://gitter.im/lektor/lektor" <li><a href="https://gitter.im/lektor/lektor"
class="js-gitter-toggle-chat-button"><img class="js-gitter-toggle-chat-button"><img
src="https://badges.gitter.im/lektor/lektor.svg" src="https://badges.gitter.im/lektor/lektor.svg"
alt="Join the chat at https://gitter.im/lektor/lektor"></a> alt="Join the chat at https://gitter.im/lektor/lektor"></a>
</li>
</ul> </ul>
</div> </div>
#### text-block #### #### text-block ####

View File

@ -20,7 +20,7 @@ differs between Python and templates. In templates you have to use the
<ul> <ul>
{% for item in this.children.filter( {% for item in this.children.filter(
(F.type == 'hotel').and(F.stars >= 3)) %} (F.type == 'hotel').and(F.stars >= 3)) %}
<li>{{ item.name }}: {{ item.stars }} stars <li>{{ item.name }}: {{ item.stars }} stars</li>
{% endfor %} {% endfor %}
</ul> </ul>
``` ```

View File

@ -19,7 +19,7 @@ contained in another string or a item can be contained within a list.
<h3>Projects Tagged 'amazing'</h3> <h3>Projects Tagged 'amazing'</h3>
<ul> <ul>
{% for item in this.children.filter(F.tags.contains('amazing')) %} {% for item in this.children.filter(F.tags.contains('amazing')) %}
<li>{{ item.name }} <li>{{ item.name }}</li>
{% endfor %} {% endfor %}
</ul> </ul>
``` ```

View File

@ -18,7 +18,7 @@ see [endswith :ref](../endswith/).
```html+jinja ```html+jinja
<ul> <ul>
{% for item in this.children.filter(F.name.endswith_cs('House')) %} {% for item in this.children.filter(F.name.endswith_cs('House')) %}
<li>{{ item.name }} <li>{{ item.name }}</li>
{% endfor %} {% endfor %}
</ul> </ul>
``` ```

View File

@ -18,7 +18,7 @@ see [endswith_cs :ref](../endswith-cs/).
```html+jinja ```html+jinja
<ul> <ul>
{% for item in this.children.filter(F.name.endswith('house')) %} {% for item in this.children.filter(F.name.endswith('house')) %}
<li>{{ item.name }} <li>{{ item.name }}</li>
{% endfor %} {% endfor %}
</ul> </ul>
``` ```

View File

@ -15,7 +15,7 @@ Typically it compares if a value matches a specific value exactly:
<h2>Our Houses</h2> <h2>Our Houses</h2>
<ul> <ul>
{% for project in this.children.filter(F.type == 'house') %} {% for project in this.children.filter(F.type == 'house') %}
<li>{{ project.name }} <li>{{ project.name }}</li>
{% endfor %} {% endfor %}
</ul> </ul>
``` ```

View File

@ -16,7 +16,7 @@ or equal to it. This behavior works best with [integers
<h3>3 or more Stars</h3> <h3>3 or more Stars</h3>
<ul> <ul>
{% for item in this.children.filter(F.stars >= 3) %} {% for item in this.children.filter(F.stars >= 3) %}
<li>{{ item.name }}: {{ item.stars }} stars <li>{{ item.name }}: {{ item.stars }} stars</li>
{% endfor %} {% endfor %}
</ul> </ul>
``` ```

View File

@ -16,7 +16,7 @@ or [floats :ref](../../types/float/).
<h3>Well Rated Items</h3> <h3>Well Rated Items</h3>
<ul> <ul>
{% for item in this.children.filter(F.stars > 3) %} {% for item in this.children.filter(F.stars > 3) %}
<li>{{ item.name }}: {{ item.stars }} stars <li>{{ item.name }}: {{ item.stars }} stars</li>
{% endfor %} {% endfor %}
</ul> </ul>
``` ```

View File

@ -16,7 +16,7 @@ or equal to it. This behavior works best with [integers
<h3>Projects From Before Including 2000</h3> <h3>Projects From Before Including 2000</h3>
<ul> <ul>
{% for item in this.children.filter(F.year <= 2000) %} {% for item in this.children.filter(F.year <= 2000) %}
<li>{{ item.name }} ({{ item.year }}) <li>{{ item.name }} ({{ item.year }})</li>
{% endfor %} {% endfor %}
</ul> </ul>
``` ```

View File

@ -16,7 +16,7 @@ or equal to it. This behavior works best with [integers
<h3>Projects From Before 2000</h3> <h3>Projects From Before 2000</h3>
<ul> <ul>
{% for item in this.children.filter(F.year < 2000) %} {% for item in this.children.filter(F.year < 2000) %}
<li>{{ item.name }} ({{ item.year }}) <li>{{ item.name }} ({{ item.year }})</li>
{% endfor %} {% endfor %}
</ul> </ul>
``` ```

View File

@ -15,7 +15,7 @@ by doing an exact comparison:
<h2>Everything Other Than Houses</h2> <h2>Everything Other Than Houses</h2>
<ul> <ul>
{% for project in this.children.filter(F.type != 'house') %} {% for project in this.children.filter(F.type != 'house') %}
<li>{{ project.name }} <li>{{ project.name }}</li>
{% endfor %} {% endfor %}
</ul> </ul>
``` ```

View File

@ -20,7 +20,7 @@ differs between Python and templates. In templates you have to use the
<ul> <ul>
{% for item in this.children.filter( {% for item in this.children.filter(
(F.type == 'hotel').or(F.type == 'apartment')) %} (F.type == 'hotel').or(F.type == 'apartment')) %}
<li>{{ item.name }} ({{ item.type}}) <li>{{ item.name }} ({{ item.type}})</li>
{% endfor %} {% endfor %}
</ul> </ul>
``` ```

View File

@ -19,7 +19,7 @@ see [startswith :ref](../startswith/).
<h1>A</h1> <h1>A</h1>
<ul> <ul>
{% for item in this.children.filter(F.name.startswith_cs('A')) %} {% for item in this.children.filter(F.name.startswith_cs('A')) %}
<li>{{ item.name }} <li>{{ item.name }}</li>
{% endfor %} {% endfor %}
</ul> </ul>
``` ```

View File

@ -19,7 +19,7 @@ see [startswith_cs :ref](../startswith-cs/).
<h1>A</h1> <h1>A</h1>
<ul> <ul>
{% for item in this.children.filter(F.name.startswith('a')) %} {% for item in this.children.filter(F.name.startswith('a')) %}
<li>{{ item.name }} <li>{{ item.name }}</li>
{% endfor %} {% endfor %}
</ul> </ul>
``` ```

View File

@ -22,7 +22,7 @@ Accessing an attributes creates an [Expression :ref](../expression/).
```html+jinja ```html+jinja
<ul> <ul>
{% for item in this.children.filter(F.status == 'published') %} {% for item in this.children.filter(F.status == 'published') %}
<li>{{ item.title }} <li>{{ item.title }}</li>
{% endfor %} {% endfor %}
</ul> </ul>
``` ```

View File

@ -28,7 +28,7 @@ used to provide alts with a humand readable title.
<p>Other languages: <p>Other languages:
<ul> <ul>
{% for alt in get_alts(this) %} {% for alt in get_alts(this) %}
<li><a href="{{ '.'|url(alt=alt) }}">{{ alt|title }}</a> <li><a href="{{ '.'|url(alt=alt) }}">{{ alt|title }}</a></li>
{% endfor %} {% endfor %}
</ul> </ul>
``` ```

View File

@ -18,7 +18,7 @@ and will also include hidden pages.
```html+jinja ```html+jinja
<ul> <ul>
{% for project in site.query('/projects') %} {% for project in site.query('/projects') %}
<li>{{ project.name }}: {{ project.year }} <li>{{ project.name }}: {{ project.year }}</li>
{% endfor %} {% endfor %}
</ul> </ul>
``` ```

View File

@ -18,7 +18,7 @@ handy.
{% if items %} {% if items %}
<ul> <ul>
{% for item in items %} {% for item in items %}
<li>{{ item.name }} <li>{{ item.name }}</li>
{% endfor %} {% endfor %}
</ul> </ul>
{% endif %} {% endif %}

View File

@ -22,7 +22,7 @@ Here a basic example of how to filter something in a template:
```html+jinja ```html+jinja
<ul> <ul>
{% for item in this.children.filter(F.status == 'published') %} {% for item in this.children.filter(F.status == 'published') %}
<li>{{ item.title }} <li>{{ item.title }}</li>
{% endfor %} {% endfor %}
</ul> </ul>
``` ```

View File

@ -22,7 +22,7 @@ Here a basic example of how to filter something in a template:
```html+jinja ```html+jinja
<ul> <ul>
{% for item in this.children.filter(F.status == 'published') %} {% for item in this.children.filter(F.status == 'published') %}
<li>{{ item.title }} <li>{{ item.title }}</li>
{% endfor %} {% endfor %}
</ul> </ul>
``` ```

View File

@ -24,7 +24,7 @@ Here a basic example of how to filter something in a template:
```html+jinja ```html+jinja
<ul> <ul>
{% for item in this.children.include_hidden(true) %} {% for item in this.children.include_hidden(true) %}
<li>{{ item.title }}{% if item.is_hidden %} (hidden){% endif %} <li>{{ item.title }}{% if item.is_hidden %} (hidden){% endif %}</li>
{% endfor %} {% endfor %}
</ul> </ul>
``` ```

View File

@ -25,7 +25,7 @@ Here a basic example of how to filter something in a template:
```html+jinja ```html+jinja
<ul> <ul>
{% for item in this.children.include_undiscoverable(true) %} {% for item in this.children.include_undiscoverable(true) %}
<li>{{ item.title }} <li>{{ item.title }}</li>
{% endfor %} {% endfor %}
</ul> </ul>
``` ```

View File

@ -17,7 +17,7 @@ of matching records.
<h3>Our Top 3</h3> <h3>Our Top 3</h3>
<ul> <ul>
{% for item in this.children.order_by('-rating').limit(3) %} {% for item in this.children.order_by('-rating').limit(3) %}
<li>{{ item.title }} <li>{{ item.title }}</li>
{% endfor %} {% endfor %}
</ul> </ul>
``` ```

View File

@ -23,7 +23,7 @@ order by year and within a year it will order by name.
```html+jinja ```html+jinja
<ul> <ul>
{% for project in this.children.order_by('-year', 'name') %} {% for project in this.children.order_by('-year', 'name') %}
<li>{{ project.year }}: {{ project.name }} <li>{{ project.year }}: {{ project.name }}</li>
{% endif %} {% endif %}
</ul> </ul>
``` ```

View File

@ -25,6 +25,7 @@ there is a good reason to use it.
<li> <li>
Items on the first page of {{ child.title }}: Items on the first page of {{ child.title }}:
{{ child.pagination.items.count() }} {{ child.pagination.items.count() }}
</li>
{% endfor %} {% endfor %}
</ul> </ul>
``` ```

View File

@ -27,7 +27,7 @@ via the [query :ref](../../pad/query/) method of the pad.
```html+jinja ```html+jinja
<ul> <ul>
{% for child in this.children %} {% for child in this.children %}
<li>{{ child.title }} <li>{{ child.title }}</li>
{% endfor %} {% endfor %}
</ul> </ul>
``` ```

View File

@ -42,7 +42,7 @@ page:
```html+jinja ```html+jinja
<ul> <ul>
{% for child in this.pagination.items %} {% for child in this.pagination.items %}
<li>{{ child.title }} <li>{{ child.title }}</li>
{% endfor %} {% endfor %}
</ul> </ul>
``` ```

View File

@ -17,7 +17,7 @@ a page that might use different independent models.
```html+jinja ```html+jinja
<ul> <ul>
{% for child in this.children %} {% for child in this.children %}
<li><a href="{{ child|url }}">{{ child.record_label }}</a> <li><a href="{{ child|url }}">{{ child.record_label }}</a></li>
{% endfor %} {% endfor %}
</ul> </ul>
``` ```

View File

@ -17,7 +17,7 @@ This field is most useful for filtering when operating on mixed collections.
```html+jinja ```html+jinja
<ul class="projects"> <ul class="projects">
{% for child in this.children.filter(F._model == 'project') %} {% for child in this.children.filter(F._model == 'project') %}
<li>{{ child.name }} <li>{{ child.name }}</li>
{% endfor %} {% endfor %}
</ul> </ul>
``` ```

View File

@ -6,7 +6,7 @@ type: type
--- ---
body: body:
The `strings` type one that is a mixture of the [string :ref](../string/) The `strings` type one that is a mixture of the [string :ref](../string/)
and [text :ref](../text/) type. It renders as a multi-line text area in the and [text :ref](../text/) type. It renders as a multi-line text area in the
admin but the template will see each line of text separately. It's primarily admin but the template will see each line of text separately. It's primarily
useful for some advanced scenarios where enumerations and other things useful for some advanced scenarios where enumerations and other things
@ -28,7 +28,7 @@ description = A list of things that would be good to buy
<h2>Shopping List</h2> <h2>Shopping List</h2>
<ul> <ul>
{% for item in this.things_to_buy %} {% for item in this.things_to_buy %}
<li>{{ item }} <li>{{ item }}</li>
{% endfor %} {% endfor %}
</ul> </ul>
``` ```

View File

@ -32,8 +32,8 @@ the website.
```html+jinja ```html+jinja
<ul class="nav"> <ul class="nav">
<li><a href="{{ '/'|url }}">Index</a> <li><a href="{{ '/'|url }}">Index</a></li>
<li><a href="{{ '/about'|url }}">About</a> <li><a href="{{ '/about'|url }}">About</a></li>
</ul> </ul>
``` ```

View File

@ -102,6 +102,7 @@ page.
<a href="{{ post|url }}">{{ post.title }}</a> — <a href="{{ post|url }}">{{ post.title }}</a> —
by {{ post.author }} by {{ post.author }}
on {{ post.pub_date|dateformat }} on {{ post.pub_date|dateformat }}
</li>
{% endfor %} {% endfor %}
</ul> </ul>

View File

@ -197,7 +197,7 @@ markup that appears on multiple pages.
<ul> <ul>
{% for category in site.query('/project-categories') %} {% for category in site.query('/project-categories') %}
<li{% if category._id == active %} class="active"{% endif <li{% if category._id == active %} class="active"{% endif
%}><a href="{{ category|url }}">{{ category.name }}</a> %}><a href="{{ category|url }}">{{ category.name }}</a></li>
{% endfor %} {% endfor %}
</ul> </ul>
{% endmacro %} {% endmacro %}
@ -205,7 +205,7 @@ markup that appears on multiple pages.
{% macro render_project_list(projects) %} {% macro render_project_list(projects) %}
<ul> <ul>
{% for project in projects %} {% for project in projects %}
<li><a href="{{ project|url }}">{{ project.name }}</a> <li><a href="{{ project|url }}">{{ project.name }}</a></li>
{% endfor %} {% endfor %}
</ul> </ul>
{% endmacro %} {% endmacro %}

View File

@ -65,6 +65,7 @@ create a `sitemap/contents.lr` file instead and use a template like
{% if page.children %} {% if page.children %}
<ul>{{ loop(page.children) }}</ul> <ul>{{ loop(page.children) }}</ul>
{% endif %} {% endif %}
</li>
{% endfor %} {% endfor %}
</ul> </ul>
{% endblock %} {% endblock %}

View File

@ -27,8 +27,8 @@ Because the path starts with a slash it will be treated as absolute path:
```html+jinja ```html+jinja
<ul class="nav"> <ul class="nav">
<li><a href="{{ '/'|url }}">Index</a> <li><a href="{{ '/'|url }}">Index</a></li>
<li><a href="{{ '/about'|url }}">About</a> <li><a href="{{ '/about'|url }}">About</a></li>
</ul> </ul>
``` ```
@ -59,7 +59,7 @@ link to all children of a page:
```html+jinja ```html+jinja
<ul class="nav"> <ul class="nav">
{% for page in this.children %} {% for page in this.children %}
<li><a href="{{ page|url }}">{{ page.title }}</a> <li><a href="{{ page|url }}">{{ page.title }}</a></li>
{% endfor %} {% endfor %}
</ul> </ul>
``` ```

View File

@ -8,7 +8,7 @@
There have been posts in the following years: There have been posts in the following years:
<ul> <ul>
{% for archive in this.year_archives %} {% for archive in this.year_archives %}
<li><a href="{{ archive|url }}">{{ archive.year }}</a> <li><a href="{{ archive|url }}">{{ archive.year }}</a></li>
{% endfor %} {% endfor %}
</ul> </ul>
{% endblock %} {% endblock %}

View File

@ -6,7 +6,7 @@
<a href="{{ '..'|url }}">&laquo; Back to {{ this.year }}</a> <a href="{{ '..'|url }}">&laquo; Back to {{ this.year }}</a>
<ul> <ul>
{% for post in this.items %} {% for post in this.items %}
<li><a href="{{ post|url }}">{{ post.title }}</a> by {{ post.author }} on {{ post.pub_date|dateformat }} <li><a href="{{ post|url }}">{{ post.title }}</a> by {{ post.author }} on {{ post.pub_date|dateformat }}</li>
{% endfor %} {% endfor %}
</ul> </ul>
{% endblock %} {% endblock %}

View File

@ -10,9 +10,10 @@
<ul> <ul>
{% for post in items %} {% for post in items %}
<li><a href="{{ post|url }}">{{ post.title }}</a> by {{ post.author }} <li><a href="{{ post|url }}">{{ post.title }}</a> by {{ post.author }}
on {{ post.pub_date|dateformat }} on {{ post.pub_date|dateformat }}</li>
{% endfor %} {% endfor %}
</ul> </ul>
</li>
{% endfor %} {% endfor %}
</ul> </ul>
{% endblock %} {% endblock %}

View File

@ -21,12 +21,12 @@
Subscribe for the latest news about Lektor as well as content Subscribe for the latest news about Lektor as well as content
management and web development. management and web development.
<ul> <ul>
<li><a href="{{ '@atom/transcript'|url }}">RSS Feed</a> <li><a href="{{ '@atom/transcript'|url }}">RSS Feed</a></li>
<li><a href="https://twitter.com/getlektor">Follow us on Twitter</a> <li><a href="https://twitter.com/getlektor">Follow us on Twitter</a></li>
</ul> </ul>
<h3>Missed a Post?</h3> <h3>Missed a Post?</h3>
<ul> <ul>
<li><a href="{{ '@blog-archive'|url }}">Blog Archives</a> <li><a href="{{ '@blog-archive'|url }}">Blog Archives</a></li>
</ul> </ul>
</div> </div>
</div> </div>

View File

@ -23,7 +23,7 @@
<ul class="toc"> <ul class="toc">
{% for item in this.body.toc recursive %} {% for item in this.body.toc recursive %}
<li><a href="#{{ item.anchor }}">{{ item.title }}</a>{% <li><a href="#{{ item.anchor }}">{{ item.title }}</a>{%
if item.children %}<ul>{{ loop(item.children) }}</ul>{% endif %} if item.children %}<ul>{{ loop(item.children) }}</ul>{% endif %}</li>
{% endfor %} {% endfor %}
</ul> </ul>
</div> </div>
@ -35,19 +35,19 @@
<ul class=page-meta> <ul class=page-meta>
{% if this.type == 'method' %} {% if this.type == 'method' %}
<li>Method of {{ get_doc_link(this.parent) }} <li>Method of {{ get_doc_link(this.parent) }}</li>
{% elif this.type == 'property' %} {% elif this.type == 'property' %}
<li>Property of {{ get_doc_link(this.parent) }} <li>Property of {{ get_doc_link(this.parent) }}</li>
{% elif this.type == 'operator' %} {% elif this.type == 'operator' %}
<li>Operator of {{ get_doc_link(this.parent) }} <li>Operator of {{ get_doc_link(this.parent) }}</li>
{% endif %} {% endif %}
{% if this.template_var %} {% if this.template_var %}
<li>Template variable: <a href="{{ ( <li>Template variable: <a href="{{ (
'/docs/api/templates/globals/' ~ this.template_var|lower ~ '/')|url '/docs/api/templates/globals/' ~ this.template_var|lower ~ '/')|url
}}"><code>{{ this.template_var }}</code></a> }}"><code>{{ this.template_var }}</code></a></li>
{% endif %} {% endif %}
{% if this.version_added %} {% if this.version_added %}
<li>New in Lektor Version <em>{{ this.version_added }}</em> <li>New in Lektor Version <em>{{ this.version_added }}</em></li>
{% endif %} {% endif %}
</ul> </ul>