-
Notifications
You must be signed in to change notification settings - Fork 4
/
social-link.html
85 lines (74 loc) · 3.22 KB
/
social-link.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
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="social-link-behavior.html">
<link rel="import" href="social-links.html">
<!--
`social-link`
@demo demo/index.html
-->
<dom-module id="social-link">
<template>
<style>
:host {
display: inline-block;
}
</style>
<template is="dom-if" if="{{_isNetwork(network,'twitter')}}">
<twitter-link href="[[href]]" text="[[text]]" color="[[color]]" height="[[height]]"></twitter-link>
</template>
<template is="dom-if" if="{{_isNetwork(network,'facebook')}}">
<facebook-link href="[[href]]" text="[[text]]" color="[[color]]" height="[[height]]"></facebook-link>
</template>
<template is="dom-if" if="{{_isNetwork(network,'linkedin')}}">
<linkedin-link href="[[href]]" text="[[text]]" color="[[color]]" height="[[height]]"></linkedin-link>
</template>
<template is="dom-if" if="{{_isNetwork(network,'email')}}">
<email-link href="[[href]]" text="[[text]]" color="[[color]]" height="[[height]]"></email-link>
</template>
<template is="dom-if" if="{{_isNetwork(network,'behance')}}">
<behance-link href="[[href]]" text="[[text]]" color="[[color]]" height="[[height]]"></behance-link>
</template>
<template is="dom-if" if="{{_isNetwork(network,'youtube')}}">
<youtube-link href="[[href]]" text="[[text]]" color="[[color]]" height="[[height]]"></youtube-link>
</template>
<template is="dom-if" if="{{_isNetwork(network,'skype')}}">
<skype-link href="[[href]]" text="[[text]]" color="[[color]]" height="[[height]]"></skype-link>
</template>
<template is="dom-if" if="{{_isNetwork(network,'vimeo')}}">
<vimeo-link href="[[href]]" text="[[text]]" color="[[color]]" height="[[height]]"></vimeo-link>
</template>
<template is="dom-if" if="{{_isNetwork(network,'pinterest')}}">
<pinterest-link href="[[href]]" text="[[text]]" color="[[color]]" height="[[height]]"></pinterest-link>
</template>
<template is="dom-if" if="{{_isNetwork(network,'github')}}">
<github-link href="[[href]]" text="[[text]]" color="[[color]]" height="[[height]]"></github-link>
</template>
<template is="dom-if" if="{{_isNetwork(network,'instagram')}}">
<instagram-link href="[[href]]" text="[[text]]" color="[[color]]" height="[[height]]"></instagram-link>
</template>
<template is="dom-if" if="{{_isNetwork(network,'dribbble')}}">
<dribbble-link href="[[href]]" text="[[text]]" color="[[color]]" height="[[height]]"></dribbble-link>
</template>
<template is="dom-if" if="{{_isNetwork(network,'convoo')}}">
<convoo-link href="[[href]]" text="[[text]]" color="[[color]]" height="[[height]]"></convoo-link>
</template>
<template is="dom-if" if="{{_isNetwork(network,'snapchat')}}">
<snapchat-link href="[[href]]" text="[[text]]" color="[[color]]" height="[[height]]"></snapchat-link>
</template>
</template>
<script>
Polymer({
is: 'social-link',
behaviors: [
SocialLinkBehavior
],
properties: {
network: {
type: String
}
},
_isNetwork: function(thisNetwork,network){
return thisNetwork == network;
}
});
</script>
</dom-module>