Pārlūkot izejas kodu

Simplify

customisations
alemart 1 mēnesi atpakaļ
vecāks
revīzija
e28f01aa0c
2 mainītis faili ar 111 papildinājumiem un 229 dzēšanām
  1. 23
    3
      docs/addons/index.md
  2. 88
    226
      docs_overrides/index.html

+ 23
- 3
docs/addons/index.md Parādīt failu

@@ -1,6 +1,10 @@
1 1
 # Add-Ons
2 2
 
3
-Add-Ons provide an enriched experience with additional features that enhance the core of encantar.js. They're offered to supporters who purchase the various demos. Become a supporter and get exclusive access to these features!
3
+Add-Ons provide an enriched experience with additional features that enhance the core of encantar.js. They're offered to supporters in the Plus! Bundle. Become a supporter and get exclusive access to these features! 😍
4
+
5
+<div style="text-align:center">
6
+  <a href="https://ko-fi.com/s/697a184728" target="_blank" rel="external" class="md-button md-button--primary" id="addon-want-plus-bundle" data-goatcounter-click>I want the Plus! Bundle</a>
7
+</div>
4 8
 
5 9
 <style>
6 10
 .addon-container { margin: 4em 0; }
@@ -21,9 +25,13 @@ Add-Ons provide an enriched experience with additional features that enhance the
21 25
 
22 26
 ## Video Player
23 27
 
24
-Enchant your audience using this [easy-to-use &amp; customizable](./ar-video-player.md) Video Player! Videos in AR are suitable for: product marketing, AR business cards, educational materials, interactive art, and more!
28
+Enchant your audience using this easy-to-use &amp; customizable Video Player! Videos in AR are suitable for: product marketing, AR business cards, educational materials, interactive art, and more!
29
+
30
+[Tell me more](./ar-video-player.md){ .md-button }
25 31
 
32
+<!--
26 33
 <a href="https://ko-fi.com/s/697a184728" target="_blank" rel="external" class="md-button" id="addon-want-video-player" data-goatcounter-click>I want this!</a>
34
+-->
27 35
 
28 36
   </div>
29 37
   <div>
@@ -36,9 +44,13 @@ Enchant your audience using this [easy-to-use &amp; customizable](./ar-video-pla
36 44
 
37 45
 ## AR Buttons
38 46
 
39
-Add interactivity to your scenes with easy-to-use buttons for AR! You can [customize their images and colors](./ar-button.md). They're bundled with the Video Player.
47
+Add interactivity to your scenes with easy-to-use buttons for AR! You can customize their images and colors. They're bundled with the Video Player.
40 48
 
49
+[Tell me more](./ar-button.md){ .md-button }
50
+
51
+<!--
41 52
 <a href="https://ko-fi.com/s/697a184728" target="_blank" rel="external" class="md-button" id="addon-want-buttons" data-goatcounter-click>I want this!</a>
53
+-->
42 54
 
43 55
   </div>
44 56
   <div markdown>
@@ -55,7 +67,11 @@ Add interactivity to your scenes with easy-to-use buttons for AR! You can [custo
55 67
 
56 68
 Turn 3D and 2D objects into "clickables" that respond to touch or mouse input. AR Clickables are based on the [Pointer Tracker](../api/pointer-tracker.md). They are the building blocks of AR Buttons and are included with them.
57 69
 
70
+[Tell me more](./ar-clickable.md){ .md-button }
71
+
72
+<!--
58 73
 <a href="https://ko-fi.com/s/697a184728" target="_blank" rel="external" class="md-button" id="addon-want-clickables" data-goatcounter-click>I want this!</a>
74
+-->
59 75
 
60 76
   </div>
61 77
   <div markdown>
@@ -72,7 +88,11 @@ Turn 3D and 2D objects into "clickables" that respond to touch or mouse input. A
72 88
 
73 89
 Framework-agnostic solution for preloading assets such as: 3D models, video clips, audio files and more. This Add-On is bundled with the core.
74 90
 
91
+[Tell me more](./more-addons.md){ .md-button }
92
+
93
+<!--
75 94
 <a href="https://encantar.dev" target="_blank" rel="external" class="md-button" id="addon-want-asset-manager" data-goatcounter-click>I want this!</a>
95
+-->
76 96
 
77 97
   </div>
78 98
   <div markdown>

+ 88
- 226
docs_overrides/index.html Parādīt failu

@@ -16,7 +16,7 @@ window.addEventListener('load', function() {
16 16
   setupReveal();
17 17
 
18 18
   if(location.hash == '#download')
19
-    document.querySelector('#donation-dialog').showModal();
19
+    document.querySelector('#bundle-dialog').showModal();
20 20
 });
21 21
 
22 22
 function setupDialogPolyfill()
@@ -160,141 +160,6 @@ body {
160 160
 
161 161
 
162 162
 
163
-#pay {
164
-  display: flex;
165
-  flex-flow: column wrap;
166
-  justify-content: center;
167
-  align-items: center;
168
-  align-content: center;
169
-  text-align: center;
170
-  font-size: 1.2rem;
171
-  line-height: 2.5;
172
-}
173
-#pay > * {
174
-  width: 100%;
175
-  min-width: 320px;
176
-}
177
-#pay > p {
178
-  font-size: 1.0rem;
179
-}
180
-#pay input[type="submit"] {
181
-  font-size: 1.0rem;
182
-  margin: 1.0rem 0 0 0;
183
-}
184
-#pay > h1 {
185
-  margin: 0.5rem 0 0 0;
186
-  font-size: 1.4rem;
187
-}
188
-#pay #actions {
189
-  display: flex;
190
-  flex-direction: column;
191
-  line-height: initial;
192
-}
193
-#pay #actions > * {
194
-  margin-top: 0.7rem;
195
-  font-size: 1rem;
196
-}
197
-#pay #actions > :not(.md-button) {
198
-  font-size: 0.8rem;
199
-}
200
-#pay #amounts {
201
-  display: flex;
202
-  flex-wrap: wrap;
203
-  justify-content: center;
204
-  font-size: 0.85em;
205
-}
206
-#pay #amounts .dollar-sign::before {
207
-  content: "$";
208
-}
209
-#pay #amounts.euro .dollar-sign::before {
210
-  content: "\20AC";
211
-}
212
-#pay #currencies {
213
-  font-size: 0.6em;
214
-  font-weight: bold;
215
-}
216
-#pay #currencies input[type="radio"] + label {
217
-  margin: 0 !important;
218
-}
219
-#pay input[type="radio"] {
220
-  width: 0;
221
-  opacity: 0;
222
-  -webkit-appearance: none;
223
-  appearance: none;
224
-  background-color: white;
225
-  margin: 0;
226
-}
227
-#pay input[type="radio"] + label {
228
-  padding: 0.1rem 0.5rem;
229
-  margin: 0 2px;
230
-  cursor: pointer;
231
-  border: 1px solid #dcdcdc;
232
-  border-radius: calc(var(--border-radius) / 3);
233
-  background: linear-gradient(180deg, white 0%, whitesmoke 100%);
234
-}
235
-#pay input[type="radio"] + label:hover {
236
-  border-color: var(--highlighted);
237
-}
238
-#pay input[type="radio"]:checked + label {
239
-  background: linear-gradient(180deg, #fffd50 0%, var(--highlighted) 100%) !important;
240
-  border-color: var(--highlighted) !important;
241
-}
242
-input::-webkit-outer-spin-button,
243
-input::-webkit-inner-spin-button {
244
-  -webkit-appearance: none;
245
-  margin: 0;
246
-}
247
-#custom-amount {
248
-  appearance: none;
249
-  -webkit-appearance: none;
250
-  -moz-appearance: textfield;
251
-
252
-  font-size: 0.75em;
253
-  padding: 0.5rem 0.5rem 0.5rem 2.1em;
254
-  margin: 0;
255
-  width: 100%;
256
-  height: 100%;
257
-
258
-  border: 1px solid #dcdcdc;
259
-  border-radius: calc(var(--border-radius) / 3);
260
-  background: linear-gradient(180deg, white 0%, whitesmoke 100%);
261
-  color: var(--md-default-fg-color--light);
262
-}
263
-#custom-amount:focus {
264
-  border-color: var(--highlighted) !important;
265
-}
266
-#custom-amount:invalid {
267
-  border-color: salmon !important;
268
-}
269
-#custom-amount-wrapper {
270
-  flex-basis: 13.8rem; /* line break */
271
-  /*flex-basis: 9rem*/; /* same line */
272
-  visibility: hidden;
273
-  max-height: 0;
274
-  transform: scaleY(0);
275
-  transform-origin: top;
276
-  transition: transform 0.2s ease-out, max-height 0.2s ease-out;
277
-}
278
-#custom-amount-wrapper > .dollar-sign {
279
-  font-size: 0.85em;
280
-  position: absolute;
281
-  left: 0.83em;
282
-  /*top: 0.33em;*/
283
-  top: 0.37em;
284
-}
285
-#custom-tier:checked ~ #custom-amount-wrapper {
286
-  visibility: visible;
287
-  max-height: 64px;
288
-  transform: scaleY(1);
289
-}
290
-#donation-dialog {
291
-  transform: translate(0, -35%) !important;
292
-}
293
-
294
-
295
-
296
-
297
-
298 163
 #topics {
299 164
   max-width: var(--max-width);
300 165
   margin-left: auto;
@@ -410,7 +275,8 @@ input::-webkit-inner-spin-button {
410 275
 
411 276
 
412 277
 
413
-#download-dialog {
278
+dialog {
279
+  /*background-color: var(--md-default-bg-color);*/
414 280
   background-color: whitesmoke;
415 281
   color: var(--md-default-fg-color--light);
416 282
   text-align: center;
@@ -421,26 +287,26 @@ input::-webkit-inner-spin-button {
421 287
   transition: opacity 0.5s ease;
422 288
 }
423 289
 
424
-#download-dialog[open] {
290
+dialog[open] {
425 291
   opacity: 1;
426 292
 }
427 293
 
428
-#download-dialog:not([open]) {
294
+dialog:not([open]) {
429 295
   opacity: 0;
430 296
   pointer-events: none;
431 297
 }
432 298
 
433
-#download-dialog::backdrop {
299
+dialog::backdrop {
434 300
   backdrop-filter: blur(8px);
435 301
   transition: backdrop-filter 0.5s ease;
436 302
 }
437 303
 
438
-#download-dialog h1 {
304
+dialog h1 {
439 305
   margin: 1.0rem 0;
440 306
   font-size: 1.4rem;
441 307
 }
442 308
 
443
-#download-dialog-close {
309
+dialog .close {
444 310
   position: absolute;
445 311
   top: 0.3rem;
446 312
   right: 0.8rem;
@@ -449,50 +315,71 @@ input::-webkit-inner-spin-button {
449 315
   cursor: pointer;
450 316
 }
451 317
 
452
-html:has(#download-dialog[open]) {
318
+html:has(dialog[open]) {
453 319
   overflow: hidden;
454 320
 }
455 321
 
456 322
 
457 323
 
458 324
 
459
-#donation-dialog {
460
-  max-width: var(--max-width);
461
-  background-color: whitesmoke;
462
-  color: var(--md-default-fg-color--light);
463
-  text-align: center;
464
-  padding: 1.5rem;
465
-  border: 0;
466
-  border-radius: 24px;
467
-  box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.2);
468
-  transition: opacity 0.5s ease;
325
+#bundle-dialog label {
326
+  display: flex;
327
+  align-items: center;
328
+  text-align: left;
329
+  margin-bottom: 1rem;
469 330
 }
470 331
 
471
-#donation-dialog[open] {
472
-  opacity: 1;
332
+#bundle-dialog footer {
333
+  margin-top: 1rem;
473 334
 }
474 335
 
475
-#donation-dialog:not([open]) {
336
+#bundle-dialog input[type="radio"] {
337
+  position: absolute;
476 338
   opacity: 0;
477
-  pointer-events: none;
478 339
 }
479 340
 
480
-#donation-dialog::backdrop {
481
-  backdrop-filter: blur(8px);
482
-  transition: backdrop-filter 0.5s ease;
341
+#bundle-dialog button[type="submit"] {
342
+  margin-top: 0.75rem;
343
+  width: 100%;
483 344
 }
484 345
 
485
-#donation-dialog-close {
486
-  position: absolute;
487
-  top: 0.3rem;
488
-  right: 0.8rem;
489
-  font-size: 1.35rem;
490
-  color: var(--md-default-fg-color--light);
346
+#bundle-dialog label:hover {
491 347
   cursor: pointer;
492 348
 }
493 349
 
494
-html:has(#donation-dialog[open]) {
495
-  overflow: hidden;
350
+.custom-radio {
351
+  min-width: 24px;
352
+  width: 24px;
353
+  height: 24px;
354
+  background-color: var(--md-primary-bg-color);
355
+  border-radius: 50%;
356
+  border: 2px solid var(--md-default-fg-color--light);
357
+  margin-right: 0.75rem;
358
+}
359
+
360
+.custom-radio:hover, label:hover > .custom-radio {
361
+  background-color: var(--md-default-bg-color--lighter);
362
+}
363
+
364
+.custom-radio:after {
365
+  content: "";
366
+  display: block;
367
+  position: relative;
368
+  top: 4px;
369
+  left: 4px;
370
+  width: 12px;
371
+  height: 12px;
372
+  border-radius: 50%;
373
+  background: var(--md-primary-fg-color);
374
+  visibility: hidden;
375
+}
376
+
377
+input[type="radio"]:checked ~ .custom-radio {
378
+  border-color: var(--md-primary-fg-color);
379
+}
380
+
381
+input[type="radio"]:checked ~ .custom-radio:after {
382
+  visibility: visible;
496 383
 }
497 384
 
498 385
 
@@ -511,7 +398,6 @@ html:has(#donation-dialog[open]) {
511 398
 
512 399
 
513 400
 @media screen and (min-width: 768px) {
514
-  /*#pay { justify-content: space-around; }*/
515 401
   #title h1 { font-size: 4.0rem; }
516 402
   #title h2 { font-size: 1.6rem; }
517 403
   #topics { text-align: justify; }
@@ -567,7 +453,7 @@ html:has(#donation-dialog[open]) {
567 453
     <div>
568 454
       <h1>Open Source AR</h1>
569 455
       <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>
570
-      <a href="tutorial/" target="_blank" class="md-button" id="read-tutorial" data-goatcounter-click>Get started now</a>
456
+      <a href="tutorial/" target="_blank" class="md-button" id="read-tutorial" data-goatcounter-click>Read the tutorial</a>
571 457
     </div>
572 458
     <div>
573 459
       <ul>
@@ -628,20 +514,8 @@ html:has(#donation-dialog[open]) {
628 514
 <section id="contact">
629 515
   <article class="reveal">
630 516
     <h1>Need help?</h1>
631
-      <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>
632
-      <a href="contact/" target="_blank" class="md-button" id="talk-to-wizard" data-goatcounter-click>Talk to a wizard</a>
633
-<!--
634
-    <div>
635
-      <div>
636
-        <p>Need help with a project?</p>
637
-        <p><a href="contact/" target="_blank" id="talk-to-wizard" data-goatcounter-click>Talk to a wizard</a></p>
638
-      </div>
639
-      <div>
640
-        <p>Wanna know more?</p>
641
-        <p><a href="api/" target="_blank" id="study-the-api" data-goatcounter-click>Study the API</a></p>
642
-      </div>
643
-    </div>
644
--->
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>
645 519
   </article>
646 520
 </section>
647 521
 
@@ -653,7 +527,7 @@ html:has(#donation-dialog[open]) {
653 527
     <h1>Download</h1>
654 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>
655 529
     <footer>
656
-      <button class="md-button md-button--primary" id="download-button" data-goatcounter-click onclick="document.getElementById('donation-dialog').showModal()">Download encantar.js</button>
530
+      <button class="md-button md-button--primary" id="download-button" data-goatcounter-click onclick="document.getElementById('bundle-dialog').showModal()">Download encantar.js</button>
657 531
       <a href="https://github.com/sponsors/alemart" target="_blank" class="md-button" id="download-sponsor" data-goatcounter-click>Sponsor on GitHub</a>
658 532
     </footer>
659 533
   </article>
@@ -671,50 +545,38 @@ html:has(#donation-dialog[open]) {
671 545
 
672 546
 
673 547
 
674
-<dialog id="download-dialog" class="fixed">
675
-  <form method="dialog">
676
-    <h1>Thank you for your interest in encantar.js</h1>
677
-    <p>Your download will start shortly...</p>
678
-    <p><button id="download-dialog-download" class="md-button md-button--primary" type="button" data-goatcounter-click>Download now</button></p>
679
-    <button id="download-dialog-close" type="submit">&times;</button>
680
-  </form>
681
-</dialog>
682
-
683
-
684
-
685
-
686
-<dialog id="donation-dialog" class="fixed">
687
-  <form id="pay" method="post" action="https://api.encantar.dev/v1/pay" autocomplete="off" onsubmit="return this.tier.value != 'custom' || this['custom-amount'].value != ''">
688
-    <h1>Do you appreciate this? <span class="heart">&#x1f496;</span></h1>
689
-    <p>Support Open Source Augmented Reality!</p>
690
-    <span>
691
-      <div id="amounts" class="euro">
692
-        <input type="radio" id="first-tier" name="tier" value="fifty" data-goatcounter-click>
693
-        <label for="first-tier"><span class="dollar-sign"></span>50</label>
694
-        <input type="radio" id="second-tier" name="tier" value="one-hundred" data-goatcounter-click>
695
-        <label for="second-tier"><span class="dollar-sign"></span>100</label>
696
-        <input type="radio" id="third-tier" name="tier" value="two-hundred" data-goatcounter-click>
697
-        <label for="third-tier"><span class="dollar-sign"></span>200</label>
698
-        <input type="radio" id="custom-tier" name="tier" value="custom" data-goatcounter-click required onchange="this.checked && document.getElementById('custom-amount').focus()">
699
-        <label for="custom-tier">Other</label>
700
-        <label for="custom-amount" id="custom-amount-wrapper">
701
-          <span class="dollar-sign"></span>
702
-          <input type="number" id="custom-amount" name="custom-amount" value="" placeholder="Enter an amount" min="0" max="999999" step="1" oninput="document.getElementById('custom-tier').click()">
703
-        </label>
548
+<dialog id="bundle-dialog" class="fixed">
549
+  <h1>Select a bundle</h1>
550
+  <form autocomplete="off" onsubmit="location.href = this.elements.bundle.value; return false">
551
+    <label>
552
+      <input type="radio" id="standard-bundle" name="bundle" value="https://ko-fi.com/s/3ee4182cb6" checked data-goatcounter-click>
553
+      <span class="custom-radio"></span>
554
+      <div>
555
+        <strong>Standard Bundle</strong><br>
556
+        Production-ready, pre-built encantar.js with core features and demos
704 557
       </div>
705
-      <div id="currencies">
706
-        <input type="radio" id="currency-usd" name="currency" value="usd" data-goatcounter-click onchange="this.checked && document.getElementById('amounts').classList.remove('euro')">
707
-        <label for="currency-usd">&#x1F1FA;&#x1F1F8; USD</label>
708
-        <input type="radio" id="currency-eur" name="currency" value="eur" checked data-goatcounter-click onchange="this.checked && document.getElementById('amounts').classList.add('euro')">
709
-        <label for="currency-eur">&#x1F1EA;&#x1F1FA; EUR</label>
558
+    </label>
559
+    <label>
560
+      <input type="radio" id="plus-bundle" name="bundle" value="https://ko-fi.com/s/697a184728" data-goatcounter-click>
561
+      <span class="custom-radio"></span>
562
+      <div>
563
+        <strong>Plus! Bundle</strong><br>
564
+        Everything in Standard + <a href="addons/" id="exclusive-addons" target="_blank" data-goatcounter-click>Exclusive Add-Ons for rich AR experiences</a>
710 565
       </div>
711
-    </span>
712
-    <div id="actions">
713
-      <button type="submit" class="md-button md-button--primary" id="donate-stripe" data-goatcounter-click>Donate &amp; Download</button>
714
-      <a href="https://www.paypal.com/donate/?hosted_button_id=3H4CAJ9832GCJ" rel="external" class="md-button md-button-primary" id="donate-paypal" data-goatcounter-click>Donate via PayPal</a>
715
-    </div>
566
+    </label>
567
+    <label>
568
+      <input type="radio" id="source-bundle" name="bundle" value="https://github.com/alemart/encantar-js" data-goatcounter-click>
569
+      <span class="custom-radio"></span>
570
+      <div>
571
+        <strong>Source Bundle</strong><br>
572
+        Source code for Augmented Reality and Computer Vision nerds
573
+      </div>
574
+    </label>
575
+    <footer>
576
+      <button type="submit" class="md-button md-button--primary" id="download-bundle" data-goatcounter-click>OK</button>
577
+    </footer>
716 578
   </form>
717
-  <button id="donation-dialog-close" onclick="this.parentNode.close()">&times;</button>
579
+  <button id="donation-dialog-close" class="close" onclick="this.parentNode.close()">&times;</button>
718 580
 </dialog>
719 581
 {% endblock %}
720 582
 

Notiek ielāde…
Atcelt
Saglabāt