Commit 34477c3d authored by Tobias Buckdahn's avatar Tobias Buckdahn

Simplified homepage only with main categories

parent 746d8a51
---
title: Categories
module_link: '/techs/explore'
module_description: 'for you to explore'
module_wrapper_classes: 'col-12'
item_wrapper_classes: 'col-12 col-sm-6 col-lg-3'
content:
items:
- '@page.self': '/techs/rotations'
- '@page.self': '/techs/offsets'
- '@page.self': '/techs/patterns'
- '@page.self': '/techs/shapes'
---
---
title: Newest
module_link: '/techs/order-by/date/desc'
module_description: 'Recently added stuff'
module_description: 'Recently added techniques'
module_wrapper_classes: 'col-12'
item_wrapper_classes: 'col-6 col-lg-3'
......
---
title: Offsets
module_link: '/techs/offsets'
module_description: 'to move gradually'
module_wrapper_classes: 'col-12 col-lg-6'
item_wrapper_classes: 'col-12 col-sm-6'
content:
items:
- '@page.descendants': '/techs/offsets'
filter:
published: true
type: 'collection'
---
---
title: Patterns
module_link: '/techs/patterns'
module_description: 'to decorate surfaces'
module_wrapper_classes: 'col-12 col-lg-6'
item_wrapper_classes: 'col-12 col-sm-6'
content:
items:
- '@page.descendants': '/techs/patterns'
filter:
published: true
type: 'collection'
---
---
title: Rotations
module_link: '/techs/rotations'
module_description: 'to change direction'
module_wrapper_classes: 'col-12 col-lg-6'
item_wrapper_classes: 'col-12 col-sm-6'
content:
items:
- '@page.descendants': '/techs/rotations'
filter:
published: true
type: 'collection'
---
---
title: Shapes
module_link: '/techs/shapes'
module_description: 'for geometric fun'
module_wrapper_classes: 'col-12 col-lg-6'
item_wrapper_classes: 'col-12 col-sm-6'
content:
items:
- '@page.descendants': '/techs/shapes'
filter:
published: true
type: 'collection'
---
......@@ -12,8 +12,5 @@ content:
custom:
- _intro
- _newest
- _rotations
- _offsets
- _patterns
- _shapes
- _categories
---
......@@ -17,6 +17,19 @@ content:
limit: 12
pagination: true
########################################################################
# Needed because size of paginated collection can't be queried
# See issue https://github.com/getgrav/grav-plugin-pagination/issues/29
unpaginated:
items:
- '@taxonomy.function': stud_tilt
- '@taxonomy.function': stud_twist
- '@taxonomy.function': axle_tilt
filter:
published: true
type: 'tech'
########################################################################
form:
name: filter-rotations
id: items-filter
......
......@@ -16,6 +16,18 @@ content:
limit: 12
pagination: true
########################################################################
# Needed because size of paginated collection can't be queried
# See issue https://github.com/getgrav/grav-plugin-pagination/issues/29
unpaginated:
items:
- '@taxonomy.function': stud_shift
- '@taxonomy.function': stud_lift
filter:
published: true
type: 'tech'
########################################################################
form:
name: filter-offsets
id: items-filter
......
......@@ -17,6 +17,19 @@ content:
limit: 12
pagination: true
########################################################################
# Needed because size of paginated collection can't be queried
# See issue https://github.com/getgrav/grav-plugin-pagination/issues/29
unpaginated:
items:
- '@taxonomy.function': pattern_1D
- '@taxonomy.function': pattern_2D
# - '@taxonomy.function': pattern_3D
filter:
published: true
type: 'tech'
########################################################################
form:
name: filter-patterns
id: items-filter
......
......@@ -16,6 +16,18 @@ content:
limit: 12
pagination: true
########################################################################
# Needed because size of paginated collection can't be queried
# See issue https://github.com/getgrav/grav-plugin-pagination/issues/29
unpaginated:
items:
- '@taxonomy.function': shape_2D
- '@taxonomy.function': shape_3D
filter:
published: true
type: 'tech'
########################################################################
form:
name: filter-shapes
id: items-filter
......
......@@ -34,7 +34,9 @@
{% endfor %}
{% if page.collection|length > 4 %}
<span class="more-count text-secondary text-center {{ class[3] }}">{{ page.collection|length - 3 }}</span>
{# See issue https://github.com/getgrav/grav-plugin-pagination/issues/29 #}
{% set fullsize = page.header.unpaginated ? page.collection('unpaginated') : page.collection %}
<span class="more-count text-secondary text-center {{ class[3] }}">{{ fullsize|length - 3 }}</span>
{% endif %}
</div>
</a>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment