Convention over configuration for themes
This commit is contained in:
parent
7cdc97b58a
commit
90027b2a0e
10
Gruntfile.js
10
Gruntfile.js
@ -22,16 +22,16 @@ module.exports = function (grunt) {
|
|||||||
report: 'min'
|
report: 'min'
|
||||||
},
|
},
|
||||||
files: {
|
files: {
|
||||||
"css/daux-blue.min.css": "less/daux-blue.less",
|
"templates/default/themes/daux-blue/css/theme.min.css": "templates/default/themes/daux-blue/less/theme.less",
|
||||||
"css/daux-green.min.css": "less/daux-green.less",
|
"templates/default/themes/daux-green/css/theme.min.css": "templates/default/themes/daux-green/less/theme.less",
|
||||||
"css/daux-navy.min.css": "less/daux-navy.less",
|
"templates/default/themes/daux-navy/css/theme.min.css": "templates/default/themes/daux-navy/less/theme.less",
|
||||||
"css/daux-red.min.css": "less/daux-red.less"
|
"templates/default/themes/daux-red/css/theme.min.css": "templates/default/themes/daux-red/less/theme.less"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
scripts: {
|
scripts: {
|
||||||
files: ['less/**/*.less'],
|
files: ['templates/default/theme/**/*.less'],
|
||||||
tasks: ['less'],
|
tasks: ['less'],
|
||||||
options: {
|
options: {
|
||||||
nospawn: true
|
nospawn: true
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 8.6 KiB |
Binary file not shown.
Before Width: | Height: | Size: 12 KiB |
@ -227,7 +227,7 @@
|
|||||||
|
|
||||||
$params['template'] = $this->options['template'];
|
$params['template'] = $this->options['template'];
|
||||||
$params['theme'] = DauxHelper::configure_theme($this->local_base . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR .
|
$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'] . '/');
|
$this->local_base, $params['base_url'] . "templates/" . $params['template'] . "/themes/" . $this->options['theme'] . '/');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -257,7 +257,7 @@
|
|||||||
|
|
||||||
$params['template'] = $this->options['template'];
|
$params['template'] = $this->options['template'];
|
||||||
$params['theme'] = DauxHelper::configure_theme($this->local_base . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR .
|
$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);
|
$this->local_base, $params['base_url'] . "templates/" . $params['template'] . "/themes/" . $this->options['theme'] . '/', $mode);
|
||||||
|
|
||||||
|
|
||||||
@ -301,7 +301,7 @@
|
|||||||
|
|
||||||
$params['template'] = $this->options['template'];
|
$params['template'] = $this->options['template'];
|
||||||
$params['theme'] = DauxHelper::configure_theme($this->local_base . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR .
|
$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);
|
$this->local_base, $params['base_url'] . "templates/" . $params['template'] . "/themes/" . $this->options['theme'] . '/', $mode);
|
||||||
|
|
||||||
if ($params['breadcrumbs'] = $this->options['breadcrumbs'])
|
if ($params['breadcrumbs'] = $this->options['breadcrumbs'])
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"favicon": "<theme_url>img/favicon-blue.png",
|
"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"],
|
"fonts": ["//fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700&subset=latin,cyrillic-ext,cyrillic"],
|
||||||
"js": [],
|
"js": [],
|
||||||
"require-jquery": true,
|
"require-jquery": true,
|
File diff suppressed because one or more lines are too long
@ -10,4 +10,4 @@
|
|||||||
@syntax-number: #2f9b92;
|
@syntax-number: #2f9b92;
|
||||||
@syntax-label: #840d7a;
|
@syntax-label: #840d7a;
|
||||||
|
|
||||||
@import "import/daux-base.less";
|
@import "../../_common/less/daux-base.less";
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"favicon": "<theme_url>img/favicon-green.png",
|
"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"],
|
"fonts": ["//fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700&subset=latin,cyrillic-ext,cyrillic"],
|
||||||
"js": [],
|
"js": [],
|
||||||
"require-jquery": true,
|
"require-jquery": true,
|
File diff suppressed because one or more lines are too long
@ -10,4 +10,4 @@
|
|||||||
@syntax-number: #097c4e;
|
@syntax-number: #097c4e;
|
||||||
@syntax-label: #022e99;
|
@syntax-label: #022e99;
|
||||||
|
|
||||||
@import "import/daux-base.less";
|
@import "../../_common/less/daux-base.less";
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"favicon": "<theme_url>img/favicon-navy.png",
|
"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"],
|
"fonts": ["//fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700&subset=latin,cyrillic-ext,cyrillic"],
|
||||||
"js": [],
|
"js": [],
|
||||||
"require-jquery": true,
|
"require-jquery": true,
|
File diff suppressed because one or more lines are too long
@ -10,4 +10,4 @@
|
|||||||
@syntax-number: #09559b;
|
@syntax-number: #09559b;
|
||||||
@syntax-label: #001775;
|
@syntax-label: #001775;
|
||||||
|
|
||||||
@import "import/daux-base.less";
|
@import "../../_common/less/daux-base.less";
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"favicon": "<theme_url>img/favicon-red.png",
|
"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"],
|
"fonts": ["//fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700&subset=latin,cyrillic-ext,cyrillic"],
|
||||||
"js": [],
|
"js": [],
|
||||||
"require-jquery": true,
|
"require-jquery": true,
|
File diff suppressed because one or more lines are too long
@ -10,4 +10,4 @@
|
|||||||
@syntax-number: #9b2f7d;
|
@syntax-number: #9b2f7d;
|
||||||
@syntax-label: #a31621;
|
@syntax-label: #a31621;
|
||||||
|
|
||||||
@import "import/daux-base.less";
|
@import "../../_common/less/daux-base.less";
|
Loading…
Reference in New Issue
Block a user