forked from rukavina/live-css-editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·74 lines (74 loc) · 3.36 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<!DOCTYPE html>
<html>
<head>
<title>Live CSS Editor</title>
<script src="js/jquery-1.7.1.min.js"></script>
<script src="js/microtpl.js"></script>
<!-- lce itself -->
<script src="js/jquery.livecsseditor.js"></script>
<link rel="stylesheet" type="text/css" href="css/livecsseditor.css">
<script src="js/lce.editors.js"></script>
<!-- colorpicker -->
<link rel="stylesheet" media="screen" type="text/css" href="plugins/colorpicker/css/colorpicker-bootstrap.css"/>
<script type="text/javascript" src="plugins/colorpicker/js/colorpicker-bootstrap.js"></script>
<!-- twitter bootstrap -->
<link rel="stylesheet" type="text/css" href="plugins/bootstrap/css/bootstrap.min.css" media="screen">
<script src="plugins/bootstrap/js/bootstrap.min.js"></script>
<!-- jquery ui -->
<link rel="stylesheet" type="text/css" href="plugins/jquery-ui-1.9.1/css/smoothness/jquery-ui-1.9.1.custom.min.css" media="screen">
<script src="plugins/jquery-ui-1.9.1/js/jquery-ui-1.9.1.custom.min.js"></script>
</head>
<body>
<div class="page-header">
<h1>Live CSS Editor <small>Customize your page design with live preview tool</small></h1>
<button class="btn" id="cssBtn">Get custom CSS</button>
</div>
<div class="container-fluid" id="lce"></div>
<script>
$(document).ready(function(){
$('#lce').livecsseditor({
pages: {
'demo/index.html': {
name: 'Demo page',
def: {
'h1':{
name: 'Heading',
props:['color','background-color']
},
'p,span':{
name: 'Text',
props:['font-size','color']
},
'div.drag':{
name:'Floating element',
props:['left','top']
},
'div.drag2':{
name:'Floating element 2',
props:['left','top','width','height']
}
}
},
'demo/second.html': {
name: 'Second page',
def: {
'h2':{
name: 'Heading 2',
props:['color']
},
'em':{
name: 'Text',
props:['font-size']
}
}
}
}
});
//css button
$('#cssBtn').click(function(){
alert($('#lce').livecsseditor('getCss',{pagePath:'demo/index.html'}));
});
});
</script>
</body>
</html>