From 521dad5267d98fc7776d75b3f44dc65ab500568d Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 1 May 2010 04:04:44 +0000 Subject: better layout of photo album covers --- views/default/tidypics/css.php | 6 ++++++ views/default/tidypics/gallery.php | 9 +++++++++ 2 files changed, 15 insertions(+) (limited to 'views/default/tidypics') diff --git a/views/default/tidypics/css.php b/views/default/tidypics/css.php index 538deeb5f..9d904a7ff 100644 --- a/views/default/tidypics/css.php +++ b/views/default/tidypics/css.php @@ -92,6 +92,12 @@ float:left; margin-bottom:20px; padding: 4px; text-align:center; +width: 160px; +} + +.tidypics_line_break { +width: 100%; +clear: both; } .tidypics_gallery_title { diff --git a/views/default/tidypics/gallery.php b/views/default/tidypics/gallery.php index b9a50bdab..74aa34500 100644 --- a/views/default/tidypics/gallery.php +++ b/views/default/tidypics/gallery.php @@ -4,6 +4,9 @@ * */ +// four albums across +$num_wide = 4; + $context = $vars['context']; $offset = $vars['offset']; $entities = $vars['entities']; @@ -43,9 +46,15 @@ if ($pagination) { } $html .= $nav; + if (is_array($entities) && sizeof($entities) > 0) { + $counter = 0; foreach($entities as $entity) { + if ($counter % $num_wide == 0) { + $html .= "
"; + } $html .= elgg_view_entity($entity, $fullview); + $counter++; } } -- cgit v1.2.3