Add print stylesheet for boards

This commit is contained in:
Frederic Guillot
2015-04-25 15:08:02 -04:00
parent 8d15d0641f
commit 956f88f527
6 changed files with 569 additions and 9 deletions

View File

@@ -129,11 +129,13 @@ class Helper
* Add a stylesheet asset
*
* @param string $filename Filename
* @param boolean $is_file Add file timestamp
* @param string $media Media
* @return string
*/
public function css($filename, $is_file = true)
public function css($filename, $is_file = true, $media = 'screen')
{
return '<link rel="stylesheet" href="'.$filename.($is_file ? '?'.filemtime($filename) : '').'" media="screen">';
return '<link rel="stylesheet" href="'.$filename.($is_file ? '?'.filemtime($filename) : '').'" media="'.$media.'">';
}
/**

View File

@@ -14,8 +14,9 @@
<?= $this->js('assets/js/app.js') ?>
<?php endif ?>
<?= $this->css($this->u('app', 'colors'), false) ?>
<?= $this->css($this->u('app', 'colors'), false, 'all') ?>
<?= $this->css('assets/css/app.css') ?>
<?= $this->css('assets/css/print.css', true, 'print') ?>
<?php if ($this->config->get('application_stylesheet')): ?>
<style><?= $this->config->get('application_stylesheet') ?></style>