Blame view

controllets/paper-card-controllet/paper-card-controllet.html 2.91 KB
1b49624d   isisadmin   paper-card-contro...
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
  <link rel="import" href="../../bower_components/paper-material/paper-material.html"/>

  <link rel="import" href="../../bower_components/paper-fab/paper-fab.html"/>

  <link rel="import" href="../../bower_components/iron-icons/iron-icons.html"/>

  

  

  <dom-module id="paper-card-controllet">

  

      <style>

          :host {

              color: #333;

              font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;

              display: inline-block;

              margin: 0 8px 8px ;

              font-size: 14px;

              text-align: justify;

              line-height: 10px;

              --paper-fab-background: var(--accent-color);

          }

  

          paper-material {

              border-radius: 2px;

              background-color: white;

          }

  

          .picture {

              position: relative;

              margin-bottom: 0px;

          }

          .picture img {

              border-top-right-radius: 2px;

              border-top-left-radius: 2px;

              width: 100%;

          }

          .legend {

              position: absolute;

              background: rgba(0,0,0,0.5);

              bottom: 0;

              color: white;

              height: 40px;

              padding: 0 16px;

              left: 0; right: 0;

          }

          paper-fab {

              position: absolute;

              right: 10px;

              bottom: -18px;

1b49624d   isisadmin   paper-card-contro...
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
94
95
96
97
98
99
100
101
102
103
              --paper-fab-background:#2196F3;

          }

  

          .content ::content {

              padding: 0 16px 8px;

              font-weight: 300;

              color: var(--secondary-text-color);

              line-height: 24px;

          }

          ::content.buttons {

              margin-top: 8px;

          }

          ::content paper-button, ::content paper-icon-button {

              font-weight: 500;

              color: var(--accent-color);

          }

  

      </style>

  

      <template>

          <paper-material elevation="{{elevation}}">

              <div class="vertical layout">

                  <div class="picture">

                      <img src="{{src}}">

                      <div class="horizontal layout center legend">

                          <span>{{legend}}</span>

                          <paper-fab mini icon="{{icon}}"></paper-fab>

                      </div>

                      </div>

                  </div>

                  <div class="content">

                      <p>{{text}}</p>

                  </div>

              </div>

          </paper-material>

      </template>

  

      <script>

          Polymer({

              is:'paper-card-controllet',

  

              properties: {

                  width: {

                      type: Number,

                      value: 350,

                      observer: "_changeWidth",

                  },

              },

              _changeWidth: function(data){

                  this.style.width = data + "px";

                  this.querySelector(".content").width = data + "px";

              },

          })

      </script>

  

  

  </dom-module>