Parcourir la source

Update pages

customisations
alemart il y a 9 mois
Parent
révision
496f7015d5

+ 19
- 17
demos/assets/demo.css Voir le fichier

@@ -16,7 +16,7 @@ body {
16 16
     z-index: 0;
17 17
 }
18 18
 
19
-#about, #sponsor {
19
+#info, #like {
20 20
     position: absolute;
21 21
     width: 64px;
22 22
     height: 64px;
@@ -35,36 +35,38 @@ body {
35 35
     border-radius: 64px;
36 36
 }
37 37
 
38
-#about:active, #about:focus, #sponsor:active, #sponsor:focus {
38
+#info:active, #info:focus, #like:active, #like:focus {
39 39
     background-color: #ffd500;
40 40
     border-color: #ffd500;
41 41
     opacity: 1.0;
42 42
 }
43 43
 
44
-#about {
45
-    top: 24px;
46
-    right: 24px;
44
+#info {
45
+    bottom: 24px;
46
+    left: 24px;
47 47
     background-image: url(../assets/info.svg);
48 48
 }
49 49
 
50
-#sponsor {
51
-    top: calc(50% - 32px);
50
+#like {
51
+    top: 24px;
52 52
     right: 24px;
53 53
     background-image: url(../assets/heart.svg);
54 54
 }
55 55
 
56 56
 @media screen and (orientation: portrait) {
57
-    #about {
58
-        left: 24px;
57
+
58
+    #like {
59
+        top: unset;
60
+        right: unset;
59 61
         bottom: 24px;
60
-        top: initial;
61
-        right: initial;
62
+        left: 24px;
62 63
     }
63 64
 
64
-    #sponsor {
65
-        left: calc(50% - 32px);
66
-        bottom: 24px;
67
-        top: initial;
68
-        right: initial;
65
+    #info {
66
+        top: 24px;
67
+        right: 24px;
68
+        bottom: unset;
69
+        left: unset;
69 70
     }
70
-}
71
+
72
+}

+ 57
- 0
demos/assets/heart-fill.svg Voir le fichier

@@ -0,0 +1,57 @@
1
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+<svg
3
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
4
+   xmlns:cc="http://creativecommons.org/ns#"
5
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
6
+   xmlns:svg="http://www.w3.org/2000/svg"
7
+   xmlns="http://www.w3.org/2000/svg"
8
+   id="svg954"
9
+   version="1.1"
10
+   fill="none"
11
+   viewBox="0 0 24 24"
12
+   height="800px"
13
+   width="800px">
14
+  <metadata
15
+     id="metadata960">
16
+    <rdf:RDF>
17
+      <cc:Work
18
+         rdf:about="">
19
+        <dc:format>image/svg+xml</dc:format>
20
+        <dc:type
21
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
22
+        <dc:title></dc:title>
23
+      </cc:Work>
24
+    </rdf:RDF>
25
+  </metadata>
26
+  <defs
27
+     id="defs958">
28
+    <marker
29
+       style="overflow:visible"
30
+       id="marker2126"
31
+       refX="0.0"
32
+       refY="0.0"
33
+       orient="auto">
34
+      <path
35
+         transform="scale(0.8) translate(12.5,0)"
36
+         style="fill-rule:evenodd;stroke:none;stroke-width:1pt;stroke-opacity:1;fill:#c6afe9;fill-opacity:1"
37
+         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
38
+         id="path2124" />
39
+    </marker>
40
+    <marker
41
+       style="overflow:visible"
42
+       id="Arrow1Lstart"
43
+       refX="0.0"
44
+       refY="0.0"
45
+       orient="auto">
46
+      <path
47
+         transform="scale(0.8) translate(12.5,0)"
48
+         style="fill-rule:evenodd;stroke:none;stroke-width:1pt;stroke-opacity:1;fill:#c6afe9;fill-opacity:1"
49
+         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
50
+         id="path1842" />
51
+    </marker>
52
+  </defs>
53
+  <path
54
+     id="rect1653"
55
+     d="M 6.6710895,7.2355654 C 5.1981979,8.7084569 5.1959125,11.3015 6.6660458,12.77165 l 7.01e-5,7.1e-5 1.4816465,1.481647 0.4971935,0.497192 2.4384081,2.495258 c 0.811316,0.830231 1.06423,0.829012 1.87679,0 l 2.39495,-2.495258 0.497193,-0.497192 1.481645,-1.481647 C 18.804078,11.301583 18.801824,8.7084859 17.328842,7.2355679 15.855936,5.7626627 13.470144,5.7603936 12,7.2305279 v 0 C 10.529896,5.7603945 8.1440775,5.7626482 6.6711594,7.2354902 Z"
56
+     style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.82013667;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
57
+</svg>

+ 37
- 6
demos/assets/poster.css Voir le fichier

@@ -37,10 +37,10 @@ body {
37 37
     height: auto;
38 38
 }
39 39
 
40
-#back {
40
+#get {
41 41
     position: fixed;
42 42
     top: 24px;
43
-    right: 24px;
43
+    left: 24px;
44 44
     padding: 16px;
45 45
     color: rgb(184, 98, 184);
46 46
     background-color: white;
@@ -53,13 +53,12 @@ body {
53 53
     transition: transform 0.25s;
54 54
 }
55 55
 
56
-#back:visited {
56
+#get:any-link {
57 57
     color: rgb(184, 98, 184);
58 58
 }
59 59
 
60
-#back:active, #back:hover {
61
-    color: rgb(184, 98, 184);
62
-    transform: scale(1.1);
60
+#get:hover {
61
+    transform: scale(1.0625);
63 62
 }
64 63
 
65 64
 #prev, #next {
@@ -100,4 +99,36 @@ body {
100 99
 
101 100
 #next::before {
102 101
     content: "\276F";
102
+}
103
+
104
+
105
+#like {
106
+    position: fixed;
107
+    top: 24px;
108
+    right: 24px;
109
+    width: 64px;
110
+    height: 64px;
111
+    padding: 0;
112
+    color: rgb(184, 98, 184);
113
+    background-color: white;
114
+    border: 0;
115
+    border-radius: 32px;
116
+    font-family: sans-serif;
117
+    font-size: 1.25em;
118
+    font-weight: bold;
119
+    text-decoration: underline;
120
+    transition: transform 0.25s;
121
+}
122
+
123
+#like:hover {
124
+    transform: scale(1.0625);
125
+}
126
+
127
+#like i {
128
+    display: inline-block;
129
+    width: 100%;
130
+    height: 100%;
131
+    background-color: rgb(184, 98, 184);
132
+    mask: url(../assets/heart-fill.svg) 0 0/64px 64px;
133
+    -webkit-mask: url(../assets/heart-fill.svg) 0 0/64px 64px;
103 134
 }

+ 18
- 11
demos/assets/poster.js Voir le fichier

@@ -14,21 +14,28 @@ function changeImage(direction)
14 14
 
15 15
 document.addEventListener('DOMContentLoaded', function() {
16 16
 
17
-    const prev = document.getElementById('prev');
18
-    const next = document.getElementById('next');
19
-
20 17
     const arImages = (document.body.dataset.arImages || DEFAULT_IMAGE).split(';');
21 18
     paths.push.apply(paths, arImages);
22 19
     changeImage(0);
23 20
 
24
-    if(!prev || !next)
25
-        return;
26
-
27
-    prev.addEventListener('click', function() { changeImage(-1); });
28
-    next.addEventListener('click', function() { changeImage(+1); });
29
-
30
-    if(paths.length < 2)
31
-        prev.hidden = next.hidden = true;
21
+    const prev = document.getElementById('prev');
22
+    const next = document.getElementById('next');
23
+    if(prev && next) {
24
+        prev.addEventListener('click', function() { changeImage(-1); });
25
+        next.addEventListener('click', function() { changeImage(+1); });
26
+
27
+        if(paths.length < 2)
28
+            prev.hidden = next.hidden = true;
29
+    }
30
+
31
+    document.querySelectorAll('a').forEach(function(a) {
32
+        a.addEventListener('click', function() {
33
+            window.goatcounter && window.goatcounter.count({
34
+                path: function(p) { return a.id + '-' + p; },
35
+                event: true,
36
+            });
37
+        });
38
+    });
32 39
 
33 40
 });
34 41
 

+ 2
- 2
demos/hello-aframe/index.html Voir le fichier

@@ -57,10 +57,10 @@
57 57
                 <ar-hud>
58 58
 
59 59
                     <!-- The about button -->
60
-                    <a id="about" href="NOTICE.html" draggable="false"></a>
60
+                    <a id="info" href="NOTICE.html" draggable="false"></a>
61 61
 
62 62
                     <!-- The sponsor button -->
63
-                    <a id="sponsor" href="https://github.com/sponsors/alemart" draggable="false"></a>
63
+                    <a id="like" href="../assets/promo.html" draggable="false"></a>
64 64
 
65 65
                     <!-- The scan gimmick -->
66 66
                     <a-entity ar-scan-gimmick="opacity: 0.75"></a-entity>

+ 3
- 2
demos/hello-aframe/poster.html Voir le fichier

@@ -12,13 +12,14 @@
12 12
     </head>
13 13
     <body data-ar-images="mage.webp;cat.webp">
14 14
         <nav>
15
+            <a id="get" href="https://alemart.github.io/encantar-js/download" target="_blank" rel="external">Get encantar.js</a>
16
+            <a id="like" href="../assets/promo.html" target="_blank"><i></i></a>
15 17
             <a id="prev" href="#"></a>
16 18
             <a id="next" href="#"></a>
17
-            <a id="back" href="https://alemart.github.io/encantar-js/download" target="_blank" rel="external">Get encantar.js</a>
18 19
         </nav>
19 20
         <section id="qr-code-area">
20 21
             <h4>QR code</h4>
21
-            <a href="index.html" target="_blank"><img id="qr-code" src="qr-code.gif" alt="QR code"></a>
22
+            <a id="video-preview" href="video.html" target="_blank"><img id="qr-code" src="../hello-babylon/qr-code.gif" alt="QR code"></a>
22 23
             <small>Scan to begin!</small>
23 24
         </section>
24 25
     </body>

+ 2
- 2
demos/hello-aframe/video.html Voir le fichier

@@ -57,10 +57,10 @@
57 57
                 <ar-hud>
58 58
 
59 59
                     <!-- The about button -->
60
-                    <a id="about" href="NOTICE.html" draggable="false"></a>
60
+                    <a id="info" href="NOTICE.html" draggable="false"></a>
61 61
 
62 62
                     <!-- The sponsor button -->
63
-                    <a id="sponsor" href="https://github.com/sponsors/alemart" draggable="false"></a>
63
+                    <a id="like" href="../assets/promo.html" draggable="false"></a>
64 64
 
65 65
                     <!-- The scan gimmick -->
66 66
                     <a-entity ar-scan-gimmick="opacity: 0.75"></a-entity>

+ 2
- 2
demos/hello-babylon/index.html Voir le fichier

@@ -15,8 +15,8 @@
15 15
     <body>
16 16
         <div id="ar-viewport">
17 17
             <div id="ar-hud" hidden>
18
-                <a id="about" href="NOTICE.html" draggable="false"></a>
19
-                <a id="sponsor" href="https://github.com/sponsors/alemart" draggable="false"></a>
18
+                <a id="info" href="NOTICE.html" draggable="false"></a>
19
+                <a id="like" href="../assets/promo.html" draggable="false"></a>
20 20
                 <img id="scan" src="../assets/scan.png" draggable="false">
21 21
             </div>
22 22
         </div>

+ 3
- 2
demos/hello-babylon/poster.html Voir le fichier

@@ -12,13 +12,14 @@
12 12
     </head>
13 13
     <body data-ar-images="mage.webp;cat.webp">
14 14
         <nav>
15
+            <a id="get" href="https://alemart.github.io/encantar-js/download" target="_blank" rel="external">Get encantar.js</a>
16
+            <a id="like" href="../assets/promo.html" target="_blank"><i></i></a>
15 17
             <a id="prev" href="#"></a>
16 18
             <a id="next" href="#"></a>
17
-            <a id="back" href="https://alemart.github.io/encantar-js/download" target="_blank" rel="external">Get encantar.js</a>
18 19
         </nav>
19 20
         <section id="qr-code-area">
20 21
             <h4>QR code</h4>
21
-            <a href="index.html" target="_blank"><img id="qr-code" src="qr-code.gif" alt="QR code"></a>
22
+            <a id="video-preview" href="video.html" target="_blank"><img id="qr-code" src="../hello-babylon/qr-code.gif" alt="QR code"></a>
22 23
             <small>Scan to begin!</small>
23 24
         </section>
24 25
     </body>

+ 2
- 2
demos/hello-babylon/video.html Voir le fichier

@@ -15,8 +15,8 @@
15 15
     <body>
16 16
         <div id="ar-viewport">
17 17
             <div id="ar-hud" hidden>
18
-                <a id="about" href="NOTICE.html" draggable="false"></a>
19
-                <a id="sponsor" href="https://github.com/sponsors/alemart" draggable="false"></a>
18
+                <a id="info" href="NOTICE.html" draggable="false"></a>
19
+                <a id="like" href="../assets/promo.html" draggable="false"></a>
20 20
                 <img id="scan" src="../assets/scan.png" draggable="false">
21 21
             </div>
22 22
         </div>

+ 2
- 2
demos/hello-three/index.html Voir le fichier

@@ -14,8 +14,8 @@
14 14
     <body>
15 15
         <div id="ar-viewport">
16 16
             <div id="ar-hud" hidden>
17
-                <a id="about" href="NOTICE.html" draggable="false"></a>
18
-                <a id="sponsor" href="https://github.com/sponsors/alemart" draggable="false"></a>
17
+                <a id="info" href="NOTICE.html" draggable="false"></a>
18
+                <a id="like" href="../assets/promo.html" draggable="false"></a>
19 19
                 <img id="scan" src="../assets/scan.png" draggable="false">
20 20
             </div>
21 21
         </div>

+ 3
- 2
demos/hello-three/poster.html Voir le fichier

@@ -12,13 +12,14 @@
12 12
     </head>
13 13
     <body data-ar-images="mage.webp;cat.webp">
14 14
         <nav>
15
+            <a id="get" href="https://alemart.github.io/encantar-js/download" target="_blank" rel="external">Get encantar.js</a>
16
+            <a id="like" href="../assets/promo.html" target="_blank"><i></i></a>
15 17
             <a id="prev" href="#"></a>
16 18
             <a id="next" href="#"></a>
17
-            <a id="back" href="https://alemart.github.io/encantar-js/download" target="_blank" rel="external">Get encantar.js</a>
18 19
         </nav>
19 20
         <section id="qr-code-area">
20 21
             <h4>QR code</h4>
21
-            <a href="index.html" target="_blank"><img id="qr-code" src="qr-code.gif" alt="QR code"></a>
22
+            <a id="video-preview" href="video.html" target="_blank"><img id="qr-code" src="../hello-babylon/qr-code.gif" alt="QR code"></a>
22 23
             <small>Scan to begin!</small>
23 24
         </section>
24 25
     </body>

+ 2
- 2
demos/hello-three/video.html Voir le fichier

@@ -14,8 +14,8 @@
14 14
     <body>
15 15
         <div id="ar-viewport">
16 16
             <div id="ar-hud" hidden>
17
-                <a id="about" href="NOTICE.html" draggable="false"></a>
18
-                <a id="sponsor" href="https://github.com/sponsors/alemart" draggable="false"></a>
17
+                <a id="info" href="NOTICE.html" draggable="false"></a>
18
+                <a id="like" href="../assets/promo.html" draggable="false"></a>
19 19
                 <img id="scan" src="../assets/scan.png" draggable="false">
20 20
             </div>
21 21
         </div>

+ 2
- 2
demos/hello-webgl/index.html Voir le fichier

@@ -11,8 +11,8 @@
11 11
     <body>
12 12
         <div id="ar-viewport">
13 13
             <div id="ar-hud" hidden>
14
-                <a id="about" href="NOTICE.html" draggable="false"></a>
15
-                <a id="sponsor" href="https://github.com/sponsors/alemart" draggable="false"></a>
14
+                <a id="info" href="NOTICE.html" draggable="false"></a>
15
+                <a id="like" href="../assets/promo.html" draggable="false"></a>
16 16
                 <img id="scan" src="../assets/scan.png" draggable="false">
17 17
             </div>
18 18
         </div>

+ 3
- 2
demos/hello-webgl/poster.html Voir le fichier

@@ -12,13 +12,14 @@
12 12
     </head>
13 13
     <body data-ar-images="my-reference-image.webp">
14 14
         <nav>
15
+            <a id="get" href="https://alemart.github.io/encantar-js/download" target="_blank" rel="external">Get encantar.js</a>
16
+            <a id="like" href="../assets/promo.html" target="_blank"><i></i></a>
15 17
             <a id="prev" href="#"></a>
16 18
             <a id="next" href="#"></a>
17
-            <a id="back" href="https://alemart.github.io/encantar-js/download" target="_blank" rel="external">Get encantar.js</a>
18 19
         </nav>
19 20
         <section id="qr-code-area">
20 21
             <h4>QR code</h4>
21
-            <a href="index.html" target="_blank"><img id="qr-code" src="qr-code.gif" alt="QR code"></a>
22
+            <a id="video-preview" href="video.html" target="_blank"><img id="qr-code" src="../hello-babylon/qr-code.gif" alt="QR code"></a>
22 23
             <small>Scan to begin!</small>
23 24
         </section>
24 25
     </body>

+ 2
- 2
demos/hello-webgl/video.html Voir le fichier

@@ -11,8 +11,8 @@
11 11
     <body>
12 12
         <div id="ar-viewport">
13 13
             <div id="ar-hud" hidden>
14
-                <a id="about" href="NOTICE.html" draggable="false"></a>
15
-                <a id="sponsor" href="https://github.com/sponsors/alemart" draggable="false"></a>
14
+                <a id="info" href="NOTICE.html" draggable="false"></a>
15
+                <a id="like" href="../assets/promo.html" draggable="false"></a>
16 16
                 <img id="scan" src="../assets/scan.png" draggable="false">
17 17
             </div>
18 18
         </div>

+ 2
- 2
demos/hello-world/index.html Voir le fichier

@@ -11,8 +11,8 @@
11 11
     <body>
12 12
         <div id="ar-viewport">
13 13
             <div id="ar-hud" hidden>
14
-                <a id="about" href="NOTICE.html" draggable="false"></a>
15
-                <a id="sponsor" href="https://github.com/sponsors/alemart" draggable="false"></a>
14
+                <a id="info" href="NOTICE.html" draggable="false"></a>
15
+                <a id="like" href="../assets/promo.html" draggable="false"></a>
16 16
                 <img id="scan" src="../assets/scan.png" draggable="false">
17 17
             </div>
18 18
         </div>

+ 3
- 2
demos/hello-world/poster.html Voir le fichier

@@ -12,13 +12,14 @@
12 12
     </head>
13 13
     <body data-ar-images="mage.webp;cat.webp">
14 14
         <nav>
15
+            <a id="get" href="https://alemart.github.io/encantar-js/download" target="_blank" rel="external">Get encantar.js</a>
16
+            <a id="like" href="../assets/promo.html" target="_blank"><i></i></a>
15 17
             <a id="prev" href="#"></a>
16 18
             <a id="next" href="#"></a>
17
-            <a id="back" href="https://alemart.github.io/encantar-js/download" target="_blank" rel="external">Get encantar.js</a>
18 19
         </nav>
19 20
         <section id="qr-code-area">
20 21
             <h4>QR code</h4>
21
-            <a href="index.html" target="_blank"><img id="qr-code" src="qr-code.gif" alt="QR code"></a>
22
+            <a id="video-preview" href="video.html" target="_blank"><img id="qr-code" src="../hello-babylon/qr-code.gif" alt="QR code"></a>
22 23
             <small>Scan to begin!</small>
23 24
         </section>
24 25
     </body>

+ 2
- 2
demos/hello-world/video.html Voir le fichier

@@ -11,8 +11,8 @@
11 11
     <body>
12 12
         <div id="ar-viewport">
13 13
             <div id="ar-hud" hidden>
14
-                <a id="about" href="NOTICE.html" draggable="false"></a>
15
-                <a id="sponsor" href="https://github.com/sponsors/alemart" draggable="false"></a>
14
+                <a id="info" href="NOTICE.html" draggable="false"></a>
15
+                <a id="like" href="../assets/promo.html" draggable="false"></a>
16 16
                 <img id="scan" src="../assets/scan.png" draggable="false">
17 17
             </div>
18 18
         </div>

+ 2
- 2
demos/pointer-demo/index.html Voir le fichier

@@ -11,8 +11,8 @@
11 11
     <body>
12 12
         <div id="ar-viewport">
13 13
             <div id="ar-hud" hidden>
14
-                <a id="about" href="NOTICE.html" draggable="false"></a>
15
-                <a id="sponsor" href="https://github.com/sponsors/alemart" draggable="false"></a>
14
+                <a id="info" href="NOTICE.html" draggable="false"></a>
15
+                <a id="like" href="../assets/promo.html" draggable="false"></a>
16 16
             </div>
17 17
         </div>
18 18
     </body>

+ 3
- 2
demos/pointer-demo/poster.html Voir le fichier

@@ -12,13 +12,14 @@
12 12
     </head>
13 13
     <body data-ar-images="mage.webp">
14 14
         <nav>
15
+            <a id="get" href="https://alemart.github.io/encantar-js/download" target="_blank" rel="external">Get encantar.js</a>
16
+            <a id="like" href="../assets/promo.html" target="_blank"><i></i></a>
15 17
             <a id="prev" href="#"></a>
16 18
             <a id="next" href="#"></a>
17
-            <a id="back" href="https://alemart.github.io/encantar-js/download" target="_blank" rel="external">Get encantar.js</a>
18 19
         </nav>
19 20
         <section id="qr-code-area">
20 21
             <h4>QR code</h4>
21
-            <a href="index.html" target="_blank"><img id="qr-code" src="qr-code.gif" alt="QR code"></a>
22
+            <a id="video-preview" href="index.html" target="_blank"><img id="qr-code" src="../hello-babylon/qr-code.gif" alt="QR code"></a>
22 23
             <small>Scan to begin!</small>
23 24
         </section>
24 25
     </body>

Chargement…
Annuler
Enregistrer