-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
146 lines (120 loc) · 5.28 KB
/
index.html
File metadata and controls
146 lines (120 loc) · 5.28 KB
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<!doctype html>
<!-- Copyright (c) 2014 Google Inc. All rights reserved. -->
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<meta name="description" content="A collection of web components for Google APIs and services.">
<meta itemprop="image" content="http://googlewebcomponents.github.io/img/logo.png">
<title>Google Web Components</title>
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Lato|Source+Code+Pro:400,600">
<link rel="stylesheet" href="css/app.css">
<script src="bower_components/webcomponentsjs/webcomponents.min.js"></script>
<link rel="import" href="bower_components/polymer/polymer.html">
<link rel="import" href="bower_components/core-icons/core-icons.html">
<link rel="import" href="bower_components/core-icon/core-icon.html">
<base target="_blank"/> <!-- make all links open in new tab -->
<link rel="shortcut icon" href="favicon.ico"> <!-- favicon -->
</head>
<body unresolved>
<header>
<h1>Google Web Components</h1>
<div>A collection of web components for Google APIs & services. Built with <a href="http://www.polymer-project.org">Polymer</a>.</div>
<div class="social-container">
<ul class="social-buttons" layout horizontal center-justified>
<li>
<div class="g-plusone" data-size="medium" data-href="http://googlewebcomponents.github.io/"></div>
</li>
<li>
<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://googlewebcomponents.github.io/" data-text="Google Web Components Kit - A collection of web components for Google APIs & services">Tweet</a>
</li>
<li>
<iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fgooglewebcomponents.github.io&width=100&layout=button_count&action=like&show_faces=false&share=false&height=21&appId=2395139037" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:21px;" allowTransparency="true"></iframe>
</li>
</ul>
</div>
</header>
<template id="t" is="auto-binding">
<main>
<article id="list">
<template repeat="{{e,i in elements}}">
<section>
<header>
<h2><code><{{e.repo}}></code></h2>
<div>
<label class="google red" on-tap="{{loadDemo}}">Demo</label>
<label class="google yellow"><a href="/{{e.repo}}">Docs</a></label>
<label class="google blue"><a href="https://github.com/{{e.org}}/{{e.repo}}">Github</a></label>
</div>
</header>
<pre>bower install {{e.org}}/{{e.repo}} [--save]</pre>
</section>
</template>
</article>
<article id="demo">
<span hidden?="{{iframeSrc}}"><core-icon icon="arrow-back"></core-icon> Try an element</span>
<iframe src="{{iframeSrc}}" hidden?="{{!iframeSrc}}"></iframe>
</article>
</main>
</template>
<!--
<footer>
<p>Built with <a href="http://www.polymer-project.org">Polymer</a>.</p>
<footer> -->
<script>
(function() {
var ELEMENTS = [
{org: 'GoogleWebComponents', repo: 'google-map'},
{org: 'GoogleWebComponents', repo: 'google-apis'},
{org: 'GoogleWebComponents', repo: 'google-analytics'},
{org: 'GoogleWebComponents', repo: 'google-calendar'},
{org: 'GoogleWebComponents', repo: 'google-castable-video'},
{org: 'GoogleWebComponents', repo: 'google-hangout-button'},
{org: 'GoogleWebComponents', repo: 'google-sheets'},
{org: 'GoogleWebComponents', repo: 'google-url-shortener'},
{org: 'GoogleWebComponents', repo: 'google-drive'},
{org: 'GoogleWebComponents', repo: 'google-signin'},
{org: 'GoogleWebComponents', repo: 'google-chart'},
{org: 'GoogleWebComponents', repo: 'google-streetview-pano'},
{org: 'GoogleWebComponents', repo: 'google-youtube'},
{org: 'GoogleWebComponents', repo: 'google-youtube-upload'},
];
ELEMENTS.sort(function (a, b) {
if (a.repo > b.repo) {
return 1;
}
if (a.repo < b.repo) {
return -1;
}
// a must be equal to b
return 0;
});
var template = document.querySelector('#t');
template.elements = ELEMENTS;
template.getHost = function(org) {
return '//' + org + '.github.io';
};
template.loadDemo = function(e, detail, sender) {
var element = sender.templateInstance.model.e;
this.iframeSrc = this.getHost(element.org) + '/' + element.repo +
'/components/' + element.repo + '/demo.html';
};
})();
// G+
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/platform.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
// Twitter
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');
// Analytics
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-51314200-1', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>