From: Jérémy Fabre Date: Mon, 12 Sep 2016 12:04:41 +0000 (+0200) Subject: Add the page block styles X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=2cc28a03cf63d25421a84213af1ac45b6bf978ad;p=mezzo.git Add the page block styles --- diff --git a/app/static/src/sass/modules/_page.scss b/app/static/src/sass/modules/_page.scss index 43d69ac1..028b795c 100644 --- a/app/static/src/sass/modules/_page.scss +++ b/app/static/src/sass/modules/_page.scss @@ -57,4 +57,55 @@ $module: ".page"; } + &__block { + + @include padding-bottom(1); + background-color: white; + + &--yellow { + + background-color: $color-main; + @include padding-top(2); + @include padding-bottom(2); + + h2:first-child { + margin-top: 0; + } + + } + + &--black { + + background-color: $color-black; + color: white; + @include padding-top(2); + @include padding-bottom(2); + + h2:first-child { + margin-top: 0; + } + + } + + &--red { + + background-color: red; + color: white; + @include padding-top(2); + @include padding-bottom(2); + + h2:first-child { + margin-top: 0; + } + + } + + p:last-child { + + margin-bottom: 0; + + } + + } + } diff --git a/app/templates/core/inc/block.html b/app/templates/core/inc/block.html index 1e013c85..8883640f 100644 --- a/app/templates/core/inc/block.html +++ b/app/templates/core/inc/block.html @@ -1,30 +1,25 @@ {% load i18n mezzanine_tags keyword_tags pages_tags organization_tags %} {% if blocks %} -
-
-
-
-
- {% for block in blocks %} - {% if block.background_color %} - color style : {{ block.background_color }} - {% endif %} -
-
- {% if not forloop.first and block.with_separator %} -
- {% endif %} -

{{ block.title }}

- {% if block.content %} - {{ block.content|richtext_filters|safe }} - {% else %} - {% lorem 3 p %} - {% endif %} -
+
+
+ {% for block in blocks %} +
+
+
+
+ {% if not forloop.first and block.with_separator %} +
+ {% endif %} +

{{ block.title }}

+ {% if block.content %} + {{ block.content|richtext_filters|safe }} + {% else %} + {% lorem 3 p %} + {% endif %}
- {% endfor %} +
-
+ {% endfor %}
{% endif %}