From: Jérémy Fabre Date: Tue, 18 Oct 2016 14:06:15 +0000 (+0200) Subject: Product box style implementation X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=ef18485af3fe871e65861f0de1dfe96493804186;p=mezzo.git Product box style implementation --- diff --git a/app/static/src/sass/modules/_all.scss b/app/static/src/sass/modules/_all.scss index fd876f0e..1b8917a7 100755 --- a/app/static/src/sass/modules/_all.scss +++ b/app/static/src/sass/modules/_all.scss @@ -15,6 +15,7 @@ @import 'boxes/person-list-box'; @import 'boxes/event-line-box'; @import 'boxes/job-line-box'; +@import 'boxes/product-box'; // Sliders @import 'sliders/slider-page'; diff --git a/app/static/src/sass/modules/boxes/_product-box.scss b/app/static/src/sass/modules/boxes/_product-box.scss new file mode 100644 index 00000000..7e79eec0 --- /dev/null +++ b/app/static/src/sass/modules/boxes/_product-box.scss @@ -0,0 +1,55 @@ +$module: ".product-box"; + +#{$module} { + + position: relative; + @include margin-bottom(2); + + &__image { + + @include fluid-aspect(320 100); + + } + + &__title { + + @include font-size(xxl); + @include line-height(2); + @include typeface(sans-serif); + @include margin(0 0 1 0); + + } + + &__desc { + + @include font-size(s); + @include line-height(.75); + @include typeface(serif); + @include margin(1 0 .25 0); + font-weight: weight(light); + + } + + &__content { + + @include padding(.5); + + height: 150px; + + } + + &:after { + + content: ""; + display: block; + height: 1px; + width: 100%; + background: #979797; + position: absolute; + bottom: -24px; + left: 0; + right: 0; + + } + +} diff --git a/app/templates/pages/page.html b/app/templates/pages/page.html index c5545de6..6ce548b4 100644 --- a/app/templates/pages/page.html +++ b/app/templates/pages/page.html @@ -106,11 +106,8 @@ {% endfor %} {% endblock %} - {% block page_person_list %} {% endblock %} - {% block products %} - {% endblock %} {% block page_sub_content %} {% with object.blocks.all as blocks %} {% include "core/inc/block.html" %} @@ -123,6 +120,8 @@
+ {% block products %} + {% endblock %} {% block page_related_content %} {% with page.dynamic_content_pages.all as dynamic_content %} {% include "core/inc/related_content.html" %} diff --git a/app/templates/shop/includes/product_list_square_style.html b/app/templates/shop/includes/product_list_square_style.html index 39bf24f1..8eb65f4c 100644 --- a/app/templates/shop/includes/product_list_square_style.html +++ b/app/templates/shop/includes/product_list_square_style.html @@ -19,22 +19,20 @@ {% with product_inline.product as product %} {% with product.links.all|get_type_link:"link" as links %}
-
+
{% if product.images.all %} -
- -
- product -
-
-
+ +
+ product +
+
{% endif %} -
-

{{ product.title }}

+
+

{{ product.title }}

{% if product.description %} -
{{ product.description|richtext_filters|safe|truncatechars_html:255 }}
+
{{ product.description|richtext_filters|safe|truncatechars_html:100 }}
{% elif product.content %} -
{{ product.content|richtext_filters|safe|truncatechars_html:255 }}
+
{{ product.content|richtext_filters|safe|truncatechars_html:100 }}
{% endif %}