Skip to content
This repository has been archived by the owner on Apr 30, 2024. It is now read-only.

Commit

Permalink
Added accessories section
Browse files Browse the repository at this point in the history
  • Loading branch information
tobias-kuendig committed Dec 15, 2016
1 parent 6e94990 commit 1cb3a9a
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 4 deletions.
2 changes: 1 addition & 1 deletion assets/main.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/main.css.map

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions partials/product/accessories.htm
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<div class="product__accessories">
<h4 class="accessories-heading">{{ 'product.accessories' | _ }}</h4>
<div class="accessories-grid">
{% for accessory in accessories %}
<a class="accessory" href="{{ __SELF__.productPage | page({slug: accessory.slug}) }}">
<div class="accessory__image">
<img src="{{ accessory.image.thumb(160, 'auto') }}" alt=""/>
</div>
<div class="accessory__name">{{ accessory.name }}</div>
</a>
{% endfor %}
</div>
</div>
20 changes: 19 additions & 1 deletion resources/styl/components/_product.styl
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,16 @@
+below('xs')
width 100%

&__accessories
margin-top 2em
padding-top 2em
border-top 1px solid #eee

&__additional-data
margin 2em 0
lost-utility clearfix


.product-info
lost-column 1/2
+below('m')
Expand All @@ -69,4 +75,16 @@

&__title
margin 0
font-size 1em
font-size 1em

.accessories-grid
lost-utility clearfix
.accessory
lost-column 1/4
&__image
lost-align center
height 120px
overflow hidden
img
max-width 100%
max-height 100%
2 changes: 2 additions & 0 deletions theme.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ translate:
search.placeholder: 'Search...'
category.empty.heading: 'No products found'
category.empty.text: 'There are no products in this category yet'
product.accessories: 'Accessories'
de:
cart.cart: 'Warenkorb'
cart.add: 'In den Warenkorb'
Expand All @@ -27,3 +28,4 @@ translate:
search.placeholder: 'Suchen...'
category.empty.heading: 'Keine Produkte gefunden'
category.empty.text: 'In dieser Kategorie gibt es derzeit keine Produkte'
product.accessories: 'Zubehör'
3 changes: 2 additions & 1 deletion version.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
1.0.1: Initial theme release
1.0.1: Initial theme release
1.0.1: Added accessories section

0 comments on commit 1cb3a9a

Please sign in to comment.