summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTom N Harris <tnharris@whoopdedo.org>2006-11-15 11:15:49 +0100
committerTom N Harris <tnharris@whoopdedo.org>2006-11-15 11:15:49 +0100
commit615960fefc1892e98e1e20725b11d535324f8c34 (patch)
tree14d953145aabda1b9cbe7d2eae1caecaf9394e49 /lib
parentafe99d0069da42f65e958174bf6d68e66eee5c41 (diff)
downloadrpg-615960fefc1892e98e1e20725b11d535324f8c34.tar.gz
rpg-615960fefc1892e98e1e20725b11d535324f8c34.tar.bz2
use generated CSS for RSS feeds
plugins can include styles with feed.css, templates can use the media type feed in style.ini darcs-hash:20061115101549-6942e-d1de56b343ce0cc11ca6b911c444197316f4a4eb.gz
Diffstat (limited to 'lib')
-rw-r--r--lib/exe/css.php22
-rw-r--r--lib/styles/feed.css18
2 files changed, 26 insertions, 14 deletions
diff --git a/lib/exe/css.php b/lib/exe/css.php
index 81f7f3489..561927c49 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 e9e9d0b81..8fa79c36d 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;
}