/** * Initialize the skin. * * @param ETController $sender The page controller. * @return void */ public function handler_init($sender) { $sender->addCSSFile((C("esoTalk.https") ? "https" : "http") . "://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700"); $sender->addCSSFile("core/skin/base.css", true); $sender->addCSSFile($this->getResource("styles.css"), true); // If we're viewing from a mobile browser, add the mobile CSS and change the master view. if ($isMobile = isMobileBrowser()) { $sender->addCSSFile($this->getResource("mobile.css"), true); $sender->masterView = "mobile.master"; $sender->addToHead("<meta name='viewport' content='width=device-width; initial-scale=1.0; maximum-scale=1.0;'>"); } // If custom colors have been set in this skin's settings, add some CSS to the page. $styles = array(); // If a custom header color has been set... if ($c = C("skin.Default.headerColor")) { $styles[] = "#hdr {background-color:{$c}}"; // If the header color is in the top half of the lightness spectrum, add the "lightHdr" class to the body. $rgb = colorUnpack($c, true); $hsl = rgb2hsl($rgb); if ($hsl[2] >= 0.5) { $sender->bodyClass .= " lightHdr"; } } // If a custom body color has been set... if ($c = C("skin.Default.bodyColor")) { $styles[] = "body, .scrubberMore {background-color:{$c} !important}"; // If the body color is in the bottom half of the lightness spectrum, add the "darkBody" class to the body. $rgb = colorUnpack($c, true); $hsl = rgb2hsl($rgb); if ($hsl[2] < 0.5) { $sender->bodyClass .= " darkBody"; } // Slightly darken the body color and set it as the border color for the body content area. $hsl[2] = max(0, $hsl[2] - 0.1); $hsl[1] = min($hsl[1], 0.5); $b = colorPack(hsl2rgb($hsl), true); $styles[] = "#body-content {border-color:{$b}}"; } // If a custom body background image has been set... if ($img = C("skin.Default.bodyImage") and !$isMobile) { $styles[] = "body {background-image:url(" . getWebPath($img) . "); background-position:top center; background-attachment:fixed}"; } // Do we want this background image to not repeat? if ($img and C("skin.Default.noRepeat")) { $styles[] = "body {background-repeat:no-repeat}"; } // If we have any custom styles at all, add them to the page head. if (count($styles)) { $sender->addToHead("<style type='text/css'>\n" . implode("\n", $styles) . "\n</style>"); } }
/** * Initialize the skin. * * @param ETController $sender The page controller. * @return void */ public function handler_init($sender) { $sender->addToHead("<link rel='shortcut icon' href='" . getWebPath($this->resource("favicon.ico")) . "'>"); $sender->addCSSFile((C("esoTalk.https") ? "https" : "http") . "://fonts.googleapis.com/css?family=Open+Sans:400,600|Roboto|TitilliumWeb"); $sender->addCSSFile("core/skin/base.css", true); $sender->addCSSFile("core/skin/font-awesome.css", true); $sender->addCSSFile($this->resource("styles.css"), true); // If we're viewing from a mobile browser, add the mobile CSS and change the master view. if ($isMobile = isMobileBrowser()) { $sender->addCSSFile($this->resource("mobile.css"), true); $sender->masterView = "mobile.master"; $sender->addToHead("<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0'>"); } $sender->addCSSFile("config/colors.css", true); if (!C("skin.Doragon.primaryColor")) { $this->writeColors("#364159"); } }
/** * Initialize the skin. * * @param ETController $sender The page controller. * @return void */ public function handler_init($sender) { $sender->addCSSFile("core/skin/base.css", true); $sender->addCSSFile("core/skin/font-awesome.css", true); $sender->addCSSFile($this->resource("styles.css"), true); // If we're viewing from a mobile browser, add the mobile CSS and change the master view. if ($isMobile = isMobileBrowser()) { $sender->addCSSFile($this->resource("mobile.css"), true); $sender->masterView = "mobile.master"; $sender->addToHead("<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0'>"); } $sender->addCSSFile("config/colors.css", true); if (!C("skin.Default.primaryColor")) { $this->writeColors("#364159"); } }
/** * Initialize the skin. * * @param ETController $sender The page controller. * @return void */ public function handler_init($sender) { $sender->addCSSFile((C("esoTalk.https") ? "https" : "http") . "://fonts.useso.com/css?family=Open+Sans:400,600"); $sender->addCSSFile("core/skin/base.css", true); $sender->addCSSFile("core/skin/font-awesome.css", true); $sender->addCSSFile($this->resource("styles.css"), true); // If we're viewing from a mobile browser, add the mobile CSS and change the master view. if ($isMobile = isMobileBrowser()) { $sender->addCSSFile($this->resource("mobile.css"), true); $sender->masterView = "mobile.master"; $sender->addToHead("<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0'>"); } $sender->addCSSFile(C("esoTalk.aggregateCSS") ? PATH_CONFIG . "/colors.css" : "config/colors.css", true); if (!C("skin.Default.primaryColor")) { $this->writeColors("#364159"); } }