allow to homegeinize the widths in rows
authorgc <gc>
Tue, 20 May 2008 22:42:52 +0000 (22:42 +0000)
committergc <gc>
Tue, 20 May 2008 22:42:52 +0000 (22:42 +0000)
bin/booh-backend
data/booh/themes/cardu/skeleton_thumbnails.html
data/booh/themes/dark/skeleton_thumbnails.html
data/booh/themes/sbs/skeleton_thumbnails.html
data/booh/themes/simple/skeleton_thumbnails.html

index e8d7043..5fb1911 100755 (executable)
@@ -1085,11 +1085,13 @@ def walk_source_dir
                 for file in entries
                     type = images.include?(file) ? 'image' : videos.include?(file) ? 'video' : nil
                     if type
+                        homogeinize_width = 100 / $N_per_row.to_i
                         if type == 'image' && elem = optfilename[utf8(file)]
                             if pano = pano_amount(elem)
                                 html_elem = run_iterations(iterations, pano)
                                 counter += count = pano.ceil
                                 html_elem.gsub!(/~~colspan~~/) { "colspan=\"#{count}\"" }
+                                homogeinize_width *= count
                             else
                                 html_elem = run_iterations(iterations, 1)
                                 counter += 1
@@ -1100,6 +1102,7 @@ def walk_source_dir
                             counter += 1
                             html_elem.gsub!(/~~colspan~~/, '')
                         end
+                        html_elem.gsub!(/~~homogeinize_width~~/) { "width=\"#{homogeinize_width}%\"" }
                         if type == 'image'
                             index = images.index(file)
                             html_elem.gsub!(/~~caption_iteration~~/,
index 4d1d114..b34d22f 100644 (file)
@@ -28,7 +28,7 @@
 ~~iterate1_open~~
 <tr>
     ~~iterate2_open_maxN~~
-    <td align="center" valign="top" ~~colspan~~>
+    <td align="center" valign="top" ~~colspan~~ ~~homogeinize_width~~>
       <br/>
         <div class="imager_thumbnails">
           ~~image_iteration~~
index 13ad283..aba730d 100644 (file)
@@ -64,7 +64,7 @@ img {
 ~~iterate1_open~~
 <tr>
     ~~iterate2_open_maxN~~
-    <td align="center" valign="top" ~~colspan~~>
+    <td align="center" valign="top" ~~colspan~~ ~~homogeinize_width~~>
        ~~image_iteration~~
        <p>~~ifvideo?~~<img src="~~pathtobase~~video.png" alt="video" class="nothing"/>~~fi~~ ~~caption_iteration~~</p>
     </td>
index 2bd06fc..bba8f4c 100644 (file)
@@ -73,7 +73,7 @@ img {
 ~~iterate1_open~~
 <tr>
     ~~iterate2_open_maxN~~
-    <td align="center" valign="top" ~~colspan~~>
+    <td align="center" valign="top" ~~colspan~~ ~~homogeinize_width~~>
        <div class="imager">~~image_iteration~~</div>
        ~~ifvideo?~~<img src="~~pathtobase~~video.png" alt="video" class="nothing"/>~~fi~~ ~~caption_iteration~~
     </td>
index 12646be..ddc6f11 100644 (file)
@@ -28,7 +28,7 @@
 ~~iterate1_open~~
 <tr>
     ~~iterate2_open_maxN~~
-    <td align="center" valign="top" ~~colspan~~>
+    <td align="center" valign="top" ~~colspan~~ ~~homogeinize_width~~>
        ~~image_iteration~~
        <p>~~ifvideo?~~<img src="~~pathtobase~~video.png" alt="video" class="nothing"/>~~fi~~ ~~caption_iteration~~</p>
     </td>