Skip to content
This repository has been archived by the owner on Dec 23, 2017. It is now read-only.

Feature/alpha text #131

Merged
merged 4 commits into from
May 6, 2015
Merged
Show file tree
Hide file tree
Changes from 2 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
7 changes: 7 additions & 0 deletions static/js/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,19 +83,26 @@ $(document).ready(function() {
if (typeof window.sessionStorage !== 'undefined') {
if (window.sessionStorage.getItem('keep-banner-closed') === '1') {
$('#notice').attr('aria-hidden', true);
$('#notice-reveal').addClass('visible');
} else {
$('#notice').attr('aria-hidden', false);
}
}

$("#notice-close").on('click keypress', function(e){
if (e.which === 13 || e.type === 'click') {
$('#notice-reveal').addClass('visible');
if (typeof window.sessionStorage !== 'undefined') {
window.sessionStorage.setItem('keep-banner-closed', '1');
}
}
});

// Hide the notice reveal link if you open it
$('#notice-reveal').click(function(){
$(this).removeClass('visible');
});

// Initialize accordions
$(SLT_ACCORDION).each(function() {
accordion.init($(this));
Expand Down
8 changes: 8 additions & 0 deletions static/styles/_components/_header.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
// MODULE: Header
#notice-reveal {
display: none;

&.visible {
display: inline;
}
}

.banner {
@include font-size(1.2);
text-align: center;
Expand Down
4 changes: 4 additions & 0 deletions static/styles/_components/_states.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
display: none;
}

.visible {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Theres a .hidden selector in base/_utilities. Should that and others be moved here to this states file?

display: block;
}

@include keyframes(fadeIn) {
from {
opacity: 0;
Expand Down
8 changes: 8 additions & 0 deletions static/styles/styles.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion templates/layouts/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ <h3>Additional Information</h3>
<a id="notice-close" class="js-action js-hide link--icon" tabindex="0" data-hides="notice"><i class="ti-close"></i></a>
<h3>This site is in alpha. Tell us what you think!</h3>
<p>This is the first public release of openFEC, a new app for exploring the FEC's disclosure data. OpenFEC uses current campaign finance disclosure data but is not inclusive of all data made available by the FEC and things may not work as expected. Please continue your regular work on the <a href="http://fec.gov/pindex.shtml">Campaign Finance Disclosure Portal</a>.</p>
<p>WWe're working hard to make openFEC a useful addition to the resources available at FEC.gov. Your feedback is important to us as we build this site. <a href="mailto:[email protected]">Email us</a> and let us know how it’s working for you.</p>
<p>We're working hard to make openFEC a useful addition to the resources available at FEC.gov. Your feedback is important to us as we build this site. <a href="mailto:[email protected]">Email us</a> and let us know how it’s working for you.</p>
</div>
<div class="banner">
<span class="banner--left">Looking for fec.gov? <a href="http://www.fec.gov">Click here.</a></span>
Expand Down