diff --git a/plugins/GNUsocialPhotos/GNUsocialPhotosPlugin.php b/plugins/GNUsocialPhotos/GNUsocialPhotosPlugin.php index f6173c29c6..7be8b0a962 100644 --- a/plugins/GNUsocialPhotos/GNUsocialPhotosPlugin.php +++ b/plugins/GNUsocialPhotos/GNUsocialPhotosPlugin.php @@ -194,5 +194,10 @@ class GNUsocialPhotosPlugin extends Plugin array('nickname' => $nav->action->trimmed('nickname'))), _('Photos'), _('Photo gallery'), $nav->action->trimmed('action') == 'photos', 'nav_photos'); } + + function onEndShowStyles($action) + { + $action->cssLink('/plugins/GNUsocialPhotos/res/style.css'); + } } diff --git a/plugins/GNUsocialPhotos/actions/photos.php b/plugins/GNUsocialPhotos/actions/photos.php index ede8ba0f73..bfa77b9c35 100644 --- a/plugins/GNUsocialPhotos/actions/photos.php +++ b/plugins/GNUsocialPhotos/actions/photos.php @@ -84,7 +84,6 @@ class PhotosAction extends Action GNUsocialPhotoAlbum::newAlbum($cur->id, 'Default'); } while ($album->fetch()) { - $this->element('style', array(), '.albumcontainer { display: block; background-color: green; float: left; padding: 30px; margin: 20px; }'); $this->elementStart('div', array('class' => 'photocontainer')); $this->elementStart('a', array('href' => $album->getPageLink())); $this->element('img', array('src' => $album->getThumbUri())); @@ -115,7 +114,6 @@ class PhotosAction extends Action $this->element('a', array('href' => $album->getPageLink() . '?pageid=' . ($page+1) ), 'Next page'); } - $this->element('style', array(), '.photocontainer { display: block; background-color: yellow; float: left; padding: 30px; margin: 20px; }'); foreach ($photos as $photo) { $this->elementStart('a', array('href' => $photo->getPageLink())); $this->elementStart('div', array('class' => 'photocontainer')); diff --git a/plugins/GNUsocialPhotos/res/style.css b/plugins/GNUsocialPhotos/res/style.css new file mode 100644 index 0000000000..78cd01f926 --- /dev/null +++ b/plugins/GNUsocialPhotos/res/style.css @@ -0,0 +1,8 @@ +.photocontainer, .albumcontainer { + display: block; + background-color: yellow; + float: left; + padding: 20px; + margin: 15px; +} +