<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>app/views/posts/index.rjs</filename>
    </added>
    <added>
      <filename>log/.gitignore</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -13,6 +13,7 @@ class PostsController &lt; ApplicationController
 
     response_for :index do |format|
       format.html
+      format.js { render :template =&gt; 'posts/index.rjs' }
       format.rss do
         headers['Content-Type'] = 'application/rss+xml; charset=utf-8'
         render :action =&gt; 'index_rss', :layout =&gt; false</diff>
      <filename>app/controllers/posts_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -7,3 +7,9 @@
   %h2 Archives
   - for month in Post.months_spanned
     = link_to month.strftime('%B %Y'), :controller =&gt; 'posts', :action =&gt; 'dates', :year =&gt; month.year, :month =&gt; month.month
+.sect.search
+  %h2 Search
+  - form_tag &quot;/posts&quot;, :method =&gt; :get do
+    = submit_tag &quot;Go&quot;, :class =&gt; 'button'
+    = text_field_tag &quot;query&quot;
+  %ul#search_results</diff>
      <filename>app/views/layouts/_sidebar.haml</filename>
    </modified>
    <modified>
      <diff>@@ -1,19 +1,32 @@
 Element.addMethods({
     spin: function(element) {
         var img = document.createElement('img');
-        img.src = &quot;/images/spinner.gif&quot;;
+        if (arguments[1])
+            img.src = &quot;/images/spinner&quot; + arguments[1] + &quot;.gif&quot;;
+        else
+            img.src = &quot;/images/spinner.gif&quot;;
         img.alt = &quot;Please Wait&quot;;
         Element.addClassName(img, &quot;spinner&quot;);
 
-        $A(element.childNodes).each(function(child) {
-            Element.remove(child);
-        });
+        $A(element.childNodes).each(Element.remove);
         
         element.appendChild(img);
         element.show();
     }
 });
 
+function search(input) {
+    new Ajax.Request(&quot;/posts.js&quot;, {
+        method: &quot;get&quot;,
+        parameters: { query: input.getValue() }
+    });
+}
+
+function setSearchListener() {
+    var input = $$(&quot;.search form input[type=text]&quot;)[0];
+    new Form.Element.EventObserver(input, search);
+}
+
 var isAction;
 
 Event.observe(window, 'load', function() {
@@ -22,6 +35,8 @@ Event.observe(window, 'load', function() {
         return body.hasClassName(controller) &amp;&amp; body.hasClassName(action);
     };
 
+    setSearchListener();
+
     if (isAction('users', 'edit')) {
         var checkbox = $('user_admin');
         var password_fields = $$('#password_stuff input');</diff>
      <filename>public/javascripts/application.js</filename>
    </modified>
    <modified>
      <diff>@@ -138,6 +138,7 @@ a img
   :width 70%
   :float left
 
+!sidebar_bg = #ffd
 #sidebar
   :float right
   :border
@@ -150,7 +151,7 @@ a img
     :top 2em
     :left 2.5em
   :margin-top -1.1em
-  :background-color #ffd
+  :background-color = !sidebar_bg
   a
     :text-decoration none
     &amp;:hover
@@ -175,6 +176,29 @@ a img
     :display block
     img
       :margin-right 0.4em
+  .search
+    input
+      :width 65%
+      &amp;.button
+        :width 20%
+        :float right
+        :margin-right 10%
+    ul
+      :list-style none
+      :padding-left 0
+      :margin-left -1em
+      a
+        :display block
+        :padding 0.2em
+          :left 1em
+        &amp;:hover
+          :background-color = !sidebar_bg - #002
+      li
+        &amp;.odd
+          :background-color = !sidebar_bg - #222
+          a:hover
+            :background-color = !sidebar_bg - #224
+
 
 #bottom
   :border-top</diff>
      <filename>public/stylesheets/sass/main.sass</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>1de1270ad2c0466a059ee37371a429a64b536683</id>
    </parent>
  </parents>
  <author>
    <name>Nathan Weizenbaum</name>
    <email>nex342@gmail.com</email>
  </author>
  <url>http://github.com/nex3/nex3-s-blog-engine/commit/684fc84185b0528a42543acdcf104e88afd62276</url>
  <id>684fc84185b0528a42543acdcf104e88afd62276</id>
  <committed-date>2007-08-17T22:56:31-07:00</committed-date>
  <authored-date>2007-08-17T22:56:31-07:00</authored-date>
  <message>Search UI stuff.</message>
  <tree>ccfeb7963c183533bb3e6b2d25eaaa93ad965710</tree>
  <committer>
    <name>Nathan Weizenbaum</name>
    <email>nex342@gmail.com</email>
  </committer>
</commit>
