move the fonts into Toolkit_Page class
authorSteve Sutton <steve@gaslightmedia.com>
Fri, 6 Mar 2015 14:19:18 +0000 (09:19 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Fri, 6 Mar 2015 14:19:18 +0000 (09:19 -0500)
so we can set https or http

Toolkit/Page.php
templates/template.html

index c25bb2c..ec0a823 100755 (executable)
@@ -146,7 +146,13 @@ class Toolkit_Page
             : BASE_URL . 'index.php';
 
         // Resources needed for every page.
-        $GLOBALS['styleSheets'] = array();
+        $baseFontUrl = ($_SERVER['HTTPS'] == 'on') ? 'https;//': 'http://';
+        $GLOBALS['styleSheets'] = array(
+            $baseFontUrl . 'fonts.googleapis.com/css?family=Oleo+Script:400,700',
+            $baseFontUrl . 'fonts.googleapis.com/css?family=Oleo+Script+Swash+Caps:400,700',
+            $baseFontUrl . 'fonts.googleapis.com/css?family=Josefin+Slab:400,700',
+            $baseFontUrl . 'fonts.googleapis.com/css?family=Open+Sans:400,400italic,700',
+        );
         // Resources needed for every page.
         $GLOBALS['topScripts'][] = MEDIA_BASE_URL . 'js/modernizr/modernizr.js';
         $GLOBALS['bottomScripts'][] = JQUERY_CDN_JS;
@@ -798,7 +804,7 @@ class Toolkit_Page
         $tabs      = str_repeat($tab, $level * 2);
         $mainClass = ($className) ? ' class="'.$className.'"': '';
         $result    = "{$tabs}<ul{$mainClass}>\n";
-        if ($level >= 1) {
+        if ($level == 1) {
             $result .= '<li class="diamond"></li>';
         }
         foreach ($array as $i => $node) {
index b344009..e79d5c7 100755 (executable)
         <title>{pageTitle:h}</title>
         {styles:h}
         <link rel="stylesheet" href="{mediaBaseURL:h}css/app.css">
-        <link href="//fonts.googleapis.com/css?family=Oleo+Script:400,700" rel="stylesheet" type="text/css">
-        <link href="//fonts.googleapis.com/css?family=Oleo+Script+Swash+Caps:400,700" rel="stylesheet" type="text/css">
-        <link href="//fonts.googleapis.com/css?family=Josefin+Slab:400,700" rel="stylesheet" type="text/css">
-        <link href="//fonts.googleapis.com/css?family=Open+Sans:400,400italic,700" rel="stylesheet" type="text/css">
         {topScripts:h}
         <script>
         (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){