all repos — homestead @ 98beceb142db5e67d74a9a64af0a1f99ba902788

Code for my website

Improve HTML indentation

Alan Pearce
commit

98beceb142db5e67d74a9a64af0a1f99ba902788

parent

0f2304646653f75f769ff8a5057ab53b3ea8d3cc

M templates/index.htmltemplates/index.html
@@ -4,10 +4,10 @@ {% block body_attrs %} class="h-card vcard"{% endblock %}
{% block title_class %} p-name fn{% endblock %} -{% block main %} +{% block main -%} <main id="content"> <div> - {{ section.content | safe }} + {{ section.content | safe -}} </div> <section> <h2>Latest Posts</h2>
@@ -26,11 +26,11 @@ <h2>Elsewhere on the Internet</h2>
<ul> {%- for item in config.extra.contact_menu %} <li> - {%- if item.url is starting_with("mailto:") %} + {%- if item.url is starting_with("mailto:") -%} <a href="{{ item.url | safe }}" class="u-email email" rel="me">{{ item.name }}</a> - {%- else %} + {%- else -%} <a href="{{ item.url | safe }}" class="u-url url" rel="me">{{ item.name }}</a> - {%- endif %} + {%- endif -%} </li> {%- endfor %} </ul>
M themes/bear/templates/header.htmlthemes/bear/templates/header.html
@@ -8,4 +8,4 @@ </h2>
<nav> {% include "nav.html" %} </nav> -</header> +</header>{{ "" -}}
M themes/bear/templates/nav.htmlthemes/bear/templates/nav.html
@@ -1,4 +1,4 @@
-<a href="{{ config.base_url | safe }}">Home</a> + <a href="{{ config.base_url | safe }}">Home</a> {%- if config.extra.main_menu %} {%- for item in config.extra.main_menu %} {%- if item.url is matching("https?://") %}
M themes/bear/templates/page.htmlthemes/bear/templates/page.html
@@ -14,7 +14,7 @@ </p>
{%- endif %} {%- endif %} <main id="content"> - {{ page.content | safe }} + {{ page.content | trim | indent | safe }} </main> <ul class="tags"> {%- if page.taxonomies %}
M themes/bear/templates/section.htmlthemes/bear/templates/section.html
@@ -9,7 +9,7 @@ <a href="{{ get_url(path="@/blog/_index.md") }}">Remove filter</a>
</small> {%- endif %} <ul class="blog-posts"> - {% for page in section.pages %} + {%- for page in section.pages %} <li> <span> <time datetime='{{ page.date | date(format='%+') }}' pubdate>
@@ -18,7 +18,7 @@ </time>
</span> <a href="{{ page.path | urlencode | safe }}">{{ page.title }}</a> </li> - {% else %} + {% else %} <li> No posts yet </li>
M themes/bear/templates/taxonomy_single.htmlthemes/bear/templates/taxonomy_single.html
@@ -6,7 +6,7 @@ {%- set rss_path = "tags/" ~ term.name ~ "/" ~ config.feed_filename %}
<link rel="alternate" type={% if config.feed_filename == "atom.xml" %}"application/atom+xml"{% else %}"application/rss+xml"{% endif %} title="{% if term %}{{ term.name | title }}{% else %}{{ section.title | title }}{% endif %}" href="{{ get_url(path=rss_path) | safe }}"> {%- endblock -%} -{% block main %} +{% block main -%} <main id="content"> {%- if taxonomy.term %} <h3 style="margin-bottom:0">Filtering for "{{ term.name }}"</h3>
@@ -15,7 +15,7 @@ <a href="{{ get_url(path="@/blog/_index.md") }}">Remove filter</a>
</small> {%- endif %} <ul class="blog-posts"> - {% for page in term.pages %} + {%- for page in term.pages %} <li> <span> <time datetime='{{ page.date | date(format='%+') }}' pubdate>
@@ -28,7 +28,7 @@ {% else %}
<li> No posts yet </li> - {% endfor %} + {%- endfor %} </ul> </main> {% endblock %}