Bläddra i källkod

Add option

customisations
alemart 3 månader sedan
förälder
incheckning
890b2fa513
1 ändrade filer med 52 tillägg och 29 borttagningar
  1. 52
    29
      docs_overrides/index.html

+ 52
- 29
docs_overrides/index.html Visa fil

@@ -93,25 +93,39 @@ body {
93 93
   font-size: 1.2rem;
94 94
   line-height: 2.5;
95 95
   margin: 0 auto 1rem auto;
96
-  padding: 3px;
96
+  padding: 18px 3px;
97 97
   max-width: var(--max-width);
98 98
   background-color: rgba(255, 255, 255, 0.2);
99 99
   box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.2);
100 100
   border-radius: var(--border-radius);
101
-  /*border: 2px outset rgba(126, 86, 194, 0.2);*/
102 101
 }
103
-#pay > #amounts {
104
-  display: flex;
105
-  flex-wrap: wrap;
106
-  justify-content: center;
102
+#pay > *:nth-child(2) {
107 103
   width: 45%;
108 104
   min-width: 320px;
109
-  font-size: 0.85em;
110 105
 }
111 106
 #pay > *:last-child {
112 107
   margin-top: 0.7rem;
113 108
   margin-bottom: 0.7rem;
114 109
 }
110
+#pay #amounts {
111
+  display: flex;
112
+  flex-wrap: wrap;
113
+  justify-content: center;
114
+  font-size: 0.85em;
115
+}
116
+#pay #amounts .dollar-sign::before {
117
+  content: "$";
118
+}
119
+#pay #amounts.euro .dollar-sign::before {
120
+  content: "\20AC";
121
+}
122
+#pay #currencies {
123
+  font-size: 0.6em;
124
+  font-weight: bold;
125
+}
126
+#pay #currencies input[type="radio"] + label {
127
+  margin: 0 !important;
128
+}
115 129
 #pay input[type="submit"] {
116 130
   font-size: 1.0rem;
117 131
 }
@@ -162,12 +176,6 @@ input::-webkit-inner-spin-button {
162 176
 #custom-amount:invalid {
163 177
   border-color: salmon !important;
164 178
 }
165
-#dollar-sign {
166
-  font-size: 0.85em;
167
-  position: absolute;
168
-  left: 0.83em;
169
-  top: 0.33em;
170
-}
171 179
 #custom-amount-wrapper {
172 180
   flex-basis: 14.9rem; /* line break */
173 181
   visibility: hidden;
@@ -176,6 +184,12 @@ input::-webkit-inner-spin-button {
176 184
   transform-origin: top;
177 185
   transition: transform 0.2s ease-out, max-height 0.2s ease-out;
178 186
 }
187
+#custom-amount-wrapper > .dollar-sign {
188
+  font-size: 0.85em;
189
+  position: absolute;
190
+  left: 0.83em;
191
+  top: 0.33em;
192
+}
179 193
 #custom-tier:checked ~ #custom-amount-wrapper {
180 194
   visibility: visible;
181 195
   max-height: 64px;
@@ -355,6 +369,7 @@ html:has(#download-dialog[open]) {
355 369
 
356 370
 @media screen and (min-width: 768px) {
357 371
   /*#pay { justify-content: space-around; }*/
372
+  #pay > *:nth-child(2) { position: relative; top: 18px; }
358 373
   #title h1 { font-size: 4.0rem; }
359 374
   #title h2 { font-size: 1.6rem; }
360 375
   #topics { text-align: justify; }
@@ -440,21 +455,29 @@ function setupReveal()
440 455
   </video>
441 456
   <form id="pay" method="post" action="https://api.encantar.dev/v1/pay" autocomplete="off" onsubmit="return this.tier.value != 'custom' || this['custom-amount'].value != ''">
442 457
     <span>Pay What You Can:</span>
443
-    <span id="amounts">
444
-      <input type="radio" id="custom-tier" name="tier" value="custom" data-goatcounter-click onchange="this.checked && document.getElementById('custom-amount').focus()">
445
-      <label for="custom-tier">$X</label>
446
-      <input type="radio" id="first-tier" name="tier" value="first" data-goatcounter-click>
447
-      <label for="first-tier">$29</label>
448
-      <input type="radio" id="second-tier" name="tier" value="second" checked data-goatcounter-click>
449
-      <label for="second-tier">$49</label>
450
-      <input type="radio" id="third-tier" name="tier" value="third" data-goatcounter-click>
451
-      <label for="third-tier">$99</label>
452
-      <input type="radio" id="fourth-tier" name="tier" value="fourth" data-goatcounter-click>
453
-      <label for="fourth-tier">$199</label>
454
-      <label for="custom-amount" id="custom-amount-wrapper">
455
-        <span id="dollar-sign">$</span>
456
-        <input type="number" id="custom-amount" name="custom-amount" value="" placeholder="Enter a fair dollar amount" min="0" max="999999" step="1">
457
-      </label>
458
+    <span>
459
+      <div id="amounts" class="euro">
460
+        <input type="radio" id="custom-tier" name="tier" value="custom" data-goatcounter-click onchange="this.checked && document.getElementById('custom-amount').focus()">
461
+        <label for="custom-tier"><span class="dollar-sign"></span>X</label>
462
+        <input type="radio" id="first-tier" name="tier" value="first" data-goatcounter-click>
463
+        <label for="first-tier"><span class="dollar-sign"></span>29</label>
464
+        <input type="radio" id="second-tier" name="tier" value="second" checked data-goatcounter-click>
465
+        <label for="second-tier"><span class="dollar-sign"></span>49</label>
466
+        <input type="radio" id="third-tier" name="tier" value="third" data-goatcounter-click>
467
+        <label for="third-tier"><span class="dollar-sign"></span>99</label>
468
+        <input type="radio" id="fourth-tier" name="tier" value="fourth" data-goatcounter-click>
469
+        <label for="fourth-tier"><span class="dollar-sign"></span>199</label>
470
+        <label for="custom-amount" id="custom-amount-wrapper">
471
+          <span class="dollar-sign"></span>
472
+          <input type="number" id="custom-amount" name="custom-amount" value="" placeholder="Enter a fair amount" min="0" max="999999" step="1">
473
+        </label>
474
+      </div>
475
+      <div id="currencies">
476
+        <input type="radio" id="currency-usd" name="currency" value="usd" data-goatcounter-click onchange="this.checked && document.getElementById('amounts').classList.remove('euro')">
477
+        <label for="currency-usd">&#x1F1FA;&#x1F1F8; USD</label>
478
+        <input type="radio" id="currency-eur" name="currency" value="eur" checked data-goatcounter-click onchange="this.checked && document.getElementById('amounts').classList.add('euro')">
479
+        <label for="currency-eur">&#x1F1EA;&#x1F1FA; EUR</label>
480
+      </div>
458 481
     </span>
459 482
     <input type="submit" value="Get encantar.js" class="md-button md-button--primary" id="get-encantar" data-goatcounter-click>
460 483
   </form>
@@ -545,7 +568,7 @@ function setupReveal()
545 568
 <section id="download">
546 569
   <article>
547 570
     <h1>Download encantar.js</h1>
548
-    <p>encantar.js is a WebAR framework created independently by <a href="contact/" target="_blank" id="author-name" data-goatcounter-click>Alexandre Martins</a> and released as open source software under the GNU LGPL v3. Users are asked to support the project. Get your copy and go build something magical with it! &#x1FA84;</p>
571
+    <p>encantar.js is a WebAR framework created independently by <a href="contact/" target="_blank" id="author-name" data-goatcounter-click>Alexandre Martins</a> and released as libre and open source software under the LGPL v3. Your support is much appreciated!</p>
549 572
     <footer>
550 573
       <a href="#pay" class="md-button md-button--primary" id="download-pay" data-goatcounter-click>Pay What You Can</a>
551 574
       <a href="https://github.com/sponsors/alemart" target="_blank" class="md-button" id="download-sponsor" data-goatcounter-click>Sponsor on GitHub</a>

Laddar…
Avbryt
Spara