Blame view

datalets/preview-datalet/preview-datalet.html 3.12 KB
035bbee3   Luigi Serra   Datalets and cont...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  <!--

  @license

      The MIT License (MIT)

  

      Copyright (c) 2015 Dipartimento di Informatica - Università di Salerno - Italy

  

      Permission is hereby granted, free of charge, to any person obtaining a copy

      of this software and associated documentation files (the "Software"), to deal

      in the Software without restriction, including without limitation the rights

      to use, copy, modify, merge, publish, distribute, sublicense, and/or sell

      copies of the Software, and to permit persons to whom the Software is

      furnished to do so, subject to the following conditions:

  

      The above copyright notice and this permission notice shall be included in

      all copies or substantial portions of the Software.

  

      THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

      IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,

      FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

      AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER

      LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,

      OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN

      THE SOFTWARE.

  -->

ae17a8dc   Luigi Serra   Controllet and da...
25
26
  

  <!--

950d181d   Luigi Serra   license updates
27
28
  * Developed by :

  * ROUTE-TO-PA Project - grant No 645860. - www.routetopa.eu

ae17a8dc   Luigi Serra   Controllet and da...
29
30
31
  *

  -->

  

035bbee3   Luigi Serra   Datalets and cont...
32
33
34
35
36
37
38
  <link rel="import" href="../base-datalet/base-datalet.html">

  

  <!--

  `preview-datalet` is a datalet that allow user to preview the content of a web page. It creates a thumbnail of the site using the data-url attribute passed as input.

  

  Example:

  

eb240478   Luigi Serra   public room cards...
39
40
      <preview-datalet data-url="http://spod.routetopa.eu"

      </preview-datalet>

035bbee3   Luigi Serra   Datalets and cont...
41
42
43
44
45
46
47
48
49
  

  

  @element preview-datalet

  @status beta

  @homepage

  @group datalets

  -->

  

  <dom-module id="preview-datalet">

b4190b56   Renato De Donato   myspace update
50
  

035bbee3   Luigi Serra   Datalets and cont...
51
      <template>

b4190b56   Renato De Donato   myspace update
52
  

035bbee3   Luigi Serra   Datalets and cont...
53
          <style is="custom-style">

b4190b56   Renato De Donato   myspace update
54
55
              #preview_datalet_container {

                  height: 432px

035bbee3   Luigi Serra   Datalets and cont...
56
57
              }

  

b4190b56   Renato De Donato   myspace update
58
59
              #preview_datalet_link {

                  padding: 8px 0px 8px 0px;

035bbee3   Luigi Serra   Datalets and cont...
60
61
              }

  

b4190b56   Renato De Donato   myspace update
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
              #preview_datalet_iframe {

                  width: 200%;

                  height: calc((100% - 32px) * 2);

  

                  /*zoom:0.75;*/

                  /*width:1280px;*/

                  /*height:800px;*/

                  /*border:none;*/

                  -ms-transform: scale(0.50);

                  -moz-transform: scale(0.50);

                  -o-transform: scale(0.50);

                  -webkit-transform: scale(0.50);

                  transform: scale(0.50);

                  -ms-transform-origin: 0 0;

                  -moz-transform-origin: 0 0;

                  -o-transform-origin: 0 0;

                  -webkit-transform-origin: 0 0;

                  transform-origin: 0 0;

035bbee3   Luigi Serra   Datalets and cont...
80
              }

b4190b56   Renato De Donato   myspace update
81
  

035bbee3   Luigi Serra   Datalets and cont...
82
          </style>

b4190b56   Renato De Donato   myspace update
83
84
85
86
87
88
89
  

          <div id="preview_datalet_container">

  

              <div id="preview_datalet_link"><b>link:</b> <a href="{{url}}" target="_blank">{{url}}</a></div>

  

              <iframe id="preview_datalet_iframe" src="{{url}}"></iframe>

  

035bbee3   Luigi Serra   Datalets and cont...
90
91
          </div>

  

b4190b56   Renato De Donato   myspace update
92
          <base-datalet></base-datalet>

035bbee3   Luigi Serra   Datalets and cont...
93
94
95
96
97
98
99
  

      </template>

  

      <script>

  

          Polymer({

              is : 'preview-datalet',

035bbee3   Luigi Serra   Datalets and cont...
100
          });

b4190b56   Renato De Donato   myspace update
101
  

035bbee3   Luigi Serra   Datalets and cont...
102
103
104
      </script>

  </dom-module>