diff options
| author | 2013-11-28 20:29:01 +0100 | |
|---|---|---|
| committer | 2013-11-28 20:29:01 +0100 | |
| commit | 6a9ce0cbadb8b2f57ee386e4b4a3bb9857af085a (patch) | |
| tree | 5362332083701f4bc7414bff9dd74c2b2aab4c86 | |
| parent | ddb9650b5dde683aaa749ab1e119e48e18cb99a5 (diff) | |
| parent | c8a7913f79955e284288468ef88adc90aa788c50 (diff) | |
Merge branch 'mergePrintCSS' into print
| -rw-r--r-- | app/App_FrontController.php | 1 | ||||
| -rwxr-xr-x | lib/minz/View.php | 5 | ||||
| -rw-r--r-- | public/themes/default/freshrss.css | 39 | ||||
| -rw-r--r-- | public/themes/default/global.css | 2 | ||||
| -rw-r--r-- | public/themes/flat-design/freshrss.css | 39 | ||||
| -rw-r--r-- | public/themes/flat-design/global.css | 2 | ||||
| -rw-r--r-- | public/themes/printer/style.css | 34 |
7 files changed, 85 insertions, 37 deletions
diff --git a/app/App_FrontController.php b/app/App_FrontController.php index 1f270c0b1..40e31f549 100644 --- a/app/App_FrontController.php +++ b/app/App_FrontController.php @@ -65,7 +65,6 @@ class App_FrontController extends FrontController { View::appendStyle (Url::display ('/themes/' . $theme['path'] . '/' . $file . '?' . @filemtime(PUBLIC_PATH . '/themes/' . $theme['path'] . '/' . $file))); } } - View::appendStyle (Url::display ('/themes/printer/style.css?' . @filemtime(PUBLIC_PATH . '/themes/printer/style.css')), 'print'); if (login_is_conf ($this->conf)) { View::appendScript ('https://login.persona.org/include.js'); diff --git a/lib/minz/View.php b/lib/minz/View.php index fd92762b3..12202542f 100755 --- a/lib/minz/View.php +++ b/lib/minz/View.php @@ -150,8 +150,9 @@ class View { $styles .= '<!--[if ' . $cond . ']>'; } - $styles .= '<link rel="stylesheet" media="' . $style['media'] - . '" href="' . $style['url'] . '" />'; + $styles .= '<link rel="stylesheet" ' . + ($style['media'] === 'all' ? '' : 'media="' . $style['media'] . '" ') . + 'href="' . $style['url'] . '" />'; if ($cond) { $styles .= '<![endif]-->'; diff --git a/public/themes/default/freshrss.css b/public/themes/default/freshrss.css index b82656751..2d166d369 100644 --- a/public/themes/default/freshrss.css +++ b/public/themes/default/freshrss.css @@ -1,3 +1,5 @@ +@charset "UTF-8"; + /* STRUCTURE */ .header { display: table; @@ -826,3 +828,40 @@ -ms-transition: width 200ms linear; } } + +@media print { + .header, + .aside, + .nav_menu, + .day, + .flux_header, + .flux_content .bottom, + .pagination { + display: none; + } + + html, body { + background: #fff; + color: #000; + font-family: Serif; + font-size: 12pt; + } + + #global, + .flux_content { + display: block !important; + } + + .flux_content .content { + width: 100% !important; + text-align: justify; + } + + .flux_content .content a { + color: #000; + } + .flux_content .content a:after { + content: " (" attr(href) ") "; + text-decoration: underline; + } +} diff --git a/public/themes/default/global.css b/public/themes/default/global.css index 2004a1936..1c554d2dc 100644 --- a/public/themes/default/global.css +++ b/public/themes/default/global.css @@ -1,3 +1,5 @@ +@charset "UTF-8"; + /* FONTS */ @font-face { font-family: "OpenSans"; diff --git a/public/themes/flat-design/freshrss.css b/public/themes/flat-design/freshrss.css index b8ed950c2..cfb79c46d 100644 --- a/public/themes/flat-design/freshrss.css +++ b/public/themes/flat-design/freshrss.css @@ -1,3 +1,5 @@ +@charset "UTF-8"; + /* STRUCTURE */ body { background: #fafafa; @@ -756,3 +758,40 @@ body { -webkit-transform: rotate(45deg); -ms-transform: rotate(45deg); } + +@media print { + .header, + .aside, + .nav_menu, + .day, + .flux_header, + .flux_content .bottom, + .pagination { + display: none; + } + + html, body { + background: #fff; + color: #000; + font-family: Serif; + font-size: 12pt; + } + + #global, + .flux_content { + display: block !important; + } + + .flux_content .content { + width: 100% !important; + text-align: justify; + } + + .flux_content .content a { + color: #000; + } + .flux_content .content a:after { + content: " (" attr(href) ") "; + text-decoration: underline; + } +} diff --git a/public/themes/flat-design/global.css b/public/themes/flat-design/global.css index c53ec863c..8cf6412b3 100644 --- a/public/themes/flat-design/global.css +++ b/public/themes/flat-design/global.css @@ -1,3 +1,5 @@ +@charset "UTF-8"; + /* FONTS */ @font-face { font-family: "OpenSans"; diff --git a/public/themes/printer/style.css b/public/themes/printer/style.css deleted file mode 100644 index 87d019c58..000000000 --- a/public/themes/printer/style.css +++ /dev/null @@ -1,34 +0,0 @@ -.header, -.aside, -.nav_menu, -.day, -.flux_header, -.flux_content .bottom, -.pagination { - display: none; -} - -html, body { - background: #fff; - color: #000; - font-family: Serif; - font-size: 12pt; -} - -#global, -.flux_content { - display: block !important; -} - -.flux_content .content { - width: 100% !important; - text-align: justify; -} - -.flux_content .content a { - color: #000; -} -.flux_content .content a:after { - content: " (" attr(href) ") "; - text-decoration: underline; -}
\ No newline at end of file |
