<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,17 +1,8 @@
-= stylesheet_link_tag 'slides'
+- content_for :head do
+  = stylesheet_link_tag 'slides'
 
 = render 'display', :locals =&gt; { :sites =&gt; @sites, :mode =&gt; :compact }
 
 :javascript
-  Event.observe(window,'resize',function() {
-    var width = document.viewport.getWidth();
-    var watches = $$('.watch');
-    var container_margin = 10;
-    var watch_width = Math.floor((width / watches.length - 10) - (container_margin / watches.length));
-    watches.each(function(element) {
-      element.setStyle({'width':watch_width+'px'});
-    });
-    watches.last().setStyle({'marginLeft':0});
-  });
-  
-  Event.observe(window,'dom:loaded',function() { window.onresize(); });
\ No newline at end of file
+  Event.observe(window,'resize', resizePanels);
+  Event.observe(window,'dom:loaded', resizePanels);
\ No newline at end of file</diff>
      <filename>app/views/dashboard/compact.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -4,14 +4,14 @@
   - warning = false
   
 .name{:onclick =&gt; &quot;location.href = '#{edit_watch_path(watch)}'&quot;}
-  %span.name
-    - if params[:action] == 'slides'
-      = watch.site.name
-    = watch.name
-  - if params[:action] == 'slides' &amp;&amp; watch.url.length &gt; 25
-    %span.url= link_to(watch.url[0..15] + '...' + watch.url[-10..-1], watch.url)
-  - else
-    %span.url= link_to(watch.url, watch.url)
+  %span.site_name= watch.site.name
+  %span.name= watch.name
+  %span.url= link_to(watch.url, watch.url)
+  -#
+    - if params[:action] == 'slides' &amp;&amp; watch.url.length &gt; 25
+      %span.url= link_to(watch.url[0..15] + '...' + watch.url[-10..-1], watch.url)
+    - else
+      %span.url= link_to(watch.url, watch.url)
 
 - if mode == :extended
   .graph</diff>
      <filename>app/views/watches/_watch.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -16,8 +16,8 @@
     &lt;%= f.text_field :warning_time %&gt;
   &lt;/p&gt;
   &lt;p&gt;
-    &lt;%= f.label :content %&gt;&lt;br /&gt;
-    &lt;%= f.text_field :content %&gt;
+    &lt;%= f.label :content_match %&gt;&lt;br /&gt;
+    &lt;%= f.text_field :content_match %&gt;
   &lt;/p&gt;
   &lt;p&gt;
     &lt;%= f.label :site_id %&gt;&lt;br /&gt;</diff>
      <filename>app/views/watches/new.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,29 @@
+// Called when the browser is resized to resize each of the slides in the compact dashboard view
+function resizePanels() {
+  var watches = $$('.watch');
+  var container_margin = $('sites').getStyle('marginLeft').match(/\d+/);  // how much space we need to reserve for the margins
+  var browser_width = parseInt(document.viewport.getWidth());             // browser width
+  var watch_margin = parseInt(watches.first().getStyle('marginRight').match(/\d+/));
+  var watch_max_width = parseInt(watches.first().getStyle('minWidth').match(/\d+/));
+  var i = watches.length;
+  
+  // start counting backwards through the number of total watches until we find a width for each that is greater than the max width
+  do {
+    var watch_width = figureWatchWidth(browser_width, i, watch_margin, container_margin);  // how wide one slide should be
+    i--;
+  } while (watch_width &lt; watch_max_width)
+
+  // resize each slide
+  watches.each(function(element) {
+    element.setStyle({'width':watch_width+'px'});
+  });
+  
+}
+
+function figureWatchWidth(browser_width,total,watch_margin,container_margin) {
+  return (browser_width / total - watch_margin) - (container_margin /total);  // how wide one slide should be
+}
+
 function getCookie(c_name) {
   if (document.cookie.length&gt;0) {
     c_start=document.cookie.indexOf(c_name + &quot;=&quot;);</diff>
      <filename>public/javascripts/application.js</filename>
    </modified>
    <modified>
      <diff>@@ -3,6 +3,7 @@ h1
   display: none
 #sites
   margin: 10px 0 10px 10px
+  overflow: hidden
   .site
     background-color: transparent
     margin: 0
@@ -15,16 +16,18 @@ h1
       height: 100px
       margin: 0 10px 10px 0!important
       display: block
-      min-width: 250px
+      min-width: 200px
       -moz-box-shadow: 2px 2px 2px rgba(0,0,0,.2)
       -webkit-box-shadow: 2px 2px 2px rgba(0,0,0,.2)
       div
         &amp;.name
           width: auto
           span.name
-            font-size: 146.5%
+            font-size: 131% !important
         &amp;.status
+          display: none
           width: auto
+          font-size: 85% !important
         &amp;.graph
           display: none
     .new_watch</diff>
      <filename>public/stylesheets/sass/slides.sass</filename>
    </modified>
    <modified>
      <diff>@@ -4,6 +4,7 @@ h1 {
 
 #sites {
   margin: 10px 0 10px 10px;
+  overflow: hidden;
 }
 #sites .site {
   background-color: transparent;
@@ -19,7 +20,7 @@ h1 {
   height: 100px;
   margin: 0 10px 10px 0!important;
   display: block;
-  min-width: 250px;
+  min-width: 200px;
   -moz-box-shadow: 2px 2px 2px rgba(0,0,0,.2);
   -webkit-box-shadow: 2px 2px 2px rgba(0,0,0,.2);
 }
@@ -27,10 +28,12 @@ h1 {
   width: auto;
 }
 #sites .site .watch div.name span.name {
-  font-size: 146.5%;
+  font-size: 131% !important;
 }
 #sites .site .watch div.status {
+  display: none;
   width: auto;
+  font-size: 85% !important;
 }
 #sites .site .watch div.graph {
   display: none;</diff>
      <filename>public/stylesheets/slides.css</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>a93d020c7365939a594b69afb6cf9c33b22d6dcc</id>
    </parent>
  </parents>
  <author>
    <name>Rob Cameron</name>
    <email>cannikinn@gmail.com</email>
  </author>
  <url>http://github.com/cannikin/owl/commit/a3c4289d52fc447db2edfa92bfdc5358a3ebb424</url>
  <id>a3c4289d52fc447db2edfa92bfdc5358a3ebb424</id>
  <committed-date>2009-10-31T21:49:22-07:00</committed-date>
  <authored-date>2009-10-31T21:49:22-07:00</authored-date>
  <message>Compact slides resize with the browser</message>
  <tree>3740f0963e5ab2feed7a5ef6da7ded77b028c2ff</tree>
  <committer>
    <name>Rob Cameron</name>
    <email>cannikinn@gmail.com</email>
  </committer>
</commit>
