-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfeature-button.html
398 lines (298 loc) · 17.3 KB
/
feature-button.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
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
<!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">
<!-- 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>
</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>Buttons</h1>
<p class="lead">Links as buttons can foreground important features or functions, when used sparingly.</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">Button</a></li>
<li><a href="#sec1">Specialty Buttons</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">Button</h2>
<p>Buttons are set to open in a new window by default, though this setting can be changed. If using multiple buttons on your page, make sure that all the buttons are the same size. Button defaults are: Sized <code>Normal</code>, colored <code>Primary(standard blue)</code>, and aligned <code>Center</code>.</p>
<div class="alert alert-warning">
<p><strong><i class="fa fa-exclamation-triangle" aria-hidden="true"></i>Alternate Button Colors<br/></strong>Alternate button colors should only be used to signal an alternate mood. For example, a yellow button might sound a note of caution; a red button might signify probibition or danger.</p>
</div>
<div class="row">
<div class="col-sm-12 col-md-3">
<form>
<div class="form-group">
<label for="button-url">URL</label>
<input type="text" class="form-control" id="button-url" placeholder="http://www.url.com">
</div>
<div class="form-group">
<label for="button-text">Button Text</label>
<input type="text" class="form-control" id="button-text" placeholder="My Cool Button">
</div>
<div class="form-group">
<label for="button-size">Button Size</label>
<select class="form-control" id="button-size">
<option id="option-lg" value=" btn-lg">Large</option>
<option id="option-norm" value="" selected="selected">Normal</option>
<option id="option-sm" value=" btn-sm">Small</option>
<option id="option-xs" value=" btn-xs">Extra-small</option>
</select>
</div>
<div class="form-group">
<label for="button-color">Button Color</label>
<select class="form-control" id="button-color">
<option id="option-default" value=" btn-default">Default (transparent)</option>
<option id="option-dim" value=" btn-dim">Dim (grey)</option>
<option id="option-primary" value=" btn-primary" selected="selected">Primary (standard blue)</option>
<option id="option-lt-blue" value=" btn-info">Information (light blue)</option>
<option id="option-green" value=" btn-success">Success (green)</option>
<option id="option-yellow" value=" btn-warning">Warning (yellow)</option>
<option id="option-red" value=" btn-danger">Danger (red)</option>
</select>
</div>
<div class="form-group">
<label for="alignment">Alignment</label>
<select class="form-control" id="alignment">
<option id="leftmost" value="text-left">Left</option>
<option id="centedmost" value="text-center" selected="selected">Center</option>
<option id="rightmost" value="text-right">Right</option>
</select>
</div>
<label style="margin-top:0em;" for="button-size">Open In</label>
<select class="form-control" id="open-in">
<option value="new" selected="selected">New window</option>
<option value="same">Same window</option>
</select>
<label for="icon-html" style="margin-top: 20px;">Optional Icon (or Text)</label>
<div class="input-group">
<span style="height: 16px;" class="input-group-addon" id="refresh-button"><i class="fa fa-refresh" aria-hidden="true"></i></span>
<input type="text" class="form-control" id="icon-html" placeholder="<i class='fa fa-up'></i>">
</div>
<p style="margin-left: 6px;" class="text-left"><a href="feature-icon.html" target="_blank"><small><i class="fa fa-external-link-square" aria-hidden="true"></i> Find Icon</small></a></p>
</form>
<div style="margin-top:30px;">
<button type="button" class="btn btn-default" id="clearButton">Reset</button>
<button type="button" class="btn btn-primary" id="renderButton">Build</button>
</div>
</div>
<div class="col-sm-12 col-md-9">
<div class="example" id="simple-example-button">
<p class='text-center'><a role='button' class='btn btn-primary' target='blank'><i class="fa fa-calendar-plus-o" aria-hidden="true"></i> Register for ALA</a></p>
</div>
<div class="well" contenteditable="true">
<button id="copyButton" class="btn btn-primary pull-right copier" type="button" data-clipboard-demo="" data-clipboard-target="#simple-button-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-button-code'>
<p class='text-center'>
<a role='button' class='btn btn-primary' href='http://alaannual.org' target='blank'><i class="fa fa-calendar-plus-o" aria-hidden="true"></i> Register for ALA</a>
</p>
</pre>
</div>
<!-- example closes -->
</div>
</div>
<h2 id="sec1">Specialty Buttons</h2>
<p>Buttons commonly invoke a call to other services, such as opening an email client, calendar booking application, or a modal image preview window, etc. For help with more advanced buttons, <a href="help.html">contact the LibGuides Management Team</a>.</p>
<table class='table table-hover' id="buttonsTable">
<thead>
<tr>
<th style='width: 35%;'>Button Type</th>
<th style='width: 65%;'>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="https://youcanbook.me/" target="_blank">You Can Book Me</a></td>
<td>Easily display your custom availability by linking Google calendar(s) to this 3rd party site. To add a scheduler button to your Profile Box, use the <a href="box-profile.html#sec2">Profile Builder Tool</a>.</td>
</tr>
</tbody>
</table>
</div>
<!--/right-->
</div>
<!--/row-->
</div>
<!--/container-->
</div>
<!-- .container -->
<!-- Main Content closes ----------------------------->
<!-- 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>
<!-- html include script -->
<script src="https://www.w3schools.com/lib/w3data.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");
$(".navbuttons").addClass("active");
// Generate the Button function
$('#renderButton').click(function() {
//var buttonIcon = '';
var buttonText = $('#button-text').val();
var buttonUrl = $('#button-url').val();
var buttonColor = $('#button-color').val();
var buttonSize = $('#button-size').val();
var buttonAlignment = $('#alignment').val();
var iconHTML = $('#icon-html').val();
var buttonOpenIn = $('#open-in').val();
var setOpen = "";
var spacer = "";
// adds fa-spacer-right class
var iconReal = iconHTML.replace('" aria-hidden="true"></i>',' fa-spacer-right" aria-hidden="true"></i>');
if (buttonOpenIn == "same") {
setOpen = "target='_self'";
} else {
setOpen = "target='_blank'";
}
var setIcon = '';
if ($('#hasIcon').is(':checked')) {
setIcon = buttonIcon;
}
// Write the button
var bsButton = "<p class='" + buttonAlignment + "'>" + "<a role='button' class='btn" + buttonSize + buttonColor + "' href='" + buttonUrl + "' " + setOpen + ">" + iconReal + buttonText + "</a></p>";
$("#simple-example-button").html(bsButton);
$('#simple-button-code').text(bsButton);
$('pre').removeClass('prettyprinted');
prettyPrint();
});
// reset the input
$('#refresh-button').click(function() {
$('#icon-html').val('');
});
// reset the form
$('#clearButton').click(function() {
location.reload(true);
});
});
// 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>
</body>
</html>