diff --git a/feed.php b/feed.php index 8fa68b66c19cac5c8e9a8d67a6c3dd5170fa7370..b1d2b3b1d2836154a420ee29a047b56546e5e882 100644 --- a/feed.php +++ b/feed.php @@ -75,7 +75,7 @@ $rss->title = $conf['title'].(($ns) ? ' '.$ns : ''); $rss->link = DOKU_URL; $rss->syndicationURL = DOKU_URL.'feed.php'; - $rss->cssStyleSheet = DOKU_URL.'lib/styles/feed.css'; + $rss->cssStyleSheet = DOKU_URL.'lib/exe/css.php?s=feed'; $image = new FeedImage(); $image->title = $conf['title']; diff --git a/inc/template.php b/inc/template.php index e9326632d33042f6c99836a5737e73eff893321d..09b5725f63f43572774aaebf1f66cdc6408108e6 100644 --- a/inc/template.php +++ b/inc/template.php @@ -236,7 +236,7 @@ function tpl_metaheaders($alt=true){ $head['link'][] = array('rel'=>'stylesheet', 'media'=>'screen', 'type'=>'text/css', 'href'=>DOKU_BASE.'lib/exe/css.php'); $head['link'][] = array('rel'=>'stylesheet', 'media'=>'print', 'type'=>'text/css', - 'href'=>DOKU_BASE.'lib/exe/css.php?print=1'); + 'href'=>DOKU_BASE.'lib/exe/css.php?s=print'); // load javascript $js_edit = ($ACT=='edit' || $ACT=='preview' || $ACT=='recover' || $ACT=='wordblock' ) ? 1 : 0; diff --git a/lib/exe/css.php b/lib/exe/css.php index 81f7f3489b14e66a2364fabb3fec72cc045503b2..561927c49fe1cd7910e59cb60cfcb54c8ab00279 100644 --- a/lib/exe/css.php +++ b/lib/exe/css.php @@ -30,7 +30,15 @@ if(!defined('SIMPLE_TEST')){ function css_out(){ global $conf; global $lang; - $print = (bool) $_REQUEST['print']; //print mode? + switch ($_REQUEST['s']) { + case 'print': + case 'feed': + $style = $_REQUEST['s']; + break; + default: + $style = ''; + break; + } // The generated script depends on some dynamic options $cache = getCacheName('styles'.$conf['template'].$print,'.css'); @@ -48,11 +56,12 @@ function css_out(){ // are needed to fix relative paths in the stylesheets $files = array(); if (isset($tplstyles['all'])) $files = array_merge($files, $tplstyles['all']); - if($print){ + if(!empty($style)){ + $files[DOKU_INC.'lib/styles/'.$style.'.css'] = DOKU_BASE.'lib/styles/'; // load plugin, template, user styles - $files = array_merge($files, css_pluginstyles('print')); - if (isset($tplstyles['print'])) $files = array_merge($files, $tplstyles['print']); - $files[DOKU_CONF.'userprint.css'] = ''; + $files = array_merge($files, css_pluginstyles($style)); + if (isset($tplstyles[$style])) $files = array_merge($files, $tplstyles[$style]); + $files[DOKU_CONF.'user'.$style.'.css'] = ''; }else{ $files[DOKU_INC.'lib/styles/style.css'] = DOKU_BASE.'lib/styles/'; if($conf['spellchecker']){ @@ -241,6 +250,9 @@ function css_pluginstyles($mode='screen'){ if($mode == 'print'){ $list[DOKU_PLUGIN."$p/print.css"] = DOKU_BASE."lib/plugins/$p/"; $list[DOKU_PLUGIN."$p/all.css"] = DOKU_BASE."lib/plugins/$p/"; + }elseif($mode == 'feed'){ + $list[DOKU_PLUGIN."$p/feed.css"] = DOKU_BASE."lib/plugins/$p/"; + $list[DOKU_PLUGIN."$p/all.css"] = DOKU_BASE."lib/plugins/$p/"; }else{ $list[DOKU_PLUGIN."$p/style.css"] = DOKU_BASE."lib/plugins/$p/"; $list[DOKU_PLUGIN."$p/screen.css"] = DOKU_BASE."lib/plugins/$p/"; diff --git a/lib/styles/feed.css b/lib/styles/feed.css index e9e9d0b81c8b6656e84b14753639778ce58feb43..8fa79c36d88f1f2b3cd851718ffb5e1b1f68777a 100644 --- a/lib/styles/feed.css +++ b/lib/styles/feed.css @@ -1,7 +1,7 @@ rss channel, feed, RDF { font: 80% "Lucida Grande", Verdana, Lucida, Helvetica, Arial, sans-serif; - background-color: White; - color: Black; + background-color: __background__; + color: __text__; margin: 0; padding: 0; } @@ -16,7 +16,7 @@ category, image { item link, entry id { display: block; - color:#436976; + color:__extern__; text-decoration:underline; } @@ -24,9 +24,9 @@ channel title, feed title { display: block; font-size:200%; font-weight:bolder; - color:#436976; + color:__extern__; text-decoration:none; - border-bottom: 20px solid #dee7ec; + border-bottom: 20px solid __background_alt__; } :root:before { @@ -36,23 +36,23 @@ channel title, feed title { item, entry { display: block; margin: 1em 180px 1em 1em; - border-bottom: 1px solid #8cacbb; + border-bottom: 1px solid __border__; padding-bottom: 1em; } item title, entry title { display: block; background: transparent none; - border: 0px solid #ffffff; + border: 0px solid __background_other__; padding: 0; - color: #222; + color: __text_alt__; font-size: 1.4em; font-weight: bold; } item pubDate, entry modified, item date { display: inline; - color: #AAA; + color: __text_neu__; font: 1em trebuchet ms, arial, helvetica, sans-serif; }