Style the recommendations block

References 
This commit is contained in:
Oliver Davies 2020-07-15 21:05:58 +01:00
parent 1e2183caae
commit ff77296e4c
4 changed files with 38 additions and 0 deletions

View file

@ -0,0 +1,5 @@
.recommendation {
.photo img {
@apply rounded-full
}
}

View file

@ -3,6 +3,7 @@
@import './components/lead.pcss';
@import './components/markup.pcss';
@import './components/note.pcss';
@import './components/recommendation.pcss';
@import './components/table.pcss';
@import './components/video.pcss';
@import './components/widget.pcss';

View file

@ -1,3 +1,9 @@
.no-js .js-hidden {
display: none
}
@responsive {
.first-of-type\:mt-0:first-of-type {
@apply mt-0 !important
}
}

View file

@ -0,0 +1,26 @@
<article class="recommendation mt-8 first-of-type:mt-0">
<h2>{{ label }}</h2>
<div
class="
mt-1 flex flex-col-reverse
sm:mt-0 sm:flex-row sm:space-y-0 sm:space-x-8
"
>
<div class="mt-4 sm:mt-0">
<div>
{{ content.field_role }}
</div>
<div class="mt-2 sm:mt-4">
{{ content|without('field_company', 'field_role', 'field_photo') }}
</div>
</div>
{% if content.field_photo %}
<div class="photo flex-shrink-0 flex justify-center">
{{ content.field_photo }}
</div>
{% endif %}
</div>
</article>