From: Steve Sutton Date: Thu, 14 Aug 2014 13:16:39 +0000 (-0400) Subject: Include the seasonator into the css for background. X-Git-Tag: V1.0^2~82 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=86bf778d1d46fa6c7537aa819664296fd444788c;p=web%2FKeweenaw.git Include the seasonator into the css for background. Separate the background image from the main styles.css and setup four css files, one for each season. These will setup the new background images for each season. --- diff --git a/Toolkit/Page.php b/Toolkit/Page.php index bc0c368..d7127f6 100755 --- a/Toolkit/Page.php +++ b/Toolkit/Page.php @@ -56,6 +56,11 @@ define("PAGE_TITLE", SITENAME); */ class Toolkit_Page { + /** + * Object containing data for the seansonator. + * @var type + */ + public $seasonImages; /** * used on img src and style href tags @@ -144,7 +149,13 @@ class Toolkit_Page : BASE_URL . 'index.php'; // Resources needed for every page. + $this->seasonImages = $this->_getSeasonImages(); $GLOBALS['styleSheets'] = array(); + $this->seasonStyleSheet + = ($this->seasonImages->getSeason()) + ? $this->seasonImages->getSeason() + : 'summer'; + // Resources needed for every page. $GLOBALS['topScripts'][] = JQUERY_CDN_JS; $GLOBALS['bottomScripts'][] = MEDIA_BASE_URL . 'js/foundation.min.js'; @@ -604,13 +615,10 @@ class Toolkit_Page private function _getMainNavigation() { - static $seasonImages; + $seasonImages = $this->seasonImages; if (defined('MAIN_LEVEL_NAV_ARRAY') && MAIN_LEVEL_NAV_ARRAY) { $mainNavArray = unserialize(MAIN_LEVEL_NAV_ARRAY); } - if (!$seasonImages) { - $seasonImages = $this->_getSeasonImages(); - } $sideNav = new Toolkit_Template_Navigation_AllInOneSideNav( $this->_pageGateway ); diff --git a/css/fall.css b/css/fall.css new file mode 100644 index 0000000..1920f25 --- /dev/null +++ b/css/fall.css @@ -0,0 +1,4 @@ +body { + background: url("../assets/background.jpg"); + background-size: cover; +} \ No newline at end of file diff --git a/css/spring.css b/css/spring.css new file mode 100644 index 0000000..1920f25 --- /dev/null +++ b/css/spring.css @@ -0,0 +1,4 @@ +body { + background: url("../assets/background.jpg"); + background-size: cover; +} \ No newline at end of file diff --git a/css/summer.css b/css/summer.css new file mode 100644 index 0000000..1920f25 --- /dev/null +++ b/css/summer.css @@ -0,0 +1,4 @@ +body { + background: url("../assets/background.jpg"); + background-size: cover; +} \ No newline at end of file diff --git a/css/winter.css b/css/winter.css new file mode 100644 index 0000000..591b50b --- /dev/null +++ b/css/winter.css @@ -0,0 +1,4 @@ +body { + background: url("../assets/background.jpg"); + background-size: cover; +} diff --git a/styles.css b/styles.css index 8c09a9f..8d91f50 100644 --- a/styles.css +++ b/styles.css @@ -75,8 +75,6 @@ article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, /* Dimensions */ /* Site specific styles */ body { - background: url("assets/background.jpg"); - background-size: cover; font-family: "Arial"; font-weight: 400; font-size: 12px; diff --git a/templates/template.html b/templates/template.html index 2568416..765c7b0 100644 --- a/templates/template.html +++ b/templates/template.html @@ -9,6 +9,7 @@ + {topScripts:h}