Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added right sidebar for donations and subscriptions #1788

Merged
merged 2 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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->url)) { ?>
<a class="button content__button <?= $featured_item->button_class ?>" href="<?= $featured_item->url ?>"><?= $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
Loading