mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
feature(css) get list of files from css.json
This commit is contained in:
parent
2fea5ae5a2
commit
bea26927e0
3 changed files with 19 additions and 4 deletions
|
|
@ -9,8 +9,7 @@
|
|||
<title>{{ title }}</title>
|
||||
|
||||
<link rel=stylesheet href="{{ prefix }}/css/urls.css">
|
||||
<link rel=stylesheet href="{{ prefix }}/join:css/reset.css:css/style.css:css/icons.css:css/help.css:css/query.css">
|
||||
|
||||
<link rel=stylesheet href="{{ prefix }}/join:{{ css }}">
|
||||
<noscript>
|
||||
<link rel=stylesheet href="{{ prefix }}/css/nojs.css">
|
||||
</noscript>
|
||||
|
|
|
|||
7
json/css.json
Normal file
7
json/css.json
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
[
|
||||
"reset",
|
||||
"style",
|
||||
"icons",
|
||||
"help",
|
||||
"query"
|
||||
]
|
||||
|
|
@ -5,6 +5,7 @@
|
|||
DIR_TMPL = DIR + 'tmpl/',
|
||||
DIR_HTML = DIR + 'html/',
|
||||
DIR_LIB = DIR + 'lib/',
|
||||
DIR_JSON = DIR + 'json/',
|
||||
DIR_SERVER = __dirname + '/',
|
||||
DIR_FS = DIR_TMPL + 'fs/',
|
||||
|
||||
|
|
@ -37,7 +38,14 @@
|
|||
Template = {},
|
||||
|
||||
Prefix,
|
||||
FS = CloudFunc.FS;
|
||||
|
||||
FS = CloudFunc.FS,
|
||||
|
||||
CSS_URL = require(DIR_JSON + 'css.json')
|
||||
.map(function(name) {
|
||||
return 'css/' + name + '.css';
|
||||
}).join(':');
|
||||
|
||||
|
||||
module.exports = function(params) {
|
||||
var p = params || {};
|
||||
|
|
@ -87,7 +95,8 @@
|
|||
data = rendy(data, {
|
||||
title : CloudFunc.getTitle(),
|
||||
fm : left + right,
|
||||
prefix : Prefix
|
||||
prefix : Prefix,
|
||||
css : CSS_URL
|
||||
});
|
||||
|
||||
return data;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue