Skip to content

Commit

Permalink
Consider all bottom spacings within *_full templates (See #37)
Browse files Browse the repository at this point in the history
- events
- news
  • Loading branch information
zoglo authored Jun 12, 2024
1 parent fae38e4 commit 94baeac
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
6 changes: 4 additions & 2 deletions contao/templates/events/event_full.html5
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</div>
<?php endif; ?>

<div class="c_text">
<div class="c_text<?= $this->details ? ' grid':''?>">
<p class="info">
<?php if ($this->recurring): ?>
<span class="recurring"><?= $this->recurring ?></span>
Expand All @@ -24,7 +24,9 @@
<h1><?= $this->title ?></h1>

<?php if ($this->details): ?>
<?= $this->details ?>
<div class="inside">
<?= $this->details ?>
</div>
<?php else: ?>
<?= method_exists($this, 'cspInlineStyles') ? $this->cspInlineStyles($this->teaser) : $this->teaser ?>
<?php endif; ?>
Expand Down
6 changes: 4 additions & 2 deletions contao/templates/news/news_full.html5
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</div>
<?php endif; ?>

<div class="c_text">
<div class="c_text<?= $this->hasText ? ' grid':''?>">
<?php if ($this->hasMetaFields || (null === $this->hasMetaFields)): // Contao 5.* BC layer for simultaneous Contao 4.13 support ?>
<?php $this->block('info'); ?>
<p class="info">
Expand All @@ -31,7 +31,9 @@
<?php endif; ?>

<?php if ($this->hasText): ?>
<?= $this->text ?>
<div class="inside">
<?= $this->text ?>
</div>
<?php else: ?>
<?= method_exists($this, 'cspInlineStyles') ? $this->cspInlineStyles($this->teaser) : $this->teaser ?>
<?php endif; ?>
Expand Down
12 changes: 10 additions & 2 deletions public/framework/scss/ctm_components/_text.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,17 @@
width: var(--img-wdth, 100%);
margin: var(--img-mt,0) var(--img-mr,0) var(--img-mb,0) var(--img-ml,0);
}
}

// Consider nested text blocks (e.g. news bundle)
.c_text {

&.grid {
--v-gap:#{$paragraph-spacing};
}

// Consider nested text blocks (e.g. news bundle)
.c_text & {
// BC-layer (see #37)
> .ce_text {
margin-bottom: $paragraph-spacing;
}
}
Expand Down

0 comments on commit 94baeac

Please sign in to comment.