Convention over configuration for themes

This commit is contained in:
Stéphane Goetz 2015-04-21 17:34:43 +02:00 committed by Stéphane Goetz
parent 7cdc97b58a
commit 90027b2a0e
92 changed files with 25 additions and 25 deletions

View File

@ -22,16 +22,16 @@ module.exports = function (grunt) {
report: 'min'
},
files: {
"css/daux-blue.min.css": "less/daux-blue.less",
"css/daux-green.min.css": "less/daux-green.less",
"css/daux-navy.min.css": "less/daux-navy.less",
"css/daux-red.min.css": "less/daux-red.less"
"templates/default/themes/daux-blue/css/theme.min.css": "templates/default/themes/daux-blue/less/theme.less",
"templates/default/themes/daux-green/css/theme.min.css": "templates/default/themes/daux-green/less/theme.less",
"templates/default/themes/daux-navy/css/theme.min.css": "templates/default/themes/daux-navy/less/theme.less",
"templates/default/themes/daux-red/css/theme.min.css": "templates/default/themes/daux-red/less/theme.less"
}
}
},
watch: {
scripts: {
files: ['less/**/*.less'],
files: ['templates/default/theme/**/*.less'],
tasks: ['less'],
options: {
nospawn: true
@ -42,4 +42,4 @@ module.exports = function (grunt) {
//grunt.registerTask('default', ['less', 'watch']);
grunt.registerTask('default', ['php']);
};
};

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

View File

@ -227,7 +227,7 @@
$params['template'] = $this->options['template'];
$params['theme'] = DauxHelper::configure_theme($this->local_base . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR .
$this->options['template'] . DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . $this->options['theme'] . '.thm', $params['base_url'],
$this->options['template'] . DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . $this->options['theme'] . '/config.json', $params['base_url'],
$this->local_base, $params['base_url'] . "templates/" . $params['template'] . "/themes/" . $this->options['theme'] . '/');
break;
@ -257,7 +257,7 @@
$params['template'] = $this->options['template'];
$params['theme'] = DauxHelper::configure_theme($this->local_base . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR .
$this->options['template'] . DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . $this->options['theme'] . '.thm', $params['base_url'],
$this->options['template'] . DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . $this->options['theme'] . '/config.json', $params['base_url'],
$this->local_base, $params['base_url'] . "templates/" . $params['template'] . "/themes/" . $this->options['theme'] . '/', $mode);
@ -301,7 +301,7 @@
$params['template'] = $this->options['template'];
$params['theme'] = DauxHelper::configure_theme($this->local_base . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR .
$this->options['template'] . DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . $this->options['theme'] . '.thm', $params['base_url'],
$this->options['template'] . DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . $this->options['theme'] . '/config.json', $params['base_url'],
$this->local_base, $params['base_url'] . "templates/" . $params['template'] . "/themes/" . $this->options['theme'] . '/', $mode);
if ($params['breadcrumbs'] = $this->options['breadcrumbs'])

View File

@ -1,8 +1,8 @@
{
"favicon": "<theme_url>img/favicon-blue.png",
"css": ["<theme_url>css/daux-blue.css"],
"css": ["<theme_url>css/theme.min.css"],
"fonts": ["//fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700&subset=latin,cyrillic-ext,cyrillic"],
"js": [],
"require-jquery": true,
"bootstrap-js": false
}
}

View File

@ -10,4 +10,4 @@
@syntax-number: #2f9b92;
@syntax-label: #840d7a;
@import "import/daux-base.less";
@import "../../_common/less/daux-base.less";

View File

@ -1,8 +1,8 @@
{
"favicon": "<theme_url>img/favicon-green.png",
"css": ["<theme_url>css/daux-green.css"],
"css": ["<theme_url>css/theme.min.css"],
"fonts": ["//fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700&subset=latin,cyrillic-ext,cyrillic"],
"js": [],
"require-jquery": true,
"bootstrap-js": false
}
}

View File

@ -10,4 +10,4 @@
@syntax-number: #097c4e;
@syntax-label: #022e99;
@import "import/daux-base.less";
@import "../../_common/less/daux-base.less";

View File

@ -1,8 +1,8 @@
{
"favicon": "<theme_url>img/favicon-navy.png",
"css": ["<theme_url>css/daux-navy.css"],
"css": ["<theme_url>css/theme.min.css"],
"fonts": ["//fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700&subset=latin,cyrillic-ext,cyrillic"],
"js": [],
"require-jquery": true,
"bootstrap-js": false
}
}

View File

@ -10,4 +10,4 @@
@syntax-number: #09559b;
@syntax-label: #001775;
@import "import/daux-base.less";
@import "../../_common/less/daux-base.less";

View File

@ -1,8 +1,8 @@
{
"favicon": "<theme_url>img/favicon-red.png",
"css": ["<theme_url>css/daux-red.css"],
"css": ["<theme_url>css/theme.min.css"],
"fonts": ["//fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700&subset=latin,cyrillic-ext,cyrillic"],
"js": [],
"require-jquery": true,
"bootstrap-js": false
}
}

View File

@ -10,4 +10,4 @@
@syntax-number: #9b2f7d;
@syntax-label: #a31621;
@import "import/daux-base.less";
@import "../../_common/less/daux-base.less";