-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathindex.html
454 lines (436 loc) · 16.9 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="author" content="steelydylan">
<meta property="og:type" content="website">
<meta property="og:site_name" content="ScrollHint">
<meta property="og:title" content="ScrollHint">
<meta property="og:description" content="A JavaScript library to suggest that the elements are scrollable horizontally, with the pointer icon.">
<meta property="og:url" content="https://appleple.github.io/scroll-hint/">
<meta property="og:image" content="https://appleple.github.io/scroll-hint/images/screenshot.png">
<meta name="twitter:site" content="ScrollHint">
<meta name="twitter:creator" content="@appleplecom">
<meta name="twitter:url" content="https://appleple.github.io/scroll-hint/">
<meta name="twitter:title" content="ScrollHint">
<meta name="twitter:description" content="A JavaScript library to suggest that the elements are scrollable horizontally, with the pointer icon.">
<meta name="twitter:card" content="summary">
<meta name="format-detection" content="telephone=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="">
<title>ScrollHint</title>
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN"
crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.0/normalize.min.css">
<link rel="stylesheet" href="https://kokushin.github.io/unim/dist/css/unim-product.css">
<link rel="stylesheet" href="https://kokushin.github.io/unim/dist/css/color-teal.css">
<link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://unpkg.com/scroll-hint@latest/css/scroll-hint.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<link rel="apple-touch-icon" sizes="57x57" href="https://appleple.github.io/scroll-hint/images/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="https://appleple.github.io/scroll-hint/images/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="https://appleple.github.io/scroll-hint/images/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="https://appleple.github.io/scroll-hint/images/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="https://appleple.github.io/scroll-hint/images/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="https://appleple.github.io/scroll-hint/images/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="https://appleple.github.io/scroll-hint/images/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="https://appleple.github.io/scroll-hint/images/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="https://appleple.github.io/scroll-hint/images/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="https://appleple.github.io/scroll-hint/images/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="https://appleple.github.io/scroll-hint/images/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="https://appleple.github.io/scroll-hint/images/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="https://appleple.github.io/scroll-hint/images/favicon-16x16.png">
<meta name="msapplication-TileImage" content="https://appleple.github.io/scroll-hint/images/ms-icon-144x144.png">
<script>hljs.initHighlightingOnLoad();</script>
<style>
@media (max-width: 767px) {
.unim-logo-box {
order: -1;
}
}
.unim-logo {
display: flex;
justify-content: center;
align-items: center;
width: 160px;
height: 160px;
background-color: #fff;
border-radius: 16px;
margin-left: auto;
margin-right: auto;
}
.unim-logo img {
width: 100%;
height: 100%;
}
.header .logo sup {
font-size: .875rem;
}
.hero-title {
font-size: 4rem;
line-height: 1;
}
@media (max-width: 767px) {
.hero-title {
font-size: 3.5rem;
}
}
.section-title {
font-size: 3rem;
}
table td,
table th{
white-space: nowrap;
}
.js-scrollable,
.js-scrollable-shadow {
max-width: 640px;
margin: 30px auto 0 auto;
}
.js-scrollable-shadow table {
background-color: transparent;
}
.scroll-hint.is-right-scrollable {
background: linear-gradient(270deg, rgba(0, 0, 0, .15) 0, rgba(0, 0, 0, 0) 16px, rgba(0, 0, 0, 0));
}
.scroll-hint.is-right-scrollable.is-left-scrollable {
background: linear-gradient(90deg, rgba(0, 0, 0, .15) 0, rgba(0, 0, 0, 0) 16px, rgba(0, 0, 0, 0)), linear-gradient(270deg, rgba(0, 0, 0, .15) 0, rgba(0, 0, 0, 0) 16px, rgba(0, 0, 0, 0));
}
.scroll-hint.is-left-scrollable {
background: linear-gradient(90deg, rgba(0, 0, 0, .15) 0, rgba(0, 0, 0, 0) 16px, rgba(0, 0, 0, 0));
}
</style>
</head>
<body>
<div class="hero" style="background-image:url(https://source.unsplash.com/pb_lF8VWaPU/1600x900)">
<header class="header is-bar is-fixed">
<div class="inner is-medium">
<h1 class="logo">ScrollHint</h1>
<div class="menu is-hide-small">
<a href="#quick-start">Quick Start</a>
<a href="#demo">Demo</a>
<a href="https://github.com/appleple/scroll-hint">GitHub</a>
<a href="https://github.com/appleple/scroll-hint/archive/master.zip" class="button is-small is-ghost">Download</a>
</div>
</div>
</header>
<div class="hero-content">
<div class="inner">
<div class="grid is-gutter is-middle is-col-2 is-col-small-1">
<div class="grid-cell">
<h2 class="hero-title">ScrollHint</h2>
<p class="hero-text">A JavaScript library to suggest that the elements are scrollable horizontally, with the pointer icon.</p>
<p class="hero-text">
<a href="https://github.com/appleple/scroll-hint/archive/master.zip" class="button" style="margin-right:10px;">Download</a>
<a href="https://github.com/appleple/scroll-hint" class="button"><i class="fa fa-github"></i>GitHub</a>
</p>
</div>
<div class="grid-cell is-col-fit unim-logo-box">
<div class="unim-logo is-shadow">
<img src="./images/logo_scrollHint01.svg">
</div>
</div>
</div>
</div>
</div>
</div>
<main class="main">
<div class="content">
<section class="section">
<div class="inner is-small">
<h2 id="quick-start">Quick start</h2>
<h3>Using CDN</h3>
<p>You can easily start by using CDN.</p>
<p>Add the following description in the
<code><head></code> tag of the web page you want to use ScrollHint.</p>
<pre><code class="html"><link rel="stylesheet" href="https://unpkg.com/scroll-hint@latest/css/scroll-hint.css">
<script src="https://unpkg.com/scroll-hint@latest/js/scroll-hint.min.js"></script></code></pre>
<p>You can also bundle the library with Browserify/Webpack</p>
<pre><code class="shell">npm install scroll-hint --save</code></pre>
<pre><code class="javascript">import ScrollHint from 'scroll-hint'</code></pre>
<p>Wrap the elements you want to apply ScrollSuggest like below</p>
<pre><code class="html"><div class="js-scrollable">
<table>
<thead>
<tr>
<th>Col1</th>
<th>Col2</th>
<th>Col3</th>
</tr>
</thead>
<tbody>
<tr>
<td>Lorem ipsum dolor sit.</td>
<td>Lorem ipsum dolor sit.</td>
<td>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Et, magnam.</td>
</tr>
</tbody>
</table>
</div></code></pre>
<p>Write the following script</p>
<pre><code class="js">new ScrollHint('.js-scrollable');</code></pre>
</div>
</section>
<section class="section">
<div class="inner is-small">
<h2 id="options">Options</h2>
<p>Some options are available when making new instances like below.</p>
<pre><code class="js">new ScrollHint('.js-scrollable', {
scrollHintIconAppendClass: 'scroll-hint-icon-white', // white-icon will appear
applyToParents: true,
i18n: {
scrollable: 'スクロールできます'
}
});</code></pre>
<p>For your reference, below is the list of the options available.</p>
<div class="js-scrollable">
<table class="table">
<tr>
<th style="text-align:left;">Name</th>
<th style="text-align:left;">Default</th>
<th style="text-align:left;">Description</th>
</tr>
<tr>
<td><code>suggestClass</code></td>
<td>is-active</td>
<td>Classname to be added when the element is scrolled-in</td>
</tr>
<tr>
<td><code>scrollableClass</code></td>
<td>is-scrollable</td>
<td>Classname to be added when the element is scrollable</td>
</tr>
<tr>
<td><code>scrollableRightClass</code></td>
<td>is-right-scrollable</td>
<td>Classname to be added when the element is right-scrollable</td>
</tr>
<tr>
<td><code>scrollableLeftClass</code></td>
<td>is-left-scrollable</td>
<td>Classname to be added when the element is left-scrollable</td>
</tr>
<tr>
<td><code>scrollHintClass</code></td>
<td>scroll-hint</td>
<td>Classname to be added to the element</td>
</tr>
<tr>
<td><code>scrollHintIconClass</code></td>
<td>scroll-hint-icon</td>
<td>Classname to be added to the icon</td>
</tr>
<tr>
<td><code>scrollHintIconAppendClass</code></td>
<td>scroll-hint-icon-white</td>
<td>Another classname to be added to the element's icon</td>
</tr>
<tr>
<td><code>scrollHintIconWrapClass</code></td>
<td>scroll-hint-icon-wrap</td>
<td>Classname to be added to the icon's wrapper</td>
</tr>
<tr>
<td><code>scrollHintText</code></td>
<td>scroll-hint-text</td>
<td>Classname to be added to the text</td>
</tr>
<tr>
<td><code>remainingTime</code></td>
<td>-1</td>
<td>When to hide scroll-hint icon (ms)</td>
</tr>
<tr>
<td><code>scrollHintBorderWidth</code></td>
<td>10</td>
<td>Shadowbox border width of the element</td>
</tr>
<tr>
<td><code>enableOverflowScrolling</code></td>
<td>true</td>
<td>When using iOS and the value is true,<br>
-webkit-overflow-scrolling property will be added to the element</td>
</tr>
<tr>
<td><code>suggestiveShadow</code></td>
<td>false</td>
<td>Show suggestive shadow, when the element is scrollable</td>
</tr>
<tr>
<td><code>applyToParents</code></td>
<td>false</td>
<td>Apply JavaScript to the parent element</td>
</tr>
<tr>
<td><code>offset</code></td>
<td>0</td>
<td>You can change criteria for scrollable.</td>
</tr>
<tr>
<td><code>i18n.scrollable</code></td>
<td>scrollable</td>
<td>You can change the scrollable text from here</td>
</tr>
</table>
</div>
</div>
</section>
<section class="section">
<div class="inner is-small">
<h2 id="demo">Demo</h2>
</div>
<div class="js-scrollable">
<table class="table">
<!-- <caption>Table</caption> -->
<thead>
<tr>
<th>Col1</th>
<th>Col2</th>
<th>Col3</th>
</tr>
</thead>
<tbody>
<tr>
<td>Lorem ipsum dolor sit.</td>
<td>Lorem ipsum dolor sit.</td>
<td>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Et, magnam.</td>
</tr>
<tr>
<td>Lorem ipsum dolor sit.</td>
<td>Lorem ipsum dolor sit.</td>
<td>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Et, magnam.</td>
</tr>
<tr>
<td>Lorem ipsum dolor sit.</td>
<td>Lorem ipsum dolor sit.</td>
<td>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Et, magnam.</td>
</tr>
<tr>
<td>Lorem ipsum dolor sit.</td>
<td>Lorem ipsum dolor sit.</td>
<td>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Et, magnam.</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>Tips.</td>
<td>Tips.</td>
<td>Tips.</td>
</tr>
</tfoot>
</table>
</div>
<div class="inner is-small" style="margin-top: 25px;">
<h3>Suggestive Shadow</h3>
<p>You can also show the shadow to suggest that the content is scrollable, with the code below.</p>
<pre><code class="js">new ScrollHint('.js-scrollable', {
suggestiveShadow: true
});</code></pre>
</div>
<div class="js-scrollable-shadow">
<table class="table">
<!-- <caption>Table</caption> -->
<thead>
<tr>
<th>Col1</th>
<th>Col2</th>
<th>Col3</th>
</tr>
</thead>
<tbody>
<tr>
<td>Lorem ipsum dolor sit.</td>
<td>Lorem ipsum dolor sit.</td>
<td>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Et, magnam.</td>
</tr>
<tr>
<td>Lorem ipsum dolor sit.</td>
<td>Lorem ipsum dolor sit.</td>
<td>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Et, magnam.</td>
</tr>
<tr>
<td>Lorem ipsum dolor sit.</td>
<td>Lorem ipsum dolor sit.</td>
<td>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Et, magnam.</td>
</tr>
<tr>
<td>Lorem ipsum dolor sit.</td>
<td>Lorem ipsum dolor sit.</td>
<td>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Et, magnam.</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>Tips.</td>
<td>Tips.</td>
<td>Tips.</td>
</tr>
</tfoot>
</table>
</div>
</section>
<section class="section" style="background-image:url(https://source.unsplash.com/pb_lF8VWaPU/1600x900)">
<div class="inner">
<div class="grid is-gutter is-middle is-center">
<div class="grid-cell">
<h2 style="margin:0">Join development on</h2>
</div>
<div class="grid-cell">
<a href="https://github.com/appleple/scroll-hint" class="button is-large is-primary">GitHub</a>
</div>
<div class="grid-cell">
<a href="https://github.com/appleple/scroll-hint/blob/master/LICENSE">License</a>
</div>
</div>
</div>
</section>
</div>
</main>
<footer class="footer is-bar">
<div class="inner">
<!-- <div class="menu is-list">
<div class="menu-group">
<strong>Data</strong>
<a href="#">Home</a>
<a href="#">Works</a>
<a href="#">Profile</a>
<a href="#">Contact</a>
</div>
<div class="menu-group">
<strong>Detail</strong>
<a href="#">Home</a>
<a href="#">Works</a>
<a href="#">Profile</a>
</div>
<div class="menu-group">
<strong>Heading</strong>
<a href="#">Home</a>
<a href="#">Works</a>
</div>
<div class="menu-group">
<strong>Body</strong>
<a href="#">Home</a>
<a href="#">Works</a>
<a href="#">Profile</a>
</div>
</div> -->
<div class="menu">
<a href="https://twitter.com/appleplecom">Twitter</a>
<a href="https://github.com/appleple/scroll-hint">GitHub</a>
</div>
<small class="copyright">© 2018 ScrollHint</small>
</div>
</footer>
<script src="https://kokushin.github.io/unim/dist/js/unim.js"></script>
<script src="https://unpkg.com/scroll-hint@latest/js/scroll-hint.js"></script>
<script>
new ScrollHint('.js-scrollable');
new ScrollHint('.js-scrollable-shadow', {
suggestiveShadow: true
});
</script>
</body>
</html>