Update for sitemap styles
authorSteve Sutton <steve@gaslightmedia.com>
Thu, 12 Feb 2015 17:16:46 +0000 (12:16 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Thu, 12 Feb 2015 17:16:46 +0000 (12:16 -0500)
set width and center

Toolkit/Template/Page/BodyFactory.php
css/siteMap.css
templates/siteMap.html

index f08ccc1..d654167 100644 (file)
@@ -28,7 +28,7 @@
  */
 class Toolkit_Template_Page_BodyFactory
 {
-       //      {{{     properties
+    //  {{{ properties
 
     /**
      * description of $_breadCrumbsFactory
@@ -36,7 +36,7 @@ class Toolkit_Template_Page_BodyFactory
      * @var string
      * @access private
      */
-       private $_breadCrumbsFactory;
+    private $_breadCrumbsFactory;
 
     /**
      * description of $_pageGateway
@@ -44,7 +44,7 @@ class Toolkit_Template_Page_BodyFactory
      * @var string
      * @access private
      */
-       private $_pageGateway;
+    private $_pageGateway;
 
     /**
      * description of $_paragraphGateway
@@ -52,7 +52,7 @@ class Toolkit_Template_Page_BodyFactory
      * @var string
      * @access private
      */
-       private $_paragraphGateway;
+    private $_paragraphGateway;
 
     /**
      * description of $_cache
@@ -60,7 +60,7 @@ class Toolkit_Template_Page_BodyFactory
      * @var string
      * @access private
      */
-       private $_cache;
+    private $_cache;
 
     /**
      * description of $_keywordReplacement
@@ -68,10 +68,10 @@ class Toolkit_Template_Page_BodyFactory
      * @var string
      * @access private
      */
-       private $_keywordReplacement;
+    private $_keywordReplacement;
 
-       //      }}}
-       //      {{{     __construct()
+    //  }}}
+    //  {{{ __construct()
 
     /**
      * Class constructor
@@ -84,23 +84,23 @@ class Toolkit_Template_Page_BodyFactory
      *
      * @access public
      */
-       public function __construct(
-               Toolkit_BreadCrumbsFactory $breadCrumbsFactory,
-               Toolkit_Toolbox_PageGatewayAbstract $pageGateway,
-               Toolkit_Toolbox_ParagraphGatewayAbstract $paragraphGateway,
-               Toolkit_Template_KeywordReplacement $keywordReplacement,
+    public function __construct(
+        Toolkit_BreadCrumbsFactory $breadCrumbsFactory,
+        Toolkit_Toolbox_PageGatewayAbstract $pageGateway,
+        Toolkit_Toolbox_ParagraphGatewayAbstract $paragraphGateway,
+        Toolkit_Template_KeywordReplacement $keywordReplacement,
         Cache_Lite $cache
-       ) {
-               $this->_breadCrumbsFactory = $breadCrumbsFactory;
-               $this->_pageGateway        = $pageGateway;
-               $this->_paragraphGateway   = $paragraphGateway;
-               $this->_keywordReplacement = $keywordReplacement;
-               $this->_cache              = $cache;
+    ) {
+        $this->_breadCrumbsFactory = $breadCrumbsFactory;
+        $this->_pageGateway        = $pageGateway;
+        $this->_paragraphGateway   = $paragraphGateway;
+        $this->_keywordReplacement = $keywordReplacement;
+        $this->_cache              = $cache;
 
-       }
+    }
 
-       //      }}}
-       //      {{{     getPageBodyBuilder()
+    //  }}}
+    //  {{{ getPageBodyBuilder()
 
     /**
      * description of getPageBodyBuilder
@@ -112,101 +112,101 @@ class Toolkit_Template_Page_BodyFactory
      * |\Toolkit_Template_Page_Member|\Toolkit_Template_Page_Toolbox
      * @access public
      */
-       public function getPageBodyBuilder($id)
-       {
-               $page = $this->_pageGateway->find($id);
-
-               $forgotPassword   = (isset($_GET['forgot']) && $_GET['forgot'] == 1);
-               $siteMap              = (isset($_GET['sitemap']) && $_GET['sitemap'] == 1);
-               $memberDbSiteMap  = (   isset($_GET['memberDbSiteMap'])
-                                                        && $_GET['memberDbSiteMap'] == 1);
-               $pageDoesNotExist = ($page === false);
-               $pageIsTurnedOff  = (   is_array($page)
-                                                        && !$page['active']
-                                                        && !strstr($_SERVER['HTTP_REFERER'], 'admin/')
+    public function getPageBodyBuilder($id)
+    {
+        $page = $this->_pageGateway->find($id);
+
+        $forgotPassword   = (isset($_GET['forgot']) && $_GET['forgot'] == 1);
+        $siteMap          = (isset($_GET['sitemap']) && $_GET['sitemap'] == 1);
+        $memberDbSiteMap  = (   isset($_GET['memberDbSiteMap'])
+                             && $_GET['memberDbSiteMap'] == 1);
+        $pageDoesNotExist = ($page === false);
+        $pageIsTurnedOff  = (   is_array($page)
+                             && !$page['active']
+                             && !strstr($_SERVER['HTTP_REFERER'], 'admin/')
                              && !$_REQUEST['preview']);
-               $googleSearch     = (   defined('GOOGLE_SEARCH')
-                                                    && GOOGLE_SEARCH
-                                                    && isset($_GET['query'])
-                                                    && !empty($_GET['query']));
-               $glmSearch        = (   defined('GLM_SEARCH')
-                                                    && GLM_SEARCH
-                                                    && isset($_REQUEST['GLMSearch'])
-                                                    && $_REQUEST['GLMSearch'] == 'true');
-               $memberPage       = (   defined('MEMBERS_DB')
-                                                && MEMBERS_DB
+        $googleSearch     = (   defined('GOOGLE_SEARCH')
+                             && GOOGLE_SEARCH
+                             && isset($_GET['query'])
+                             && !empty($_GET['query']));
+        $glmSearch    = (   defined('GLM_SEARCH')
+                             && GLM_SEARCH
+                             && isset($_REQUEST['GLMSearch'])
+                             && $_REQUEST['GLMSearch'] == 'true');
+        $memberPage       = (   defined('MEMBERS_DB')
+                             && MEMBERS_DB
                              && $page['include_members']);
 
-               if ($forgotPassword) {
-                       die('Toolkit_Template_Page_BodyFactory::getPageBodyBuilder');
-               } elseif ($memberDbSiteMap) {
-                       return new Toolkit_Members_SiteMapPage(
-                               Toolkit_Database::getInstance(),
+        if ($forgotPassword) {
+            die('Toolkit_Template_Page_BodyFactory::getPageBodyBuilder');
+        } elseif ($memberDbSiteMap) {
+            return new Toolkit_Members_SiteMapPage(
+                Toolkit_Database::getInstance(),
                 $this->_pageGateway
-                       );
-               } elseif ($siteMap) {
-                       return new Toolkit_Template_Page_SiteMap(
-                               Toolkit_Database::getInstance(),
+            );
+        } elseif ($siteMap) {
+            return new Toolkit_Template_Page_SiteMap(
+                Toolkit_Database::getInstance(),
                 $this->_pageGateway
-                       );
-               } elseif ($pageDoesNotExist) {
-                       //      page does not exist
-                       //      give 301 redirect and go back to index page
-                       header($_SERVER['SERVER_PROTOCOL'] . ' 301 Moved Permanently');
-                       header('Location: ' . BASE_URL . 'index.php');
-                       exit();
-               } elseif ($pageIsTurnedOff) {
-                       //      page exists, but is turned off
-                       //      give 404 redirect and go back to index page
-                       header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');
-                       return new Toolkit_Template_Page_Bad();
-               } elseif ($googleSearch) {
-                       return new Toolkit_Template_Page_GoogleSearch();
-               } elseif ($glmSearch) {
-                       return new Toolkit_Template_Page_GLMSearch();
-               } elseif ($memberPage) {
-                       $conf = new Config;
-                       $root =& $conf->parseConfig(
-                               BASE . 'Toolkit/Members/config.ini',
-                               'IniFile'
-                       );
-
-                       $imageAdapter  = new Toolkit_FileServer_ImageAdapter();
-
-                       return new Toolkit_Template_Page_Member(
-                               $id,
-                               new Toolkit_Template_Image_Factory($imageAdapter),
-                               $this->_breadCrumbsFactory,
-                               $this->_pageGateway,
-                               $this->_paragraphGateway,
-                               $this->_keywordReplacement,
-                               $this->_cache,
-                               $root
-                       );
-               } else { // regular toolbox page
-                       $imageAdapter = new Toolkit_FileServer_ImageAdapter();
-
-                       $photoGallery = null;
-                       if (defined('PHOTO_GALLERY') && PHOTO_GALLERY) {
-                               $dbh = Toolkit_Database::getInstance();
-                               $photoGallery = new Toolkit_Photos_Gallery(
-                                       $dbh,
-                                       new Toolkit_Photos_Display($dbh)
-                               );
-                       }
-
-                       return new Toolkit_Template_Page_Toolbox(
-                               $id,
-                               new Toolkit_Template_Image_Factory($imageAdapter),
-                               $this->_breadCrumbsFactory,
-                               $this->_pageGateway,
-                               $this->_paragraphGateway,
-                               $this->_keywordReplacement,
-                               $this->_cache,
-                               $photoGallery
-                       );
-               }
-       }
-
-       //      }}}
+            );
+        } elseif ($pageDoesNotExist) {
+            //  page does not exist
+            //  give 301 redirect and go back to index page
+            header($_SERVER['SERVER_PROTOCOL'] . ' 301 Moved Permanently');
+            header('Location: ' . BASE_URL . 'index.php');
+            exit();
+        } elseif ($pageIsTurnedOff) {
+            //  page exists, but is turned off
+            //  give 404 redirect and go back to index page
+            header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');
+            return new Toolkit_Template_Page_Bad();
+        } elseif ($googleSearch) {
+            return new Toolkit_Template_Page_GoogleSearch();
+        } elseif ($glmSearch) {
+            return new Toolkit_Template_Page_GLMSearch();
+        } elseif ($memberPage) {
+            $conf = new Config;
+            $root =& $conf->parseConfig(
+                BASE . 'Toolkit/Members/config.ini',
+                'IniFile'
+            );
+
+            $imageAdapter  = new Toolkit_FileServer_ImageAdapter();
+
+            return new Toolkit_Template_Page_Member(
+                $id,
+                new Toolkit_Template_Image_Factory($imageAdapter),
+                $this->_breadCrumbsFactory,
+                $this->_pageGateway,
+                $this->_paragraphGateway,
+                $this->_keywordReplacement,
+                $this->_cache,
+                $root
+            );
+        } else { // regular toolbox page
+            $imageAdapter = new Toolkit_FileServer_ImageAdapter();
+
+            $photoGallery = null;
+            if (defined('PHOTO_GALLERY') && PHOTO_GALLERY) {
+                $dbh = Toolkit_Database::getInstance();
+                $photoGallery = new Toolkit_Photos_Gallery(
+                    $dbh,
+                    new Toolkit_Photos_Display($dbh)
+                );
+            }
+
+            return new Toolkit_Template_Page_Toolbox(
+                $id,
+                new Toolkit_Template_Image_Factory($imageAdapter),
+                $this->_breadCrumbsFactory,
+                $this->_pageGateway,
+                $this->_paragraphGateway,
+                $this->_keywordReplacement,
+                $this->_cache,
+                $photoGallery
+            );
+        }
+    }
+
+    //  }}}
 }
index 2300043..6cb45c9 100644 (file)
@@ -1,49 +1,55 @@
 
 #sitemap h2 {
-       font-size: 14px;
-       font-weight: bold;
-       margin: 20px 0 5px 0;
-       padding: 5px;
-       border-bottom: 1px solid #000;
-       }
+    font-size: 14px;
+    font-weight: bold;
+    margin: 20px 0 5px 0;
+    padding: 5px;
+    border-bottom: 1px solid #000;
+    }
 #sitemap h2 a {
-       color: #000;
-       }
+    color: #000;
+    }
 #sitemap .row {
-       clear: both;
-       overflow: hidden;
-       }
+    clear: both;
+    overflow: hidden;
+    }
 .row ol, .row li {
-       list-style-image: none;
-       list-style-type: none;
-       text-transform: capitalize;
-       font-size: 12px;
-       font-weight: normal;
-       margin: 0;
-       padding: 0;
+    list-style-image: none;
+    list-style-type: none;
+    text-transform: capitalize;
+    font-size: 12px;
+    font-weight: normal;
+    margin: 0;
+    padding: 0;
 }
 #sitemap a {
-       border-bottom: none;
-       text-decoration: none;
-       color: #666;
-       }
+    border-bottom: none;
+    text-decoration: none;
+    color: #666;
+    }
 #sitemap a:hover {
-       text-decoration: underline;
-       color: #00F;
-       }
+    text-decoration: underline;
+    color: #00F;
+    }
 #sitemap a:active {
-       text-decoration: underline;
-       color: #00F;
-       }
+    text-decoration: underline;
+    color: #00F;
+    }
 .row > ol {
-       float: left;
-       margin-right: 3%;
-       /* width: 30% */
-       }
+    float: left;
+    margin-right: 3%;
+    /* width: 30% */
+    }
 .row > ol > li {
-       margin: 5px;
-       font-weight: bold;
-       }
+    margin: 5px;
+    font-weight: bold;
+    }
 .row > ol > li > ol > li {
-       margin: 5px 0 5px 20px;
-       }
\ No newline at end of file
+    margin: 5px 0 5px 20px;
+    }
+#slideshow_wrapper {display:none;}
+#sitemap {
+    width: 75%;
+    margin-left: auto;
+    margin-right: auto;
+}
index f558a73..9e47f14 100644 (file)
@@ -1,6 +1,3 @@
-<style>
-#slideshow_wrapper {display:none;}
-</style>
 <div id="sitemap">
   <ol>
     <li flexy:foreach="nav,main">