-
Notifications
You must be signed in to change notification settings - Fork 24
/
index.html
129 lines (111 loc) · 3.39 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>GrapesJS Parser PostCSS</title>
<link href="https://unpkg.com/grapesjs/dist/css/grapes.min.css" rel="stylesheet">
<script src="https://unpkg.com/grapesjs"></script>
<style>
body,
html {
height: 100%;
margin: 0;
}
</style>
</head>
<body>
<div id="gjs" style="height:0px; overflow:hidden">
<div style="margin:100px 100px 25px; padding:25px; font:caption">
This is a demo content from index.html. For the development, you shouldn't edit this file, instead you can
copy and rename it to _index.html, on next server start the new file will be served, and it will be ignored by git.
<div class="header-banner">
1. Hello world!
</div>
<div class="class-test">
2. Hello world!
</div>
<div class="header-banner important">
3. Hello world!
</div>
</div>
<style>
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 100;
src: local('Roboto Thin'), local('Roboto-Thin'), url(https://fonts.gstatic.com/s/roboto/v18/KFOkCnqEu92Fr1MmgVxFIzIXKMnyrYk.woff2) format('woff2');
}
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 300;
src: local('Roboto Light'), local('Roboto-Light'), url(https://fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmSU5fCRc4AMP6lbBP.woff2) format('woff2');
}
@keyframes name {
from {opacity: 0;}
to {opacity: 1;}
}
@keyframes name2 {
0% {opacity: 0;}
50% {opacity: 0.3;}
100% {opacity: 1;}
}
@media screen and (min-width: 480px) {
.class-test2 {
background-color: lightgreen;
}
.class-test {
color: blue;
}
}
@media (max-width: 500px) {
.class-test {
font-size: 20px;
}
}
#main {
border: 1px solid black;
}
.important {
color: yellow !important;
}
.header-banner, .header-banner2 {
padding-top: 35px;
padding-bottom: 100px;
color: red;
font-family: Helvetica, serif;
font-weight: 100;
background-image:url("http://grapesjs.com/img/bg-gr-v.png"), url("http://grapesjs.com/img/work-desk.jpg");
background-attachment: fixed, scroll;
background-position:left top, center center;
background-repeat:repeat-y, no-repeat;
background-size: contain, cover;
box-shadow: 0 0 5px #9d7aa5, 0 0 10px #e6c3ee;
}
.header-banner:hover {
color: green;
}
:root {
--some-color: red;
--some-width: 55px;
}
</style>
</div>
<script type="text/javascript">
window.onload = () => {
window.editor = grapesjs.init({
height: '100%',
container: '#gjs',
showOffsets: true,
noticeOnUnload: false,
storageManager: false,
fromElement: true,
plugins: [
editor => editor.on('log-parser-poscss', console.log),
'grapesjs-parser-postcss'
],
});
};
</script>
</body>
</html>