Added LESS support.
This commit is contained in:
parent
b7f2f24e23
commit
a48b7fc7b6
|
@ -13,3 +13,6 @@
|
|||
[submodule "modules/markdown"]
|
||||
path = modules/markdown
|
||||
url = git://github.com/aptgraph/kohana-markdown.git
|
||||
[submodule "modules/less"]
|
||||
path = modules/less
|
||||
url = git://github.com/mongeslani/kohana-less.git
|
||||
|
|
|
@ -177,4 +177,4 @@ th,td,caption {
|
|||
|
||||
tfoot {
|
||||
font-style: italic;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
@import "colors";
|
||||
@import "layout";
|
||||
@import "base";
|
|
@ -80,7 +80,7 @@ if (isset($_SERVER['KOHANA_ENV']))
|
|||
* - boolean caching enable or disable internal caching FALSE
|
||||
*/
|
||||
Kohana::init(array(
|
||||
'base_url' => '/',
|
||||
'base_url' => '/phunt',
|
||||
'index_file' => FALSE,
|
||||
'errors' => TRUE,
|
||||
'profile' => (Kohana::$environment == Kohana::DEVELOPMENT),
|
||||
|
@ -110,6 +110,7 @@ Kohana::modules(array(
|
|||
// 'unittest' => MODPATH.'unittest', // Unit testing
|
||||
// 'userguide' => MODPATH.'userguide', // User guide and API documentation
|
||||
'markdown' => MODPATH.'markdown', // Markdown module
|
||||
'less' => MODPATH.'less'
|
||||
));
|
||||
|
||||
/**
|
||||
|
|
|
@ -4,6 +4,7 @@ class Controller_Header extends Controller_Template {
|
|||
public $template = 'header';
|
||||
public function action_standard() {
|
||||
$this->template->title = $this->request->post('title');
|
||||
$this->template->stylesheet = Less::compile(APPPATH.'assets/stylesheets/style');
|
||||
$scripts = $this->request->post('scripts');
|
||||
$temp = "";
|
||||
if (is_array($scripts)) foreach($scripts as $script):
|
||||
|
@ -12,4 +13,4 @@ class Controller_Header extends Controller_Template {
|
|||
$this->template->scripts = $temp;
|
||||
}
|
||||
public function action_view(){$this->request->redirect('');}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ return array
|
|||
* Ports and sockets may be appended to the hostname.
|
||||
*/
|
||||
'hostname' => 'localhost',
|
||||
'database' => 'plastek',
|
||||
'database' => 'dandelion',
|
||||
'username' => 'dandelion',
|
||||
'password' => '',
|
||||
'persistent' => FALSE,
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
||||
|
||||
return array(
|
||||
|
||||
'compress' => TRUE,
|
||||
'path' => 'application/cache/css/',
|
||||
|
||||
);
|
|
@ -4,7 +4,7 @@
|
|||
<title><?php echo $title ?></title>
|
||||
<meta charset="utf-8">
|
||||
<link href='<?php echo URL::site('favicon.ico')?>' rel='shortcut icon' type='image/x-icon'/>
|
||||
<link rel="stylesheet" type="text/css" media="all" href="<?php echo URL::site('assets/stylesheets/main.css') ?>">
|
||||
<?php echo $stylesheet ?>
|
||||
<?php echo $scripts ?>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -15,4 +15,4 @@
|
|||
<div id="menu">
|
||||
<?php echo Request::factory('navigation/actions')->execute() ?>
|
||||
</div>
|
||||
<div id="column_text">
|
||||
<div id="column_text">
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
#!/bin/bash
|
||||
lessc -x base.less >main.css
|
||||
lessc -x layout.less >>main.css
|
||||
lessc -x colors.less >>main.css
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 18624ccfdf559e2eedd1fe9c9bcdadd99fccf0b1
|
Reference in New Issue