-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgoogle-embed.html
More file actions
315 lines (234 loc) · 13.2 KB
/
Copy pathgoogle-embed.html
File metadata and controls
315 lines (234 loc) · 13.2 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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Metadata for the Webpage -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrapr · Google Embeds</title>
<!-- Favicons -->
<link rel="apple-touch-icon" sizes="57x57" href="img/favicon/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="img/favicon/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="img/favicon/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="img/favicon/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="img/favicon/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="img/favicon/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="img/favicon/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="img/favicon/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="img/favicon/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="img/favicon/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="img/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="img/favicon/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="img/favicon/favicon-16x16.png">
<link rel="manifest" href="img/favicon/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="img/favicon/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<!-- jQuery UI CSS (optional) -->
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css">
<!-- Bootstrap CSS files-->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<!-- Google web fonts -->
<link href="https://fonts.googleapis.com/css?family=Montserrat:500,600" rel="stylesheet">
<link rel="stylesheet" href="https://use.typekit.net/cti7nio.css">
<!-- Font Awesome Web Icons -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<!-- CSS Animations -->
<link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
<!-- Main local stylesheet -->
<link rel="stylesheet" href="css/main.css">
<!-- Prettify theme -->
<link rel="stylesheet" href="css/prettify-theme.css">
<style>
td button:last-of-type {
margin-top: .25rem;
}
/* Allows the popover to work with the long link */
.popover {
max-width: 480px !important;
}
.popover-content {
word-wrap: break-word;
}
</style>
</head>
<body id="top">
<!-- Navbar include -->
<div w3-include-html="navbar.html"></div>
<div class="container main-content">
<div class="row add-100">
<div class="col-sm-6">
<ol class="breadcrumb">
<li><a href="index.html">Bootstrapr</a></li>
<li class="active">Google Embeds</li>
</ol>
</div>
<!-- col-sm-6 -->
<div class="col-sm-6">
<p class="pull-right">
<a href="https://getbootstrap.com/docs/3.3/" target="_blank" data-toggle="tooltip" data-placement="bottom" title="Bootstrap Docs"><i class="fa fa-fw fa-bookmark gray" aria-hidden="true"></i>
Bootstrap 3.3.7</a>
</p>
</div>
<!-- col-sm-4-->
</div>
<!-- .row -->
<div class="row">
<div class="col-sm-12">
<h1>Google Embeds</h1>
<p class="lead">Leverage the power of third party APIs from Google.</p>
<p>You may embed a Google Doc, Sheet, or Slide Presentation directly by using an iframe. Set the height of your iframe window based on how much of the document you want to show at once without scrolling.</p>
<div class="alert alert-warning push-down-2" role="alert">
<p><i class="fa fa-exclamation-triangle fa-fw" aria-hidden="true"></i> Google Suite embeds HTML inside an <code><iframe></code> element. On iPads the iframe will show full-length and ignore any 'window height' property. Do not use
this feature if such behavior will have an adverse effect on users.</p>
</div>
</div>
</div>
<hr class="divider">
<div class="row">
<div class="col-sm-3">
<form>
<div class="form-group">
<label for="google-type">Type</label>
<select class="form-control" id="google-type">
<option value="document" selected="selected">Google Docs</option>
<option value="spreadsheets">Google Spreadsheets</option>
<option value="presentation">Google Slides</option>
</select>
</div>
<div class="form-group">
<label for="my-doc-id">Document ID</label> <a id="google-doc-popover" tabindex="1" data-html="true" data-trigger="focus" role="button" data-container="body" data-toggle="popover" data-placement="top"
data-content="<h5>Share Your Google Resource</h5><hr><ol><li>Open your Google doc, spreadsheet, or presentation.</li><li>Set your sharing option to '<strong>Public on the Web | Anyone on the internet</strong> can find and view'.</li><li>Copy your <span style='color:purple;font-weight: 500;'>Doc ID</span> from the sharing URL string. It's the bit between 'd/' and '/edit?' (see example, below).</li></ol><hr><p>Example of Doc ID:<br/><br/><span style='color: #337ab7;'>https://docs.google.com/document/d/</span><span style='color:purple;font-weight: 500;'>1MPm4fG_RVwwoc3sqQhC_NBjJ_T0eVVGqUBHyS0MSUVY</span><span style='color: #337ab7;'>/edit?usp=sharing</span></p>"><i
class="fa fa-info-circle" aria-hidden="true"></i></a>
<input type="text" class="form-control" id="my-doc-id" placeholder="1MPm4fG_RVwwoc3sqQhC_NBjJ_T0eVVGqUBHyS0MSUVY">
<a href="https://drive.google.com/drive/my-drive" target="_blank"><small><i class="fa fa-fw fa-external-link-square"></i> Google Drive</small></a>
</div>
<div class="form-group push-down-1">
<label for="google-doc-height">Window Height <small>(pixels)</small></label>
<input type="text" class="form-control number-control" id="google-doc-height" placeholder="1000">
</div>
<label for="print-link">Add ‘Print’ Link</label>
<div class="checkbox">
<label class="switch">
<input type="checkbox" id="print-link">
<span class="slider round"></span>
</label>
</div>
</form>
<div class="push-down-2 button-box" id="action-buttons">
<button type="button" class="btn btn-primary pull-right" id="build-button"><i class="fa fa-fw fa-cogs" aria-hidden="true"></i> Build </button>
<button type="button" class="btn btn-default pull-right" id="clear-form"><i class="fa fa-refresh fa-fw" aria-hidden="true"></i> <span class="hidden-xs hidden-sm">Reset</span></button>
</div>
</div>
<!-- .col-sm-3 -->
<div class="col-sm-9">
<div class="example" id="simple-example">
<p class='text-right'><a href='https://docs.google.com/document/d/1MPm4fG_RVwwoc3sqQhC_NBjJ_T0eVVGqUBHyS0MSUVY/edit' target='_blank'><i class='fa fa-print fa-spacer-right' aria-hidden='true'></i>Print This</a></p>
<iframe width='100%' height='640' frameborder='0' scrolling='yes' class="embed-responsive-item" src='https://docs.google.com/document/d/1MPm4fG_RVwwoc3sqQhC_NBjJ_T0eVVGqUBHyS0MSUVY/preview' allowfullscreen></iframe>
</div>
<div class="well">
<!-- Copier-->
<button class="btn btn-code-well pull-right copier" type="button" data-clipboard-demo="" data-clipboard-target="#simple-code" data-toggle="tooltip" data-placement="bottom" title="Copy to Clipboard"><i class="fa fa-fw fa-clipboard"
aria-hidden="true"></i> Copy</button>
<!-- Beautifier -->
<button id="beautify" class="btn btn-code-well pull-left" type="button" data-clipboard-demo="" data-toggle="tooltip" data-placement="bottom" title="Indent code"><i class="fa fa-indent fa-fw" aria-hidden="true"></i> Prettify
</button>
<!-- Update Example Panel-->
<button id="update-preview" class="btn btn-code-well pull-left" type="button" data-clipboard-demo="" data-toggle="tooltip" data-placement="bottom" title="Update Example window"><i class="fa fa-fw fa-arrows-v" aria-hidden="true"></i>
Update Example</button>
<hr class="well-separator">
<pre class="prettyprint lang-html" id="simple-code" contenteditable="true">
<p class='text-right'>
<a href='https://docs.google.com/document/d/1MPm4fG_RVwwoc3sqQhC_NBjJ_T0eVVGqUBHyS0MSUVY/edit' target='_blank'><i class='fa fa-print fa-spacer-right' aria-hidden='true'></i>Print This</a>
</p>
<iframe width='100%' height='640' frameborder='0' scrolling='yes' class="embed-responsive-item" src='https://docs.google.com/document/d/1MPm4fG_RVwwoc3sqQhC_NBjJ_T0eVVGqUBHyS0MSUVY/preview' allowfullscreen></iframe>
</pre>
</div>
<!-- example closes -->
</div>
<!-- .col-sm-9 -->
</div>
<!-- .row -->
</div>
<!-- .container -->
<!-- Navbar include -->
<div w3-include-html="footer.html"></div>
<!-- Back-to-top button -->
<a role="button" id="topper" class="btn scroll-link" href="#top"><i class="fa fa-fw fa-2x fa-caret-up" aria-hidden="true"></i></a>
<!-- jQuery Javascript Library (required by Bootstrap) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script><script>window.jQuery || document.write('<script src="js/jquery.min.js"><\/script>')</script>
<!-- jQuery UI Library (optional) -->
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
<!-- Bootstrap Library -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script>window.jQuery.fn.modal || document.write('<script src="js/bootstrap.min.js"><\/script>')</script>
<script>
(function($) {
$(function() {
if ($('body').css('color') !== 'rgb(246, 247, 251)') {
$('head').prepend('<link rel="stylesheet" href="css/bootstrap.min.css">');
$('head').prepend('<link rel="stylesheet" href="css/fontawesome-local.css">');
}
});
})(window.jQuery);
</script>
<!-- Main local script file -->
<script src="js/main.js"></script>
<!-- includes for Google's code highlighter 'prettyprint' -->
<link rel="stylesheet" type="text/css" href="css/prettify.css">
<script type="text/javascript" src="js/prettify.js"></script>
<script type="text/javascript" src="js/lang-css.js"></script>
<!-- html file include script | used for navbar -->
<script src="js/w3data.js"></script>
<script>
w3IncludeHTML();
</script>
<!-- Bootstrap Table -->
<script type="text/javascript" src="js/jquery.sortElements.js"></script>
<script type="text/javascript" src="js/jquery.bdt.js"></script>
<!-- clipboard.js include -->
<script src="js/clipboard.min.js"></script>
<!-- Animations JS -->
<script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script>
<script>
$(document).ready(function() {
// The searchable bootstrap table
$('#bootstrap-table').bdt();
$('#search').css("width", "400px").css("margin-top", "0").parent().css("height", "3.6rem").prepend("<i style='opacity: .2' class='pull-left fa fa-search fa-2x'></i>");
// tooltips function
$('[data-toggle="tooltip"]').tooltip();
// Add active class to navmenu selection
$("li#google").addClass("active");
$("#containers-dropdown").addClass("activated");
$('#print-link').prop('checked', true);
$('#clearGoogleDocBuilder').click(function() {
location.reload(true);
});
$('#build-button').click(function() {
var googleType = $('#google-type').val();
var theDocID = $('#my-doc-id').val();
var googleDocHeight = $('#google-doc-height').val();
var printHeader = '';
if ($('#print-link').is(":checked")) {
printHeader = "<p class='text-right'><a href='https://docs.google.com/" + googleType + "/d/" + theDocID + "/preview' target='_blank'><i class='fa fa-print fa-spacer-right' aria-hidden='true'></i>Print This</a></p>";
}
var printDoc = "<iframe width='100%' height='" + googleDocHeight + "' frameborder='0' scrolling='yes' class='embed-responsive-item' src='https://docs.google.com/" + googleType + "/d/" + theDocID +
"/preview' allowfullscreen></iframe>";
var bsGoogleDoc = printHeader + printDoc;
// Write the image
$("#simple-example").html(bsGoogleDoc);
$('#simple-code').text(bsGoogleDoc);
$('pre').removeClass('prettyprinted');
prettyPrint();
});
// clipboard button
new Clipboard('.btn');
});
// document.ready
</script>
<!-- Confirmation modal -->
<div id="dialog-confirm" title="Reset Form">
<p>This will reset the form. Are you sure?</p>
</div>
</body>
</html>