Close <li> tags
Because valid HTML is better than invalid HTML
This commit is contained in:
parent
1120f277c1
commit
10296444df
|
@ -38,15 +38,18 @@ text:
|
|||
<li><a href="https://twitter.com/getlektor"
|
||||
class="twitter-follow-button" data-show-count="false"
|
||||
data-size="large" data-dnt="true">Follow @getlektor</a>
|
||||
</li>
|
||||
<li><a class="github-button" href="https://github.com/lektor/lektor"
|
||||
data-style="mega" data-count-href="/lektor/lektor/stargazers"
|
||||
data-count-api="/repos/lektor/lektor#stargazers_count"
|
||||
data-count-aria-label="# stargazers on GitHub"
|
||||
aria-label="Star lektor/lektor on GitHub">Star</a>
|
||||
</li>
|
||||
<li><a href="https://gitter.im/lektor/lektor"
|
||||
class="js-gitter-toggle-chat-button"><img
|
||||
src="https://badges.gitter.im/lektor/lektor.svg"
|
||||
alt="Join the chat at https://gitter.im/lektor/lektor"></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
#### text-block ####
|
||||
|
|
|
@ -20,7 +20,7 @@ differs between Python and templates. In templates you have to use the
|
|||
<ul>
|
||||
{% for item in this.children.filter(
|
||||
(F.type == 'hotel').and(F.stars >= 3)) %}
|
||||
<li>{{ item.name }}: {{ item.stars }} stars
|
||||
<li>{{ item.name }}: {{ item.stars }} stars</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
```
|
||||
|
|
|
@ -19,7 +19,7 @@ contained in another string or a item can be contained within a list.
|
|||
<h3>Projects Tagged 'amazing'</h3>
|
||||
<ul>
|
||||
{% for item in this.children.filter(F.tags.contains('amazing')) %}
|
||||
<li>{{ item.name }}
|
||||
<li>{{ item.name }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
```
|
||||
|
|
|
@ -18,7 +18,7 @@ see [endswith :ref](../endswith/).
|
|||
```html+jinja
|
||||
<ul>
|
||||
{% for item in this.children.filter(F.name.endswith_cs('House')) %}
|
||||
<li>{{ item.name }}
|
||||
<li>{{ item.name }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
```
|
||||
|
|
|
@ -18,7 +18,7 @@ see [endswith_cs :ref](../endswith-cs/).
|
|||
```html+jinja
|
||||
<ul>
|
||||
{% for item in this.children.filter(F.name.endswith('house')) %}
|
||||
<li>{{ item.name }}
|
||||
<li>{{ item.name }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
```
|
||||
|
|
|
@ -15,7 +15,7 @@ Typically it compares if a value matches a specific value exactly:
|
|||
<h2>Our Houses</h2>
|
||||
<ul>
|
||||
{% for project in this.children.filter(F.type == 'house') %}
|
||||
<li>{{ project.name }}
|
||||
<li>{{ project.name }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
```
|
||||
|
|
|
@ -16,7 +16,7 @@ or equal to it. This behavior works best with [integers
|
|||
<h3>3 or more Stars</h3>
|
||||
<ul>
|
||||
{% for item in this.children.filter(F.stars >= 3) %}
|
||||
<li>{{ item.name }}: {{ item.stars }} stars
|
||||
<li>{{ item.name }}: {{ item.stars }} stars</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
```
|
||||
|
|
|
@ -16,7 +16,7 @@ or [floats :ref](../../types/float/).
|
|||
<h3>Well Rated Items</h3>
|
||||
<ul>
|
||||
{% for item in this.children.filter(F.stars > 3) %}
|
||||
<li>{{ item.name }}: {{ item.stars }} stars
|
||||
<li>{{ item.name }}: {{ item.stars }} stars</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
```
|
||||
|
|
|
@ -16,7 +16,7 @@ or equal to it. This behavior works best with [integers
|
|||
<h3>Projects From Before Including 2000</h3>
|
||||
<ul>
|
||||
{% for item in this.children.filter(F.year <= 2000) %}
|
||||
<li>{{ item.name }} ({{ item.year }})
|
||||
<li>{{ item.name }} ({{ item.year }})</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
```
|
||||
|
|
|
@ -16,7 +16,7 @@ or equal to it. This behavior works best with [integers
|
|||
<h3>Projects From Before 2000</h3>
|
||||
<ul>
|
||||
{% for item in this.children.filter(F.year < 2000) %}
|
||||
<li>{{ item.name }} ({{ item.year }})
|
||||
<li>{{ item.name }} ({{ item.year }})</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
```
|
||||
|
|
|
@ -15,7 +15,7 @@ by doing an exact comparison:
|
|||
<h2>Everything Other Than Houses</h2>
|
||||
<ul>
|
||||
{% for project in this.children.filter(F.type != 'house') %}
|
||||
<li>{{ project.name }}
|
||||
<li>{{ project.name }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
```
|
||||
|
|
|
@ -20,7 +20,7 @@ differs between Python and templates. In templates you have to use the
|
|||
<ul>
|
||||
{% for item in this.children.filter(
|
||||
(F.type == 'hotel').or(F.type == 'apartment')) %}
|
||||
<li>{{ item.name }} ({{ item.type}})
|
||||
<li>{{ item.name }} ({{ item.type}})</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
```
|
||||
|
|
|
@ -19,7 +19,7 @@ see [startswith :ref](../startswith/).
|
|||
<h1>A</h1>
|
||||
<ul>
|
||||
{% for item in this.children.filter(F.name.startswith_cs('A')) %}
|
||||
<li>{{ item.name }}
|
||||
<li>{{ item.name }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
```
|
||||
|
|
|
@ -19,7 +19,7 @@ see [startswith_cs :ref](../startswith-cs/).
|
|||
<h1>A</h1>
|
||||
<ul>
|
||||
{% for item in this.children.filter(F.name.startswith('a')) %}
|
||||
<li>{{ item.name }}
|
||||
<li>{{ item.name }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
```
|
||||
|
|
|
@ -22,7 +22,7 @@ Accessing an attributes creates an [Expression :ref](../expression/).
|
|||
```html+jinja
|
||||
<ul>
|
||||
{% for item in this.children.filter(F.status == 'published') %}
|
||||
<li>{{ item.title }}
|
||||
<li>{{ item.title }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
```
|
||||
|
|
|
@ -28,7 +28,7 @@ used to provide alts with a humand readable title.
|
|||
<p>Other languages:
|
||||
<ul>
|
||||
{% 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 %}
|
||||
</ul>
|
||||
```
|
||||
|
|
|
@ -18,7 +18,7 @@ and will also include hidden pages.
|
|||
```html+jinja
|
||||
<ul>
|
||||
{% for project in site.query('/projects') %}
|
||||
<li>{{ project.name }}: {{ project.year }}
|
||||
<li>{{ project.name }}: {{ project.year }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
```
|
||||
|
|
|
@ -18,7 +18,7 @@ handy.
|
|||
{% if items %}
|
||||
<ul>
|
||||
{% for item in items %}
|
||||
<li>{{ item.name }}
|
||||
<li>{{ item.name }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
|
|
@ -22,7 +22,7 @@ Here a basic example of how to filter something in a template:
|
|||
```html+jinja
|
||||
<ul>
|
||||
{% for item in this.children.filter(F.status == 'published') %}
|
||||
<li>{{ item.title }}
|
||||
<li>{{ item.title }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
```
|
||||
|
|
|
@ -22,7 +22,7 @@ Here a basic example of how to filter something in a template:
|
|||
```html+jinja
|
||||
<ul>
|
||||
{% for item in this.children.filter(F.status == 'published') %}
|
||||
<li>{{ item.title }}
|
||||
<li>{{ item.title }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
```
|
||||
|
|
|
@ -24,7 +24,7 @@ Here a basic example of how to filter something in a template:
|
|||
```html+jinja
|
||||
<ul>
|
||||
{% 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 %}
|
||||
</ul>
|
||||
```
|
||||
|
|
|
@ -25,7 +25,7 @@ Here a basic example of how to filter something in a template:
|
|||
```html+jinja
|
||||
<ul>
|
||||
{% for item in this.children.include_undiscoverable(true) %}
|
||||
<li>{{ item.title }}
|
||||
<li>{{ item.title }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
```
|
||||
|
|
|
@ -17,7 +17,7 @@ of matching records.
|
|||
<h3>Our Top 3</h3>
|
||||
<ul>
|
||||
{% for item in this.children.order_by('-rating').limit(3) %}
|
||||
<li>{{ item.title }}
|
||||
<li>{{ item.title }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
```
|
||||
|
|
|
@ -23,7 +23,7 @@ order by year and within a year it will order by name.
|
|||
```html+jinja
|
||||
<ul>
|
||||
{% for project in this.children.order_by('-year', 'name') %}
|
||||
<li>{{ project.year }}: {{ project.name }}
|
||||
<li>{{ project.year }}: {{ project.name }}</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
```
|
||||
|
|
|
@ -25,6 +25,7 @@ there is a good reason to use it.
|
|||
<li>
|
||||
Items on the first page of {{ child.title }}:
|
||||
{{ child.pagination.items.count() }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
```
|
||||
|
|
|
@ -27,7 +27,7 @@ via the [query :ref](../../pad/query/) method of the pad.
|
|||
```html+jinja
|
||||
<ul>
|
||||
{% for child in this.children %}
|
||||
<li>{{ child.title }}
|
||||
<li>{{ child.title }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
```
|
||||
|
|
|
@ -42,7 +42,7 @@ page:
|
|||
```html+jinja
|
||||
<ul>
|
||||
{% for child in this.pagination.items %}
|
||||
<li>{{ child.title }}
|
||||
<li>{{ child.title }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
```
|
||||
|
|
|
@ -17,7 +17,7 @@ a page that might use different independent models.
|
|||
```html+jinja
|
||||
<ul>
|
||||
{% 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 %}
|
||||
</ul>
|
||||
```
|
||||
|
|
|
@ -17,7 +17,7 @@ This field is most useful for filtering when operating on mixed collections.
|
|||
```html+jinja
|
||||
<ul class="projects">
|
||||
{% for child in this.children.filter(F._model == 'project') %}
|
||||
<li>{{ child.name }}
|
||||
<li>{{ child.name }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
```
|
||||
|
|
|
@ -28,7 +28,7 @@ description = A list of things that would be good to buy
|
|||
<h2>Shopping List</h2>
|
||||
<ul>
|
||||
{% for item in this.things_to_buy %}
|
||||
<li>{{ item }}
|
||||
<li>{{ item }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
```
|
||||
|
|
|
@ -32,8 +32,8 @@ the website.
|
|||
|
||||
```html+jinja
|
||||
<ul class="nav">
|
||||
<li><a href="{{ '/'|url }}">Index</a>
|
||||
<li><a href="{{ '/about'|url }}">About</a>
|
||||
<li><a href="{{ '/'|url }}">Index</a></li>
|
||||
<li><a href="{{ '/about'|url }}">About</a></li>
|
||||
</ul>
|
||||
```
|
||||
|
||||
|
|
|
@ -102,6 +102,7 @@ page.
|
|||
<a href="{{ post|url }}">{{ post.title }}</a> —
|
||||
by {{ post.author }}
|
||||
on {{ post.pub_date|dateformat }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
|
|
|
@ -197,7 +197,7 @@ markup that appears on multiple pages.
|
|||
<ul>
|
||||
{% for category in site.query('/project-categories') %}
|
||||
<li{% if category._id == active %} class="active"{% endif
|
||||
%}><a href="{{ category|url }}">{{ category.name }}</a>
|
||||
%}><a href="{{ category|url }}">{{ category.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endmacro %}
|
||||
|
@ -205,7 +205,7 @@ markup that appears on multiple pages.
|
|||
{% macro render_project_list(projects) %}
|
||||
<ul>
|
||||
{% for project in projects %}
|
||||
<li><a href="{{ project|url }}">{{ project.name }}</a>
|
||||
<li><a href="{{ project|url }}">{{ project.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endmacro %}
|
||||
|
|
|
@ -65,6 +65,7 @@ create a `sitemap/contents.lr` file instead and use a template like
|
|||
{% if page.children %}
|
||||
<ul>{{ loop(page.children) }}</ul>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
|
|
@ -27,8 +27,8 @@ Because the path starts with a slash it will be treated as absolute path:
|
|||
|
||||
```html+jinja
|
||||
<ul class="nav">
|
||||
<li><a href="{{ '/'|url }}">Index</a>
|
||||
<li><a href="{{ '/about'|url }}">About</a>
|
||||
<li><a href="{{ '/'|url }}">Index</a></li>
|
||||
<li><a href="{{ '/about'|url }}">About</a></li>
|
||||
</ul>
|
||||
```
|
||||
|
||||
|
@ -59,7 +59,7 @@ link to all children of a page:
|
|||
```html+jinja
|
||||
<ul class="nav">
|
||||
{% for page in this.children %}
|
||||
<li><a href="{{ page|url }}">{{ page.title }}</a>
|
||||
<li><a href="{{ page|url }}">{{ page.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
```
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
There have been posts in the following years:
|
||||
<ul>
|
||||
{% for archive in this.year_archives %}
|
||||
<li><a href="{{ archive|url }}">{{ archive.year }}</a>
|
||||
<li><a href="{{ archive|url }}">{{ archive.year }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<a href="{{ '..'|url }}">« Back to {{ this.year }}</a>
|
||||
<ul>
|
||||
{% 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 %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
|
|
@ -10,9 +10,10 @@
|
|||
<ul>
|
||||
{% for post in items %}
|
||||
<li><a href="{{ post|url }}">{{ post.title }}</a> by {{ post.author }}
|
||||
on {{ post.pub_date|dateformat }}
|
||||
on {{ post.pub_date|dateformat }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
|
|
@ -21,12 +21,12 @@
|
|||
Subscribe for the latest news about Lektor as well as content
|
||||
management and web development.
|
||||
<ul>
|
||||
<li><a href="{{ '@atom/transcript'|url }}">RSS Feed</a>
|
||||
<li><a href="https://twitter.com/getlektor">Follow us on Twitter</a>
|
||||
<li><a href="{{ '@atom/transcript'|url }}">RSS Feed</a></li>
|
||||
<li><a href="https://twitter.com/getlektor">Follow us on Twitter</a></li>
|
||||
</ul>
|
||||
<h3>Missed a Post?</h3>
|
||||
<ul>
|
||||
<li><a href="{{ '@blog-archive'|url }}">Blog Archives</a>
|
||||
<li><a href="{{ '@blog-archive'|url }}">Blog Archives</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<ul class="toc">
|
||||
{% for item in this.body.toc recursive %}
|
||||
<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 %}
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -35,19 +35,19 @@
|
|||
|
||||
<ul class=page-meta>
|
||||
{% 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' %}
|
||||
<li>Property of {{ get_doc_link(this.parent) }}
|
||||
<li>Property of {{ get_doc_link(this.parent) }}</li>
|
||||
{% elif this.type == 'operator' %}
|
||||
<li>Operator of {{ get_doc_link(this.parent) }}
|
||||
<li>Operator of {{ get_doc_link(this.parent) }}</li>
|
||||
{% endif %}
|
||||
{% if this.template_var %}
|
||||
<li>Template variable: <a href="{{ (
|
||||
'/docs/api/templates/globals/' ~ this.template_var|lower ~ '/')|url
|
||||
}}"><code>{{ this.template_var }}</code></a>
|
||||
}}"><code>{{ this.template_var }}</code></a></li>
|
||||
{% endif %}
|
||||
{% 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 %}
|
||||
</ul>
|
||||
|
||||
|
|
Loading…
Reference in New Issue