|
@@ -2,7 +2,6 @@
|
2
|
2
|
|
3
|
3
|
{% block libs %}
|
4
|
4
|
{{ super() }}
|
5
|
|
-<script src="js/dialog-polyfill.js"></script>
|
6
|
5
|
{% endblock %}
|
7
|
6
|
|
8
|
7
|
{% block scripts %}
|
|
@@ -12,7 +11,6 @@
|
12
|
11
|
|
13
|
12
|
window.addEventListener('load', function() {
|
14
|
13
|
setupDialogPolyfill();
|
15
|
|
- setupDialog();
|
16
|
14
|
setupReveal();
|
17
|
15
|
|
18
|
16
|
if(location.hash == '#download')
|
|
@@ -21,39 +19,25 @@ window.addEventListener('load', function() {
|
21
|
19
|
|
22
|
20
|
function setupDialogPolyfill()
|
23
|
21
|
{
|
24
|
|
- if(typeof HTMLDialogElement === 'undefined')
|
|
22
|
+ if(typeof HTMLDialogElement !== 'undefined')
|
25
|
23
|
return;
|
26
|
24
|
|
27
|
|
- document.querySelectorAll('dialog').forEach(function(dialog) {
|
28
|
|
- dialogPolyfill.registerDialog(dialog);
|
29
|
|
- dialog.classList.add('fixed');
|
30
|
|
- });
|
31
|
|
-}
|
32
|
|
-
|
33
|
|
-function setupDialog()
|
34
|
|
-{
|
35
|
|
- if(location.search.indexOf('checkout_session_id') < 0)
|
36
|
|
- return;
|
37
|
|
-
|
38
|
|
- try {
|
39
|
|
- const searchParams = new URLSearchParams(location.search);
|
40
|
|
- const sessionId = searchParams.get('checkout_session_id') || '';
|
41
|
|
- const next = searchParams.get('next') || location.href;
|
42
|
|
-
|
43
|
|
- const url = new URL(next);
|
44
|
|
- url.searchParams.append('checkout_session_id', sessionId);
|
45
|
|
-
|
46
|
|
- const button = document.getElementById('download-dialog-download');
|
47
|
|
- const redirect = function() { location.href = url.href; };
|
48
|
|
- button.onclick = redirect;
|
49
|
|
- setTimeout(redirect, 3000);
|
50
|
|
-
|
51
|
|
- const dialog = document.getElementById('download-dialog');
|
52
|
|
- dialog.showModal();
|
53
|
|
- }
|
54
|
|
- catch(e) {
|
55
|
|
- console.error(e);
|
56
|
|
- alert(e.message);
|
|
25
|
+ const link = document.createElement('link');
|
|
26
|
+ link.rel = 'stylesheet';
|
|
27
|
+ link.href = 'style/dialog-polyfill.css';
|
|
28
|
+ document.head.prepend(link);
|
|
29
|
+
|
|
30
|
+ const script = document.createElement('script');
|
|
31
|
+ script.onload = registerDialogs;
|
|
32
|
+ script.src = 'js/dialog-polyfill.js';
|
|
33
|
+ document.head.append(script);
|
|
34
|
+
|
|
35
|
+ function registerDialogs()
|
|
36
|
+ {
|
|
37
|
+ document.querySelectorAll('dialog').forEach(function(dialog) {
|
|
38
|
+ dialogPolyfill.registerDialog(dialog);
|
|
39
|
+ dialog.classList.add('fixed');
|
|
40
|
+ });
|
57
|
41
|
}
|
58
|
42
|
}
|
59
|
43
|
|
|
@@ -83,7 +67,6 @@ function setupReveal()
|
83
|
67
|
|
84
|
68
|
{% block styles %}
|
85
|
69
|
{{ super() }}
|
86
|
|
-<link rel="stylesheet" href="style/dialog-polyfill.css">
|
87
|
70
|
<style>
|
88
|
71
|
:root {
|
89
|
72
|
--max-width: 42rem;
|
|
@@ -210,37 +193,6 @@ body {
|
210
|
193
|
|
211
|
194
|
|
212
|
195
|
|
213
|
|
-#contact {
|
214
|
|
- max-width: var(--max-width);
|
215
|
|
- margin-left: auto;
|
216
|
|
- margin-right: auto;
|
217
|
|
- padding: 0 var(--hpad);
|
218
|
|
- text-align: center;
|
219
|
|
-}
|
220
|
|
-#contact article {
|
221
|
|
- margin: 2rem 0;
|
222
|
|
- padding: 1.2rem;
|
223
|
|
- border-radius: var(--border-radius);
|
224
|
|
- background-image: linear-gradient(0deg, white 0%, lemonchiffon 100%);
|
225
|
|
-}
|
226
|
|
-#contact article h1 {
|
227
|
|
- margin-bottom: 1.0rem;
|
228
|
|
-}
|
229
|
|
-#contact article > div {
|
230
|
|
- display: flex;
|
231
|
|
- justify-content: space-around;
|
232
|
|
- flex-wrap: wrap;
|
233
|
|
- font-size: 1.1em;
|
234
|
|
-}
|
235
|
|
-/*
|
236
|
|
-#contact article a::after {
|
237
|
|
- content: ' \2192';
|
238
|
|
-}
|
239
|
|
-*/
|
240
|
|
-
|
241
|
|
-
|
242
|
|
-
|
243
|
|
-
|
244
|
196
|
#download {
|
245
|
197
|
background-image: linear-gradient(0deg,rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 1) 100%), url('img/enchanted-sky.webp');
|
246
|
198
|
background-size: cover;
|
|
@@ -409,7 +361,6 @@ input[type="radio"]:checked ~ .custom-radio:after {
|
409
|
361
|
|
410
|
362
|
@media screen and (min-width: 992px) {
|
411
|
363
|
#topics { padding: 0; }
|
412
|
|
- #contact { padding: 0; }
|
413
|
364
|
#download article footer > * { margin: 0; }
|
414
|
365
|
}
|
415
|
366
|
</style>
|
|
@@ -453,7 +404,7 @@ input[type="radio"]:checked ~ .custom-radio:after {
|
453
|
404
|
<div>
|
454
|
405
|
<h1>Open Source AR</h1>
|
455
|
406
|
<p>encantar.js is one of the few open source Augmented Reality frameworks in existence. Your WebAR content is not tied to any platform. Host it wherever you want: there is no vendor lock-in and no usage limit.</p>
|
456
|
|
- <a href="tutorial/" target="_blank" class="md-button" id="read-tutorial" data-goatcounter-click>Read the tutorial</a>
|
|
407
|
+ <a href="https://github.com/alemart/encantar-js" rel="external" target="_blank" class="md-button" id="browse-source" data-goatcounter-click>Browse the source</a>
|
457
|
408
|
</div>
|
458
|
409
|
<div>
|
459
|
410
|
<ul>
|
|
@@ -511,21 +462,10 @@ input[type="radio"]:checked ~ .custom-radio:after {
|
511
|
462
|
|
512
|
463
|
|
513
|
464
|
|
514
|
|
-<section id="contact">
|
515
|
|
- <article class="reveal">
|
516
|
|
- <h1>Need help?</h1>
|
517
|
|
- <p>Usually you can go a long way with the publicly available resources, which include the written materials and the various demos. If you need one-to-one assistance, consultancy services are available.</p>
|
518
|
|
- <a href="contact/" target="_blank" class="md-button" id="talk-to-wizard" data-goatcounter-click>Talk to a wizard</a>
|
519
|
|
- </article>
|
520
|
|
-</section>
|
521
|
|
-
|
522
|
|
-
|
523
|
|
-
|
524
|
|
-
|
525
|
465
|
<section id="download">
|
526
|
466
|
<article>
|
527
|
467
|
<h1>Download</h1>
|
528
|
|
- <p>encantar.js is created independently by <a href="contact/" target="_blank" id="author-name" data-goatcounter-click>Alexandre Martins</a>. It's based on <a href="https://github.com/alemart/speedy-vision" target="_blank" rel="external" id="speedy-vision" data-goatcounter-click>speedy-vision</a>, an open source computer vision library created by the same author. Your support is much appreciated!</p>
|
|
468
|
+ <p>encantar.js is created independently by <a href="https://github.com/alemart" target="_blank" id="author-name" data-goatcounter-click>Alexandre Martins</a>. It's based on <a href="https://github.com/alemart/speedy-vision" target="_blank" rel="external" id="speedy-vision" data-goatcounter-click>speedy-vision</a>, an open source computer vision library created by the same author. Your support is much appreciated!</p>
|
529
|
469
|
<footer>
|
530
|
470
|
<button class="md-button md-button--primary" id="download-button" data-goatcounter-click onclick="document.getElementById('bundle-dialog').showModal()">Download encantar.js</button>
|
531
|
471
|
<a href="https://github.com/sponsors/alemart" target="_blank" class="md-button" id="download-sponsor" data-goatcounter-click>Sponsor on GitHub</a>
|
|
@@ -536,20 +476,11 @@ input[type="radio"]:checked ~ .custom-radio:after {
|
536
|
476
|
|
537
|
477
|
|
538
|
478
|
|
539
|
|
-<footer class="md-footer">
|
540
|
|
- <div class="md-copyright">
|
541
|
|
- encantar.js: GPU-accelerated Augmented Reality framework for the web. Copyright © 2022 – present Alexandre Martins
|
542
|
|
- </div>
|
543
|
|
-</footer>
|
544
|
|
-
|
545
|
|
-
|
546
|
|
-
|
547
|
|
-
|
548
|
|
-<dialog id="bundle-dialog" class="fixed">
|
|
479
|
+<dialog id="bundle-dialog">
|
549
|
480
|
<h1>Select an option</h1>
|
550
|
481
|
<form autocomplete="off" onsubmit="location.href = this.elements.bundle.value; return false">
|
551
|
482
|
<label>
|
552
|
|
- <input type="radio" name="bundle" value="https://ko-fi.com/s/3ee4182cb6" checked data-goatcounter-click>
|
|
483
|
+ <input type="radio" name="bundle" value="https://ko-fi.com/s/a9b92194e0" checked data-goatcounter-click>
|
553
|
484
|
<span class="custom-radio"></span>
|
554
|
485
|
<div>
|
555
|
486
|
<strong>Standard Bundle</strong><br>
|
|
@@ -578,6 +509,15 @@ input[type="radio"]:checked ~ .custom-radio:after {
|
578
|
509
|
</form>
|
579
|
510
|
<button id="donation-dialog-close" class="close" onclick="this.parentNode.close()">×</button>
|
580
|
511
|
</dialog>
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+<footer class="md-footer">
|
|
517
|
+ <div class="md-copyright">
|
|
518
|
+ encantar.js: GPU-accelerated Augmented Reality framework for the web. Copyright © 2022 – present Alexandre Martins
|
|
519
|
+ </div>
|
|
520
|
+</footer>
|
581
|
521
|
{% endblock %}
|
582
|
522
|
|
583
|
523
|
{% block announce %}{% endblock %}
|