From: Date: Tue, 28 Aug 2007 15:12:59 +0000 (-0400) Subject: First major stab at the integration of Courtland's CSS into X-Git-Url: https://projects.mako.cc/source/selectricity-live/commitdiff_plain/68d36148578a124acbf34f5da6893b0a62663699?ds=sidebyside First major stab at the integration of Courtland's CSS into Selectricity. It looks good! So far, I've only really finished the front page. --- diff --git a/app/controllers/site_controller.rb b/app/controllers/site_controller.rb index 80fdfc4..522bbb2 100644 --- a/app/controllers/site_controller.rb +++ b/app/controllers/site_controller.rb @@ -1,5 +1,5 @@ class SiteController < ApplicationController - layout 'main' + layout 'frontpage' require_dependency "user" require_dependency "election" require_dependency "account" diff --git a/app/views/layouts/_footer.rhtml b/app/views/layouts/_footer.rhtml new file mode 100644 index 0000000..b23900f --- /dev/null +++ b/app/views/layouts/_footer.rhtml @@ -0,0 +1,4 @@ + diff --git a/app/views/layouts/frontpage.rhtml b/app/views/layouts/frontpage.rhtml new file mode 100644 index 0000000..8f14c3a --- /dev/null +++ b/app/views/layouts/frontpage.rhtml @@ -0,0 +1,25 @@ + + + + + Selectricity + <%= stylesheet_link_tag "common", :media => "all" %> + <%= stylesheet_link_tag "front", :media => "all" %> + + + +
+ + + +
+ <%= @content_for_layout %> +
+ + <%= render_partial 'layouts/footer' %> +
+ + + diff --git a/app/views/layouts/main.rhtml b/app/views/layouts/main.rhtml index 0ed6082..c6a14a3 100644 --- a/app/views/layouts/main.rhtml +++ b/app/views/layouts/main.rhtml @@ -1,52 +1,44 @@ -<% %> - - <%= @page_title || "Selectricity" %> - <%= 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 %> + + <%= @page_title || "Selectricity" %> + <%= stylesheet_link_tag "main", :media => "all" %> + <%= javascript_include_tag "prototype", "effects", "dragdrop", "controls" %> + - -
- - <% if flash[:notice]%> -
<%= flash[:notice] %>
- <% end%> + +
+ <% if @page_title %> +

<%= @page_title %>

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

Selectricity
+ Voting Machinery for the Masses

', :controller => + 'site', :action => 'index')%>
+ <% end %> -
- <%= @content_for_layout %> -
+ +
+ + <% if flash[:notice]%> +
<%= flash[:notice] %>
+ <% end%> - +
+ <%= @content_for_layout %> +
- + <%= render_partial 'layouts/footer' %> + diff --git a/app/views/site/_basic_login.rhtml b/app/views/site/_basic_login.rhtml index 689a3f5..9c689fc 100644 --- a/app/views/site/_basic_login.rhtml +++ b/app/views/site/_basic_login.rhtml @@ -1,19 +1,13 @@ -<% -%> - <% form_tag :controller => 'account', :action => 'login' do %> - - - <%= text_field "Login", "login", :size => 30 %>
- - <%= password_field "Password", "password", :size => 30 %>
-
+<% form_tag :controller => 'account', :action => 'login' do %> -
-

<%= submit_tag 'Login' %>

-<% end %> -

<%= link_to 'Register for an account', :controller => -'account', :action => 'signup' %>

+

+

<%= text_field "Login", "login", :size => 30 %>

+

+

<%= password_field "Password", "password", :size => 30 %>

-

<%= link_to 'Lost or forgot your password?', :controller => 'account', :action => 'forgot_password' %>

+

<%= submit_tag 'Login' %>

+<% end %> -
+

<%= link_to 'Register for an account', :controller => 'account', :action => 'signup' %>

+

<%= link_to 'Lost or forgot your password?', :controller => 'account', :action => 'forgot_password' %>

diff --git a/app/views/site/_user_summary.rhtml b/app/views/site/_user_summary.rhtml index 310d98c..e37cafb 100644 --- a/app/views/site/_user_summary.rhtml +++ b/app/views/site/_user_summary.rhtml @@ -1,7 +1,3 @@ -<% %> - -

Activity Summary

- <% if @current_elections.length < 1 %> You have not created any elections. <% else %> diff --git a/app/views/site/index.rhtml b/app/views/site/index.rhtml index 9b0b1fe..bb74bba 100644 --- a/app/views/site/index.rhtml +++ b/app/views/site/index.rhtml @@ -1,31 +1,65 @@ -<% %> +
+
+

Voters

- - -
+

If you have received an email with a token inviting you to vote in + an ongoing election, you can log in to vote using your token below.

-

QuickVotes

+ <%= form_tag :controller => 'voter', :action => 'index' %> +

<%= text_field :vote, :password %>

+

<%= submit_tag "Log In" %>

+ <%= end_form_tag %> -

QuickVotes are like polls: unstructured, non-anonymous and -without the complex features of Selectricity. They are the -quickest way to make a decision or to compare between voting -methods.

+

<%= link_to 'Lost or forgot your token?', :controller => 'voter', :action => 'forgot_password' %>

-

<%= link_to( "Create a QuickVote", :controller => 'quickvote', - :action => 'create') %>

+

SMS Interface

+

For information on accessing Selectricity over email or via SMS/text messages from your mobile phone, email <%= link_to "vote\@mako.cc", "mailto:vote@mako.cc" %> with "help" in the body or read the <%= link_to "Selectricity Anywhere documentation", "selectricity-anywhere.html"%>.

-

Take a look at the QuickVotes you've made recently:
-<%= link_to( "My Recent QuickVotes", :controller => 'quickvote', - :action => 'my_quickvotes')%>

-

Recent QuickVotes include:

+ + -
    -<% for quickvote in @quickvotes %> -
  • <%= link_to (h(quickvote.shortdesc) || "Unnamed"), quickvote_url(:ident => quickvote.name) %>
  • -<% end %> -
+
+
+

Control Room

+ + <% if session[:user] %> + <%= render :partial => 'user_summary' %> + <% else %> + +

You must have an account to start a new vote or to administer an + existing vote. You can log in or create a new account below.

+ + <%= render_partial 'basic_login' %> + <% end %> + +
+
+ +
+
+ +

QuickVotes

+

QuickVotes are like polls: unstructured, non-anonymous and + without the complex features of Selectricity. They are the + quickest way to make a decision or to compare between voting + methods.

+ +
    +
  • <%= link_to( "Create a QuickVote", :controller => 'quickvote', :action => 'create') %>
  • +
  • <%= link_to( "Recent QuickVotes", :controller => 'quickvote', :action => 'my_quickvotes')%>
  • +
+ +

Recently created QuickVotes include:

+
    + <% for quickvote in @quickvotes %> +
  • <%= link_to (h(quickvote.shortdesc) || "Unnamed"), quickvote_url(:ident => quickvote.name) %>
  • + <% end %> +
+
+
+ diff --git a/public/images/bg_controlroom.png b/public/images/bg_controlroom.png new file mode 100644 index 0000000..5629933 Binary files /dev/null and b/public/images/bg_controlroom.png differ diff --git a/public/images/bg_index.png b/public/images/bg_index.png new file mode 100644 index 0000000..52ac075 Binary files /dev/null and b/public/images/bg_index.png differ diff --git a/public/images/bg_quickvotes.png b/public/images/bg_quickvotes.png new file mode 100644 index 0000000..fd844ec Binary files /dev/null and b/public/images/bg_quickvotes.png differ diff --git a/public/images/bg_resultblock.png b/public/images/bg_resultblock.png new file mode 100644 index 0000000..21a05bd Binary files /dev/null and b/public/images/bg_resultblock.png differ diff --git a/public/images/bg_results.png b/public/images/bg_results.png new file mode 100644 index 0000000..a94d556 Binary files /dev/null and b/public/images/bg_results.png differ diff --git a/public/images/bg_voters.png b/public/images/bg_voters.png new file mode 100644 index 0000000..8901917 Binary files /dev/null and b/public/images/bg_voters.png differ diff --git a/public/images/rails.png b/public/images/rails.png deleted file mode 100644 index b8441f1..0000000 Binary files a/public/images/rails.png and /dev/null differ diff --git a/public/images/title.png b/public/images/title.png new file mode 100644 index 0000000..acf328f Binary files /dev/null and b/public/images/title.png differ diff --git a/public/images/title_main.png b/public/images/title_main.png new file mode 100644 index 0000000..f3dd02d Binary files /dev/null and b/public/images/title_main.png differ diff --git a/public/images/top_bar_1.png b/public/images/top_bar_1.png new file mode 100644 index 0000000..3be6999 Binary files /dev/null and b/public/images/top_bar_1.png differ diff --git a/public/images/top_bar_2.png b/public/images/top_bar_2.png new file mode 100644 index 0000000..7242913 Binary files /dev/null and b/public/images/top_bar_2.png differ diff --git a/public/stylesheets/common.css b/public/stylesheets/common.css new file mode 100644 index 0000000..4b53f59 --- /dev/null +++ b/public/stylesheets/common.css @@ -0,0 +1,77 @@ +@charset "UTF-8"; +/* CSS Document */ + +/**************************************************************** + Selectricity || selectricity.org + Design by Courtland Allen + + "Reset Reloaded" + Thanks to Eric Meyer + http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/ +*****************************************************************/ + +/* common css files */ + +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, font, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +dl, dt, dd, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font-family: inherit; + vertical-align: baseline; +} + + +#body { + font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif; + color: white; + font-size: 12px; + text-align: left; + line-height: 1.5em; +} + +#body a { + text-decoration: underline; + color: inherit; + display: inline; + opacity: 0.8; +} + +#body a:hover { + opacity: .5; +} + +strong, h2, h3 { + font-weight: bold; +} + +h2, h3 { + text-transform: uppercase; + margin-bottom: 0.5em; +} + + +/* footer */ + +#footer { + font-size: 11px; + font-family: "Trebuchet MS", Trebuchet, Verdana, Arial, Helvetica, sans-serif; + margin-top: 40px; + text-align: center; +} + +#footer a { + text-decoration: none; + color: #dc0d13; +} + +#footer a:hover { + text-decoration: underline; +} diff --git a/public/stylesheets/front.css b/public/stylesheets/front.css new file mode 100644 index 0000000..af714b8 --- /dev/null +++ b/public/stylesheets/front.css @@ -0,0 +1,121 @@ +@charset "UTF-8"; +/* CSS Document */ + +/**************************************************************** + Selectricity || selectricity.org + Design by Courtland Allen +*****************************************************************/ + +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, font, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +dl, dt, dd, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font-family: inherit; + vertical-align: baseline; +} + +body { + line-height: 1; + color: black; + 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; + overflow: hidden; + padding-top: 189px; + height: 0px; + margin-top: 10px; +} + + +/* Body */ + +#body { + margin-top: 9px; + height: 609px; +} + +h2 { + margin-top: 0.3em; + font-size: 24px; +} + +h3 { + margin-top: 1em; + font-size: 16px; +} + +.main-section { + float: left; + padding-left: 120px; + padding-right: 15px; +} + +.main-section p { + font-size: 12px; + overflow: hidden; + line-height: 2em; + margin-bottom: 1em; +} + +#voters { + padding-top: 50px; + height: 559px; + width: 185px; + background: url(/images/bg_voters.png) top left no-repeat; +} + +#voters-content { + height: 516px; +} + +#control-room { + padding-top: 139px; + height: 470px; + width: 185px; + background: url(/images/bg_controlroom.png) top left no-repeat; + +} + +#control-room-content { + height: 428px; +} + +#quickvotes { + padding-top: 80px; + height: 529px; + width: 185px; + background: url(/images/bg_quickvotes.png) top left no-repeat; +} + +#quickvotes-content { + height: 486px; +} +