45de198aa529

Add the rest of the project photos, and the gallery script.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Fri, 25 Dec 2009 20:15:07 -0500
parents 1ebe3b372bac
children 91bd0cc3d73b
branches/tags (none)
files content/projects/fuego.html content/projects/hg-prompt.html content/projects/lindyjam-com.html content/projects/women-in-water.html layout/skeleton/_base.html media/images/projects/fuego/Fuego-4852.jpg media/images/projects/fuego/Fuego-4887.jpg media/images/projects/fuego/Fuego-4919.jpg media/images/projects/fuego/Fuego-4941.jpg media/images/projects/fuego/Fuego-4985.jpg media/images/projects/fuego/Fuego-5133.jpg media/images/projects/hg-prompt/prompt.png media/images/projects/lindyjam-com/lindyjamcom-splash.png media/images/projects/women-in-water/alex-tele.jpg media/images/projects/women-in-water/alex-wide.jpg media/images/projects/women-in-water/anna-tele.jpg media/images/projects/women-in-water/anna-wide.jpg media/images/projects/women-in-water/erin-tele.jpg media/images/projects/women-in-water/erin-wide.jpg media/images/projects/women-in-water/leah-tele.jpg media/images/projects/women-in-water/leah-wide.jpg media/images/projects/women-in-water/lizza-tele.jpg media/images/projects/women-in-water/lizza-wide.jpg media/js/sjl-gallery.js

Changes

--- a/content/projects/fuego.html	Fri Dec 25 19:51:15 2009 -0500
+++ b/content/projects/fuego.html	Fri Dec 25 20:15:07 2009 -0500
@@ -9,12 +9,12 @@
 {% block article %}
 
 <div class="gallery">
-	<img src="/site-media/storage/projects/2009-01-19-fuego/Fuego-4852.jpg" />
-	<img src="/site-media/storage/projects/2009-01-19-fuego/Fuego-4887.jpg" />
-	<img src="/site-media/storage/projects/2009-01-19-fuego/Fuego-4919.jpg" />
-	<img src="/site-media/storage/projects/2009-01-19-fuego/Fuego-4941.jpg" />
-	<img src="/site-media/storage/projects/2009-01-19-fuego/Fuego-4985.jpg" />
-	<img src="/site-media/storage/projects/2009-01-19-fuego/Fuego-5133.jpg" />
+	<img src="/media/images/projects/{{ page.page_name }}/Fuego-4852.jpg" />
+	<img src="/media/images/projects/{{ page.page_name }}/Fuego-4887.jpg" />
+	<img src="/media/images/projects/{{ page.page_name }}/Fuego-4919.jpg" />
+	<img src="/media/images/projects/{{ page.page_name }}/Fuego-4941.jpg" />
+	<img src="/media/images/projects/{{ page.page_name }}/Fuego-4985.jpg" />
+	<img src="/media/images/projects/{{ page.page_name }}/Fuego-5133.jpg" />
 </div>
 
 I really like how these turned out.  One of them is hanging in my apartment.
--- a/content/projects/hg-prompt.html	Fri Dec 25 19:51:15 2009 -0500
+++ b/content/projects/hg-prompt.html	Fri Dec 25 20:15:07 2009 -0500
@@ -14,7 +14,7 @@
 
 Here's what it looks like:
 
-![My bash prompt while using hg-prompt.](http://stevelosh.com/site-media/storage/projects/2009-06-19-hg-prompt/hg-prompt.png "My bash prompt while using hg-prompt.")
+![My bash prompt while using hg-prompt.](/media/images/projects/{{ page.page_name }}/prompt.png "My bash prompt while using hg-prompt.")
 
 [TOC]
 
--- a/content/projects/lindyjam-com.html	Fri Dec 25 19:51:15 2009 -0500
+++ b/content/projects/lindyjam-com.html	Fri Dec 25 20:15:07 2009 -0500
@@ -15,7 +15,7 @@
 
 [Lindy Jam]: http://lindyjam.com/
 
-![lindyjam.com screenshot](/site-media/storage/projects/2009-01-21-lindyjam/lindyjamcom-splash.png "Screenshot of the Lindy Jam site.")
+![lindyjam.com screenshot](/media/images/projects/{{ page.page_name }}/lindyjamcom-splash.png "Screenshot of the Lindy Jam site.")
 
 Design
 ------
--- a/content/projects/women-in-water.html	Fri Dec 25 19:51:15 2009 -0500
+++ b/content/projects/women-in-water.html	Fri Dec 25 20:15:07 2009 -0500
@@ -9,16 +9,16 @@
 {% block article %}
 
 <div class="gallery">
-    <img src="/site-media/storage/projects/2009-08-04-women-in-water/erin-tele.jpg" />
-    <img src="/site-media/storage/projects/2009-08-04-women-in-water/alex-tele.jpg" />
-    <img src="/site-media/storage/projects/2009-08-04-women-in-water/lizza-tele.jpg" />
-    <img src="/site-media/storage/projects/2009-08-04-women-in-water/leah-tele.jpg" />
-    <img src="/site-media/storage/projects/2009-08-04-women-in-water/anna-tele.jpg" />
-    <img src="/site-media/storage/projects/2009-08-04-women-in-water/erin-wide.jpg" />
-    <img src="/site-media/storage/projects/2009-08-04-women-in-water/alex-wide.jpg" />
-    <img src="/site-media/storage/projects/2009-08-04-women-in-water/lizza-wide.jpg" />
-    <img src="/site-media/storage/projects/2009-08-04-women-in-water/leah-wide.jpg" />
-    <img src="/site-media/storage/projects/2009-08-04-women-in-water/anna-wide.jpg" />
+    <img src="/media/images/projects/{{ page.page_name }}/erin-tele.jpg" />
+    <img src="/media/images/projects/{{ page.page_name }}/alex-tele.jpg" />
+    <img src="/media/images/projects/{{ page.page_name }}/lizza-tele.jpg" />
+    <img src="/media/images/projects/{{ page.page_name }}/leah-tele.jpg" />
+    <img src="/media/images/projects/{{ page.page_name }}/anna-tele.jpg" />
+    <img src="/media/images/projects/{{ page.page_name }}/erin-wide.jpg" />
+    <img src="/media/images/projects/{{ page.page_name }}/alex-wide.jpg" />
+    <img src="/media/images/projects/{{ page.page_name }}/lizza-wide.jpg" />
+    <img src="/media/images/projects/{{ page.page_name }}/leah-wide.jpg" />
+    <img src="/media/images/projects/{{ page.page_name }}/anna-wide.jpg" />
 </div>
 
 This is still a work in progress.
--- a/layout/skeleton/_base.html	Fri Dec 25 19:51:15 2009 -0500
+++ b/layout/skeleton/_base.html	Fri Dec 25 20:15:07 2009 -0500
@@ -28,6 +28,7 @@
         
         {% block js %}
             <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
+            <script src="/media/js/sjl-gallery.js"></script>
             {% block extra_js %}{% endblock %}
         {% endblock %}
     </head>
Binary file media/images/projects/fuego/Fuego-4852.jpg has changed
Binary file media/images/projects/fuego/Fuego-4887.jpg has changed
Binary file media/images/projects/fuego/Fuego-4919.jpg has changed
Binary file media/images/projects/fuego/Fuego-4941.jpg has changed
Binary file media/images/projects/fuego/Fuego-4985.jpg has changed
Binary file media/images/projects/fuego/Fuego-5133.jpg has changed
Binary file media/images/projects/hg-prompt/prompt.png has changed
Binary file media/images/projects/lindyjam-com/lindyjamcom-splash.png has changed
Binary file media/images/projects/women-in-water/alex-tele.jpg has changed
Binary file media/images/projects/women-in-water/alex-wide.jpg has changed
Binary file media/images/projects/women-in-water/anna-tele.jpg has changed
Binary file media/images/projects/women-in-water/anna-wide.jpg has changed
Binary file media/images/projects/women-in-water/erin-tele.jpg has changed
Binary file media/images/projects/women-in-water/erin-wide.jpg has changed
Binary file media/images/projects/women-in-water/leah-tele.jpg has changed
Binary file media/images/projects/women-in-water/leah-wide.jpg has changed
Binary file media/images/projects/women-in-water/lizza-tele.jpg has changed
Binary file media/images/projects/women-in-water/lizza-wide.jpg has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/media/js/sjl-gallery.js	Fri Dec 25 20:15:07 2009 -0500
@@ -0,0 +1,29 @@
+$(function() {
+    $('div.gallery').each(function () {
+        $(this).contents().filter(function() {
+            return this.nodeType == Node.TEXT_NODE;
+        }).remove();
+        
+        var cols = 4;
+        var padding = 10;
+        var total_width = $(this).width();
+        var width = (total_width / cols) - 2 * padding;
+        $(this).find('img').css({width: width, margin: padding});
+        
+        $(this).before('<div class="gallery-pane"></div>');
+        $(this).find('img:first').clone()
+                                 .addClass('gallery-display')
+                                 .css({width: '', margin: ''})
+                                 .appendTo('div.gallery-pane');
+    });
+
+    $('div.gallery img').click(function() {
+        var new_image = $(this).clone()
+                               .addClass('gallery-display')
+                               .css({width: '', margin: '', display: 'none'});
+        $('img.gallery-display').fadeOut('fast', function() {
+            $(this).remove();
+            new_image.appendTo('div.gallery-pane').fadeIn('slow');
+        });
+    });
+});
\ No newline at end of file