-
Notifications
You must be signed in to change notification settings - Fork 3
/
post-list.html
executable file
·37 lines (33 loc) · 1.13 KB
/
post-list.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
<link rel="import" href="/components/polymer/polymer.html">
<link rel="import" href="/components/paper-input/paper-input.html">
<link rel="import" href="/post-service/post-service.html">
<link rel="import" href="post-card.html">
<polymer-element name="post-list" attributes="show">
<template>
<style>
:host {
display: block;
width: 100%;
}
post-card {
margin-bottom: 30px;
}
</style>
<post-service id="service" posts="{{posts}}"></post-service>
<div layout vertical center hidden?="{{show == 'none'}}">
<template repeat="{{post in posts}}">
<post-card
favorite="{{post.favorite}}"
on-favorite-tap="{{handleFavorite}}"
hidden?="{{show == 'favorites' && !post.favorite}}">
<img src="{{post.avatar}}" width="70" height="70">
<h2>{{post.username}}</h2>
<paper-input multiline floatinglabel rows="fit" label="Note #{{post.uid}}" inputValue="{{post.text}}"> </paper-input>
</post-card>
</template>
</div>
</template>
<script>
Polymer({});
</script>
</polymer-element>