forked from basic-web-components/basic-web-components
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcarouselWithTemplateDemo.html
94 lines (84 loc) · 3.02 KB
/
carouselWithTemplateDemo.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
<!-- <!DOCTYPE html> -->
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<title>Carousel with template</title>
<script src="../../bower_components/webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="../basic-arrow-direction/basic-arrow-direction.html">
<link rel="import" href="../basic-framed-content/basic-framed-content.html">
<link rel="import" href="basic-carousel-fit.html">
<style>
body,
button,
input {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 15px;
}
body {
margin: 0;
}
.emojiSlide {
-webkit-align-items: center;
align-items: center;
display: -webkit-flex;
display: flex;
-webkit-flex-direction: column;
flex-direction: column;
}
.emoji {
/*
* NOTE: Mobile Safari will not scale emoji above 16px.
* http://stackoverflow.com/questions/19702013/emojis-wont-scale-beyond-16px-font-size-on-ios-7
*/
font-size: 72px;
}
.description {
text-align: center;
width: 200px;
}
</style>
<script>
var emojis = [
{emoji: "😁", description: "Grinning face with smiling eyes" },
{emoji: "😂", description: "Face with tears of joy" },
{emoji: "😃", description: "Smiling face with open mouth" },
{emoji: "😄", description: "Smiling face with open mouth and smiling eyes" },
{emoji: "😅", description: "Smiling face with open mouth and cold sweat" },
{emoji: "😆", description: "Smiling face with open mouth and tightly-closed eyes" },
{emoji: "😉", description: "Winking face" },
{emoji: "😊", description: "Smiling face with smiling eyes" },
{emoji: "😋", description: "Face savouring delicious food" },
{emoji: "😌", description: "Relieved face" },
{emoji: "😍", description: "Smiling face with heart-shaped eyes" },
{emoji: "😏", description: "Smirking face" },
{emoji: "😒", description: "Unamused face" },
{emoji: "😓", description: "Face with cold sweat" },
{emoji: "😔", description: "Pensive face" },
{emoji: "😖", description: "Confounded face" },
{emoji: "😘", description: "Face throwing a kiss" },
{emoji: "😚", description: "Kissing face with closed eyes" }
];
document.addEventListener('WebComponentsReady', function() {
document.querySelector("#emojiRepeater").items = emojis;
document.body.removeAttribute('unresolved');
});
</script>
</head>
<body unresolved>
<basic-framed-content>
<basic-arrow-direction target="child" aria-label="Emoji">
<basic-carousel-fit id="emojiCarousel">
<template is="dom-repeat" id="emojiRepeater">
<div class="emojiSlide">
<div class="emoji">{{item.emoji}}</div>
<div class="description">{{item.description}}</div>
</div>
</template>
</basic-carousel-fit>
</basic-arrow-direction>
</basic-framed-content>
</body>
</html>