4
4
< head >
5
5
< meta charset ="UTF-8 ">
6
6
< meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
7
- < link href =" https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css " rel =" stylesheet " >
8
-
7
+
8
+ <!-- Primary Meta Tags -->
9
9
< title > Spotlight.js</ title >
10
+ < meta name ="title " content ="Spotlight.js ">
11
+ < meta name ="description "
12
+ content ="Interactive walkthroughs, key feature spotlights, in-app guidance, & additional resources to support users in navigating & understanding the product. ">
13
+ < meta name ="keywords "
14
+ content ="spotlight, popover, overlay, tour, walkthrough, product-tour, features-introduction, javascript-library ">
15
+ < meta name ="robots " content ="index, follow ">
16
+ < meta http-equiv ="Content-Type " content ="text/html; charset=utf-8 ">
17
+ < meta name ="language " content ="English ">
18
+ < meta name ="revisit-after " content ="15 days ">
19
+ < meta name ="author " content ="Tanish Raj ">
20
+
21
+ <!-- Open Graph / Facebook -->
22
+ < meta property ="og:type " content ="website " />
23
+ < meta property ="og:url " content ="https://cttricks.com/ " />
24
+ < meta property ="og:title " content ="Spotlight.js " />
25
+ < meta property ="og:description "
26
+ content ="Interactive walkthroughs, key feature spotlights, in-app guidance, & additional resources to support users in navigating & understanding the product. " />
27
+ < meta property ="og:image " content ="./docs/assets/img/spotlight-js-banner.png " />
28
+
10
29
< link rel ="icon " href ="./docs/assets/img/favicon.png ">
30
+ < link href ="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css " rel ="stylesheet ">
11
31
< link rel ="stylesheet " href ="./docs/assets/css/home.css ">
12
- <!-- TODO: Add Meta tags -->
32
+
33
+
13
34
</ head >
14
35
15
36
< body >
@@ -124,12 +145,13 @@ <h2>#Examples</h2>
124
145
</ div >
125
146
< p class ="mt-4 ">
126
147
Additional features are planned for future updates. If you have any suggestions, feel free to
127
- < a href ="https://github.com/cttricks/spotlight.js/discussions " target ="_blank "> start a discussion</ a > on our GitHub repository.
148
+ < a href ="https://github.com/cttricks/spotlight.js/discussions " target ="_blank "> start a discussion</ a > on our
149
+ GitHub repository.
128
150
</ p >
129
151
</ section >
130
152
131
153
< div class ="hr-line "> </ div >
132
-
154
+
133
155
< section class ="container-lg github-starts ">
134
156
< div class ="text-center ">
135
157
< h2 > Unlock the full potential of your web projects</ h2 >
@@ -182,51 +204,50 @@ <h2>Unlock the full potential of your web projects</h2>
182
204
</ footer >
183
205
184
206
< script src ="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.min.js "> </ script >
185
- <!-- <script type="module" src="./dist/spotlight.js" ></script> -->
186
207
187
208
< script type ="module ">
188
-
209
+
189
210
// Let's Start with
190
211
import { spotlight } from './dist/spotlight.min.js' ;
191
212
192
213
const Spotlight = await spotlight ( ) ;
193
214
194
215
// Event Handler
195
216
Spotlight . addEventListener ( 'exit' , ( e ) => {
196
- Spotlight . setCover ( { hex : '#000000' , alpha : 0.5 } ) ;
217
+ Spotlight . setCover ( { hex : '#000000' , alpha : 0.5 } ) ;
197
218
} ) ;
198
219
199
220
// Below codes are to handel the events of this page Only
200
221
document . querySelector ( 'footer span' ) . innerHTML += new Date ( ) . getFullYear ( ) ;
201
222
202
223
const handelButtonClickWithLinkAttr = ( e ) => {
203
- window . open ( ( e . getAttribute ( 'link' ) ?? '#' ) , ( e . getAttribute ( 'target' ) ?? '_self' ) ) ;
224
+ window . open ( ( e . getAttribute ( 'link' ) ?? '#' ) , ( e . getAttribute ( 'target' ) ?? '_self' ) ) ;
204
225
} ;
205
226
206
227
document . body . addEventListener ( 'click' , ( e ) => {
207
- if ( ( e . target . getAttribute ( 'type' ) ?? '' ) === 'link' ) return handelButtonClickWithLinkAttr ( e . target ) ;
208
-
228
+ if ( ( e . target . getAttribute ( 'type' ) ?? '' ) === 'link' ) return handelButtonClickWithLinkAttr ( e . target ) ;
229
+
209
230
let toggle = e . target . getAttribute ( 'data-style' ) ;
210
231
211
- if ( ! toggle ) return ;
212
- e . preventDefault ( ) ;
232
+ if ( ! toggle ) return ;
233
+ e . preventDefault ( ) ;
213
234
214
- switch ( toggle ) {
235
+ switch ( toggle ) {
215
236
case 'highlight-only' :
216
237
Spotlight . start ( { from : 3 , highlightOnly : true } ) ;
217
238
break ;
218
239
219
240
case 'confirm-before-exit' :
220
241
Spotlight . start ( { from : 3 , highlightOnly : true , confirmOnExit : true } ) ;
221
242
break ;
222
-
243
+
223
244
case 'change-overlay-color' :
224
- Spotlight . setCover ( { hex : '#bfff5c' , alpha : 0.5 } ) ;
245
+ Spotlight . setCover ( { hex : '#bfff5c' , alpha : 0.5 } ) ;
225
246
Spotlight . start ( { from : 3 , highlightOnly : true } ) ;
226
247
break ;
227
248
228
249
case 'popover-with-img' :
229
- Spotlight . start ( { from : 4 } ) ;
250
+ Spotlight . start ( { from : 4 } ) ;
230
251
break ;
231
252
232
253
case 'event-listener' :
@@ -236,7 +257,7 @@ <h2>Unlock the full potential of your web projects</h2>
236
257
default :
237
258
console . log ( `${ toggle } is not a toggle event` ) ;
238
259
}
239
-
260
+
240
261
} ) ;
241
262
242
263
</ script >
0 commit comments