-
Notifications
You must be signed in to change notification settings - Fork 0
/
xitij-news.html
61 lines (48 loc) · 1.28 KB
/
xitij-news.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
<link rel="import" href="bower_components/iron-flex-layout/iron-flex-layout-classes.html">
<dom-module id="xitij-news">
<template>
<style is="custom-style" include="iron-flex">
:host {
display: block;
}
.news-content {
background-color: rgba(255, 255, 255, 0.6);
width: 80%;
font-size: var(--text-size);
color: var(--text-color);
--paper-card-header-color: var(--primary-color);
margin-bottom: 10px;
}
/* Media queries */
@media (max-width: 600px) {
.news-content {
font-size: 17px;
line-height: 1.5em;
}
}
</style>
<firebase-document
id="newsDoc"
app-name="xitij16"
path="/news"
data="{{news}}">
</firebase-document>
<div class="layout vertical center">
<template is="dom-repeat" items="{{reverse(news)}}" as="news">
<paper-card heading="{{news.title}}" class="news-content">
<div class="card-content">
{{news.message}}
</div>
</paper-card>
</template>
</div>
</template>
<script>
Polymer({
is: 'xitij-news',
reverse: function (news) {
if (news.reverse) return news.reverse();
}
});
</script>
</dom-module>