guy 8 years ago
parent
commit
f325f6aaae
  1. 2
      Gruntfile.js
  2. 3
      demo.html
  3. 3
      demo/css/index.css
  4. 3
      demo/css/main.css
  5. 10
      demo/css/north.css
  6. 48
      demo/js/center.js
  7. 17
      demo/js/north.js
  8. 1
      demo/less/index.less
  9. 4
      demo/less/main.less
  10. 11
      demo/less/north.less

2
Gruntfile.js

@ -131,7 +131,7 @@ module.exports = function (grunt) {
}, },
watch: { watch: {
scripts: { scripts: {
files: ['src/**/*.js', 'demo/**/*.js', 'demo/**/*.less'], files: ['src/**/*.js', 'demo/js/**/*.js', 'demo/less/**/*.less'],
tasks: ['less', 'concat'], tasks: ['less', 'concat'],
options: { options: {
spanw: true, spanw: true,

3
demo.html

@ -19,5 +19,8 @@
<body> <body>
<div id="wrapper"></div> <div id="wrapper"></div>
<div id="container"></div> <div id="container"></div>
<link href='https://fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,400italic,500,500italic,700,700italic,900italic,900&subset=latin,greek,greek-ext,vietnamese,cyrillic-ext,latin-ext,cyrillic'
rel='stylesheet' type='text/css'>
</body> </body>
</html> </html>

3
demo/css/index.css

@ -0,0 +1,3 @@
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/

3
demo/css/main.css

@ -1,3 +1,6 @@
* {
font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
.demo-main .bg1 { .demo-main .bg1 {
background-color: #178cdf; background-color: #178cdf;
} }

10
demo/css/north.css

@ -1,3 +1,13 @@
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.demo-north { .demo-north {
background-color: #3c8dbc; background-color: #3c8dbc;
} }
.demo-north .logo {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #ffffff;
background-color: #367fa9;
font-size: 20px;
font-weight: 300;
}

48
demo/js/center.js

@ -7,48 +7,14 @@ Demo.Center = BI.inherit(BI.Widget, {
}, },
render: function () { render: function () {
return { return {
type: "bi.vertical", type: "bi.tab",
hgap: 50, defaultShowIndex: 0,
vgap: 20, cardCreator: function (v) {
items: [{ return BI.createWidget({
type: "bi.label",
text: "栅格布局",
height: 50
}, {
type: "bi.lattice",
columnSize: [0.1, 0.1, 0.3, 0.4, 0.1],
items: [{
type: "bi.label", type: "bi.label",
height: 30, text: v
text: "Left-1", });
cls: "layout-bg1 lattice-item", }
hgap: 20
}, {
type: "bi.label",
height: 30,
text: "Left-2",
cls: "layout-bg2 lattice-item",
hgap: 20
}, {
type: "bi.label",
height: 30,
text: "Left-3",
cls: "layout-bg3 lattice-item",
hgap: 20
}, {
type: "bi.label",
height: 30,
text: "Left-4",
cls: "layout-bg4 lattice-item",
hgap: 20
}, {
type: "bi.label",
height: 30,
text: "Left-5",
cls: "layout-bg5 lattice-item",
hgap: 20
}]
}]
} }
}, },
created: function () { created: function () {

17
demo/js/north.js

@ -3,7 +3,22 @@ Demo.North = BI.inherit(BI.Widget, {
baseCls: "demo-north" baseCls: "demo-north"
}, },
render: function () { render: function () {
return {
type: "bi.htape",
items: [{
width: 230,
el: {
type: "bi.label",
cls: "logo",
height: 50,
text: "FineUI"
}
}, {
el: {
type: "bi.layout"
}
}]
}
} }
}); });
$.shortcut("demo.north", Demo.North); $.shortcut("demo.north", Demo.North);

1
demo/less/index.less

@ -0,0 +1 @@
@import "../../src/less/bibase";

4
demo/less/main.less

@ -1,3 +1,7 @@
* {
font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
.demo-main { .demo-main {
& .bg1 { & .bg1 {
background-color: #178cdf; background-color: #178cdf;

11
demo/less/north.less

@ -1,3 +1,12 @@
.demo-north{ @import "index";
.demo-north {
background-color: #3c8dbc; background-color: #3c8dbc;
& .logo {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
color: @color-bi-text;
background-color: #367fa9;
font-size: 20px;
font-weight: 300;
}
} }
Loading…
Cancel
Save