-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
executable file
·657 lines (618 loc) · 25 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
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>shortcodes.js - JavaScript Front-end Shortcode Engine</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="icon" type="image/png" href="">
<link href="https://fonts.googleapis.com/css?family=Lato:300,400,700|IBM+Plex+Mono:400,600&display=swap" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.19.0/themes/prism-tomorrow.min.css" rel="stylesheet" />
<link rel="stylesheet" type="text/css" href="styles.css">
<link href="https://cdn.quilljs.com/1.3.6/quill.snow.css" rel="stylesheet">
<!--
========================================================================
INITIALIZE SHORTCODES
========================================================================
-->
<script type="text/javascript" src="shortcodes.js"></script>
<script type="text/javascript">
var shortcodes = new Shortcodes();
</script>
</head>
<body class="editor-active">
<div class="container">
<div class="sidebar">
<div id="editor">
<div class="editor">
<p>[body body-class="example-body-class"]</p>
<p>[hero]</p>
<p><img src="https://i.imgur.com/TKg3lCb.jpg" /></p>
<h1>[shortcodes.js]</h1>
<h2>JavaScript Front-end Shortcode Engine</h2>
<p>Shortcodes.js is a completely front-end solution that uses sequences of DOM elements for templating dynamic and beautiful layouts while preserving SEO where backend development is limited, e.g. Shopify.</p>
<p><a href="https://github.com/stamat/shortcodes.js">View on GitHub</a></p>
<p>[carousel]</p>
<p><img src="https://imgur.com/6v3awSm.png" /></p>
<h1>1. Prepare</h1>
<p>Initializing is straightforward, load the shortcodes.js script together with jQuery as the only dependencie. Create a new Shortcodes object, which will be used to register the templates and initialize the rendering.</p>
<p><a href="https://github.com/stamat/shortcodes.js/blob/master/README.md">View README</a></p>
<p><img src="https://imgur.com/2dTDpFg.png" /></p>
<h1>2. Ready</h1>
<p>Write and style your templates in HTML/CSS and register your shortcodes with binding descriptors which will provide the script with enough data on how to interpret the DOM sequences and bind the data to the template.</p>
<p><a href="#view-code" target="_action">View example code</a></p>
<p><img src="https://imgur.com/0AtbzI5.png" /></p>
<h1>3. Stack</h1>
<p>It's super simple for the end user. Just add any of the registered shortcodes as a simple text before a sequence of content and voilá - shortcodes.js will build an amazing layout out of "thin air". It's just like magic.</p>
<p><a href="#toggle-editor" target="_action">Try the editor</a></p>
<p>[text color="black"]</p>
<h2>Task</h2>
<p><strong>Creating beatuiful, if needed complex, layouts</strong> in simple enviroments like Shopify or Tumblr, from WYSIWYG editor output only. All that on front-end without creating a thirdparty hosted app, while also making it easy for the end user.</p>
<p> </p>
<h2>Why?</h2>
<p>Shortcodes are a popular way to insert data or layouts provided by third party plugins in Wordpress from it's PHP based back-end. Why would you need those on the front-end?</p>
<blockquote>First of all, why not?</blockquote>
<p>Second of all, if you have a limited back-end but you can store JS in your theme - like for instance Shopify, where you would usualy need a thirdparty plugin to manage metadata and it's data is usualy stored elsewhere to display layouts. Why not leverage the Shopify's cache and use the data from it's product/page/article content to fill the layouts? Or on Tumblr? Why not?</p>
<blockquote>This whole page is built with shortcode.js, with no backend at all. Give the editor on the side a try, or see how the shortcodes are declared by clicking <strong>"Show Code"</strong> on each of it's layout sections.</blockquote>
<p>Save on back-end rendering resources and let the overpowered visitor clients do all the work, while having better SEO and easier maintainance. It's even easy for the content maintainers - content is easily exported and imported, since it's local, without any additional fuss. It's even easier and more straightforward then custom Gutenberg or Elementor modules.</p>
<p> </p>
<h2>Usage (Developer Perspective)</h2>
<p><pre class="line-numbers">
<code class="language-javascript"><script type="text/javascript" src="path/to/shortcodes.js"></script>
<script type="text/javascript">
	var shortcodes = new Shortcodes(/* options */);
</script></code>
</pre></p>
<h2>Usage (End User Perspective)</h2>
</div>
</div>
<div class="carret">
<a href="#" class="toggle-editor">
<img src="https://imgur.com/UgOaSLI.png" />
</a>
</div>
</div>
<main>
<div class="content">
<div class="shortcode-landing">
</div>
</div>
</main>
</div>
<div id="templates" class="templates" style="display: none">
<script type="text/javascript">
shortcodes.register('body', {});
</script>
<!--
____________________________________________________________________
[hero]
____________________________________________________________________
-->
<section class="hero template image-landing">
<div class="table">
<div class="cell">
<h1 class="title monospace title-landing"></h1>
<h2 class="subtitle subtitle-landing"></h2>
<div class="text text-landing center p656">
</div>
<div class="button-wrap link-landing"></div>
<a href="#main" class="down"><span class="bounce">↓</span></a>
<div class="code-wrap">
<a href="#" class="code-button">
<img src="https://i.imgur.com/P197gya.png" /><span class="label"><span class="show">show</span><span class="hide">hide</span> code</span>
</a>
<div class="code">
<h2>[hero]</h2>
<div class="columns clearfix">
<div class="column">
<h3>HTML Template</h3>
<pre class="line-numbers">
<code class="language-html"><section class="hero image-landing">
	<div class="table">
		<div class="cell">
			<h1 class="title monospace title-landing"></h1>
			<h2 class="subtitle subtitle-landing"></h2>
			<div class="text text-landing">
			</div>
			<div class="button-wrap link-landing"></div>
			<a href="#main" class="down"><span class="bounce">&darr;</span></a>
		</div>
	</div>
</section></code>
</pre>
</div>
<div class="column">
<h3>JavaScript Descriptor</h3>
<pre class="line-numbers">
<code class="language-javascript">shortcodes.register('hero', {
anchor: '.shortcode-landing',
bind_fn: 'append',
template: 'section.hero',
elements: {
img: {
count: 1,
bind_extracted: {
style_property: 'background-image',
extracted_property: 'src'
},
extract: 'src',
anchor: '.image-landing',
anchor_element: 'template'
},
a: {
count: 1,
anchor: '.link-landing',
extract: ['href', 'title', 'text'],
bind_extracted: function(dest, extract, props) {
dest.appendChild(parseDOM(`<a href="${extract.href}" title="${ extract.title ? extract.title : '' }" class="button hollow flex-button"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill="currentColor" d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path></svg>${extract.text}</a>`));
},
anchor_element: 'template'
},
h1: {
count: 1,
bind_extracted: 'html',
anchor: '.title-landing',
extract: 'html',
anchor_element: 'template'
},
'h2,h3,h4,h5,h6': {
count: 1,
bind_extracted: 'html',
anchor: '.subtitle-landing',
extract: 'html',
anchor_element: 'template'
},
rest: {
anchor: '.text-landing',
bind_extracted: 'append',
extract: 'self',
anchor_element: 'template'
}
}
});</code>
</pre>
</div>
</div>
</div>
</div>
<div class="github-buttons">
<a style="background-color:black;color:white;text-decoration:none;padding:4px 6px;font-family:-apple-system, BlinkMacSystemFont, "San Francisco", "Helvetica Neue", Helvetica, Ubuntu, Roboto, Noto, "Segoe UI", Arial, sans-serif;font-size:12px;font-weight:bold;line-height:1.2;display:inline-block;border-radius:3px" href="https://unsplash.com/@evstyle?utm_medium=referral&utm_campaign=photographer-credit&utm_content=creditBadge" target="_blank" rel="noopener noreferrer" title="Download free do whatever you want high-resolution photos from Ev"><span style="display:inline-block;padding:2px 3px"><svg xmlns="http://www.w3.org/2000/svg" style="height:12px;width:auto;position:relative;vertical-align:middle;top:-2px;fill:white" viewBox="0 0 32 32"><title>unsplash-logo</title><path d="M10 9V0h12v9H10zm12 5h10v18H0V14h10v9h12v-9z"></path></svg></span><span style="display:inline-block;padding:2px 3px">Ev</span></a>
</div>
</div>
</div>
</section>
<script type="text/javascript">
shortcodes.register('hero', {
anchor: '.shortcode-landing',
bind_fn: 'append',
template: 'section.hero',
elements: {
img: {
count: 1,
bind_extracted: {
style_property: 'background-image',
extracted_property: 'src'
},
extract: 'src',
anchor: '.image-landing',
anchor_element: 'template'
},
a: {
count: 1,
anchor: '.link-landing',
extract: ['href', 'title', 'text'],
bind_extracted: function(dest, extract, props) {
dest.appendChild(parseDOM(`<a href="${extract.href}" title="${ extract.title ? extract.title : '' }" class="button hollow flex-button"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill="currentColor" d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path></svg>${extract.text}</a>`));
},
anchor_element: 'template'
},
h1: {
count: 1,
bind_extracted: 'html',
anchor: '.title-landing',
extract: 'html',
anchor_element: 'template'
},
'h2,h3,h4,h5,h6': {
count: 1,
bind_extracted: 'html',
anchor: '.subtitle-landing',
extract: 'html',
anchor_element: 'template'
},
rest: {
anchor: '.text-landing',
bind_extracted: 'append',
extract: 'self',
anchor_element: 'template'
}
}
});
</script>
<!--
____________________________________________________________________
[carousel]
____________________________________________________________________
-->
<section class="carousel template">
<div class="center above glide">
<div data-glide-el="track" class="glide__track">
<div class="slides glide__slides slides-landing">
</div>
</div>
<div class="slider__bullets glide__bullets" data-glide-el="controls[nav]">
</div>
</div>
<div class="code-wrap">
<a href="#" class="code-button black">
<img src="https://i.imgur.com/P197gya.png" /><span class="label"><span class="show">show</span><span class="hide">hide</span> code</span>
</a>
<div class="code">
<h2>[carousel]</h2>
<div class="columns clearfix">
<div class="column">
<h3>HTML Template</h3>
<pre class="line-numbers">
<code class="language-html"><section class="carousel template">
<div class="center above glide">
<div data-glide-el="track" class="glide__track">
<div class="slides glide__slides slides-landing">
</div>
</div>
<div class="slider__bullets glide__bullets" data-glide-el="controls[nav]">
</div>
</div>
</section>
<div class="carousel-item glide__slide template">
<div class="inner">
<div class="image-wrap">
<div class="image image-landing">
<img class="spacer" src="https://imgur.com/YLLYqYt.png" />
</div>
</div>
<h2 class="title title-landing"></h2>
<div class="text text-landing"></div>
<div class="button-wrap link-landing"></div>
</div>
</div></code>
</pre>
</div>
<div class="column">
<h3>JavaScript Descriptor</h3>
<pre class="line-numbers">
<code class="language-javascript">shortcodes.register('carousel', {
anchor: '.shortcode-landing',
bind_fn: 'append',
template: 'section.carousel',
item_template: '.carousel-item',
item_anchor: '.slides-landing',
callback: function(template) {
document.querySelector('section.carousel').setAttribute('id', 'main')
var glide = new Glide(template, {
type: 'carousel',
perView: 3,
breakpoints: {
960: {
perView: 1
}
}
})
var slides = template.querySelectorAll('.glide__slide')
var bullets = template.querySelector('.glide__bullets')
if (bullets)
for (var i = 0; i < slides.length; i++) {
bullets.appendChild(parseDOM(`<button class="slider__bullet glide__bullet" data-glide-dir="=${i}"></button>`))
}
glide.mount()
},
elements: {
img: {
count: 'many',
bind_extracted: {
style_property: 'background-image',
extracted_property: 'src'
},
extract: 'src',
anchor: '.image-landing',
anchor_element: 'item'
},
a: {
count: 'many',
anchor: '.link-landing',
extract: ['href', 'target', 'html'],
bind_extracted: function(dest, extract, props, descriptor, num) {
if (num === 1) {
dest.appendChild(parseDOM(`<a href="#view-code" target="_action" class="button small green">${extract.html}</a>`))
} else if (num === 2) {
dest.appendChild(parseDOM(`<a href="#toggle-editor" target="_action" class="button small green">${extract.html}</a>`))
} else {
dest.appendChild(parseDOM(`<a href="${extract.href}" target="${extract.target}" class="button small green">${extract.html}</a>`))
}
},
anchor_element: 'item'
},
h1: {
count: 'many',
bind_extracted: 'html',
anchor: '.title-landing',
extract: 'html',
anchor_element: 'item'
},
rest: {
anchor: '.text-landing',
bind_extracted: 'append',
extract: 'self',
anchor_element: 'item'
}
}
});</code>
</pre>
</div>
</div>
</section>
<div class="carousel-item glide__slide template">
<div class="inner">
<div class="image-wrap">
<div class="image image-landing">
<img class="spacer" src="https://imgur.com/YLLYqYt.png" />
</div>
</div>
<h2 class="title title-landing"></h2>
<div class="text text-landing"></div>
<div class="button-wrap link-landing"></div>
</div>
</div>
<script type="text/javascript">
shortcodes.register('carousel', {
anchor: '.shortcode-landing',
bind_fn: 'append',
template: 'section.carousel',
item_template: '.carousel-item',
item_anchor: '.slides-landing',
callback: function(template) {
document.querySelector('section.carousel').setAttribute('id', 'main')
var glide = new Glide(template, {
type: 'carousel',
perView: 3,
breakpoints: {
960: {
perView: 1
}
}
})
var slides = template.querySelectorAll('.glide__slide')
var bullets = template.querySelector('.glide__bullets')
if (bullets)
for (var i = 0; i < slides.length; i++) {
bullets.appendChild(parseDOM(`<button class="slider__bullet glide__bullet" data-glide-dir="=${i}"></button>`))
}
glide.mount()
},
elements: {
img: {
count: 'many',
bind_extracted: {
style_property: 'background-image',
extracted_property: 'src'
},
extract: 'src',
anchor: '.image-landing',
anchor_element: 'item'
},
a: {
count: 'many',
anchor: '.link-landing',
extract: ['href', 'target', 'html'],
bind_extracted: function(dest, extract, props, descriptor, num) {
if (num === 1) {
dest.appendChild(parseDOM(`<a href="#view-code" target="_action" class="button small green">${extract.html}</a>`))
} else if (num === 2) {
dest.appendChild(parseDOM(`<a href="#toggle-editor" target="_action" class="button small green">${extract.html}</a>`))
} else {
dest.appendChild(parseDOM(`<a href="${extract.href}" target="${extract.target}" class="button small green">${extract.html}</a>`))
}
},
anchor_element: 'item'
},
h1: {
count: 'many',
bind_extracted: 'html',
anchor: '.title-landing',
extract: 'html',
anchor_element: 'item'
},
rest: {
anchor: '.text-landing',
bind_extracted: 'append',
extract: 'self',
anchor_element: 'item'
}
}
});
</script>
<!--
____________________________________________________________________
[text]
____________________________________________________________________
-->
<section class="text template">
<div class="text-landing center p656">
</div>
<div class="code-wrap">
<a href="#" class="code-button black">
<img src="https://i.imgur.com/P197gya.png" /><span class="label"><span class="show">show</span><span class="hide">hide</span> code</span>
</a>
<div class="code">
<h2>[text]</h2>
<div class="columns clearfix">
<div class="column">
<h3>HTML Template</h3>
<pre class="line-numbers">
<code class="language-html"><section class="text template">
	<div class="text-landing center p656">
	</div>
</section></code>
</pre>
</div>
<div class="column">
<h3>JavaScript Descriptor</h3>
<pre class="line-numbers">
<code class="language-javascript">shortcodes.register('text', {
anchor: '.shortcode-landing',
bind_fn: 'append',
template: 'section.text',
callback: function(template) {
const pres = template.querySelectorAll('.text-landing pre')
for (let i = 0; i < pres.length; i++) {
pres[i].innerHTML = '<code class="language-html">' + pres[i].innerHTML + '</code>'
}
},
elements: {
rest: {
anchor: '.text-landing',
bind_extracted: 'append',
extract: 'self',
anchor_element: 'template'
}
}
});</code>
</div>
</div>
</pre>
</div>
</div>
</section>
<script type="text/javascript">
shortcodes.register('text', {
anchor: '.shortcode-landing',
bind_fn: 'append',
template: 'section.text',
callback: function(template) {
const pres = template.querySelectorAll('.text-landing pre')
for (let i = 0; i < pres.length; i++) {
pres[i].innerHTML = '<code class="language-html">' + pres[i].innerHTML + '</code>'
}
},
elements: {
rest: {
anchor: '.text-landing',
bind_extracted: 'append',
extract: 'self',
anchor_element: 'template'
}
}
});
</script>
<!--
____________________________________________________________________
[footer] NOT COMPLETE
____________________________________________________________________
-->
<footer class="footer template">
<div class="center">
</div>
<div class="code-wrap">
<a href="#" class="code-button black">
<img src="https://i.imgur.com/P197gya.png" /><span class="label"><span class="show">show</span><span class="hide">hide</span> code</span>
</a>
<div class="code">
<h2>[text]</h2>
<div class="columns clearfix">
<div class="column">
<h3>HTML Template</h3>
<pre class="line-numbers">
<code class="language-html">
</code>
</pre>
</div>
<div class="column">
<h3>JavaScript Descriptor</h3>
<pre class="line-numbers">
<code class="language-javascript">shortcodes.register('text', {
anchor: '.shortcode-landing',
bind_fn: 'append',
template: 'section.text',
elements: {
rest: {
anchor: '.text-landing',
bind_fn: 'append',
extract_fn: 'self',
anchor_element: 'template'
}
}
});</code>
</div>
</div>
</pre>
</div>
</div>
</footer>
<script type="text/javascript">
shortcodes.register('footer', {
anchor: '.shortcode-landing',
bind_fn: 'append',
template: 'footer',
elements: {
img: {
count: 'many',
bind_fn: 'css',
bind_property: 'background-image',
extract_fn: 'attr',
extract_attr: 'src',
anchor: '.image-landing',
anchor_element: 'item'
},
a: {
count: 'many',
anchor: '.link-landing',
extract_fn: 'attr',
extract: ['href', 'target', 'html'],
bind_fn: function(extract, dest, props, descriptor, num) {
if (num === 1) {
$(dest).find(props.anchor).append(`<a href="#view-code" target="_action" class="button small green">${extract.html}</a>`);
} else if (num === 2) {
$(dest).find(props.anchor).append(`<a href="#toggle-editor" target="_action" class="button small green">${extract.html}</a>`);
} else {
$(dest).find(props.anchor).append(`<a href="${extract.href}" target="${extract.target}" class="button small green">${extract.html}</a>`);
}
},
anchor_element: 'item'
},
h1: {
count: 'many',
bind_fn: 'html',
anchor: '.title-landing',
extract_fn: 'html',
anchor_element: 'item'
},
rest: {
anchor: '.text-landing',
bind_fn: 'append',
extract_fn: 'self',
anchor_element: 'item'
}
}
});
</script>
</div>
<!-- Quill WYSIWYG editor -->
<script src="https://cdn.quilljs.com/1.3.6/quill.min.js"></script>
<script type="text/javascript" src="demo.min.js"></script>
<script type="text/javascript">
/**
* ========================================================================
EXECUTE SHORTCODES
* ========================================================================
*/
shortcodes.execute(document.querySelector('#editor .ql-editor').cloneNode(true), function() {
// https://www.youtube.com/watch?v=qetW6R9Jxs4
});
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.19.0/prism.min.js"></script>
<script>document.write('<script src="http://'
+ (location.host || 'localhost').split(':')[0]
+ ':35729/livereload.js?snipver=1"></'
+ 'script>')</script>
</body>
</html>