Skip to content

Commit cf04ff7

Browse files
调整示例页样式。review by zhurch
1 parent 29ba7a6 commit cf04ff7

File tree

6 files changed

+93
-14
lines changed

6 files changed

+93
-14
lines changed

examples/css/examples.css

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,33 @@
44
}
55

66
.examples-container {
7-
background-color: #f9f9f9;
7+
background-color: #ffffff;
88
margin-top: 50px;
99
overflow: auto;
1010
}
1111

1212
@media (max-width: 767px) {
1313
.examples-container {
14-
margin-top: 100px;
1514
}
1615
}
1716

1817
#charts-list {
19-
margin: 0px;
20-
padding: 1px 20px;
18+
margin: 0;
19+
padding: 0 20px;
2120
list-style: none;
2221
overflow: inherit;
2322
}
2423

2524
h3.category-title {
2625
margin-top: 10px;
27-
height: 50px;
28-
line-height: 50px;
29-
border-bottom: 1px solid #3c8dbc;
26+
height: 40px;
27+
line-height: 40px;
28+
margin-bottom: 0;
3029
}
3130

32-
.category-content {
31+
/*.category-content {
3332
margin-left: 30px;
34-
}
33+
}*/
3534

3635
#charts-list .chart {
3736
width: 100%;
@@ -51,7 +50,7 @@ h3.category-title {
5150
}
5251

5352
#charts-list .chart .chart-link .chart-title {
54-
color: #293c55;
53+
color: #2c3b41;
5554
overflow: hidden;
5655
text-overflow: ellipsis;
5756
white-space: nowrap;
@@ -63,3 +62,29 @@ h3.category-title {
6362
#charts-list .chart .chart-link .chart-area {
6463
width: 100%;
6564
}
65+
66+
.box {
67+
border-top: 3px solid #3c8dbc;
68+
}
69+
70+
.box.box-default{
71+
background-color: #FFFFFF;
72+
border-top-color: #3c8dbc;
73+
}
74+
75+
.box-title {
76+
padding-top: 10px ;
77+
padding-bottom: 0 ;
78+
padding-left: 5px;
79+
color: #555555;
80+
}
81+
82+
.box-header{
83+
padding-top: 10px ;
84+
padding-bottom: 5px ;
85+
padding-left: 0;
86+
}
87+
88+
.box-body{
89+
padding: 0;
90+
}

examples/iclient3d/config.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,13 @@ var exampleConfig = {
2727
*/
2828
var sideBarIconConfig = {
2929
"iClient3D": "fa-globe"
30+
};
31+
32+
/**
33+
*key值:为exampleConfig配置的key值
34+
*value值:fontawesome字体icon名
35+
*与sideBarIconConfig的区别:sideBarIconConfig包括侧边栏所有层级目录的图标,exampleIconConfig仅包括一级标题的图标
36+
*/
37+
var exampleIconConfig = {
38+
"iClient3D": "fa-globe"
3039
};

examples/js/example.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function createSubGalleryItem(config) {
4848
var categoryContentDiv = $("<div class='category-content'></div>");
4949
for (var key in config) {
5050
var configItem = config[key];
51-
var content = $("<div id='category-content-" + key + "'></div>");
51+
var content = $("<div class='box box-default color-palette-box' id='category-content-" + key + "'></div>");
5252
createSubGalleryItemTitle(key, configItem.name).appendTo(content);
5353
if (configItem.content) {
5454
createGalleryCharts(configItem.content).appendTo(content);
@@ -59,15 +59,19 @@ function createSubGalleryItem(config) {
5959
}
6060

6161
function createGalleryItemTitle(id, title) {
62-
return $("<h3 class='category-title' id='" + id + "'>" + title + "</h3>");
62+
var menuItemIcon = exampleIconConfig[id];
63+
return $("<h3 class='category-title' id='" + id + "'>" + "<i class='fa " + menuItemIcon + "'></i>" + "&nbsp;&nbsp;"+title + "</h3>");
6364
}
6465

6566
function createSubGalleryItemTitle(id, title) {
66-
return $("<h4 class='category-type' id='category-type-" + id + "'>" + title + "</h4>");
67+
return $("<div class='box-header with-border'>"+"<h3 class='box-title' id='category-type-" + id + "'>" + "&nbsp;&nbsp;" + title + "</h4>"+"</h3>"+"</div>");
6768
}
6869

70+
71+
72+
6973
function createGalleryCharts(examples) {
70-
var chartsDiv = $("<div class='row charts'></div>");
74+
var chartsDiv = $("<div class='box-body'></div>");
7175
var len = (examples && examples.length) ? examples.length : 0;
7276
for (var i = 0; i < len; i++) {
7377
createGalleryChart(examples[i]).appendTo(chartsDiv);

examples/leaflet/config.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,4 +449,20 @@ var sideBarIconConfig = {
449449
"viz": "fa-map",
450450
"OGC": "fa-globe",
451451
"mapping": "fa-send"
452+
};
453+
454+
/**
455+
*key值:为exampleConfig配置的key值
456+
*value值:fontawesome字体icon名
457+
*与sideBarIconConfig的区别:sideBarIconConfig包括侧边栏所有层级目录的图标,exampleIconConfig仅包括一级标题的图标
458+
*/
459+
var exampleIconConfig = {
460+
"iServer": "fa-server",
461+
"iPortal": "fa-desktop",
462+
"online": "fa-cloud",
463+
"iManager": "fa-group",
464+
"plot": "fa-edit",
465+
"viz": "fa-map",
466+
"OGC": "fa-globe",
467+
"mapping": "fa-send"
452468
};

examples/mapboxgl/config.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,12 @@ var exampleConfig = {
2828
var sideBarIconConfig = {
2929
"iServer": "fa-server"
3030
};
31+
32+
/**
33+
*key值:为exampleConfig配置的key值
34+
*value值:fontawesome字体icon名
35+
*与sideBarIconConfig的区别:sideBarIconConfig包括侧边栏所有层级目录的图标,exampleIconConfig仅包括一级标题的图标
36+
*/
37+
var exampleIconConfig = {
38+
"iServer": "fa-server"
39+
};

examples/openlayers/config.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,4 +461,20 @@ var sideBarIconConfig = {
461461
"viz": "fa-map",
462462
"OGC": "fa-globe",
463463
"mapping": "fa-send"
464+
};
465+
466+
/**
467+
*key值:为exampleConfig配置的key值
468+
*value值:fontawesome字体icon名
469+
*与sideBarIconConfig的区别:sideBarIconConfig包括侧边栏所有层级目录的图标,exampleIconConfig仅包括一级标题的图标
470+
*/
471+
var exampleIconConfig = {
472+
"iServer": "fa-server",
473+
"iPortal": "fa-desktop",
474+
"online": "fa-cloud",
475+
"iManager": "fa-group",
476+
"plot": "fa-edit",
477+
"viz": "fa-map",
478+
"OGC": "fa-globe",
479+
"mapping": "fa-send"
464480
};

0 commit comments

Comments
 (0)