Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

adding credits page

  • Loading branch information...
commit 57781fe2c877947f31d82fec6256f1047acb27a0 1 parent 8caf49a
Jeremy Ashkenas authored
8 app/controllers/congressional_controller.rb
@@ -25,9 +25,15 @@ def templates
25 25 end
26 26
27 27
28   - # Dynamically render the bookmarklet javascript, for flexibility.
  28 + # The main site index.
29 29 def bookmarklet
30 30 # Just render.
31 31 end
32 32
  33 +
  34 + # A Credits and Thanks page.
  35 + def credits
  36 + # Just render.
  37 + end
  38 +
33 39 end
44 app/views/congressional/credits.html.erb
... ... @@ -0,0 +1,44 @@
  1 +<!DOCTYPE html>
  2 +
  3 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  4 +<head>
  5 + <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
  6 + <meta name="author" content="http://ashkenas.com/" />
  7 + <title>Know thy Congressman | Credits</title>
  8 + <link href="/stylesheets/bookmarklet.css" media="screen" rel="stylesheet" type="text/css" />
  9 + <link rel="icon" type="image/vnd.microsoft.icon" href="/favicon.ico" />
  10 +</head>
  11 +
  12 +<body>
  13 + <div class="container"> </div>
  14 + <div id="senator"> </div>
  15 +
  16 + <div id="explanation">
  17 + <div id="explanation_inner">
  18 + <p class="first_child">
  19 + <q><span class="def" title="Know Thy Congressman">KTC</span></q>
  20 + is made possible by a group of generous and informative
  21 + <span class="def" title="Application Programming Interface">API</span>s,
  22 + which together provide every bit of information:
  23 + <ul style="list-style:none;">
  24 + <li><a target="_blank" href="http://services.sunlightlabs.com/api/">Sunlight Labs API</a></li>
  25 + <li><a target="_blank" href="http://watchdog.net/">Watchdog.net JSON pages</a></li>
  26 + <li><a target="_blank" href="http://developer.nytimes.com/docs/timestags_api">New York Times Tags API</a></li>
  27 + <li><a target="_blank" href="http://developer.nytimes.com/docs/article_search_api">New York Times Articles API</a></li>
  28 + <li><a target="_blank" href="http://www.opensecrets.org/action/api_doc.php">Open Secrets API</a></li>
  29 + <li><a target="_blank" href="http://www.flickr.com/services/api/">Flickr Images API</a></li>
  30 + <li><a target="_blank" href="http://www.capitolwords.org/api/">Capitol Words API</a></li>
  31 + </ul>
  32 + </p>
  33 + <p>
  34 + Many thanks to the Sunlight Foundation for holding this contest.
  35 + </p>
  36 + </div>
  37 + </div>
  38 +
  39 + <img id="knowthycongressman" src="/images/KNOWTHYCONGRESSMAN.png" alt="" />
  40 + <div id="horizon"> </div>
  41 + <a id="sunlight" href="http://sunlightlabs.com/appsforamerica/" title="Sunlight Labs | Apps For America"> </a>
  42 + <a href="http://en.wikipedia.org/wiki/Henry_F._Ashurst" id="ashurst">(Senator Ashurst of Arizona)</a>
  43 +</body>
  44 +</html>
1  app/views/js_templates/base.html.erb
@@ -17,5 +17,6 @@
17 17 <!-- Render target for all the blocks -->
18 18 </div>
19 19 </div>
  20 + <a class="credits" title="Thanks and Credits" target="_blank" href="<%= ktc_root %>/credits" style="background-image:url(<%= ktc_root %>/images/credits.png)"> </a>
20 21 </div>
21 22 </div>
3  config/routes.rb
@@ -35,7 +35,8 @@
35 35
36 36 # See how all your routes lay out with "rake routes"
37 37
38   - map.index '/', :controller => 'congressional', :action => 'bookmarklet'
  38 + map.root :controller => 'congressional', :action => 'bookmarklet'
  39 + map.credits 'credits', :controller => 'congressional', :action => 'credits'
39 40 map.search 'find/:name.:format', :controller => 'congressional', :action => 'find'
40 41 map.templates 'templates.:format', :controller => 'congressional', :action => 'templates'
41 42
BIN  public/images/credits.png
3  public/stylesheets/bookmarklet.css
@@ -43,6 +43,9 @@ a {
43 43 padding: 0 2px 0 2px;
44 44 cursor: help;
45 45 }
  46 + #explanation li a {
  47 + border-bottom: 1px solid #d94a3f;
  48 + }
46 49
47 50 #knowthycongressman {
48 51 position: fixed;
8 public/stylesheets/know-thy-congressman.css
@@ -106,6 +106,14 @@ Indy: #80d68a
106 106 height: 1160px;
107 107 opacity: 0.96;
108 108 }
  109 + #ktc .credits {
  110 + display: block;
  111 + width: 11px; height: 45px;
  112 + position: absolute;
  113 + bottom: 32px; right: 0px;
  114 + cursor: pointer;
  115 + z-index: 4;
  116 + }
109 117 #ktc .closer {
110 118 width: 30px; height: 30px;
111 119 position: absolute;

0 comments on commit 57781fe

Please sign in to comment.
Something went wrong with that request. Please try again.