]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
External css
authorMax Shinn <trombonechamp@gmail.com>
Tue, 28 Dec 2010 15:10:22 +0000 (09:10 -0600)
committerMax Shinn <trombonechamp@gmail.com>
Tue, 28 Dec 2010 15:10:22 +0000 (09:10 -0600)
plugins/GNUsocialPhotos/GNUsocialPhotosPlugin.php
plugins/GNUsocialPhotos/actions/photos.php
plugins/GNUsocialPhotos/res/style.css [new file with mode: 0644]

index f6173c29c60e9ac4dc684224c880a56a8bbabcb4..7be8b0a962305863c4285ed6ae113109a978dde6 100644 (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');
+    }
 }
 
index ede8ba0f73982f8b02eed8830b815a115b976330..bfa77b9c35176cfa07cde1a118ceafee32852fef 100644 (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'));
diff --git a/plugins/GNUsocialPhotos/res/style.css b/plugins/GNUsocialPhotos/res/style.css
new file mode 100644 (file)
index 0000000..78cd01f
--- /dev/null
@@ -0,0 +1,8 @@
+.photocontainer, .albumcontainer { 
+    display: block; 
+    background-color: yellow; 
+    float: left; 
+    padding: 20px; 
+    margin: 15px; 
+}
+