-
Notifications
You must be signed in to change notification settings - Fork 17
/
google-slide-author.html
74 lines (64 loc) · 1.34 KB
/
google-slide-author.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
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../iron-flex-layout/classes/iron-flex-layout.html">
<!--
A social card with information for your talk.
##### Example
<google-slide-author
avatar="resources/images/addy.jpg"
twitter="@addyosmani"
plus="+AddyOsmani">
</google-slide-author>
@element google-slide-author.
@blurb A social card with information for your talk.
-->
<dom-module id="google-slide-author">
<style>
:host {
display: block;
}
:host .twitter {
font-size: 0.8em;
}
:host .plus {
line-height: 40px;
}
:host img {
border: 5px solid gray;
width: 90px;
border-radius: 50%;
margin: 25px;
}
</style>
<template>
<div class="layout horizontal">
<div>
<template is="dom-if" if="{{_ifAvatar(avatar)}}">
<img src="{{avatar}}">
</template>
</div>
<div class="flex">
<p class="plus">[[plus]]</p>
<p class="twitter">[[twitter]]</p>
</div>
</div>
</template>
<script>
Polymer({
is: 'google-slide-author',
properties: {
avatar: {
type: String
},
plus: {
type: String
},
twitter: {
type: String
}
},
_ifAvatar: function (avatar) {
return avatar.length > 0;
}
});
</script>
</dom-module>