&__image {
- @include fluid-aspect(9 4, "img");
+ @include fluid-aspect(9 4);
@include mq($until: xs) {
- @include fluid-aspect(4.5 8, "img");
+ @include fluid-aspect(4.5 8);
>img {
width: 310%;
left: -50%;
}
+ &__placeholder {
+
+ background: $color-main;
+
+ &.pattern-bg--squares {
+ background-color: white;
+ background-image: url(../img/patterns/squares.png);
+ opacity: 0.4;
+ }
+ &.pattern-bg--circles {
+ background-color: white;
+ background-image: url(../img/patterns/circles.png);
+ opacity: 0.2;
+ }
+ &.pattern-bg--stripes {
+ background-color: white;
+ background-image: url(../img/patterns/stripes.png);
+ opacity: 0.4;
+ }
+ &.pattern-bg--triangles {
+ background-color: white;
+ background-image: url(../img/patterns/triangles.png);
+ opacity: 0.2;
+ }
+
+ }
+
&__content {
position: absolute;
{% load mezzanine_tags organization_tags %}
<a href="{{ object.get_absolute_url }}" title="{{ object.title }}" class="page-box">
<div class="page-box__image">
- {% with object.get_content_model.images.all|get_type:'card' as images %}
- {% if images %}
- <img src="{{ MEDIA_URL }}{% thumbnail images.0.file 900 400 %}" />
- {% endif %}
- {% endwith %}
+ {% with object.get_content_model.images.all|get_type:'card' as images %}
+ {% if images %}
+ <img src="{{ MEDIA_URL }}{% thumbnail images.0.file 900 400 %}" />
+ {% else %}
+ {% with page.get_ascendants|last as top_level_parent %}
+ {% if top_level_parent.get_content_model.weaving_css_class %}
+ <div class="page-box__placeholder {{top_level_parent.get_content_model.weaving_css_class}}"></div>
+ {% endif %}
+ {% endwith %}
+ {% endif %}
+ {% endwith %}
</div>
<div class="page-box__content">
<div>