Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

56 lines
1.6KB

  1. <?php
  2. /**
  3. * @link http://www.yiiframework.com/
  4. * @copyright Copyright (c) 2008 Yii Software LLC
  5. * @license http://www.yiiframework.com/license/
  6. */
  7. namespace frontend\assets;
  8. use yii\web\AssetBundle;
  9. use yii ;
  10. /**
  11. * @author Qiang Xue <qiang.xue@gmail.com>
  12. * @since 2.0
  13. */
  14. class AppAsset extends AssetBundle
  15. {
  16. public $basePath = '@webroot';
  17. public $baseUrl = '@web';
  18. public $css = [];
  19. public $js = [];
  20. public $depends = [
  21. 'yii\web\YiiAsset',
  22. 'yii\bootstrap\BootstrapAsset',
  23. ];
  24. public function __construct() {
  25. parent::__construct() ;
  26. // css
  27. $this->addAsset('css','bootstrap/css/bootstrap.min.css') ;
  28. $this->addAsset('css','bootstrap/css/bootstrap-theme.min.css');
  29. $this->addAsset('css','js/bjqs/bjqs.css');
  30. $this->addAsset('css','js/jquery-ui-1.11.4.custom/jquery-ui.min.css');
  31. $this->addAsset('css','js/jquery-ui-1.11.4.custom/jquery-ui.theme.css');
  32. $this->addAsset('css','js/lightbox/css/lightbox.css');
  33. $this->addAsset('css','css/screen.css');
  34. // js
  35. $this->addAsset('js','bootstrap/js/bootstrap.min.js');
  36. $this->addAsset('js','js/vegas/jquery.vegas.js');
  37. $this->addAsset('js','js/bjqs/bjqs-1.3.min.js');
  38. $this->addAsset('js','js/jquery-ui-1.11.4.custom/jquery-ui.min.js');
  39. $this->addAsset('js','js/lightbox/js/lightbox.min.js');
  40. $this->addAsset('js','js/lechatdesnoisettes.js');
  41. $this->addAsset('js','js/boulange.js');
  42. }
  43. public function addAsset($type, $path)
  44. {
  45. $this->$type[] = $path.'?v='.filemtime(Yii::getAlias('@app/web/'.$path)) ;
  46. }
  47. }