External css

This commit is contained in:
Max Shinn 2010-12-28 09:10:22 -06:00
parent 46b2151f09
commit c73398fb25
3 changed files with 13 additions and 2 deletions

View File

@ -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');
}
}

View File

@ -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'));

View File

@ -0,0 +1,8 @@
.photocontainer, .albumcontainer {
display: block;
background-color: yellow;
float: left;
padding: 20px;
margin: 15px;
}