Refined the CSS and fixed some of the more recent issues.
author<mako@atdot.cc> <>
Wed, 29 Aug 2007 21:46:46 +0000 (17:46 -0400)
committer<mako@atdot.cc> <>
Wed, 29 Aug 2007 21:46:46 +0000 (17:46 -0400)
app/controllers/graph_controller.rb
app/controllers/quickvote_controller.rb
app/views/quickvote/_results_sidebar.rhtml [new file with mode: 0644]
app/views/quickvote/create.rhtml
app/views/quickvote/results.rhtml
app/views/quickvote/success.rhtml
app/views/quickvote/thanks.rhtml
public/stylesheets/main.css

index ff29d8ecb91e742f3bcd7113a48c2db2116c36ad..b80b5d32e2605d99cad6ceaf6ac7f45f42a85db6 100644 (file)
@@ -74,7 +74,7 @@ class GraphController < ApplicationController
                             :data => data,
                             :interval_labels => labels,
                             :title => "Voters Over Time",
-                            :size => "700x400",
+                            :size => "270x230",
                             :x_axis_label => scale,
                             :y_axis_label => "Number of Votes")
     send_data(*graph.output)
index ea7711fa2fc5981b74da5f7e66e450838ee4df78..1e5b14226b0049a83c3bab7477a75de2ee57bbd5 100644 (file)
@@ -212,6 +212,7 @@ class QuickvoteController < ApplicationController
     @results = @election.results
     @candidates = {}
     @election.candidates.each {|c| @candidates[c.id] = c}
+    @sidebar_content = render_to_string :partial => 'results_sidebar'
   end
   
   def my_quickvotes
diff --git a/app/views/quickvote/_results_sidebar.rhtml b/app/views/quickvote/_results_sidebar.rhtml
new file mode 100644 (file)
index 0000000..704c052
--- /dev/null
@@ -0,0 +1,2 @@
+<%= image_tag( graph_url( :action => 'votes_per_interval', :id => @election ))%>
+
index 37e62c698c6ea2208be2c4fdba191176f252e5d0..94081e6389490df425db021ebb6cf8866c309380 100644 (file)
@@ -4,8 +4,6 @@
        <div style="clear:both;"></div>
 </div>
 
-<div class="main-content">
-
 <p><label for="quickvote_candidate_names">Choices</p>
 
 <!-- the list of candidates -->
@@ -69,4 +67,3 @@
 
 <% end %>
 
-</div>
index 8b658f77a3c86dcae036916f5c7ddee82322fb6c..a2da83de7c7fee449e26c3ccc46b4d0e0fe51d8a 100644 (file)
@@ -5,8 +5,6 @@
   <span class="subheader">Results</span>
 </div>
 
-<div class="main-content">
-
 <% if @election.shortdesc %>
   <p><strong>Vote Description:</strong></p>
   <blockquote><em><%=h @election.shortdesc %></em>
@@ -90,9 +88,9 @@
 <% end %>
 </table>
 
-<%=image_tag( graph_url( :action => 'votes_per_interval', :id => @election ))%>
 <br />
 
+<!--
 <%= image_tag( graph_url( :action => 'choices_positions', :id => @election ) ) %><br />
+-->
 
-</div>
index 95ae386762902ffb99611a9f7250d38124d3e44d..428a3f295ed3140f3b31ca3b89671ef35e236651 100644 (file)
@@ -4,8 +4,6 @@
        <div style="clear:both;"></div>
 </div>
 
-<div class="main-content">
-
 <p>Please direct voters to:</p>
 
 <blockquote><strong>
@@ -19,4 +17,3 @@ HyperChad site. Voters do not need to log in or authenticate to
 participate in this election.</p>
 
 <p><%= link_to "Jump to QuickVote", quickvote_url( :ident => @quickvote.name ) %></p>
-</div>
index 506677f8f6f70c3f0e4e80c78f180ef895d732aa..b57ac0b2a3abcd42bcb84798b577b1e421483729 100644 (file)
@@ -3,8 +3,6 @@
   <span class="subheader">Vote Recorded Successfully</span>
 </div>
 
-<div class="main-content">
-
 <p>Your vote has been recorded with the following ranked
 preferences:</p>
 
@@ -22,4 +20,3 @@ preferences:</p>
   <li><%= link_to "View Current Results", quickaction_url( :ident => @voter.election.name, :action => 'results' ) %></li>
 </ul>
 
-</div>
index 313dee5a55c6d5f658e9be66c3542c15c74e1f8a..4e845796687b9667f41fea7218a9d75f3d475835 100644 (file)
@@ -152,8 +152,12 @@ h5 {
        overflow: hidden;
 }
 
+#page-title {
+    margin: -20px -20px 1em -20px;
+}
+
 .plain-header {
-    margin: 1em -1.2em 1em -1.2em;
+    margin: 1em -20px 1em -20px;
 }
 
 .header {
@@ -185,19 +189,13 @@ h5 {
 
 #main-box {
        float: right;
-       width: 611px;
-       padding: 0;
+       width: 571px;
+       padding: 20px;
        background: #f9f9f9;
        border: 1px solid #b3b3b3;
 }
 
-.main-content {
-       margin: 1.2em;
-       line-height: 1.5em;
-       text-color: #454545;
-}
-
-.main-content p, .main-content blockquote, .main-content ul {
+#main-box p, #main-box blockquote, #main-box ul {
     margin-bottom: 1em;
 }
 

Benjamin Mako Hill || Want to submit a patch?