Skip to content

Commit

Permalink
Added right sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
lucascumsille committed Apr 10, 2024
1 parent 24e608e commit 0b412e0
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 1 deletion.
1 change: 1 addition & 0 deletions www/docs/style/sass/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -267,5 +267,6 @@ form {
@import "parts/regional-headers";
@import "parts/toc";
@import "parts/donate_form";
@import "parts/sidebar_right";

@import "print";
2 changes: 2 additions & 0 deletions www/docs/style/sass/pages/_business.scss
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@

.rss-feed {
font-size: 0.8em;
margin-bottom: 1rem;
}

.calendar {
Expand All @@ -106,6 +107,7 @@
}

.business-section__secondary__item {
margin-bottom: 1em;
h3 {
color: $colour_grey;
margin: 0;
Expand Down
1 change: 0 additions & 1 deletion www/docs/style/sass/pages/_search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,6 @@ table.search-results-grouped {

a {
display: block;
border-bottom: 1px solid darken($body-bg, 5%);
padding: 0.3em 0;
}

Expand Down
9 changes: 9 additions & 0 deletions www/docs/style/sass/parts/_sidebar_right.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.sidebar__unit__featured_side--right {
padding: 2rem 1.5rem;
border-top: 1px solid #f3f1eb;
border-bottom: 1px solid #f3f1eb;
margin: -1px -1.5rem; // 1px Allows the horizontal borders at the top and bottom to collapse with each other when two boxes stack with each other .
& *:last-child {
margin-bottom: 0;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@


<?php $featured_item = $announcement_manager->get_random_valid_item("sidebar_right_donation"); ?>

<?php if ( $featured_item ) { ?>

<div class="sidebar__unit__featured_side sidebar__unit__featured_side--right">
<div class="featured_side__content">
<a href="<?= $featured_item->url ?>"><h3 class="content__title"><?= $featured_item->title ?></h3></a>
<p class="content__description"><?= $featured_item->content ?></p>
<?php if (isset($featured_item->button_text)) { ?>
<a class="button content__button <?= $featured_item->button_class ?>" href="<?= $featured_item->url ?>"><?= (isset($featured_item->button_text) ? $featured_item->button_text : "Read more") ?></a>
<?php } ?>
</div>
</div>

<?php }; ?>

<?php $featured_item = $announcement_manager->get_random_valid_item("sidebar_right_subscribe"); ?>

<?php if ( $featured_item ) { ?>

<div class="sidebar__unit__featured_side sidebar__unit__featured_side--right">
<div class="featured_side__content">
<a href="<?= $featured_item->url ?>"><h3 class="content__title"><?= $featured_item->title ?></h3></a>
<p class="content__description"><?= $featured_item->content ?></p>
<?php if (isset($featured_item->button_text)) { ?>
<a class="button content__button <?= $featured_item->button_class ?>" href="<?= $featured_item->url ?>"><?= (isset($featured_item->button_text) ? $featured_item->button_text : "Read more") ?></a>
<?php } ?>
</div>
</div>

<?php }; ?>
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
<a href="/voting-information"><?= gettext('Learn more about our voting records and what they mean.') ?></a>
</p>
</div>
<?php include dirname(__FILE__) . '/../announcements/_sidebar_right_announcements.php'; ?>
</div>
</div>
</div>
4 changes: 4 additions & 0 deletions www/includes/easyparliament/templates/html/people/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,11 @@
<a href="<?= $urls['plain'] ?>?all=1"><?= sprintf(gettext('Historical list of all %s'), $rep_plural) ?></a>
</p>
<?php } ?>

<?php include dirname(__FILE__) . '/../announcements/_sidebar_right_announcements.php'; ?>

</div>

</div>

</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<p class="rss-feed">
<a href="<?= WEBPATH . $content['rssurl'] ?>"><?= sprintf(gettext('RSS feed of %s'), $title) ?></a>
</p>
<?php include dirname(__FILE__) . '/../announcements/_sidebar_right_announcements.php'; ?>
</div>
<?php } ?>
</div>
Expand Down

0 comments on commit 0b412e0

Please sign in to comment.