summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/controllers/albums.php10
-rw-r--r--themes/default/views/page.html.php14
2 files changed, 24 insertions, 0 deletions
diff --git a/core/controllers/albums.php b/core/controllers/albums.php
index adf59c02..b580bcca 100644
--- a/core/controllers/albums.php
+++ b/core/controllers/albums.php
@@ -63,6 +63,7 @@ class Albums_Controller extends Items_Controller {
$template->set_global("children", $album->viewable()->children($page_size, $offset));
$template->set_global("children_count", $children_count);
$template->set_global("parents", $album->parents());
+ $template->set_global("thumb_proportion", $this->thumb_proportion());
$template->content = new View("album.html");
$album->view_count++;
@@ -209,4 +210,13 @@ class Albums_Controller extends Items_Controller {
print album::get_edit_form($album);
}
+
+ /**
+ * Proportion of the current thumb_size's to default
+ * @return int
+ */
+ public function thumb_proportion() {
+ return module::get_var("core", "thumb_size", 150) / 150;
+ }
+
}
diff --git a/themes/default/views/page.html.php b/themes/default/views/page.html.php
index 893e6f9b..e9672dcb 100644
--- a/themes/default/views/page.html.php
+++ b/themes/default/views/page.html.php
@@ -13,6 +13,7 @@
<? else: ?>
<?= $page_title ?>
<? endif ?>
+ <?= $theme->page_type ?>
</title>
<link rel="shortcut icon" href="<?= $theme->url("images/favicon.ico") ?>" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="<?= url::file("lib/yui/reset-fonts-grids.css") ?>"
@@ -27,6 +28,19 @@
<link rel="stylesheet" type="text/css" href="<?= $theme->url("css/fix-ie.css") ?>"
media="screen,print,projection" />
<![endif]-->
+ <? if ($theme->page_type == 'album'): ?>
+ <? if ($thumb_proportion != 1): ?>
+ <? $new_width = $thumb_proportion * 213 ?>
+ <? $new_height = $thumb_proportion * 240 ?>
+ <style type="text/css">
+ #gContent #gAlbumGrid .gItem {
+ width: <?= $new_width ?>px;
+ height: <?= $new_height ?>px;
+ /* <?= $thumb_proportion ?> */
+ }
+ </style>
+ <? endif ?>
+ <? endif ?>
<script src="<?= url::file("lib/jquery.js") ?>" type="text/javascript"></script>
<script src="<?= url::file("lib/jquery.form.js") ?>" type="text/javascript"></script>
<script src="<?= url::file("lib/jquery-ui.js") ?>" type="text/javascript"></script>