/** * Prepare the inclusion of a library script * * @param string $type * @param string $tool_name * @param string $file_name * @return string */ function prepare_library_include($type, $tool_name, $file_name = null) { $str = ''; if (!empty($tool_name)) { $cc_type = strtoupper($type); switch ($type) { case 'js': $extension = 'js'; $root_dir = _ASSETSLIB_JS_PATH; $http_dir = _ASSETSLIB_JS_HTTP; break; case 'css': $extension = 'css'; $root_dir = _ASSETSLIB_CSS_PATH; $http_dir = _ASSETSLIB_CSS_HTTP; break; default: $extension = $root_dir = $http_dir = ''; break; } $str = library_include($root_dir . $tool_name . DIRECTORY_SEPARATOR . (!empty($file_name) ? $file_name : $tool_name) . '.' . $extension); } return $str; }
* * The source code of this package is available online at * <http://github.com/atelierspierrot/assets-library>. */ @ini_set('display_errors', 1); @error_reporting(E_ALL ^ E_NOTICE); require_once __DIR__ . '/../../assets-library.php'; css_header(); ?> /* -------------------------------- Global Default CSS Styles -------------------------------- */ <?php // reset echo library_include('css', 'commons', 'reset'); ?> /* body global styles */ body { background-color: #fff; margin: 40px; font-size: 82%; font-family: "Lucida Grande", Verdana, Sans-serif; color: #4F5155; direction: <?php echo _CSS_DIRECTION; ?> ; } <?php // typography echo prepare_library_include('css', 'commons', 'typography');