Commit: dc319138da945eb55d187e6e64977857dea05743

Author: gwoo | Date: 2010-02-16 08:57:13 -0800
updating bot layout and css for 0.6
diff --git a/config/bootstrap.php b/config/bootstrap.php new file mode 100644 index 0000000..45c2c47 --- /dev/null +++ b/config/bootstrap.php @@ -0,0 +1,27 @@ +<?php +/** + * Filter to serve the assets from plugins. + * + */ +use \lithium\action\Dispatcher; +use \lithium\core\Libraries; +use \lithium\net\http\Media; + +Dispatcher::applyFilter('_callable', function($self, $params, $chain) { + list($plugin, $asset) = explode('/', $params['request']->url, 2) + array("", ""); + if ($asset && $library = Libraries::get($plugin)) { + $asset = "{$library['path']}/webroot/{$asset}"; + + if (file_exists($asset)) { + return function () use ($asset) { + $info = pathinfo($asset); + $type = Media::type($info['extension']); + header("Content-type: {$type['content']}"); + return file_get_contents($asset); + }; + } + } + return $chain->next($self, $params, $chain); +}); + +?> \ No newline at end of file diff --git a/views/layouts/default.html.php b/views/layouts/default.html.php index ccaa37e..b345159 100644 --- a/views/layouts/default.html.php +++ b/views/layouts/default.html.php @@ -3,7 +3,7 @@ <head> <?php echo $this->html->charset(); ?> <title>Lithium Bot <?php echo $this->title(); ?></title> - <?php echo $this->html->style(array('base', 'li3.bot')); ?> + <?php echo $this->html->style(array('lithium', '/li3_bot/css/li3_bot')); ?> <?php echo $this->scripts(); ?> <?php echo $this->html->link('Icon', null, array('type' => 'icon')); ?> </head> diff --git a/webroot/css/li3.bot.css b/webroot/css/li3.bot.css deleted file mode 100644 index ff62ebb..0000000 --- a/webroot/css/li3.bot.css +++ /dev/null @@ -1,42 +0,0 @@ -/*------------------------------------------------------------------------------------------------- - Lithium: the most rad php framework - - @copyright Copyright 2009, Union of RAD (http://union-of-rad.org) - @license http://opensource.org/licenses/bsd-license.php The BSD License --------------------------------------------------------------------------------------------------*/ - -/*--- This is the stylesheet for li3_bot ---*/ - -#content { - margin-top: 2em; -} -table.messages { - width: 100%; -} -.messages { - vertical-align: top; - font-family: Monaco, Courier, monospace; - font-size: 12px; -} -.messages .time { - color: #666; -} -.messages .user { - text-align: right; - font-weight: bold; -} -.messages .user:before { - content: '<'; -} -.messages .user:after { - content: '>'; -} -.message { - width: 80%; -} - -ul.channels { - margin: 0; - padding: 0; - list-style: none; -} diff --git a/webroot/css/li3_bot.css b/webroot/css/li3_bot.css new file mode 100644 index 0000000..3e49151 --- /dev/null +++ b/webroot/css/li3_bot.css @@ -0,0 +1,41 @@ +/*------------------------------------------------------------------------------------------------- + Lithium: the most rad php framework + + @copyright Copyright 2009, Union of RAD (http://union-of-rad.org) + @license http://opensource.org/licenses/bsd-license.php The BSD License +-------------------------------------------------------------------------------------------------*/ + +/*--- This is the stylesheet for li3_bot ---*/ + +#content { + margin-top: 2em; +} +table.messages { + width: 100%; +} +.messages { + vertical-align: top; + font-family: Monaco, Courier, monospace; + font-size: 12px; +} +.messages .time { + color: #666; +} +.messages .user { + text-align: right; + font-weight: bold; +} +.messages .user:before { + content: '<'; +} +.messages .user:after { + content: '>'; +} +.message { + width: 80%; +} + +ul.channels { + padding: 0; + list-style: none; +}