-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
218 lines (196 loc) · 11 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<title>UCF University Header</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf-8">
<link rel="stylesheet" href="https://cdn.ucf.edu/athena-framework/latest/css/framework.min.css">
<script type="text/javascript" id="ucfhb-script" src="bar/js/university-header.js"></script>
</head>
<body>
<main>
<div class="container mt-3 mt-sm-5 mb-sm-3">
<div class="row">
<div class="col-xl-10 offset-xl-1">
<h1>University Header</h1>
<p class="lead">
The UCF University Header is a cohesive marketing and branding tool for the entire university. It provides consistent
navigational elements and a universal search feature.
</p>
<p class="lead">
The University Header is responsive and will adapt to various screen sizes as necessary. Responsive
breakpoints mirror those used in the
<a href="https://ucf.github.io/Athena-Framework/">Athena Framework</a> and
<a href="https://getbootstrap.com/">Bootstrap</a>.
</p>
</div>
</div>
</div>
<div class="jumbotron jumbotron-fluid bg-faded mt-3 mt-sm-4 mb-sm-5">
<div class="container">
<div class="row">
<div class="col-xl-10 offset-xl-1">
<h2 class="heading-underline h3 mb-4 mb-sm-5" id="installation">Installation</h2>
<h3 class="h4 mt-4">Default</h3>
<p>
To add the standard University Header to your website, add this script tag to your document.
</p>
<div class="card">
<div class="card-block">
<pre class="mb-0"><script type="text/javascript" id="ucfhb-script" src="//universityheader.ucf.edu/bar/js/university-header.js"></script></pre>
</div>
</div>
<h3 class="h4 mt-4 mt-sm-5">Wide Version (Recommended)</h3>
<p>
The header shown on this page is the standard, default width provided. A <code>use-1200-breakpoint</code> parameter can be added to display a wider version of the header:
</p>
<div class="card mb-4">
<div class="card-block">
<pre class="mb-0"><script type="text/javascript" id="ucfhb-script" src="//universityheader.ucf.edu/bar/js/university-header.js?use-1200-breakpoint=1"></script></pre>
</div>
</div>
<p>
See the <a href="#options">Options section</a> for more available configuration options.
</p>
</div>
</div>
</div>
</div>
<div class="container mt-sm-3 mb-5">
<div class="row">
<div class="col-xl-10 offset-xl-1">
<h2 class="heading-underline h3 mb-4" id="usage">Usage</h2>
<p>
The University Header is a "plug-and-go" solution. Please keep the following in mind when including it on your site:
</p>
<h3 class="h4 media align-items-center mt-4 mt-sm-5 mb-3">
<span class="d-flex text-center bg-primary rounded-circle mr-3" style="padding: .25em .475em .275em;">1.</span>
<span class="media-body">The University Header should be consistent visually and functionally across all UCF websites.</span>
</h3>
<p>
Please do not modify the bar's existing appearance or functionality, such as modifying graphics/colors associated with the bar, links included within the bar, markup associated with the bar or the search functionality.
</p>
<h3 class="h4 media align-items-center mt-4 mt-md-5 mb-3">
<span class="d-flex text-center bg-primary rounded-circle mr-3" style="padding: .25em .375em .275em;">2.</span>
<span class="media-body">The University Header should always be at the top of each page.</span>
</h3>
<p>
Do not modify where the bar is intended to render. The bar should always be the first visible element on the page.
</p>
<h3 class="h4 media align-items-center mt-4 mt-md-5 mb-3">
<span class="d-flex text-center bg-primary rounded-circle mr-3" style="padding: .25em .375em .275em;">3.</span>
<span class="media-body">The University Header should not present any other content beyond its default content.</span>
</h3>
<p>
The bar should not be given the appearance of an "attachment" of the default bar on your site, and should not include extra links or graphics beyond what the default bar provides.
</p>
<p>
<em>Your site's navigation should not be displayed as an extension or piece of the University Header.</em>
</p>
<hr class="my-5">
<h2 class="heading-underline h3 mb-4" id="options">Options</h2>
<h3 class="h4 mt-4">Responsiveness</h3>
<p>
To utilize a responsive bar, simply make sure your site's <code><head></code> includes the following <code><meta></code> tag:
</p>
<div class="card mb-4">
<div class="card-block">
<pre class="mb-0"><meta name="viewport" content="width=device-width, initial-scale=1.0"></pre>
</div>
</div>
<h3 class="h4 mt-4">Using a placeholder element (Skip Navigation link support)</h3>
<p>
If for technical or accessibility-related reasons, you need to place some element(s) before the header (e.g. for implementing a Skip Navigation link), you can include a placeholder element in your page markup for where the header will be placed.
</p>
<p>
We recommend absolutely-positioning and/or using a "visible-on-focus" technique for Skip Navigation links to ensure the header is still the first visible element on the page. For more information on Skip Navigation techniques, see <a href="https://webaim.org/techniques/skipnav/" target="_blank">this WebAIM article on Skip Navigation links</a>.
</p>
<div class="alert alert-info my-4">
<p class="mb-0">
<strong>Note:</strong> Do not use a header placeholder to insert any other types of content or stylistic adjustments before the header.
</p>
</div>
<div class="card mb-4">
<div class="card-block">
<pre class="mb-0"><body>
<a href="#content">Skip Navigation</a>
<div id="ucfhb"></div>
...
</pre>
</div>
</div>
<h3 class="h4 mt-4">Bootstrap 2.x overrides</h3>
<p>
Due to the way that some older versions of the Bootstrap CSS framework apply left- and right-hand padding to elements at screen sizes less than 768px wide,
a style override is necessary for sites using these versions of Bootstrap if they utilize responsive styles.
</p>
<div class="card mb-4">
<div class="card-block">
<pre class="mb-0"><script type="text/javascript" id="ucfhb-script" src="//universityheader.ucf.edu/bar/js/university-header.js?use-bootstrap-overrides=1"></script></pre>
</div>
</div>
<div class="alert alert-info my-4">
<h3 id="wordpress-lt-63" class="h4 alert-heading">Setting Options for WordPress Sites (WordPress Version < 6.3)</h3>
<p>
Parameter-based options such as <code>use-1200-breakpoint</code> and <code>use-bootstrap-overrides</code> require that the <code><script></code> tag has an ID of <code>ucfhb-script</code>.
If your site runs on WordPress and requires these overrides, enqueue the University Header script with <code><a href="http://codex.wordpress.org/Function_Reference/wp_enqueue_script">wp_enqueue_script()</a></code> using the parameter(s) above, and add the following snippet to your theme's functions.php file:
</p>
<div class="alert alert-warning my-2">
<h4 class="h5 alert-heading">Deprecation Warning</h4>
<p>The following method is only valid for WordPress installations older than 6.3.0. For newer installations, see the <a href="#wordpress-ge-63">instructions on how to set the ID on a script tag on WordPress 6.3+</a>.</p>
</div>
<div class="card mb-4">
<div class="card-block">
<pre class="mb-0">/**
* Add ID attribute to registered University Header script.
**/
function add_id_to_ucfhb( $url ) {
if ( ( false !== strpos( $url, 'bar/js/university-header.js' ) ) || ( false !== strpos( $url, 'bar/js/university-header-full.js' ) ) ) {
remove_filter( 'clean_url', 'add_id_to_ucfhb', 10, 3 );
return "$url' id='ucfhb-script";
}
return $url;
}
add_filter( 'clean_url', 'add_id_to_ucfhb', 10, 1 );
</pre>
</div>
</div>
</div>
<div class="alert alert-info my-4">
<h3 id="wordpress-ge-63" class="h4 alert-heading">Setting Options for WordPress Sites (WordPress Version ≥ 6.3)</h3>
<p>The following code snippet should be used for overriding the ID of the UCF Header Bar script tag on WordPress version 6.3 or higher.</p>
<div class="card mb-4">
<div class="card-block">
<pre class="mb-0">/**
* Add ID attribute to registered University Header script.
**/
function ucfhb_script_handle( $tag, $handle, $src ) {
if ( false !== strpos( $src, 'universityheader.ucf.edu' ) ) {
$tag = str_replace( "{$handle}-js", 'ucfhb-script', $tag );
}
return $tag;
}
add_filter( 'script_loader_tag', 'ucfhb_script_handle', 10, 3 );
</pre>
</div>
</div>
</div>
<hr class="my-5">
<h2 class="heading-underline h3 mb-4" id="browser-compatibility">Browser Compatibility</h2>
<p>
The University Header is tested against the <strong>latest two versions of Chrome, Safari, Firefox and Edge,</strong> as well
as <strong>Chrome for Android and Safari for iOS.</strong> Support for other browsers is not guaranteed.
</p>
<div class="alert alert-info my-4">
<p>
<strong>Note:</strong> The University Header may not render properly if the <code><body></code>
tag on your site has margins, padding, or other non-standard styles applied to it. Use a CSS Reset, CSS framework, or your own
<code><body></code> tag styles to ensure consistent rendering across all browsers.
</p>
</div>
</div>
</div>
</div>
</main>
</body>
</html>