Browse Source

+subtitle

refactoring
Nico Schottelius 3 years ago
parent
commit
143a19efae
  1. 1
      content/u/products/contents.lr
  2. 4
      models/products.ini
  3. 1
      templates/layout-2020.html
  4. 8
      templates/products.html

1
content/u/products/contents.lr

@ -3,3 +3,4 @@ _model: products
title: Products
---
subtitle: Our offer to make your life easier.
---

4
models/products.ini

@ -7,5 +7,9 @@ hidden = yes
label = Title
type = string
[fields.subtitle]
label = Subtitle
type = string
[children]
model = product

1
templates/layout-2020.html

@ -60,6 +60,7 @@
{% block content %}{% endblock %}
<hr/>
<footer class="footer mt-auto py-3">
<div class="container">
<span class="text-muted">Copyright

8
templates/products.html

@ -1,14 +1,15 @@
{% extends "layout-2020.html" %}
{% block title %}{{ this.title }}{% endblock %}
{% block content %}
{% block subtitle %}{{ this.subtitle }}{% endblock %}
{% block content %}
<div class="container">
{% for product in this.children %}
{% if loop.first %}
<div class="row mb-3">
{% endif %}
<div class="col-md-4">
<div class="col-md-4 mb-3">
<div class="card">
<div class="card-body">
<h5 class="card-title">{{ product.title }}</h5>
@ -19,8 +20,7 @@
</div>
{% if loop.index is divisibleby 3 %}
</div>
<hr/>
<div class="row">
<div class="row mb-3">
{% endif %}
{% if loop.last %}
</div>

Loading…
Cancel
Save