-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfeature-widgets.html
364 lines (263 loc) · 16.4 KB
/
feature-widgets.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
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
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Hesburgh Libraries · Guides Handbook</title>
<link rel="apple-touch-icon" sizes="57x57" href="favicons/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="favicons/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="favicons/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="favicons/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="favicons/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="favicons/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="favicons/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="favicons/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="favicons/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="favicons/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="favicons/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicons/favicon-16x16.png">
<link rel="manifest" href="favicons/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="favicons/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<!-- Bootstrap -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.2/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<!--<!-- <link href="http://fonts.googleapis.com/css?family=Roboto:300,400,500&subset=latin,cyrillic" rel="stylesheet" type="text/css"> --> <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,400i,600,700" rel="stylesheet">
-->
<link rel="stylesheet" href="css/main.css">
<style type="text/css">
/* Allows the popover to work with the long link */
.popover { max-width: 90%; }
.popover-content { word-wrap: break-word; }
</style>
</head>
<body data-spy="scroll" data-target="#myScrollspy" data-offset="15">
<!-- header ----------------------------->
<div class="brand-bar container-fluid">
<div class="container-fluid">
<div class="row">
<div class="hidden-xs col-sm-6 col-md-6 col-lg-6">
<a href="http://www.nd.edu">University <i>of</i> Notre Dame</a>
</div>
<div class="text-center col-xs-12 hidden-sm hidden-md hidden-lg hidden-xl">
<a href="http://www.nd.edu">University <i>of</i> Notre Dame</a>
</div>
<div class="hidden-xs col-sm-6 col-md-6 col-lg-6 text-right">
<a href="https://provost.nd.edu/">Office <i>of the</i> Provost</a>
</div>
<div class="text-center col-xs-12 hidden-sm hidden-md hidden-lg hidden-xl text-center">
<a class="brand-bar-bottom-padded" href="https://provost.nd.edu/">Office <i>of the</i> Provost</a>
</div>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row" id="nd-libguides-header-pattern">
<div class="hidden-xs col-sm-6 col-md-6 col-lg-6">
<h1 id="hesburgh-libraries"><a href="http://library.nd.edu" target="_blank">HESBURGH <span style="color:#F8E999;">LIBRARIES</span></a></h1>
</div>
<div class="hidden-xs col-sm-6 col-md-6 col-lg-6">
<h1 style="opacity:.6;text-align:right;">Guides Handbook</h1>
</div>
<div class="col-xs-12 text-center hidden-sm hidden-md hidden-lg">
<h1><a href="http://library.nd.edu" target="_blank">HESBURGH <span style="color:#F8E999;margin-bottom:10px;">LIBRARIES</span></a></h1>
</div>
<div class="col-xs-12 text-center hidden-sm hidden-md hidden-lg">
<h1 style="opacity:.6;text-align:center;">Guides Handbook</h1>
</div>
</div>
</div>
<!-- header closes ----------------------------->
<!-- Main Content ----------------------------->
<div class="container" id="main-container">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 text-right">
<a class="btn btn-default help-button" href="https://nd.libapps.com/libapps/login.php" role="button" target="_blank"><i class="fa fa-lock fa-spacer-right" aria-hidden="true"></i> LibGuides Login</a>
<a class="btn btn-default help-button" href="http://libguides.library.nd.edu/reusable-assets" role="button" target="_blank"><i class="fa fa-list-alt fa-spacer-right" aria-hidden="true"></i>Reusable Assets</a>
</div>
</div>
<div class="page-header">
<div w3-include-html="navmenu.html"></div>
</div>
<!-- page header closes -->
<div id="masthead">
<div class="container">
<div class="row">
<div class="col-md-12">
<h1>Widgets <small style="color: #999;">(APIs)</small></h1>
<p class="lead">Embedding dynamic content from 3rd party Web services both engages and empowers users.</p>
</div>
</div>
</div>
<!--/container-->
</div>
<!--/masthead-->
<div class="container">
<div class="row">
<!--left column-->
<div class="col-md-3 hidden-xs hidden-sm" id="leftCol">
<ul class="nav nav-stacked" id="sidebar">
<li><a href="#sec0">Google Suite Embed</a></li>
<li class="hidden"><a href="#sec1">Twitter Feed Embed</a></li>
<li><a href="#" class="back-to-top"><i class="fa fa-arrow-circle-o-up"></i> Back to top</a></li>
</ul>
</div>
<!--right column-->
<div class="col-md-9" id="rightCol">
<h2 id="sec0">Google Suite Embed</h2>
<p>You may embed a Google Doc or Spreadsheet or Slide Presentation directly inside a guide box 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="row">
<div class='alert alert-danger' role='alert'><p><i class='fa fa-times-circle fa-spacer-right' aria-hidden='true'></i>Google Suite embeds HTML inside an <code>iframe</code> element, which is not supported on iPads. Do not use this feature if your users will require access on Apple mobile devices (or any device which doesn't support <code>iframe</code> embedding). I am currently investigating HTML5 alternatives to this which will work on mobile. Stay tuned!</p></div>
<div class="col-sm-4">
<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 Pages</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 Doc</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:red;font-weight: 500;'>Doc ID</span> from the sharing URL string (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:red;font-weight: 500;'>1MPm4fG_RVwwoc3sqQhC_NBjJ_T0eVVGqUBHyS0MSUVY</span><span style='color: #337ab7;'>/edit?usp=sharing</span></p>"><i class="fa fa-info-circle fa-spacer-left" 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-external-link-square fa-spacer-right" /></i>Google Drive</small></a>
</div>
<div class="form-group" style="margin-top: 20px;">
<label for="google-doc-height">Window Height <small>(pixels)</small></label>
<input type="text" class="form-control" id="google-doc-height" placeholder="1000">
</div>
<div style="margin-top: 25px;" class="checkbox">
<label for="print-link">
<input type="checkbox" id="print-link"> Print Document Link
</label>
</div>
</form>
<div style="margin-top:30px;">
<button type="button" class="btn btn-default" id="clearGoogleDocBuilder">Reset</button>
<button type="button" class="btn btn-primary" id="displayGoogleDocBuilder">Build</button>
</div>
</div>
<div class="col-sm-8">
<div class="example" id="simple-example-google-doc">
<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" contenteditable="true">
<button class="btn btn-primary pull-right copier" type="button" data-clipboard-demo="" data-clipboard-target="#simple-google-doc-code" data-toggle="tooltip" data-placement="bottom" title="copy HTML">
<i class="fa fa-clipboard" aria-hidden="true"></i>
</button>
<pre class="prettyprint" id="simple-google-doc-code">
<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>View / Print this document</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>
</div>
<div class="hidden">
<!-- hiding this div --------------->
<h2 id="sec1">Twitter Feed Embed</h2>
<p>Lead text should be used sparingly at the beginning of larger content blocks to summarize content or focus readers.</p>
<div class="example">
<p class="lead">Organize and highlight your content with strong typographic hierarchy.</p>
</div>
<div class="well" contenteditable="true">
<button class="btn btn-primary pull-right copier" type="button" data-clipboard-demo="" data-clipboard-target="#simple-google-doc-code" data-toggle="tooltip" data-placement="bottom" title="copy HTML">
<i class="fa fa-clipboard" aria-hidden="true"></i>
</button>
<pre class="prettyprint" id="simple-google-doc-code">
</pre>
</div>
<!-- example closes -->
</div>
<!-- closing the div for hiding this --->
</div>
<!-- col-md-9 -->
</div>
<!-- row -->
</div>
<!-- container -->
</div>
<!-- Footer ----------------------------->
<div id="handbook-footer">
<div class="container-fluid">
<div class="row">
<div class="col-xs-12 col-sm-6">
<i class="fa fa-copyright" aria-hidden="true"></i><span id="thisYear"></span> University of Notre Dame
</div>
<div class="col-xs-12 col-sm-6">
<p class="text-right"><a href="https://github.com/randal-sean-harrison/handbook" target="_blank"><i class="fa fa-github fa-spacer-right" aria-hidden="true"></i>randal-sean-harrison/handbook</a></p>
</div>
</div>
</div>
</div>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="js/jquery-3.2.1.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<!-- Include for the Back to top button -->
<script src="js/back-to-top.js"></script>
<!-- Scrollspy / affix js -->
<script src="js/scripts.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>
<!-- html include script -->
<script src="https://www.w3schools.com/lib/w3data.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>
w3IncludeHTML();
</script>
<!-- clipboard.js include -->
<script src="js/clipboard.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
// Add the active classes to the nav menu
$(".navfeatures").addClass("active");
$(".navwidgets").addClass("active");
$('#print-link').prop('checked', true);
$('#clearGoogleDocBuilder').click(function() {
location.reload(true);
});
$('#displayGoogleDocBuilder').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 + "/edit' 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-google-doc").html(bsGoogleDoc);
$('#simple-google-doc-code').text(bsGoogleDoc);
$('pre').removeClass('prettyprinted');
prettyPrint();
});
}); // document ready
// clipboard button
new Clipboard('.btn');
$(function() {
$('[data-toggle="tooltip"]').tooltip()
});
</script>
<!-- add the active class to the correct tab and submenu element -->
<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>
<script type="text/javascript">
$('#google-doc-popover').popover('animation', 'true');
</script>
</body>
</html>