-
Notifications
You must be signed in to change notification settings - Fork 11
/
infinite-scroll.html
115 lines (115 loc) · 2.77 KB
/
infinite-scroll.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
<!doctype html>
<!--
Copyright 2013 The Polymer Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<html>
<head>
<title>infinite-scroll</title>
<script src="bower_components/platform/platform.js"></script>
<meta name="viewport" content="width=device-width, user-scalable=no">
<link rel="import" href="app-widgets.html">
<script src="data.js"></script>
<style>
html {
height: 100%;
}
body {
display: block;
height: 100%;
margin: 0;
}
#container {
height: 100%;
margin: 0;
}
.item {
-webkit-transform: translate3d(0,0,0);
box-sizing: border-box;
overflow: hidden;
background-color: white;
}
.conversation {
font-family: sans-serif;
height: 70px;
display: flex;
border-bottom: 1px solid lightgray;
}
.avatar {
display: flex;
flex-shrink: 0;
color: white;
align-items: center;
justify-content: center;
font-size: 40px;
width: 50px;
height: 50px;
margin: 10px;
background-color: lightblue;
}
.summary {
flex: 1;
flex-shrink: 0;
display: flex;
flex-direction: column;
padding: 10px 10px 10px 0px;
}
.topline {
display: flex;
flex-shrink: 0;
}
.participants {
flex: 1;
flex-shrink: 0;
font-weight: bold;
}
.time {
flex-shrink: 0;
font-size: 12px;
color: #444;
}
.bottomline {
flex-shrink: 0;
display: flex;
}
.preview {
flex: 1;
flex-shrink: 0;
font-size: 12px;
height: 2em;
text-overflow: ellipsis;
}
.subject {
font-weight: bold;
}
.snippet {
color: #444;
}
.trinkets {
flex-shrink: 0;
font-size: 20px;
}
</style>
</head>
<body>
<app-list id="container">
<template repeat>
<div class="item conversation">
<div class="avatar" style="background-color: {{ avatarColor }}">{{ avatarLetter }}</div>
<div class="summary">
<div class="topline">
<div class="participants">{{ participants }}</div>
<div class="time">{{ time }}</div>
</div>
<div class="bottomline">
<div class="preview"><span class="subject">{{ subject }}</span> —
<span class="snippet">{{ snippet }}</span></div>
<div class="trinkets">☆</div>
</div>
</div>
</div>
</template>
</app-list>
</body>
</html>