forked from writeaway/writeaway.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
261 lines (242 loc) · 9.94 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>RedaXtor Example</title>
<meta name="description" content="RedaXtor is overlay content editor for your website. Modular and Open Source.">
<style>
body {
padding: 0;
margin: 0;
}
.bs-docs-header {
margin-bottom: 40px;
font-size: 20px;
color: #fff;
background-color: #1a3e53;
}
.bs-docs-header h1 {
margin-top: 0;
color: #fff;
}
.bs-docs-header p {
margin-bottom: 0;
font-weight: 300;
line-height: 1.4;
}
.bs-docs-header .container {
position: relative;
}
.bs-docs-header {
padding-top: 60px;
padding-bottom: 60px;
font-size: 24px;
text-align: left;
}
.bs-docs-header h1 {
font-size: 60px;
line-height: 1;
}
</style>
</head>
<body>
<div class="bs-docs-header" data-piece="background" data-id="bg-0" data-name="Header:Background">
<div class="container">
<div data-piece="html" data-id="pieceHTML" data-name="Header:Base">
<h1>RedaXtor</h1>
<p>RedaXtor in on-site overlay editor for your content</p>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col col-md-6">
<div data-piece="html" data-id="html-1" data-name="Body:Try It Out">
<h2>Try it out!</h2>
<p>1. Open RedaXtor floating panel and enable edit mode.</p>
<p>2. Edit this block! It's that simple!</p>
<p> </p>
<p>Try how it looks for <a href="./email-samples/charlesmudy.html">editing email templates</a> too!</p>
</div>
</div>
<div class="col col-md-6">
<div data-piece="html" data-id="html-2" data-name="Body:GitHub">
<h2>Visit our documentation</h2>
<p>RedaXtor is OpenSource with MIT licence and is distributed on <a href="https://github.com/redaxtor/redaxtor">GitHub</a></p>
<p>RedaXtor comes with default set of plugins for <a href="https://github.com/redaxtor/redaxtor-medium">Rich Text</a> editing, <a href="https://github.com/redaxtor/redaxtor-codemirror">Source Code</a>, <a href="https://github.com/redaxtor/redaxtor-medium">Block Background, Standalone Image</a> and <a href="https://github.com/redaxtor/redaxtor-seo">SEO meta</a> information editing.</p>
<p>As a developer you can add own plugin as long as you follow up <a href="https://github.com/redaxtor/redaxtor/blob/master/src/index.d.ts#L252-L323">specs</a>. You may refer to <a href="https://github.com/redaxtor/redaxtor.github.io">bundle sample</a> for reference too.</p>
</div>
</div>
</div>
<p> </p>
</div>
<div data-piece="background" data-id="bg-1" data-name="Body:Background" style="background-image: url('api/images/sayagata-400px.png'); background-repeat: repeat;">
<br/><br/>
<div class="container">
<div class="row">
<div class="col col-md-6">
<div>
<h3>Edit predefined images!</h3>
<p>You can force user to modify existing image without adding/removing new ones</p>
<p>Useful for cases when you want strict structure or have custom image styling you don't want to
touch</p>
<p style="text-align: center"><img data-piece="image" data-id="image-1" data-name="Body:Image"
style="width: 300px; border: 10px solid #f8f8f8; box-shadow: 2px 2px 10px rgba(0,0,0,0.3); border-radius: 10px"
src="http://orig03.deviantart.net/ffe1/f/2013/143/2/d/pusheen_the_cat_png_2_by_13taylorswiftlover13-d66byxz.png"
alt="Happy smile"></p>
</div>
</div>
<div class="col col-md-6">
<div data-piece="source" data-id="source-1" data-name="Body:Source">
<h3>Edit widget code!</h3>
<p>If you have iframes or scripts on your page, source editor is your friend</p>
<iframe style="width: 100%; min-height: 300px"
src="https://www.youtube.com/embed/qRC4Vk6kisY?ecver=1" frameborder="0"
allowfullscreen></iframe>
<script></script>
</div>
</div>
</div>
</div>
<br/><br/>
</div>
<div data-piece="background" data-id="bg-2" data-name="Body:Background 2" style="background-image: url('api/images/weather.png');background-repeat: repeat;">
<br/><br/>
<div class="container">
<div class="row">
<div class="col col-md-6">
<div data-piece="html" data-id="html-3" data-name="Body:Backgrounds Text">
<h3>Edit block backgrounds!</h3>
<p>You can change color or background image of blocks</p>
<p>You can have different image set for usage in backgrounds and content images</p>
</div>
</div>
<div class="col col-md-6">
<div data-piece="html" data-id="errorSample" data-name="Body:Error Sample">
<h3>This block will demo an error</h3>
<p>When something happens, notification system comes in and shows a problem</p>
<p>Of cause you can override this as you please</p>
</div>
</div>
</div>
</div>
<br/><br/>
</div>
<div data-piece="background" data-id="bg-3" data-name="Body:Background 3" >
<br/><br/>
<div class="container">
<div class="row">
<div class="col col-md-12">
<div>
<h3>SEO Compatible</h3>
<p>You can also edit information that is not directly visible to page visitors</p>
<p>Unless you are a robot! Then you will see page meta. As site admin you can edit these too with SEO button.</p>
</div>
</div>
</div>
</div>
<br/><br/>
</div>
<p> </p>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400" rel="stylesheet">
<style>
body {
padding: 0;
margin: 0;
font-family: 'Montserrat', sans-serif;
font-weight: 300;
}
</style>
<script
src="https://code.jquery.com/jquery-2.2.4.min.js"
integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44="
crossorigin="anonymous"></script>
<script src="redaxtor.js"></script>
<script>
var redaxtor = new Redaxtor({
pieces: {},
options: {
html: {
pickerColors: [
"inherit",
"#9b59b6",
"#34495e",
"#16a085",
"#27ae60",
"#2980b9",
"#8e44ad",
"#2c3e50",
"#f1c40f",
"#e67e22",
"#e74c3c",
"#bdc3c7",
"#95a5a6",
"#666",
"#212121",
"#f39c12",
"#d2d064",
"#4fbbf7",
"#ffffff"
],
}
},
api: {
/*api for get gallery image list*/
getImageList: function (data) {
const dataUrl = (data && data.type == "background") ? "api/imagesBg.json" : "api/images.json";
return new Promise(function (resolve, reject) {
$.get({
url: dataUrl,
dataType: "json"
}).done(function (data) {
resolve(data.data.list);
}).fail(function (error) {
reject(error);
});
});
},
/* example of api for delete images */
deleteImage: function (id) {
return Promise.resolve();
},
uploadImage: function () {
return new Promise(function(resolve, reject) {
setTimeout(function() {
resolve({
url: "http://cdn2-www.dogtime.com/assets/uploads/gallery/30-impossibly-cute-puppies/impossibly-cute-puppy-8.jpg",
thumbnailUrl: "http://cdn2-www.dogtime.com/assets/uploads/gallery/30-impossibly-cute-puppies/impossibly-cute-puppy-8.jpg",
width: 680,
height: 606,
id: Date.now()
});
}, 1000);
});
},
getPieceData: function (piece) {
return Redaxtor.defaultApi.getPieceData(piece).then(function (piece) {
if (piece.id === "pieceSource2") {
piece.data.updateNode = false;
}
return piece;
});
},
savePieceData: function (piece) {
console.info("Saving to server", piece);
if (piece.id === "errorSample") {
return Promise.reject("Error sample");
} else {
return Promise.resolve();
}
}
}
});
redaxtor.attachSeo({
html: "" // Custom page header html
// title: "Override page title tag"
// description: "Override page meta[description] tag
// keywords: "Override page meta[keywords] tag
});
</script>
</body>
</html>