Skip to content

Instantly share code, notes, and snippets.

/* Paste this after your CSS, but before the media queries begin. */
.spev-jpac-top h1 {
color: #FFF;
}
.spev-jpac-top {
position: relative;
top: 130px;
left: 10px;
@lenagroeger
lenagroeger / gist:9355408
Created March 4, 2014 20:54
mia-table-styles
#mia #yearlycost th, #mia #yearlycost .header{
font-size: 11px;
text-transform: uppercase;
color: #999;
font-weight: normal;
}
#mia #yearlycost td, th {
padding: 10px;
text-align: left;
@lenagroeger
lenagroeger / gist:9212488
Created February 25, 2014 16:33
MIA SPEV
<!-- START OF MIA SPEV -->
<style type="text/css">
#spev-mia {
width: 956px;
height: 580px;
position: relative;
padding-top: 10px;
}
@lenagroeger
lenagroeger / typeahead autocomplete
Last active December 28, 2015 22:09
Typeahead Autofill AutoComplete
<script type="text/javascript" src="http://propublica.s3.amazonaws.com/projects/projectx/jquerytypeahead.js"></script>
<script type="text/javascript">
propublica.views.nameTypeahead = propublica.View.extend({
tag : "input",
cssClass : "name_typeahead",
render : function(){
var typeaheadName = [
@lenagroeger
lenagroeger / social sharing buttons
Created November 19, 2013 21:53
Social Sharing Buttons
<!-- SOCIAL SHARING SNIPPET
make sure you include the socialsnippet.js, get-involved.css, and socialsnippet.css
-->
<script type="text/javascript" src="http://propublica.s3.amazonaws.com/assets/social/socialsnippet.js"></script>
<link type="text/css" rel="stylesheet" href="http://www.propublica.org/css/get-involved.css?20130301" type="text/css" media="all" charset="utf-8" />
<link rel="stylesheet" href="http://propublica.s3.amazonaws.com/assets/social/socialsnippet.css">
<div class="social_section">
@lenagroeger
lenagroeger / takeaways box
Created November 19, 2013 21:52
Takeaways Box
<!-- TAKEAWAY BOX
make sure you include the socialsnippet.js, get-involved.css, and socialsnippet.css
-->
<script type="text/javascript" src="http://propublica.s3.amazonaws.com/assets/social/socialsnippet.js"></script>
<link type="text/css" rel="stylesheet" href="http://www.propublica.org/css/get-involved.css?20130301" type="text/css" media="all" charset="utf-8" />
<link rel="stylesheet" href="http://propublica.s3.amazonaws.com/assets/social/socialsnippet.css">
<div class="right-sidebar-media" id="some-id">
<h2>Takeaways</h2>
.annotation {
background: #cecbc3 ;
border-radius: 3px;
padding: 0px 3px;
transition: all 0.10s ease-in-out;
-webkit-transition: all 0.10s ease-in-out;
-moz-transition: all 0.10s ease-in-out;
cursor:pointer;
}
@lenagroeger
lenagroeger / prevent scrolling on iframe
Last active December 21, 2015 09:39
prevent scrolling on iframe
$('.overlaydiv').bind('mousewheel', function (e) {
$(this).scrollTop($(this).scrollTop() - e.originalEvent.wheelDeltaY);
//prevent page fom scrolling
return false;
});
function showInfo(data, tabletop) {
var m_td = [];
var senators = [];
$.each( tabletop.sheets("Members").all(), function(i, member) {
if (member.office == "Senate") {
if (member.twitter) {
var twitter = "@" + member.twitter
} else {
var twitter = ""
}
task :import => :environment do
Member.delete_all
f = FasterCSV.open("#{Rails.root.to_s}/db/initial/membersgrades.csv", :headers => true)
f.each do |row|
m = Member.new
m.grade = row["grade"]
m.nra_rating = row["rating"]
m.full_name = row["full_name"]
m.lastname = row["lastname"]
m.firstname = row["firstname"]