Permalink
Browse files

flatten folder hierarchy

  • Loading branch information...
1 parent a343868 commit f2431b88b5bbff402a209dc3d26efe3d74bb01a7 @janl committed Mar 8, 2012
File renamed without changes.
File renamed without changes.
File renamed without changes.
View
17 gap.js
@@ -1,14 +1,25 @@
var gaps = [
{
phrasing: "",
- occupation: ",edoca; scientists",
+ occupation: "Ärztinnen",
earnings_gap: 78,
less_per_week: 275,
source: "ftp://ftp.bls.gov/pub/special.requests/lf/aat39.txt"
+ },
+ {
+ phrasing: "",
+ occupation: "Werbefachfrauen",
+ earnings_gap: 93,
+ less_per_week: 59,
+ source: "ftp://ftp.bls.gov/pub/special.requests/lf/aat39.txt"
}
+
];
var exclamations = [
- "Woha",
- "Boulderdash"
+ "Lachhaft!",
+ "Unsinn!",
+ "Wahnsinn!",
+ "Unglaublich!",
+ "Was?!"
];
View
Binary file not shown.
File renamed without changes
File renamed without changes
File renamed without changes
View
@@ -6,18 +6,17 @@
<title>Narrow the Gapp</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta itemprop="name" content="Narrow the Gapp">
- <meta itemprop="description" content="Women{$phrasing} {$occupation} make {$earnings_gap} cents to the dollar men earn doing the same job. #NarrowTheGap">
- <meta itemprop="image" content="http://narrowthegapp.com/images/narrow-the-gapp.jpg">
+ <meta itemprop="image" content="http://narrowthegapp.comimg/narrow-the-gapp.jpg">
<meta name="author" content="">
<meta property="og:title" content="Narrow the Gapp" />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://narrowthegapp.com/" />
- <meta property="og:image" content="http://narrowthegapp.com/images/narrow-the-gapp.jpg" />
+ <meta property="og:image" content="http://narrowthegapp.comimg/narrow-the-gapp.jpg" />
<meta property="og:site_name" content="Narrow the Gapp" />
<meta property="fb:admins" content="606837591" />
<!-- Le styles -->
- <link href="extlibs/bootstrap/css/bootstrap.css" rel="stylesheet">
+ <link href="css/bootstrap.css" rel="stylesheet">
<style type="text/css">
body {
padding-top: 60px;
@@ -55,18 +54,18 @@
-webkit-font-smoothing: antialiased;
}
</style>
- <link href="extlibs/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
+ <link href="css/bootstrap-responsive.css" rel="stylesheet">
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- Le fav and touch icons -->
- <link rel="shortcut icon" href="/images/favicon.ico">
- <link rel="apple-touch-icon" href="/images/apple-touch-icon.png">
- <link rel="apple-touch-icon" sizes="72x72" href="/images/apple-touch-icon-72x72.png">
- <link rel="apple-touch-icon" sizes="114x114" href="/images/apple-touch-icon-114x114.png">
+ <link rel="shortcut icon" href="favicon.ico">
+ <link rel="apple-touch-icon" href="img/apple-touch-icon.png">
+ <link rel="apple-touch-icon" sizes="72x72" href="img/apple-touch-icon-72x72.png">
+ <link rel="apple-touch-icon" sizes="114x114" href="img/apple-touch-icon-114x114.png">
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,600,700' rel='stylesheet' type='text/css'>
</head>
@@ -75,16 +74,16 @@
<div class="container">
<!-- Main hero unit for a primary call to action -->
<div class="hero-unit">
- <h1>Women{$phrasing} <span style="color:#006DCC">{$occupation}</span> make <span style="color:red">{$earnings_gap}&nbsp;cents</span> to the dollar men earn doing the same job.</h1>
+ <h1><span style="color:#006DCC">{{occupation}}</span> verdienen <span style="color:red">{{earnings_gap}}&nbsp;cents</span> pro Euro den ein Mann, der denselben Job hat, verdient.</h1>
<br>
- <p>That's ${$less_per_week} out of a weekly paycheck, which means she gets paid ${($less_per_week * 52)|number_format} less per year.</p>
+ <p>Das sind {{less_per_week}} € weniger im Momant und {{less_per_year}} € weniger im Jahr.</p>
<div style="float:left;margin-top:20px">
<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://narrowthegapp.com/?i={$id}" data-lang="en" data-text="Women{$phrasing} {$occupation_short_version} make {$earnings_gap} cents to the dollar men earn #NarrowTheGap" data-count="vertical">Tweet</a>
<div class="fb-like" data-href="http://narrowthegapp.com/?i={$id}" data-send="false" data-width="50" data-show-faces="true" data-layout="box_count" style="margin-bottom:3px;top:-3px;padding-left:6px;"></div>
<g:plusone size="tall" href="http://narrowthegapp.com/?i={$id}"></g:plusone>
<a href="http://pinterest.com/pin/create/button/?url={'http://narrowthegapp.com/?i='|urlencode}{$id}&media=http%3A%2F%2Fnarrowthegapp.com%2Fimages%2Fnarrow-the-gapp.jpg" class="pin-it-button" count-layout="vertical">Pin It</a>
</div>
- <p align="right" style="margin-top:30px"><a class="btn btn-custom btn-large" href="/">{$exclamation} Show me another &raquo;</a></p>
+ <p align="right" style="margin-top:30px"><a class="btn btn-custom btn-large" href="">{{exclamation}} Zeig mir mehr &raquo;</a></p>
<br style="clear:all;">
</div>
@@ -121,34 +120,11 @@ <h2>Hack On It</h2>
<hr>
- <div class="row" style="margin-top:20px;margin-bottom:10px;">
- <div class="span12">
- <h2>Tell people how it is in <em>your</em> line of work.</h2>
- </div>
- </div>
- <div class="row">
- <div class="span4">
- {foreach from=$occupations_array item=occ}
- {if $occ.tertiary_category neq 'Total, 16 years and over'}
- {if $occ.primary_category eq 'Service occupations'}</div><div class="span4">{/if}
- {if $occ.primary_category eq 'Sales and office occupations'}</div><div class="span4">{/if}
-
- {if $occ.primary_category}<h3><a href="/?i={$occ.id}">{$occ.primary_category}</a></h3>{/if}
- {if $occ.secondary_category}&nbsp;<b><a href="/?i={$occ.id}">{$occ.secondary_category}</a></b><br>{/if}
- {if $occ.tertiary_category}&nbsp;&nbsp;<a href="/?i={$occ.id}">{$occ.tertiary_category}</a><br>{/if}
- {if $occ.job_title}&nbsp;&nbsp;&nbsp;<a href="/?i={$occ.id}">{$occ.job_title}</a><br>{/if}
- {else}
- <h3><a href="/?i={$occ.id}">All Occupations</a></h3>
- {/if}
- {/foreach}
- </div>
- </div>
-
<hr>
<footer>
<p><a href="ftp://ftp.bls.gov/pub/special.requests/lf/aat39.txt">Source</a>: <a href="http://bls.gov">U.S. Bureau of Labor Statistics</a>. Pay gap based on 2010 median weekly earnings of full-time salary workers over 16 years of age in the United States.</p>
- <p>A <a href="http://ginatrapani.org">Gina Trapani</a> Production. Made with open data, <a href="https://github.com/ginatrapani/isosceles">Isosceles</a>, <a href="http://twitter.github.com/bootstrap/">Bootstrap</a>, insomnia, outrage, and hope. <a href="http://github.com/ginatrapani/narrowthegapp">Fork this app on GitHub.</a></p>
+ <p>A <a href="http://ginatrapani.org">Gina Trapani</a> Production. Made with open data, <a href="https://github.com/janl/mustache.js">Mustache</a>, <a href="http://twitter.github.com/bootstrap/">Bootstrap</a>, insomnia, outrage, and hope. JS-ification by <a href="https://github.com/janl">Jan L</a><a href="http://github.com/janl/narrow">Fork this app on GitHub.</a></p>
</footer>
</div> <!-- /container -->
@@ -159,56 +135,34 @@ <h3><a href="/?i={$occ.id}">All Occupations</a></h3>
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
- <script src="extlibs/bootstrap/assets/js/jquery.js"></script>
- <script src="extlibs/bootstrap/assets/js/bootstrap-transition.js"></script>
- <script src="extlibs/bootstrap/assets/js/bootstrap-alert.js"></script>
- <script src="extlibs/bootstrap/assets/js/bootstrap-modal.js"></script>
- <script src="extlibs/bootstrap/assets/js/bootstrap-dropdown.js"></script>
- <script src="extlibs/bootstrap/assets/js/bootstrap-scrollspy.js"></script>
- <script src="extlibs/bootstrap/assets/js/bootstrap-tab.js"></script>
- <script src="extlibs/bootstrap/assets/js/bootstrap-tooltip.js"></script>
- <script src="extlibs/bootstrap/assets/js/bootstrap-popover.js"></script>
- <script src="extlibs/bootstrap/assets/js/bootstrap-button.js"></script>
- <script src="extlibs/bootstrap/assets/js/bootstrap-collapse.js"></script>
- <script src="extlibs/bootstrap/assets/js/bootstrap-carousel.js"></script>
- <script src="extlibs/bootstrap/assets/js/bootstrap-typeahead.js"></script>
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="js/bootstrap.js"></script>
+ <script src="js/mustache.js"></script>
<script src="gap.js" type="text/javascript" charset="utf-8"></script>
-
- {literal}
- <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
-
- <!-- Place this render call where appropriate -->
- <script type="text/javascript">
- (function() {
- var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
- po.src = 'https://apis.google.com/js/plusone.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
- })();
+ <script type="text/javascript" charset="utf-8">
+ (function($) {
+ // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Math/random
+ // Returns a random integer between min and max
+ // Using Math.round() will give you a non-uniform distribution!
+ function getRandomInt(min, max)
+ {
+ return Math.floor(Math.random() * (max - min + 1)) + min;
+ }
+ console.log("ohai");
+ var gap = gaps[getRandomInt(0, gaps.length - 1)];
+ var exclamation = exclamations[getRandomInt(0, exclamations.length - 1)];
+ gap.exclamation = exclamation;
+ gap.less_per_year = function() {
+ return this.less_per_week * 52;
+ };
+ var unit = $(".hero-unit");
+ var template = unit.html();
+ var out = Mustache.render(template, gap);
+ unit.html(out);
+ console.log("kthxbye");
+ })($);
</script>
- <script>(function(d, s, id) {
- var js, fjs = d.getElementsByTagName(s)[0];
- if (d.getElementById(id)) return;
- js = d.createElement(s); js.id = id;
- js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=64091411419";
- fjs.parentNode.insertBefore(js, fjs);
- }(document, 'script', 'facebook-jssdk'));</script>
-
- <script type="text/javascript" src="http://assets.pinterest.com/js/pinit.js"></script>
-
- {/literal}
-
- <!-- <script type="text/javascript">
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', 'UA-436966-8']);
- _gaq.push(['_trackPageview']);
-
- (function() {
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
- })();
- </script> -->
</body>
</html>
File renamed without changes.
File renamed without changes.
Oops, something went wrong.

0 comments on commit f2431b8

Please sign in to comment.