示例#1
0
?>
" />
	<link rel="apple-touch-icon" sizes="144x144" href="<?php 
echo $api->getFile("/favicon/apple-touch-icon-144x144.png");
?>
" />
	<link rel="apple-touch-icon" sizes="152x152" href="<?php 
echo $api->getFile("/favicon/apple-touch-icon-152x152.png");
?>
" />

	<?php 
echo Amslib_Resource::getStylesheet();
?>
	<?php 
echo Amslib_Resource::getJavascript();
?>
</head>

<body class="<?php 
echo $body;
?>
">
    <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
        <div class="container-fluid">
            <div class="navbar-header">
                <a class="navbar-brand" href="<?php 
echo $url_home;
?>
">Antimatter Studios / Amslib Framework</a>
            </div>
 /**
  * 	method:	autoloadResources
  *
  * 	todo: write documentation
  */
 protected function autoloadResources()
 {
     //	STEP 1: Autoload all resources from each plugin as they are requested
     foreach (Amslib_Plugin_Manager::listPlugin() as $name) {
         $p = Amslib_Plugin_Manager::getAPI($name);
         if ($p) {
             $p->autoloadResources();
         } else {
             Amslib_Debug::log("plugin not found?", $p);
         }
     }
     $default = Amslib_Router::getRouteParam("plugin");
     $route = Amslib_Router::getRoute();
     //	STEP 2: Autoload all resources which are bound the current route.
     //	hack into place the adding or removing of all the stylesheets and javascripts
     foreach (Amslib_Array::valid(Amslib_Router::getJavascript()) as $j) {
         //	datatables does't load because it's trying with the wrong plugin
         $name = isset($j["plugin"]) ? str_replace("__CURRENT_PLUGIN__", $route["group"], $j["plugin"]) : $default;
         $plugin = Amslib_Plugin_Manager::getAPI($name);
         if ($plugin) {
             if (isset($j["remove"])) {
                 Amslib_Resource::removeJavascript($j["value"]);
             } else {
                 $plugin->addJavascript($j["value"]);
             }
         }
     }
     foreach (Amslib_Array::valid(Amslib_Router::getStylesheet()) as $c) {
         $name = isset($c["plugin"]) ? str_replace("__CURRENT_PLUGIN__", $route["group"], $c["plugin"]) : $default;
         $plugin = Amslib_Plugin_Manager::getAPI($name);
         if ($plugin) {
             if (isset($c["remove"])) {
                 Amslib_Resource::removeStylesheet($c["value"]);
             } else {
                 $plugin->addStylesheet($c["value"]);
             }
         }
     }
 }
 /**
  * 	method:	removeGoogleFont
  *
  * 	todo: write documentation
  */
 public static function removeGoogleFont($id)
 {
     Amslib_Resource::removeStylesheet($id);
 }
示例#4
0
 /**
  * 	method:	removeFont
  *
  * 	todo: write documentation
  */
 public function removeFont($id)
 {
     Amslib_Resource::removeFont($id);
 }