public function before()
 {
     parent::before();
     Casset::css('admin.css');
     Casset::js('bootstrap.js');
     Casset::js('admin.js');
 }
 /**
  * Initialize bootstrap
  */
 public static function init()
 {
     $autoload = \Config::get('bootstrap.assets.autoload', false);
     if (!$autoload) {
         return;
     }
     $path = \Config::get('bootstrap.assets.path', '');
     $use_min = \Config::get('bootstrap.assets.use_min', true);
     $css_file = $path . 'bootstrap';
     $js_file = $path . 'bootstrap';
     if ($use_min) {
         $css_file .= '.min';
         $js_file .= '.min';
     }
     $css_file .= '.css';
     $js_file .= '.js';
     // See if Casset package is used.
     if (\Package::loaded('casset')) {
         \Casset::css($css_file, !$use_min);
         \Casset::js($js_file, !$use_min);
     } else {
         \Asset::css($css_file);
         \Asset::js($js_file);
     }
 }
Esempio n. 3
0
 /**
  * CSS
  *
  * Either adds the stylesheet to the group, or returns the CSS tag.
  *
  * @access	public
  * @param	mixed	The file name, or an array files.
  * @param	array	An array of extra attributes
  * @param	string	The asset group name
  * $raw		bool	If set to true the result css tags will include the file contents directly instead of via a link tag.
  * $is_minify	bool	If set to true minify and combine files at only prod env.
  * @return	string
  */
 public static function css($stylesheets = array(), $attr = array(), $group = NULL, $raw = false, $is_minify = false, $is_use_minified_file = false)
 {
     if (Fuel::$env == Fuel::PRODUCTION) {
         if ($is_minify) {
             foreach ($stylesheets as $stylesheet) {
                 Casset::css($stylesheet, false, $group);
             }
             return;
         }
         if ($is_use_minified_file) {
             $stylesheets = Util_File::convert_filename2min($stylesheets);
         }
     }
     return parent::css($stylesheets, $attr, $group, $raw);
 }
echo \Settings::Get('site_name');
?>
</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="A simple and easy to use URL shortener script.">
        <meta name="author" content="CodeCanopy">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
            
        <!-- styles -->
        <?php 
Casset::css('bootstrap.css');
Casset::css('font-awesome.min.css');
Casset::css('jquery-ui-1.10.3.custom.min.css');
Casset::css('bootstrap-switch.css');
Casset::css('base.css');
Casset::css('colorbox.css');
echo Casset::render_css();
?>
        <!--[if IE 7]>
            <link href="<?php 
echo Uri::Create('assets/css/font-awesome-ie7.min.css');
?>
" rel="stylesheet">
        <![endif]-->
        
        <!--[if lt IE 9]>
            <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->
        
        <!-- fav icon -->
        <link rel="shortcut icon" href="<?php 
Esempio n. 5
0
 /**
  * Assets loader
  *
  * @access  private
  */
 private function _init_assets()
 {
     Casset::css('main.css');
     Casset::js('main.js');
 }