forked from shaunnetherby/inf-action-card
-
Notifications
You must be signed in to change notification settings - Fork 0
/
inf-action-card.html
93 lines (84 loc) · 2.9 KB
/
inf-action-card.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
<!--
`inf-action-card` is a polymer element with an animated popup.
<inf-action-card></inf-action-card>
@group Infusionsoft Elements
@element inf-action-card
@homepage http://github.com/infusionsoft/inf-action-card/
-->
<link rel="import" href="../polymer/polymer.html"/>
<link rel="import" href="../core-icon/core-icon.html" />
<link rel="import" href="../core-icons/core-icons.html" />
<link rel="import" href="../core-animated-pages/core-animated-pages.html" />
<link rel="import" href="../core-animated-pages/transitions/slide-up.html" />
<link rel="import" href="../core-animated-pages/transitions/cross-fade.html" />
<link rel="import" href="../paper-button/paper-button.html" />
<polymer-element name="inf-action-card" on-mouseenter="{{ showBack }}" on-mouseleave="{{ showFront }}">
<template>
<style>
:host {
background-color: #fff;
border: 1px solid #ddd;
border-radius: 3px;
box-shadow: 0 2px 3px -1px rgba(0,0,0,0.1);
display: block;
margin: 10px;
overflow: hidden;
position: relative;
text-align: center;
width: 226px;
height: 190px;
}
h1 {
margin-top: 30px;
font-size: 15px;
font-weight: 700;
}
#icon {
height: 80px;
width: 80px;
}
paper-button {
background-color: #51A3DC;
color: #FFF;
border: 1px solid #125079;
}
</style>
<core-animated-pages id="pages" transitions="slide-up cross-fade" selected="0">
<section>
<div id="cardFront" cross-fade>
<h1>Get Checked</h1>
<core-icon id="icon" icon="check"></core-icon>
</div>
</section>
<section>
<div id="cardBack" slide-up>
<p>Review the navigation, learn where to find help and jump into Infusionsoft.</p>
<paper-button id="button">Select</paper-button>
</div>
</section>
</core-animated-pages>
</template>
<script>
(function() {
"use strict";
Polymer({
/**
* Animates the back of the card open.
*
* @method showBack
*/
showBack: function() {
this.$.pages.selected = 1;
},
/**
* Animates the front of the card open.
*
* @method showFront
*/
showFront: function() {
this.$.pages.selected = 0;
}
});
})();
</script>
</polymer-element>