From: John Dong Date: Wed, 29 Aug 2007 15:28:47 +0000 (-0400) Subject: Merge trunk X-Git-Url: https://projects.mako.cc/source/selectricity/commitdiff_plain/3f5f14d1c73ff2614b0012d027e7360583e1a70e?hp=3a0cee8424956a5c2d0466175222cacd271da098 Merge trunk --- diff --git a/app/views/layouts/main.rhtml b/app/views/layouts/main.rhtml index c6a14a3..a1c9173 100644 --- a/app/views/layouts/main.rhtml +++ b/app/views/layouts/main.rhtml @@ -1,44 +1,55 @@ - + + <%= @page_title || "Selectricity" %> + <%= stylesheet_link_tag "common", :media => "all" %> <%= stylesheet_link_tag "main", :media => "all" %> <%= javascript_include_tag "prototype", "effects", "dragdrop", "controls" %> -
- <% if @page_title %> -

<%= @page_title %>

- <% else %> - <%= link_to('

Selectricity
- Voting Machinery for the Masses

', :controller => - 'site', :action => 'index')%>
- <% end %> +
- -
+
+ <%= link_to "

Selectricity

", + :controller => 'site', :action => 'index' %> + +
+ <%= @sidebar_content %> +
+ +
+ +
+
+
+ <% 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 %> +
+ +
+ <%= link_to("help/about", :controller => "site", :action => "about") %> +
+
- <% if flash[:notice]%> +
+ <% if flash[:notice]%>
<%= flash[:notice] %>
- <% end%> - -
+ <% end%> <%= @content_for_layout %>
- <%= render_partial 'layouts/footer' %> +
+
+ <%= render_partial 'layouts/footer' %> +
diff --git a/app/views/quickvote/_advanced.rhtml b/app/views/quickvote/_advanced.rhtml index 0255fbd..d8228cf 100644 --- a/app/views/quickvote/_advanced.rhtml +++ b/app/views/quickvote/_advanced.rhtml @@ -1,20 +1,26 @@ - <% fields_for 'quickvote', quickvote do |quickform| %> -
-<%= quickform.select('election_method', - %w(ssd condorcet plurality approval borda) ) %>
+

+ +

<%= quickform.select('election_method', + %w(ssd condorcet plurality approval borda) ) %>

+ +

+

<%= quickform.date_select(:enddate, :start_year => Time.now.year) %>

-
-<%= quickform.date_select(:enddate, :start_year => Time.now.year) %>
+

Visibility

-

Want the results to be visible while the election is active? -Yes <%= quickform.radio_button(:viewable, 1)%> +

Do you want the results to be visible while the election is active?

+ +

Yes <%= quickform.radio_button(:viewable, 1)%> No <%= quickform.radio_button(:viewable, 0)%>

<% if session[:user] %> -

Would you like to be e-mailed when this QuickVote concludes? -Yes <%= quickform.radio_button(:notices, 1)%> +

Notification

+ +

Would you like to be e-mailed when this QuickVote concludes?

+ +

Yes <%= quickform.radio_button(:notices, 1)%> No <%= quickform.radio_button(:notices, 0)%>

<% end -%> diff --git a/app/views/quickvote/_candidate_list.rhtml b/app/views/quickvote/_candidate_list.rhtml index 76de0ac..4ec3db8 100644 --- a/app/views/quickvote/_candidate_list.rhtml +++ b/app/views/quickvote/_candidate_list.rhtml @@ -1,4 +1,3 @@ -<% %> <% if flash[:candidate_names] %>

-<%= submit_tag "Create Quickvote" -%> +

<%= submit_tag "Create Quickvote" -%>

<% end %> diff --git a/public/images/bg_results.png b/public/images/bg_main.png similarity index 100% rename from public/images/bg_results.png rename to public/images/bg_main.png diff --git a/public/images/bg_quickvotes.png b/public/images/bg_quickvotes.png index fd844ec..53e3c21 100644 Binary files a/public/images/bg_quickvotes.png and b/public/images/bg_quickvotes.png differ diff --git a/public/images/bg_voters.png b/public/images/bg_voters.png index 8901917..c7da281 100644 Binary files a/public/images/bg_voters.png and b/public/images/bg_voters.png differ diff --git a/public/images/title.png b/public/images/title_front.png similarity index 100% rename from public/images/title.png rename to public/images/title_front.png diff --git a/public/stylesheets/common.css b/public/stylesheets/common.css index 9bc6264..5e23927 100644 --- a/public/stylesheets/common.css +++ b/public/stylesheets/common.css @@ -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 */ diff --git a/public/stylesheets/front.css b/public/stylesheets/front.css index 1285e7f..045055f 100644 --- a/public/stylesheets/front.css +++ b/public/stylesheets/front.css @@ -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; diff --git a/public/stylesheets/main.css b/public/stylesheets/main.css index 76eff61..185b48a 100644 --- a/public/stylesheets/main.css +++ b/public/stylesheets/main.css @@ -1,33 +1,226 @@ -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; +} + +.special { + background-color: #999999; + color: white; + text-align: center; + pading: 0 1em 0 1em; +} + + +/* 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; +} + +#quickvote-title .header { + background-color: #74ce00; } +#quickvote-title .subheader { + color: #74ce00; + background-color: #e5e5e5; +} + +#controlroom-title .header { + background-color: #dc0d13; +} + +#controlroom-title .subheader { + color: #dc0d13; + background-color: #e5e5e5; +} + +#voters-title .header { + background-color: #005cd9; +} + +#voters-title .subheader { + color: #005cd9; + background-color: #e5e5e5; +} + +.header { + display: block; + font-family: "trebuchet ms",trebuchet,verdana,arial,sans-serif; + font-size:30px; + text-transform: uppercase; + text-align: center; + color: white; + background-color: #999999; + height: 32px; + float: left; + padding: 0px .75em 0px .75em; + margin-right: 10px; + margin-bottom: 14px; +} + +.subheader { + display: block; + font-family: "trebuchet ms",trebuchet,verdana,arial,sans-serif; + font-size: 18px; + text-align: left; + color: #666666; + background-color: #CCCCCC; + height: 26px; + padding: 6px 1em 0px 20px; + margin-bottom: 14px; +} + +#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 +251,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 +260,6 @@ a:active { color: #FFFFFF; text-decoration: none; background: #0259C4; } } -#main { margin: 30px; } - #notice { background: #FFFBB3; text-align: left; font-weight: bold; @@ -105,18 +279,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 +286,6 @@ a:active { color: #FFFFFF; text-decoration: none; background: #0259C4; } background-color: #ffdfdf; } - - #xxErrorExplanation h2 { text-align: left; font-weight: bold; @@ -336,3 +496,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; +} +*/ + +