Do not make menu header transparent if background is white

Ref agaric/sites/agaric-com#86
This commit is contained in:
benjamin melançon 2020-03-02 04:29:31 -05:00
parent cb0f7b6478
commit 5a8e3c221a

View file

@ -38,6 +38,7 @@
* @ingroup themeable
*/
#}
{% set attributes = attributes.setAttribute('data-headerbg', 'transparent') %}
{%
set classes = [
'hero',
@ -46,6 +47,9 @@
%}
{% if paragraph.field_style_color is not empty %}
{% set classes = classes|merge(['is-'~paragraph.field_style_color.value]) %}
{% if paragraph.field_style_color.value == 'white' %}
{% set attributes = attributes.removeAttribute('data-headerbg') %}
{% endif %}
{% endif %}
{% if paragraph.field_style_titlebar.value == false %}
{% set classes = classes|merge(['hero-project']) %}
@ -58,12 +62,13 @@
{% set classes = classes|merge(styles) %}
{% endif %}
{% if paragraph.field_style_titlebar.value == true and paragraph.field_image is not empty %}
{% set attributes = attributes.setAttribute('data-headerbg', 'transparent').setAttribute('style', 'background-image: url('~file_url(paragraph.field_image.entity.uri.value)~')') %}
{% set attributes = attributes.setAttribute('style', 'background-image: url('~file_url(paragraph.field_image.entity.uri.value)~')') %}
{% endif %}
{% block paragraph %}
<section{{ attributes.addClass(classes) }} data-headerbg="transparent">
<section{{ attributes.addClass(classes) }}>
{% block content %}
{% if paragraph.field_style_titlebar.value == false %}
<div class="container">