Skip to content

Commit

Permalink
Standardise use of .business-section__secondary__item
Browse files Browse the repository at this point in the history
Ensuring that each item in the business section sidebar is wrapped in
a .business-section__secondary__item allows us to simplify the vertical
spacing styles, and prevents awkward double space above calendars.
  • Loading branch information
zarino authored and dracos committed Mar 11, 2021
1 parent dfbeaa3 commit f832dac
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 20 deletions.
9 changes: 5 additions & 4 deletions www/docs/style/sass/pages/_business.scss
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,12 @@
}

.rss-feed {
margin-top: 2em;
font-size: 0.8em;
}

.calendar {
margin: 1em 0 2em 0;
}
}

.business-section__secondary__item {
Expand All @@ -114,9 +117,7 @@
}
}

.business-section__secondary__item + .business-section__secondary__item,
.business-section__secondary .calendar,
.business-section__secondary .minisurvey {
.business-section__secondary__item + .business-section__secondary__item {
margin-top: 2em;

@media (min-height: 700px) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,24 @@
<h3>What is this?</h3>
<?php include '_' . $section . '_desc.php'; ?>
</div>
<?php
$calendar = $content['calendar']['years'];
include '_calendar_section.php';
if ( !isset($no_survey) ) {
include( dirname(__FILE__) . '/../sidebar/looking_for.php' );
}
?>
<?php if ( isset($content['rssurl']) ) { ?>
<p class="rss-feed">
<a href="<?= WEBPATH . $content['rssurl'] ?>">RSS feed of <?= $title ?></a>
</p>
<?php } ?>
<div class="business-section__secondary__item">
<?php
$calendar = $content['calendar']['years'];
include '_calendar_section.php';
?>
</div>
<?php if ( !isset($no_survey) ) { ?>
<div class="business-section__secondary__item">
<?php include( dirname(__FILE__) . '/../sidebar/looking_for.php' ); ?>
</div>
<?php } ?>
<?php if ( isset($content['rssurl']) ) { ?>
<div class="business-section__secondary__item">
<p class="rss-feed">
<a href="<?= WEBPATH . $content['rssurl'] ?>">RSS feed of <?= $title ?></a>
</p>
</div>
<?php } ?>
</div>
<?php } else { ?>
<div class="business-section__primary">
Expand Down
10 changes: 6 additions & 4 deletions www/includes/easyparliament/templates/html/section/day.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,12 @@
<h3>What is this?</h3>
<?php include '_' . $section . '_desc.php'; ?>
</div>
<?php
include '_calendar_section.php';
include( dirname(__FILE__) . '/../sidebar/looking_for.php' );
?>
<div class="business-section__secondary__item">
<?php include '_calendar_section.php'; ?>
</div>
<div class="business-section__secondary__item">
<?php include( dirname(__FILE__) . '/../sidebar/looking_for.php' ); ?>
</div>
</div>
<?php } else { ?>
<div class="business-section__primary">
Expand Down

0 comments on commit f832dac

Please sign in to comment.