Skip to content

Commit

Permalink
Fix sidebar running over the footer on alerts page
Browse files Browse the repository at this point in the history
This page used the .sticky-sidebar class that is used in the help
section to present the in-page navigation of a lot of text. There,
there's no danger of the sidebar being scrolled over the footer
because it's very short. On this page though, there is.

This commit removes that class, so that the recent photos are fixed
in position with the top of the content. I don't think this is a
great loss for usability or design. It also removes the alertindex
class, which was only used to work around this issue.

Closes #1168
  • Loading branch information
Steven Day authored and dracos committed Jul 31, 2015
1 parent 366f6b1 commit b748677
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 16 deletions.
4 changes: 2 additions & 2 deletions templates/web/base/alert/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[% INCLUDE 'header.html', title = loc('Local RSS feeds and email alerts'), bodyclass = 'twothirdswidthpage alertindex' %]
[% INCLUDE 'header.html', title = loc('Local RSS feeds and email alerts'), bodyclass = 'twothirdswidthpage' %]

<h1>[% loc('Local RSS feeds and email alerts') %]</h1>

Expand Down Expand Up @@ -37,7 +37,7 @@ <h1>[% loc('Local RSS feeds and email alerts') %]</h1>
</form>

[% IF photos.size %]
<div class="sticky-sidebar" id="alert_recent">
<div id="alert_recent">
<aside>
<h2>[% loc('Some photos of recent reports') %]</h2>
[% FOREACH p IN photos;
Expand Down
2 changes: 1 addition & 1 deletion templates/web/base/alert/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h1>[% title %]</h1>
<form id="alerts" name="alerts" method="post" action="/alert/subscribe">

[% IF photos.size %]
<div id="alert_photos" class="sticky-sidebar">
<div id="alert_photos">
<aside>
<h2>[% loc('Photos of recent nearby reports') %]</h2>
[% FOREACH p IN photos;
Expand Down
2 changes: 1 addition & 1 deletion templates/web/fixmybarangay/alert/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ <h1>[% loc('Local RSS feeds and email alerts') %]</h1>
<form id="alerts" name="alerts" method="post" action="/alert/subscribe">

[% IF photos.size %]
<div class="sticky-sidebar" id="alert_recent">
<div id="alert_recent">
<aside>
<h2>[% loc('Some photos of recent reports') %]</h2>
[% FOREACH p IN photos;
Expand Down
4 changes: 0 additions & 4 deletions web/cobrands/eastsussex/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,6 @@ body.mappage {
line-height: 14px;
}

body.twothirdswidthpage.alertindex .content .sticky-sidebar aside {
top: -17em;
}

body.twothirdswidthpage .content .sticky-sidebar aside {
top: 0;
position: absolute;
Expand Down
8 changes: 0 additions & 8 deletions web/cobrands/fixmystreet/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -249,14 +249,6 @@ body.twothirdswidthpage {
}
}

/* hide the footer on the alert page as the interaction with the
* photo sidebar is awkward to fix */
body.alertindex {
#footer-nav {
display: none;
}
}

.next-steps {
@include clearfix;
margin-bottom: 2em; // add some space between this and the footer
Expand Down

0 comments on commit b748677

Please sign in to comment.