From 2cc28a03cf63d25421a84213af1ac45b6bf978ad Mon Sep 17 00:00:00 2001 From: =?utf8?q?Je=CC=81re=CC=81my=20Fabre?= Date: Mon, 12 Sep 2016 14:04:41 +0200 Subject: [PATCH] Add the page block styles --- app/static/src/sass/modules/_page.scss | 51 ++++++++++++++++++++++++++ app/templates/core/inc/block.html | 41 +++++++++------------ 2 files changed, 69 insertions(+), 23 deletions(-) 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 %} -- 2.39.5