Merge jdong
authorJohn Dong <jdong@mit.edu>
Tue, 28 Aug 2007 20:12:32 +0000 (16:12 -0400)
committerJohn Dong <jdong@mit.edu>
Tue, 28 Aug 2007 20:12:32 +0000 (16:12 -0400)
app/views/layouts/main.rhtml
app/views/quickvote/_advanced.rhtml
app/views/quickvote/_candidate_list.rhtml
app/views/quickvote/create.rhtml
public/images/bg_main.png [moved from public/images/bg_results.png with 100% similarity]
public/images/title_front.png [moved from public/images/title.png with 100% similarity]
public/stylesheets/common.css
public/stylesheets/front.css
public/stylesheets/main.css

index c6a14a31a1eebdb22fcce5263a1e09337a0a2718..a1c9173851c7cb7bb797a891111ce6bdf97ec40e 100644 (file)
@@ -1,44 +1,55 @@
-<html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <title><%= @page_title || "Selectricity" %></title>
+    <%= stylesheet_link_tag "common", :media => "all" %>
     <%= stylesheet_link_tag "main", :media => "all" %>
     <%= javascript_include_tag "prototype", "effects", "dragdrop", "controls" %>
   </head>
 
   <body>
-    <div id="top">
-    <% if @page_title %>
-      <h3><%= @page_title %></h3>  
-    <% else %>
-      <span id="headertext"><%= link_to('<h3>Selectricity<br />
-      <font size="-1">Voting Machinery for the Masses</font></h3>', :controller => 
-      'site', :action => 'index')%></span>
-   <% end %>
+  <div id="page-wrapper">
 
-     <div id="links">
-     <% if session[:user] %>
-       Welcome <strong><%= User.find(session[:user]).login.capitalize %></strong>
-       <%= link_to("Profile", :controller => "account",
-           :action => "summary", :id => session[:user][:id] )%>
-       <%= link_to("Logout", :controller => "account",
-                             :action => "logout") %>  |
-     <% else %>
-       <%= link_to("Login", :controller => "account", :action => "login")
-       %>/<%= link_to("Sign up", :controller => "account", :action => "signup")%>
-     <% end %> |
-       
-     <%= link_to("Help/About", :controller => "site", :action => "about") %>
-  </div>
-</div>
+    <div id="left-side">
+      <%= link_to "<h1>Selectricity</h1>",
+                  :controller => 'site', :action => 'index' %>
+
+      <div id="left-side-content">
+        <%= @sidebar_content %>
+      </div>
+
+    </div>
+
+    <div id="right-side">
+      <div id="top-bar">
+           <div id="bar-left">
+        <% if session[:user] %>
+          <%= link_to User.find(session[:user]).login.capitalize,
+                      :controller => "account",
+                      :action => "summary", :id => session[:user][:id] %>
+          <%= link_to "logout", :controller => "account",
+                      :action => "logout" %> 
+        <% else %>
+          <%= link_to("login", :controller => "account", :action => "login")
+          %>/<%= link_to("sign up", :controller => "account", :action => "signup")%>
+        <% end %> 
+        </div>
+
+        <div id="bar-right">
+          <%= link_to("help/about", :controller => "site", :action => "about") %>
+        </div>
+      </div> <!-- end of top-bar -->
       
-      <% if flash[:notice]%>
+      <div id="main-box">
+        <% if flash[:notice]%>
         <div id="notice"><%= flash[:notice] %></div>
-      <% end%>
-
-      <div id="main">
+        <% end%>
         <%= @content_for_layout %>
       </div>
 
-  <%= render_partial 'layouts/footer' %>
+    </div> <!-- end of right-side -->
+    <div class="clear-div"></div>
+    <%= render_partial 'layouts/footer' %>
+    </div>
   </body>
 </html>
index 0255fbd6e27599285556adc61c5ce21d06f8dbc9..609e84a28ec324ac82a7f56c9b2f50d5bc69ac75 100644 (file)
@@ -1,20 +1,26 @@
-
 <% fields_for 'quickvote', quickvote do |quickform| %>
 
-<span><label for="quickvote_election_method">Election Method</span><br />
-<%= quickform.select('election_method', 
-    %w(ssd condorcet plurality approval borda) ) %><br />
+<h3><label for="quickvote_election_method">Election Method</label></h3>
+
+<p><%= quickform.select('election_method', 
+    %w(ssd condorcet plurality approval borda) ) %></p>
+
+<h3><label for="quickvote_enddate">End Time</label></h3>
+<p><%= quickform.date_select(:enddate, :start_year => Time.now.year) %></p>
 
-<span><label for="quickvote_enddate">End Time</span><br />
-<%= quickform.date_select(:enddate, :start_year => Time.now.year) %><br />
+<h3>Visibility</h3>
 
-</p>Want the results to be visible while the election is active?
-Yes <%= quickform.radio_button(:viewable, 1)%>
+<p>Do you want the results to be visible while the election is active?</p>
+
+<p>Yes <%= quickform.radio_button(:viewable, 1)%>
 No  <%= quickform.radio_button(:viewable, 0)%></p>
 
 <% if session[:user] %>
-<p>Would you like to be e-mailed when this QuickVote concludes?
-Yes <%= quickform.radio_button(:notices, 1)%>
+<h3>Notification</h3>
+
+<p>Would you like to be e-mailed when this QuickVote concludes?</p>
+
+<p>Yes <%= quickform.radio_button(:notices, 1)%>
 No  <%= quickform.radio_button(:notices, 0)%></p>
 <% end -%>
 
index 76de0ac59e25c40512a466deb13a0af620ddbdd6..4ec3db8b24014e9be500974187a93e2fa2132367 100644 (file)
@@ -1,4 +1,3 @@
-<% %>
 <!-- the list of candidates -->
 <% if flash[:candidate_names] %>
   <ul>
index 7ccb6443120e8d7f50a1a506176b8b828b9c0b1c..57df1ed24970a7bd9d9b182190ca404cc2047aef 100644 (file)
@@ -1,9 +1,8 @@
-<% -%>
-<h1>Create QuickVote</h1>
+<h2>Create QuickVote</h2>
 
 <%= error_messages_for 'quickvote' %>
 
-<p><label for="quickvote_candidate_names">Choices</p>
+<h3><label for="quickvote_candidate_names">Choices</h3>
 
 <!-- the list of candidates -->
 <div id="candidate_names">
 <% form_tag(:action => 'create') do %>
 <!--[form:election]-->
 
-<p><label for="quickvote_name">One Word Description (for URL)<br />
+<h3><label for="quickvote_name">One Word Description (for URL)</label></h3>
 
-<em><font size="-1">required; 5-12 characters; only letters and numbers; no spaces</font></em></label><br/>
+<p><em><font size="-1">required; 5-12 characters; only letters and numbers; no spaces</font></em></p>
 
-<%= text_field 'quickvote', 'name', :size => 15, :maxsize => 12  %></p>
+<p><%= text_field 'quickvote', 'name', :size => 15, :maxsize => 12  %></p>
 
-<p><label for="quickvote_description">Description<em><br />
-<font size="-1">required; one line summary on the first line</font></em></label><br/>
+<h3><label for="quickvote_description">Description</label></h3>
+
+<p><font size="-1">required; one line summary on the first line</font></em><br/>
 
 <%= text_area 'quickvote', 'description', :cols => 50, :rows => 4 %></p>
 
@@ -32,7 +32,7 @@
 </div>
 <br />
 
-<%= submit_tag "Create Quickvote" -%>
+<p><%= submit_tag "Create Quickvote" -%></p>
 
 <% end %>
 
index 9bc6264e406780788ecaf6f262ae275aad6f2dca..5e23927b893ede6959b333f2b1261789d88db458 100644 (file)
@@ -31,7 +31,6 @@ table, caption, tbody, tfoot, thead, tr, th, td {
 
 #body {
        font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
-       color: white;
        font-size: 12px;
        text-align: left;
        line-height: 1.5em;
@@ -48,6 +47,26 @@ table, caption, tbody, tfoot, thead, tr, th, td {
        opacity: .5;
 }
 
+/* tables still need 'cellspacing="0"' in the markup */
+table {
+       border-collapse: separate;
+       border-spacing: 0;
+}
+
+caption, th, td {
+       text-align: left;
+       font-weight: normal;
+}
+
+blockquote:before, blockquote:after,
+q:before, q:after {
+       content: "";
+}
+
+blockquote, q {
+       quotes: "" "";
+}
+
 strong, h2, h3 {
     font-weight: bold;
 }
@@ -57,6 +76,15 @@ h2, h3 {
     margin-bottom: 0.5em !important;
 }
 
+#page-wrapper {
+       width: 960px;
+       margin: 0 auto 0 auto;
+}
+
+.clear-div {
+       clear: both;
+}
+
 
 /* footer */
 
index 1285e7fbb80f7199584df5573a992e6eadc4d6dc..045055f5df22d63c1ed801ab80e696290379612c 100644 (file)
@@ -24,30 +24,13 @@ table, caption, tbody, tfoot, thead, tr, th, td {
 
 body {
        line-height: 1;
-       color: black;
+       color: white;
        background: #ffffff url(/images/bg_index.png) repeat-x top center;
 }
 
-/* tables still need 'cellspacing="0"' in the markup */
-table {
-       border-collapse: separate;
-}
-
-caption, th, td {
-       text-align: left;
-       font-weight: normal;
-}
-
-#page-wrapper {
-       width: 960px;
-       margin: 0 auto 0 auto;
-       text-align: center;
-}
-
-
 /* Header */
 #header h1 {
-       background: url(/images/title.png) center top no-repeat;
+       background: url(/images/title_front.png) center top no-repeat;
        overflow: hidden;
        padding-top: 189px;
        height: 0px;
index 76eff61026e1a05c6a188d0a779280c77ea8c196..ca71d76539e0de25d42cb1abc9c5f00e0885a1d9 100644 (file)
-body   {       
-       font-size:      1em;
-       font-weight:    normal;
-       word-spacing:   normal;
-       letter-spacing: normal;
-       text-transform: none;
-       font-family:    Myriad Web, Geneva, Arial, Helvetica, sans-serif;
-       font-size-adjust:       .48;
-}      
-p, blockquote, ul, ol, dl, dd, li, dir, menu {}
-
-h1, h2, h3, h4 {
-    border-bottom: 1px solid #4D801A;
-    text-shadow: #4D801A 0.2em 0.2em 3px;
-
-}
-#headertext a {color: #FFFFFF; text-decoration: none;}
-
-a:link { font-weight: bold; color: #4D801A; text-decoration: underline; } 
-a:visited { font-weight: bold; color: #4D801A; text-decoration: underline; }
-a:hover { color: #FFFFFF; text-decoration: none; background: #0063DC; }
-a:active { color: #FFFFFF; text-decoration: none; background: #0259C4; }
-
-#loginbox {
-  padding: 10px;
-  border: 1px solid;
-  width: 400px;
-  text-align: left;
+@charset "utf-8";
+/* CSS Document */
+
+/****************************************************************
+   Selectricity || selectricity.org
+   Design by Courtland Allen
+*****************************************************************/
+
+/* basics */
+body {
+       color: black;
+       background: white;
+       background: url(/images/bg_main.png) repeat-x top left;
+}
+
+h2 {
+       font-size: 24px !important;
+       margin: 0 0 1em 0 !important;
+}
+
+h3 {
+       font-size: 18px !important;
+       margin: 0 0 1em 0 !important;
+}
+
+
+/* Left column. Includes logo, poll information, and graph. */
+#left-side {
+       width: 270px;
+       float: left;
+       text-align: left;
+       margin-top: 33px;
+       font-size: 13px;
+}
+
+#left-side h1 {
+       height: 0px;
+       overflow: hidden;
+       padding-top: 189px;
+       background: url(/images/title_main.png) no-repeat top left;
+}
+
+
+#left-side-content {
+       color: #666666;
+       margin-top: 40px;
+       text-align: left;
+}
+
+#left-side-content p {
+       color: #666666;
+       padding-left: 2em;
+       margin: 2em 0 2em 0;
+}
+
+#left-side-content ol {
+       color: #666666;
+}
+
+/* #graph {
+       margin-top: 50px;
+       background: url(/images/graph.jpg) top left no-repeat;
+       height: 0px;
+       overflow: hidden;
+       padding-top: 243px;
+} */
+
+
+
+/* Right column. Includes top-bar and main-box. */
+
+#right-side {
+       width: 611px;
+       margin-top: 0px;
+       float: right;
+}
+#top-bar {
+       float: right;
+       margin-right: 50px;
+       width: 231px;
+       text-align: center;
+       margin-bottom: 35px;
+}
+
+#top-bar a {
+       color: #dddddd;
+       font-size: 11px;
+}
+
+div#bar-left {
+       background-image: url(/images/top_bar_1.png);
+       width: 153px;
+       height: 37px;
+       padding-top: 8px;
+       float: left;
+       clear: left;
+}
+
+div#bar-right {
+       background-image: url(/images/top_bar_2.png);
+       width: 78px;
+       height: 37px;
+       padding-top: 8px;
+       float: left;
+       clear: right;
+}
+
+.green { color: #10a700; }
+
+.left-aligned h4 {
+       float: left;
+       padding-top: 26px;
+       height: 0px;
+       overflow: hidden;
+       background: no-repeat top left;
+}
+
+.right-aligned h4 {
+       float: right;
+       padding-top: 26px;
+       height: 0px;
+       overflow: hidden;
+       background: no-repeat top right;
 }
 
+.left-aligned { text-align: left; }
+
+.right-aligned { text-align: right; }
+
+h5 {
+       color: #5c5c5c;
+       background-color: #d6d6d6;
+       height: 21px;
+       font-size: 16px;
+       padding: 5px 15px 0 15px;
+       margin-bottom: .75em;
+       overflow: hidden;
+}
+
+
+
+#main-box {
+       float: right;
+       width: 611px;
+       padding: 0;
+       background: #f9f9f9;
+       border: 1px solid #b3b3b3;
+}
+
+#main-box h1 {
+  
+}
+
+#main-box p {
+       margin-bottom: 1.75em;
+       padding: 0 1.7em 0 1.7em;
+       line-height: 1.8em;
+       color: #454545;
+}
+
+
 #ErrorExplanation {
   width: 400px;
   border: 2px solid 'red';
@@ -58,23 +192,6 @@ a:active { color: #FFFFFF; text-decoration: none; background: #0259C4; }
   list-style: square;
 }
 
-#top { padding-left: 10px;
-       padding-right: 10px;
-       padding-top: 5px;
-       padding-bottom: 5px;
-       font-weight: normal;
-       background: #73BF26;
-       color: #FFFFFF;
-}
-
-#top h3 {
-  border-bottom: 0px;
-  font-size: 30px; }
-
-#links { text-align : right; }
-#links a { color: #FFF; font-weight: bold; }
-#links a:visited { color: #FFF; font-weight: bold; }
-
 .ListLine0 {
        background:  #e0f8f8;
        
@@ -84,8 +201,6 @@ a:active { color: #FFFFFF; text-decoration: none; background: #0259C4; }
        
 }
 
-#main { margin: 30px; }
-
 #notice { background: #FFFBB3; 
                        text-align: left;
                        font-weight: bold;
@@ -105,18 +220,6 @@ a:active { color: #FFFFFF; text-decoration: none; background: #0259C4; }
   background-color: #f0f0f0;
 }
 
-#footer { text-align: center;
-          font-size: 12px;
-          color: #464646;
-         clear: both;}
-
-#footer a { font-weight: normal; }
-       
-#subtext { 
-       text-align: center;
-       font-size: 12px;
-       font-weight: bold; }
-
 .fieldWithErrors {
     display: inline;
 }
@@ -124,8 +227,6 @@ a:active { color: #FFFFFF; text-decoration: none; background: #0259C4; }
     background-color: #ffdfdf;
 }
 
-
-
 #xxErrorExplanation h2 {
   text-align: left;
   font-weight: bold;
@@ -336,3 +437,37 @@ li.moveable {
   color: #CCCCCC;
   font-weight: bold;
 }
+
+/*
+#plurality h4 {
+       background: url(/images/voting_plurality.png);
+       width: 217px;
+}
+
+#schulze h4 {
+       background: url(/images/voting_schulze_quickvote.png);
+       width: 183px;
+}
+
+#approval h4 {
+       background: url(/images/voting_approval.png);
+       width: 208px;
+}
+
+#borda h4 {
+       background: url(/images/voting_borda.png);
+       width: 147px;
+}
+
+#condorcet h4 {
+       background: url(/images/voting_condorcet.png);
+       width: 240px;
+}
+
+#irv h4 {
+       background: url(/images/voting_irv.png);
+       width: 86px;
+}
+*/
+
+

Benjamin Mako Hill || Want to submit a patch?