Ver código fonte

Format code with djhtml

Sage Abdullah 2 anos atrás
pai
commit
707ac77ba1

+ 51 - 51
bakerydemo/templates/base.html

@@ -1,55 +1,55 @@
 {% load navigation_tags static wagtailuserbar wagtailfontawesome %}
 <!DOCTYPE html>
 <html lang="en">
-<head>
-<meta charset="utf-8">
-<title>
-  {% block title %}
-    {% if page.seo_title %}
-      {{ page.seo_title }}
-    {% else %}
-      {{ page.title }}
-    {% endif %}
-  {% endblock %}
-  {% block title_suffix %}
-    | The Wagtail Bakery
-  {% endblock %}
-</title>
-<meta name="description" content="{% if page.search_description %}{{ page.search_description }}{% endif %}">
-<meta name="viewport" content="width=device-width, initial-scale=1">
-
-<link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}">
-{% fontawesome_css %}
-<link rel="stylesheet" href="{% static 'css/font-marcellus.css' %}">
-<link rel="stylesheet" href="{% static 'css/font-open-sans.css' %}">
-<link rel="stylesheet" href="{% static 'css/main.css' %}">
-</head>
-
-<body class="{% block body_class %}template-{{ self.get_verbose_name|slugify }}{% endblock %}">
-{% wagtailuserbar %}
-
-{% block header %}
-    {% include "includes/header.html" with parent=site_root calling_page=self %}
-{% endblock header %}
-
-{% block breadcrumbs %}
-    {# breadcrumbs is defined in base/templatetags/navigation_tags.py #}
-    {% breadcrumbs %}
-{% endblock breadcrumbs %}
-
-{% block messages %}
-    {% include "includes/messages.html" %}
-{% endblock messages %}
-
-<main>
-    {% block content %}
-    {% endblock content %}
-</main>
-
-<hr>
-
-{% include "includes/footer.html" %}
-
-<script type="module" src="{% static 'js/main.js' %}"></script>
-</body>
+    <head>
+        <meta charset="utf-8">
+        <title>
+            {% block title %}
+                {% if page.seo_title %}
+                    {{ page.seo_title }}
+                {% else %}
+                    {{ page.title }}
+                {% endif %}
+            {% endblock %}
+            {% block title_suffix %}
+                | The Wagtail Bakery
+            {% endblock %}
+        </title>
+        <meta name="description" content="{% if page.search_description %}{{ page.search_description }}{% endif %}">
+        <meta name="viewport" content="width=device-width, initial-scale=1">
+
+        <link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}">
+        {% fontawesome_css %}
+        <link rel="stylesheet" href="{% static 'css/font-marcellus.css' %}">
+        <link rel="stylesheet" href="{% static 'css/font-open-sans.css' %}">
+        <link rel="stylesheet" href="{% static 'css/main.css' %}">
+    </head>
+
+    <body class="{% block body_class %}template-{{ self.get_verbose_name|slugify }}{% endblock %}">
+        {% wagtailuserbar %}
+
+        {% block header %}
+            {% include "includes/header.html" with parent=site_root calling_page=self %}
+        {% endblock header %}
+
+        {% block breadcrumbs %}
+            {# breadcrumbs is defined in base/templatetags/navigation_tags.py #}
+            {% breadcrumbs %}
+        {% endblock breadcrumbs %}
+
+        {% block messages %}
+            {% include "includes/messages.html" %}
+        {% endblock messages %}
+
+        <main>
+            {% block content %}
+            {% endblock content %}
+        </main>
+
+        <hr>
+
+        {% include "includes/footer.html" %}
+
+        <script type="module" src="{% static 'js/main.js' %}"></script>
+    </body>
 </html>

+ 41 - 41
bakerydemo/templates/base/form_page.html

@@ -3,55 +3,55 @@
 
 {% block content %}
 
-<div class="container">
-    <div class="row">
-        <div class="col-md-12">
-            <h1 class="index-header__title">{{ page.title }}</h1>
-        </div>
-        <div class="col-md-8 index-header__body-introduction">
-            {% if page.intro %}
-                <p class="intro">{{ page.intro|richtext }}</p>
-            {% endif %}
-            {% if page.body %}
-                {{ page.body }}
-            {% endif %}
+    <div class="container">
+        <div class="row">
+            <div class="col-md-12">
+                <h1 class="index-header__title">{{ page.title }}</h1>
+            </div>
+            <div class="col-md-8 index-header__body-introduction">
+                {% if page.intro %}
+                    <p class="intro">{{ page.intro|richtext }}</p>
+                {% endif %}
+                {% if page.body %}
+                    {{ page.body }}
+                {% endif %}
+            </div>
         </div>
     </div>
-</div>
 
-<div class="container">
-    <div class="row">
-        <div class="col-md-8 form-page">
-        {% comment %}
+    <div class="container">
+        <div class="row">
+            <div class="col-md-8 form-page">
+                {% comment %}
         You could render your form using a Django rendering shortcut such as `{{ form.as_p }}` but that will tend towards unsemantic code, and make it difficult to style. You can read more on Django form at:
         https://docs.djangoproject.com/en/3.2/topics/forms/#form-rendering-options
         {% endcomment %}
-            <form action="{% pageurl page %}" method="POST">
-                {% csrf_token %}
-                {% if form.subject.errors %}
-                    <ol>
-                    {% for error in form.subject.errors %}
-                        <li><strong>{{ error|escape }}</strong></li>
+                <form action="{% pageurl page %}" method="POST">
+                    {% csrf_token %}
+                    {% if form.subject.errors %}
+                        <ol>
+                            {% for error in form.subject.errors %}
+                                <li><strong>{{ error|escape }}</strong></li>
+                            {% endfor %}
+                        </ol>
+                    {% endif %}
+
+                    {% for field in form %}
+                        <div class="form-page__field" aria-required={% if field.field.required %}"true"{% else %}"false"{% endif %}>
+
+                            {{ field.label_tag }}{% if field.field.required %}<span class="required">*</span>{% endif %}
+
+                            {% if field.help_text %}
+                                <p class="help">{{ field.help_text }}</p>
+                            {% endif %}
+
+                            {{ field }}
+                        </div>
                     {% endfor %}
-                    </ol>
-                {% endif %}
-
-                {% for field in form %}
-                    <div class="form-page__field" aria-required={% if field.field.required %}"true"{% else %}"false"{% endif %}>
-
-                        {{ field.label_tag }}{% if field.field.required %}<span class="required">*</span>{% endif %}
-
-                        {% if field.help_text %}
-                            <p class="help">{{ field.help_text }}</p>
-                        {% endif %}
-
-                        {{ field }}
-                    </div>
-                {% endfor %}
 
-                <input type="submit">
-            </form>
+                    <input type="submit">
+                </form>
+            </div>
         </div>
     </div>
-</div>
 {% endblock content %}

+ 9 - 9
bakerydemo/templates/base/form_page_landing.html

@@ -3,14 +3,14 @@
 
 {% block content %}
 
-<div class="container form-page-thanks">
-    <div class="row">
-        <div class="col-md-12">
-            <h1 class="index-header__title">{{ page.title }}</h1>
-        </div>
-        <div class="col-md-7 index-header__body-introduction">
-            {{ page.thank_you_text|richtext }}
+    <div class="container form-page-thanks">
+        <div class="row">
+            <div class="col-md-12">
+                <h1 class="index-header__title">{{ page.title }}</h1>
+            </div>
+            <div class="col-md-7 index-header__body-introduction">
+                {{ page.thank_you_text|richtext }}
+            </div>
         </div>
     </div>
-</div>
-{% endblock content %}
+{% endblock content %}

+ 13 - 13
bakerydemo/templates/base/gallery_page.html

@@ -2,19 +2,19 @@
 {% load wagtailimages_tags gallery_tags %}
 
 {% block content %}
-{% image self.image fill-1920x600 as hero_img %}
-{% include "base/include/header-hero.html" %}
+    {% image self.image fill-1920x600 as hero_img %}
+    {% include "base/include/header-hero.html" %}
 
-<div class="container gallery__container">
-    <div class="row">
-        <div class="col-md-8">
-            {% if page.introduction %}
-            <p class="gallery__introduction">{{ page.introduction }}</p>
-            {% endif %}
+    <div class="container gallery__container">
+        <div class="row">
+            <div class="col-md-8">
+                {% if page.introduction %}
+                    <p class="gallery__introduction">{{ page.introduction }}</p>
+                {% endif %}
+            </div>
+        </div>
+        <div class="gallery__grid">
+            {% gallery page.collection %}
         </div>
     </div>
-    <div class="gallery__grid">
-        {% gallery page.collection %}
-    </div>
-</div>
-{% endblock content %}
+{% endblock content %}

+ 78 - 78
bakerydemo/templates/base/home_page.html

@@ -2,103 +2,103 @@
 {% load wagtailimages_tags wagtailcore_tags %}
 
 {% block content %}
-<div class="homepage">
+    <div class="homepage">
 
-    {% image page.image fill-1920x600 as image %}
-    <div class="container-fluid hero" style="background-image:url('{{ image.url }}')">
-        <div class="hero-gradient-mask"></div>
-        <div class="container">
-            <div class="row">
-                <div class="col-md-6 col-md-offset-1 col-lg-5 home-hero">
-                    <h1>{{ page.title }}</h1>
-                    <p class="lead">{{ page.hero_text }}</p>
-                    {% if page.hero_cta_link %}
-                    <a href="{% pageurl page.hero_cta_link %}" class="hero-cta-link">
-                        {{ page.hero_cta }}
-                    </a>
-                    {% else %}
-                    {{ page.hero_cta }}
-                    {% endif %}
+        {% image page.image fill-1920x600 as image %}
+        <div class="container-fluid hero" style="background-image:url('{{ image.url }}')">
+            <div class="hero-gradient-mask"></div>
+            <div class="container">
+                <div class="row">
+                    <div class="col-md-6 col-md-offset-1 col-lg-5 home-hero">
+                        <h1>{{ page.title }}</h1>
+                        <p class="lead">{{ page.hero_text }}</p>
+                        {% if page.hero_cta_link %}
+                            <a href="{% pageurl page.hero_cta_link %}" class="hero-cta-link">
+                                {{ page.hero_cta }}
+                            </a>
+                        {% else %}
+                            {{ page.hero_cta }}
+                        {% endif %}
+                    </div>
                 </div>
             </div>
         </div>
-    </div>
 
-    <div class="container">
-        <div class="row promo-row">
-            <div class="featured-cards col-sm-5 col-sm-offset-1">
-                {% if page.featured_section_1 %}
-                <h2 class="featured-cards__title">{{ page.featured_section_1_title }}</h2>
-                <ul class="featured-cards__list">
-                    {% for childpage in page.featured_section_1.specific.children|slice:"3" %}
-                    <li>
-                        {% include "includes/card/listing-card.html" with page=childpage %}
-                    </li>
-                    {% endfor %}
-                </ul>
-                <a class="featured-cards__link" href="/breads">
-                    <span>View more of our breads</span>
-                    {% include "includes/chevron-icon.html" with class="featured-cards__chevron-icon" %}
-                </a>
-                {% endif %}
-            </div>
+        <div class="container">
+            <div class="row promo-row">
+                <div class="featured-cards col-sm-5 col-sm-offset-1">
+                    {% if page.featured_section_1 %}
+                        <h2 class="featured-cards__title">{{ page.featured_section_1_title }}</h2>
+                        <ul class="featured-cards__list">
+                            {% for childpage in page.featured_section_1.specific.children|slice:"3" %}
+                                <li>
+                                    {% include "includes/card/listing-card.html" with page=childpage %}
+                                </li>
+                            {% endfor %}
+                        </ul>
+                        <a class="featured-cards__link" href="/breads">
+                            <span>View more of our breads</span>
+                            {% include "includes/chevron-icon.html" with class="featured-cards__chevron-icon" %}
+                        </a>
+                    {% endif %}
+                </div>
 
-            <div class="col-sm-6 promo">
-                {% if page.promo_image or page.promo_title or page.promo_text %}
-                <div class="col-lg-10 promo-text">
-                    {% if page.promo_title %}
-                    <h2>{{ page.promo_title }}</h2>
+                <div class="col-sm-6 promo">
+                    {% if page.promo_image or page.promo_title or page.promo_text %}
+                        <div class="col-lg-10 promo-text">
+                            {% if page.promo_title %}
+                                <h2>{{ page.promo_title }}</h2>
+                            {% endif %}
+                            {% if page.promo_text %}
+                                {{ page.promo_text|richtext }}
+                            {% endif %}
+                        </div>
                     {% endif %}
-                    {% if page.promo_text %}
-                    {{ page.promo_text|richtext }}
+                    {% if page.promo_image %}
+                        <figure>{% image page.promo_image fill-590x413-c100 %}</figure>
                     {% endif %}
                 </div>
-                {% endif %}
-                {% if page.promo_image %}
-                <figure>{% image page.promo_image fill-590x413-c100 %}</figure>
-                {% endif %}
-            </div>
-        </div>
-    </div>
-
-    {% if page.body %}
-    <div class="container-fluid streamfield">
-        <div class="row">
-            <div class="col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 streamfield-column">
-                {{ page.body }}
             </div>
         </div>
-    </div>
-    {% endif %}
 
-    <div class="container">
-        <div class="row">
-            <div class="col-md-12 locations-section">
-                {% if page.featured_section_2 %}
-                <h2 class="locations-section__title">{{ page.featured_section_2_title }}</h2>
-                {% for childpage in page.featured_section_2.specific.children|slice:"3" %}
-                {% include "includes/card/location-card.html" with page=childpage %}
-                {% endfor %}
-                {% endif %}
+        {% if page.body %}
+            <div class="container-fluid streamfield">
+                <div class="row">
+                    <div class="col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 streamfield-column">
+                        {{ page.body }}
+                    </div>
+                </div>
             </div>
-        </div>
-    </div>
+        {% endif %}
 
-    {% if page.featured_section_3 %}
-    <div class="blog-section__background">
         <div class="container">
             <div class="row">
-                <div class="col-md-12 blog-section">
-                    <h2 class="blog-section__title">{{ page.featured_section_3_title }}</h2>
-                    <div class="blog-section__grid">
-                        {% for childpage in page.featured_section_3.specific.children|slice:"6" %}
-                        {% include "includes/card/picture-card.html" with page=childpage portrait=True %}
+                <div class="col-md-12 locations-section">
+                    {% if page.featured_section_2 %}
+                        <h2 class="locations-section__title">{{ page.featured_section_2_title }}</h2>
+                        {% for childpage in page.featured_section_2.specific.children|slice:"3" %}
+                            {% include "includes/card/location-card.html" with page=childpage %}
                         {% endfor %}
-                    </div>
+                    {% endif %}
                 </div>
             </div>
         </div>
+
+        {% if page.featured_section_3 %}
+            <div class="blog-section__background">
+                <div class="container">
+                    <div class="row">
+                        <div class="col-md-12 blog-section">
+                            <h2 class="blog-section__title">{{ page.featured_section_3_title }}</h2>
+                            <div class="blog-section__grid">
+                                {% for childpage in page.featured_section_3.specific.children|slice:"6" %}
+                                    {% include "includes/card/picture-card.html" with page=childpage portrait=True %}
+                                {% endfor %}
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        {% endif %}
     </div>
-    {% endif %}
-</div>
 {% endblock content %}

+ 5 - 5
bakerydemo/templates/base/include/header-blog.html

@@ -9,17 +9,17 @@
         <div class="col-sm-12 col-md-9">
             <h1 class="index-header__title index-header__title--blog">{{ page.title }}</h1>
             {% if page.subtitle %}
-              <p>{{ page.subtitle }}</p>
+                <p>{{ page.subtitle }}</p>
             {% endif %}
         </div>
         <div class="col-sm-12 col-md-7">
             {% if page.introduction %}
-            <p class="index-header__introduction index-header__introduction--blog">{{ page.introduction }}</p>
+                <p class="index-header__introduction index-header__introduction--blog">{{ page.introduction }}</p>
             {% endif %}
             {% if page.date_published %}
-            <div class="blog__published">
-                {{ page.date_published }}
-            </div>
+                <div class="blog__published">
+                    {{ page.date_published }}
+                </div>
             {% endif %}
         </div>
     </div>

+ 1 - 1
bakerydemo/templates/blocks/blockquote.html

@@ -1,5 +1,5 @@
 {% load wagtailimages_tags %}
 
 <blockquote><p class="text">{{ self.text }}</p>
-<p class="attribute_name">{{ self.attribute_name}}</p>
+    <p class="attribute_name">{{ self.attribute_name}}</p>
 </blockquote>

+ 5 - 5
bakerydemo/templates/blocks/heading_block.html

@@ -4,12 +4,12 @@
 {% endcomment %}
 
 {% if self.size == 'h2' %}
-        <h2>{{ self.heading_text }}</h2>
+    <h2>{{ self.heading_text }}</h2>
 
-    {% elif self.size == 'h3' %}
-        <h3>{{ self.heading_text }}</h3>
+{% elif self.size == 'h3' %}
+    <h3>{{ self.heading_text }}</h3>
 
-    {% elif self.size == 'h4' %}
-        <h4>{{ self.heading_text }}</h4>
+{% elif self.size == 'h4' %}
+    <h4>{{ self.heading_text }}</h4>
 
 {% endif %}

+ 3 - 3
bakerydemo/templates/blog/blog_index_page.html

@@ -2,9 +2,9 @@
 {% load wagtailcore_tags navigation_tags wagtailimages_tags %}
 
 {% if tag %}
-  {% block title %}
-    Viewing all blog posts sorted by the tag {{ tag }}
-  {% endblock %}
+    {% block title %}
+        Viewing all blog posts sorted by the tag {{ tag }}
+    {% endblock %}
 {% endif %}
 
 {% block content %}

+ 25 - 25
bakerydemo/templates/blog/blog_page.html

@@ -3,35 +3,35 @@
 
 {% block content %}
 
-{% image self.image fill-1920x600 as hero_img %}
-{% include "base/include/header-blog.html" %}
+    {% image self.image fill-1920x600 as hero_img %}
+    {% include "base/include/header-blog.html" %}
 
-<div class="container">
-    <div class="row">
-        <div class="col-md-8">
-            <div class="blog__meta">
-                {% if page.authors %}
-                <div class="blog__avatars">
-                    {% for author in page.authors %}
-                    <div class="blog__author">{% image author.image fill-50x50-c100 class="blog__avatar" %}
-                        {{ author.first_name }} {{ author.last_name }}</div>
-                    {% endfor %}
+    <div class="container">
+        <div class="row">
+            <div class="col-md-8">
+                <div class="blog__meta">
+                    {% if page.authors %}
+                        <div class="blog__avatars">
+                            {% for author in page.authors %}
+                                <div class="blog__author">{% image author.image fill-50x50-c100 class="blog__avatar" %}
+                                    {{ author.first_name }} {{ author.last_name }}</div>
+                            {% endfor %}
+                        </div>
+                    {% endif %}
                 </div>
-                {% endif %}
-            </div>
 
-            {{ page.body }}
+                {{ page.body }}
 
-            {% if page.get_tags %}
-            <p class="blog__tag-introduction">Find more blog posts with similar tags</p>
-            <div class="blog-tags blog-tags--condensed">
-                <span class="u-sr-only">Filter blog posts by tag</span>
-                {% for tag in page.get_tags %}
-                <a href="{{ tag.url }}" class="blog-tags__pill">{{ tag }}</a>
-                {% endfor %}
+                {% if page.get_tags %}
+                    <p class="blog__tag-introduction">Find more blog posts with similar tags</p>
+                    <div class="blog-tags blog-tags--condensed">
+                        <span class="u-sr-only">Filter blog posts by tag</span>
+                        {% for tag in page.get_tags %}
+                            <a href="{{ tag.url }}" class="blog-tags__pill">{{ tag }}</a>
+                        {% endfor %}
+                    </div>
+                {% endif %}
             </div>
-            {% endif %}
         </div>
     </div>
-</div>
-{% endblock content %}
+{% endblock content %}

+ 1 - 1
bakerydemo/templates/breads/bread_page.html

@@ -51,7 +51,7 @@
 
                 <div class="col-md-7">
                     <div class="row hidden-md-up">
-                    {{ page.body }}
+                        {{ page.body }}
                     </div>
                 </div>
             </div>

+ 5 - 5
bakerydemo/templates/includes/header.html

@@ -6,11 +6,11 @@
             <a href="/" class="navigation__logo">The Wagtail Bakery</a>
 
             <button
-              type="button"
-              class="navigation__mobile-toggle"
-              aria-label="Toggle mobile menu"
-              aria-expanded="false"
-              data-mobile-navigation-toggle
+                type="button"
+                class="navigation__mobile-toggle"
+                aria-label="Toggle mobile menu"
+                aria-expanded="false"
+                data-mobile-navigation-toggle
             >
                 <span class="navigation__toggle-icon-bar"></span>
                 <span class="navigation__toggle-icon-bar"></span>

+ 1 - 1
bakerydemo/templates/includes/messages.html

@@ -3,7 +3,7 @@
         <p class="alert__title">Error</p>
         <ul class="alert__messages">
             {% for message in messages %}
-            <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
+                <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
             {% endfor %}
         </ul>
     </div>

+ 6 - 6
bakerydemo/templates/includes/pagination.html

@@ -6,7 +6,7 @@
             <li class="page-item">
                 <a href="?page={{ subpages.previous_page_number }}" class="page-link previous arrows">previous</a>
             </li>
-            {% else %}
+        {% else %}
             <li class="page-item disabled">
                 <a class="page-link">previous</a>
             </li>
@@ -14,20 +14,20 @@
 
         {% for i in subpages.paginator.page_range %}
             {% if subpages.number == i %}
-              <li class="page-item active"><span>{{ i }} <span class="sr-only">(current)</span></span></li>
+                <li class="page-item active"><span>{{ i }} <span class="sr-only">(current)</span></span></li>
             {% else %}
-              <li class="page-item"><a href="?page={{ query_string|urlencode }}&amp;page={{ i }}" class="page-link">{{ i }}</a></li>
+                <li class="page-item"><a href="?page={{ query_string|urlencode }}&amp;page={{ i }}" class="page-link">{{ i }}</a></li>
             {% endif %}
-          {% endfor %}
+        {% endfor %}
 
         {% if subpages.has_next %}
             <li class="page-item">
                 <a href="?page={{ subpages.next_page_number }}" class="page-link next arrows">next</a>
             </li>
-            {% else %}
+        {% else %}
             <li class="page-item disabled">
                 <a class="page-link">next</a>
             </li>
         {% endif %}
     </ul>
-</nav>
+</nav>

+ 50 - 50
bakerydemo/templates/locations/location_page.html

@@ -2,68 +2,68 @@
 {% load wagtailimages_tags navigation_tags %}
 
 {% block content %}
-{% include "base/include/header-hero.html" %}
+    {% include "base/include/header-hero.html" %}
 
-<div class="container bread-detail">
-    <div class="row">
-        <div class="col-md-12">
-            <div class="col-md-7">
-                <div class="row">
-                    {% if page.introduction %}
-                    <p class="bread-detail__introduction">
-                        {{ page.introduction }}
-                    </p>
-                    {% endif %}
+    <div class="container bread-detail">
+        <div class="row">
+            <div class="col-md-12">
+                <div class="col-md-7">
+                    <div class="row">
+                        {% if page.introduction %}
+                            <p class="bread-detail__introduction">
+                                {{ page.introduction }}
+                            </p>
+                        {% endif %}
 
-                    <div class="hidden-md-down">
-                        {{ page.body }}
+                        <div class="hidden-md-down">
+                            {{ page.body }}
+                        </div>
                     </div>
                 </div>
-            </div>
 
-            <div class="col-md-4 col-md-offset-1">
-                <div class="row">
-                    <div class="bread-detail__meta">
-                        <p class="location__meta-title">Operating Status</p>
-                        {% if page.is_open %}
-                        This location is currently open.
-                        {% else %}
-                        Sorry, this location is currently closed.
-                        {% endif %}
+                <div class="col-md-4 col-md-offset-1">
+                    <div class="row">
+                        <div class="bread-detail__meta">
+                            <p class="location__meta-title">Operating Status</p>
+                            {% if page.is_open %}
+                                This location is currently open.
+                            {% else %}
+                                Sorry, this location is currently closed.
+                            {% endif %}
 
-                        <p class="location__meta-title">Address</p>
-                        <address>{{ page.address|linebreaks }}</address>
+                            <p class="location__meta-title">Address</p>
+                            <address>{{ page.address|linebreaks }}</address>
 
-                        {% if page.operating_hours %}
-                        <p class="location__meta-title">Opening hours</p>
-                        {% for hours in page.operating_hours %}
-                        <time itemprop="openingHours" datetime="{{ hours }}" class="location__time">
-                            <span class="location__day">{{ hours.day }}</span>:
-                            <span class="location__hours">
-                                {% if hours.closed == True %}
-                                Closed
-                                {% else %}
-                                {% if hours.opening_time %}
-                                {{ hours.opening_time }}
-                                {% endif %} -
-                                {% if hours.closing_time %}
-                                {{ hours.closing_time }}
-                                {% endif %}
-                                {% endif %}
-                            </span></time>
-                        {% endfor %}
-                        {% endif %}
+                            {% if page.operating_hours %}
+                                <p class="location__meta-title">Opening hours</p>
+                                {% for hours in page.operating_hours %}
+                                    <time itemprop="openingHours" datetime="{{ hours }}" class="location__time">
+                                        <span class="location__day">{{ hours.day }}</span>:
+                                        <span class="location__hours">
+                                            {% if hours.closed == True %}
+                                                Closed
+                                            {% else %}
+                                                {% if hours.opening_time %}
+                                                    {{ hours.opening_time }}
+                                                {% endif %} -
+                                                {% if hours.closing_time %}
+                                                    {{ hours.closing_time }}
+                                                {% endif %}
+                                            {% endif %}
+                                        </span></time>
+                                {% endfor %}
+                            {% endif %}
+                        </div>
                     </div>
                 </div>
-            </div>
 
-            <div class="col-md-7">
-                <div class="row hidden-md-up">
-                    {{ page.body }}
+                <div class="col-md-7">
+                    <div class="row hidden-md-up">
+                        {{ page.body }}
+                    </div>
                 </div>
             </div>
         </div>
     </div>
-</div>
 
-{% endblock content %}
+{% endblock content %}

+ 7 - 7
bakerydemo/templates/locations/locations_index_page.html

@@ -3,14 +3,14 @@
 
 {% block content %}
 
-{% include "base/include/header-index.html" %}
+    {% include "base/include/header-index.html" %}
 
-<div class="container">
-    <div class="location-list-page">
-        {% for location in locations %}
-            {% include "includes/card/picture-card.html" with page=location portrait=False %}
-        {% endfor %}
+    <div class="container">
+        <div class="location-list-page">
+            {% for location in locations %}
+                {% include "includes/card/picture-card.html" with page=location portrait=False %}
+            {% endfor %}
+        </div>
     </div>
-</div>
 {% endblock content %}
 

+ 40 - 40
bakerydemo/templates/search/search_results.html

@@ -4,46 +4,46 @@
 {% block title %}Search{% if search_results %} results{% endif %}{% if search_query %} for “{{ search_query }}”{% endif %}{% endblock %}
 
 {% block content %}
-<div class="container">
-    <div class="row">
-        <div class="col-md-8">
-            <h1>Search results</h1>
-            {% if search_results %}
-                <p class="search__introduction">You searched{% if search_query %} for “{{ search_query }}”{% endif %}, {{ search_results|length }} result{{ search_results|length|pluralize }} found.</p>
-                <ul class="search__results">
-                    {% for result in search_results %}
-                        <li class="listing-card">
-                            <a class="listing-card__link" href="{% pageurl result.specific %}">
-                                {% if result.specific.image %}
-                                    <figure class="listing-card__image">
-                                        {% image result.specific.image fill-180x180-c100 loading="lazy" %}
-                                    </figure>
-                                {% endif %}
-                                <div class="listing-card__contents">
-                                    <h3 class="listing-card__title">{{ result.specific }}</h3>
-                                    <p class="listing-card__content-type">
-                                        {% if result.specific.content_type.model == "blogpage" %}
-                                            Blog Post
-                                        {% elif result.specific.content_type.model == "locationpage" %}
-                                            Location
-                                        {% else %}
-                                            Bread
-                                        {% endif %}
-                                    </p>
-                                    <p class="listing-card__description">
-                                        {% if result.specific.search_description %}{{ result.specific.search_description|richtext }}{% endif %}
-                                    </p>
-                                </div>
-                            </a>
-                        </li>
-                    {% endfor %}
-                </ul>
-            {% elif search_query %}
-                <p class="search__introduction">No results found for “{{ search_query }}”.</p>
-            {% else %}
-                <p class="search__introduction">You didn&apos;t search for anything!</p>
-            {% endif %}
+    <div class="container">
+        <div class="row">
+            <div class="col-md-8">
+                <h1>Search results</h1>
+                {% if search_results %}
+                    <p class="search__introduction">You searched{% if search_query %} for “{{ search_query }}”{% endif %}, {{ search_results|length }} result{{ search_results|length|pluralize }} found.</p>
+                    <ul class="search__results">
+                        {% for result in search_results %}
+                            <li class="listing-card">
+                                <a class="listing-card__link" href="{% pageurl result.specific %}">
+                                    {% if result.specific.image %}
+                                        <figure class="listing-card__image">
+                                            {% image result.specific.image fill-180x180-c100 loading="lazy" %}
+                                        </figure>
+                                    {% endif %}
+                                    <div class="listing-card__contents">
+                                        <h3 class="listing-card__title">{{ result.specific }}</h3>
+                                        <p class="listing-card__content-type">
+                                            {% if result.specific.content_type.model == "blogpage" %}
+                                                Blog Post
+                                            {% elif result.specific.content_type.model == "locationpage" %}
+                                                Location
+                                            {% else %}
+                                                Bread
+                                            {% endif %}
+                                        </p>
+                                        <p class="listing-card__description">
+                                            {% if result.specific.search_description %}{{ result.specific.search_description|richtext }}{% endif %}
+                                        </p>
+                                    </div>
+                                </a>
+                            </li>
+                        {% endfor %}
+                    </ul>
+                {% elif search_query %}
+                    <p class="search__introduction">No results found for “{{ search_query }}”.</p>
+                {% else %}
+                    <p class="search__introduction">You didn&apos;t search for anything!</p>
+                {% endif %}
+            </div>
         </div>
     </div>
-</div>
 {% endblock content %}

+ 18 - 18
bakerydemo/templates/tags/breadcrumbs.html

@@ -1,22 +1,22 @@
 {% load wagtailcore_tags %}
 
 {% if ancestors %}
-<nav class="breadcrumb-container" aria-label="Breadcrumb">
-  <div class="container">
-    <div class="row">
-      <div class="col-lg-12">
-        <ol class="breadcrumb">
-          {% for ancestor in ancestors %}
-          {% if forloop.last %}
-          <li aria-current="page">{{ ancestor }}</li>
-          {% else %}
-          <li><a href="{% pageurl ancestor %}">{% if forloop.first %}Home{% else %}{{ ancestor }}{% endif %}</a>
-            {% include "includes/chevron-icon.html" with class="breadcrumb__chevron-icon" %}</li>
-          {% endif %}
-          {% endfor %}
-        </ol>
-      </div>
-    </div>
-  </div>
-</nav>
+    <nav class="breadcrumb-container" aria-label="Breadcrumb">
+        <div class="container">
+            <div class="row">
+                <div class="col-lg-12">
+                    <ol class="breadcrumb">
+                        {% for ancestor in ancestors %}
+                            {% if forloop.last %}
+                                <li aria-current="page">{{ ancestor }}</li>
+                            {% else %}
+                                <li><a href="{% pageurl ancestor %}">{% if forloop.first %}Home{% else %}{{ ancestor }}{% endif %}</a>
+                                    {% include "includes/chevron-icon.html" with class="breadcrumb__chevron-icon" %}</li>
+                            {% endif %}
+                        {% endfor %}
+                    </ol>
+                </div>
+            </div>
+        </div>
+    </nav>
 {% endif %}

+ 9 - 9
bakerydemo/templates/tags/gallery.html

@@ -1,13 +1,13 @@
 {% load wagtailimages_tags %}
 
 {% for img in images %}
-<div class="picture-card">
-    <figure class="picture-card__image">
-        {% image img fill-645x480-c100 loading="lazy" %}
-        <div class="picture-card__contents">
-            <p class="picture-card__title">{{ img.title }}</p>
-        </div>
-    </figure>
-</div>
-{{ image.title }}
+    <div class="picture-card">
+        <figure class="picture-card__image">
+            {% image img fill-645x480-c100 loading="lazy" %}
+            <div class="picture-card__contents">
+                <p class="picture-card__title">{{ img.title }}</p>
+            </div>
+        </figure>
+    </div>
+    {{ image.title }}
 {% endfor %}

+ 23 - 23
bakerydemo/templates/tags/sidebar_menu.html

@@ -2,31 +2,31 @@
 {% get_site_root as site_root %}
 
 {% if calling_page|has_protocol_parent and calling_page.content_type.model == 'standardpage' %}
-  <div class="off-canvas position-left reveal-for-large bla" id="offCanvasLeft" data-off-canvas>
-    {% protocol_menu calling_page=calling_page %}
-  </div>
+    <div class="off-canvas position-left reveal-for-large bla" id="offCanvasLeft" data-off-canvas>
+        {% protocol_menu calling_page=calling_page %}
+    </div>
 {% elif ancestor.has_children %}
-  <div class="off-canvas position-left reveal-for-large" id="offCanvasLeft" data-off-canvas>
-    <nav class="sidebar-nav">
-      <h3>In this section</h3>
-      <ul class="vertical menu">
-        {% for menuitem in ancestor.children %}
-          <li class="{% if menuitem.is_active %}is-active{% endif %}">
-            <a href="{% pageurl menuitem %}">{{ menuitem.title }}</a>
+    <div class="off-canvas position-left reveal-for-large" id="offCanvasLeft" data-off-canvas>
+        <nav class="sidebar-nav">
+            <h3>In this section</h3>
+            <ul class="vertical menu">
+                {% for menuitem in ancestor.children %}
+                    <li class="{% if menuitem.is_active %}is-active{% endif %}">
+                        <a href="{% pageurl menuitem %}">{{ menuitem.title }}</a>
 
-            {% if menuitem.is_active and menuitem.has_children %}
-              <ul class="nested vertical menu is-active">
-                {% for child in menuitem.children %}
-                  <li>
-                    <a href="{% pageurl child %}">{{ child.title }}</a>
-                  </li>
+                        {% if menuitem.is_active and menuitem.has_children %}
+                            <ul class="nested vertical menu is-active">
+                                {% for child in menuitem.children %}
+                                    <li>
+                                        <a href="{% pageurl child %}">{{ child.title }}</a>
+                                    </li>
 
+                                {% endfor %}
+                            </ul>
+                        {% endif %}
+                    </li>
                 {% endfor %}
-              </ul>
-            {% endif %}
-          </li>
-        {% endfor %}
-      </ul>
-    </nav>
-  </div>
+            </ul>
+        </nav>
+    </div>
 {% endif %}

+ 29 - 29
bakerydemo/templates/tags/table_of_contents_menu.html

@@ -1,35 +1,35 @@
 {% if section_pages %}
-  <nav class="sidebar-nav section-nav">
-    <h3>In this section</h3>
-    <ul class="vertical menu">
-      {% for section_page in section_pages %}
-        <li class="{% if section_page.is_active %}is-active{% endif %}">
-          <a href="{{section_page.url}}">{{ section_page.title }}</a>
-        </li>
-      {% endfor %}
-    </ul>
-  </nav>
+    <nav class="sidebar-nav section-nav">
+        <h3>In this section</h3>
+        <ul class="vertical menu">
+            {% for section_page in section_pages %}
+                <li class="{% if section_page.is_active %}is-active{% endif %}">
+                    <a href="{{section_page.url}}">{{ section_page.title }}</a>
+                </li>
+            {% endfor %}
+        </ul>
+    </nav>
 {% endif %}
 {% if article_headings %}
-  <div data-sticky-container>
-    <div class="sticky" data-sticky data-sticky-on="large" data-margin-top="3" data-top-anchor="on-this-page:top" data-btm-anchor="main-end:bottom">
-      <nav class="sidebar-nav article-nav">
-        <h3 id="on-this-page">On this page</h3>
-        <ul class="vertical menu" data-magellan data-bar-offset="60">
-          {% for heading in article_headings %}
-            <li>
-              <a href="#{{heading.value|slugify}}">{{heading.value}}</a>
-              {% if heading.children %}
-                <ul>
-                  {% for subheading in heading.children %}
-                    <li><a href="#{{subheading|slugify}}">{{subheading}}</a></li>
-                  {% endfor %}
+    <div data-sticky-container>
+        <div class="sticky" data-sticky data-sticky-on="large" data-margin-top="3" data-top-anchor="on-this-page:top" data-btm-anchor="main-end:bottom">
+            <nav class="sidebar-nav article-nav">
+                <h3 id="on-this-page">On this page</h3>
+                <ul class="vertical menu" data-magellan data-bar-offset="60">
+                    {% for heading in article_headings %}
+                        <li>
+                            <a href="#{{heading.value|slugify}}">{{heading.value}}</a>
+                            {% if heading.children %}
+                                <ul>
+                                    {% for subheading in heading.children %}
+                                        <li><a href="#{{subheading|slugify}}">{{subheading}}</a></li>
+                                    {% endfor %}
+                                </ul>
+                            {% endif %}
+                        </li>
+                    {% endfor %}
                 </ul>
-              {% endif %}
-            </li>
-          {% endfor %}
-        </ul>
-      </nav>
+            </nav>
+        </div>
     </div>
-  </div>
 {% endif %}

+ 9 - 9
bakerydemo/templates/tags/top_menu.html

@@ -2,13 +2,13 @@
 {% get_site_root as site_root %}
 
 {% for menuitem in menuitems %}
-  <li class="presentation {{ menuitem.title|lower|cut:" " }}{% if menuitem.active %} active{% endif %}{% if menuitem.show_dropdown %} has-submenu{% endif %}">
-      {% if menuitem.show_dropdown %}
-          <a href="{% pageurl menuitem %}" class="allow-toggle">{{ menuitem.title }} <span><a class="caret-custom dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"></a></span></a>
-              {% top_menu_children parent=menuitem %}
-              {# Used to display child menu items #}
-      {% else %}
-          <a href="{% pageurl menuitem %}">{{ menuitem.title }}</a>
-      {% endif %}
-  </li>
+    <li class="presentation {{ menuitem.title|lower|cut:" " }}{% if menuitem.active %} active{% endif %}{% if menuitem.show_dropdown %} has-submenu{% endif %}">
+        {% if menuitem.show_dropdown %}
+            <a href="{% pageurl menuitem %}" class="allow-toggle">{{ menuitem.title }} <span><a class="caret-custom dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"></a></span></a>
+            {% top_menu_children parent=menuitem %}
+            {# Used to display child menu items #}
+        {% else %}
+            <a href="{% pageurl menuitem %}">{{ menuitem.title }}</a>
+        {% endif %}
+    </li>
 {% endfor %}

+ 3 - 3
bakerydemo/templates/tags/top_menu_children.html

@@ -1,7 +1,7 @@
 {% load navigation_tags wagtailcore_tags %}
 
 <ul class="dropdown-menu">
-  {% for child in menuitems_children %}
-    <li><a href="{% pageurl child %}">{{ child.title }}</a></li>
-  {% endfor %}
+    {% for child in menuitems_children %}
+        <li><a href="{% pageurl child %}">{{ child.title }}</a></li>
+    {% endfor %}
 </ul>