University Header

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.

The University Header is responsive and will adapt to various screen sizes as necessary. Responsive breakpoints mirror those used in the Athena Framework and Bootstrap.

Installation

Default

To add the standard University Header to your website, add this script tag to your document.

<script type="text/javascript" id="ucfhb-script" src="//universityheader.ucf.edu/bar/js/university-header.js"></script>

Wide Version (Recommended)

The header shown on this page is the standard, default width provided. A use-1200-breakpoint parameter can be added to display a wider version of the header:

<script type="text/javascript" id="ucfhb-script" src="//universityheader.ucf.edu/bar/js/university-header.js?use-1200-breakpoint=1"></script>

See the Options section for more available configuration options.

Usage

The University Header is a "plug-and-go" solution. Please keep the following in mind when including it on your site:

1. The University Header should be consistent visually and functionally across all UCF websites.

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.

2. The University Header should always be at the top of each page.

Do not modify where the bar is intended to render. The bar should always be the first visible element on the page.

3. The University Header should not present any other content beyond its default content.

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.

Your site's navigation should not be displayed as an extension or piece of the University Header.


Options

Responsiveness

To utilize a responsive bar, simply make sure your site's <head> includes the following <meta> tag:

<meta name="viewport" content="width=device-width, initial-scale=1.0">

Using a placeholder element (Skip Navigation link support)

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.

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 this WebAIM article on Skip Navigation links.

Note: Do not use a header placeholder to insert any other types of content or stylistic adjustments before the header.

<body>
    <a href="#content">Skip Navigation</a>
    <div id="ucfhb"></div>
    ...
  

Bootstrap 2.x overrides

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.

<script type="text/javascript" id="ucfhb-script" src="//universityheader.ucf.edu/bar/js/university-header.js?use-bootstrap-overrides=1"></script>

Setting Options for WordPress Sites (WordPress Version < 6.3)

Parameter-based options such as use-1200-breakpoint and use-bootstrap-overrides require that the <script> tag has an ID of ucfhb-script. If your site runs on WordPress and requires these overrides, enqueue the University Header script with wp_enqueue_script() using the parameter(s) above, and add the following snippet to your theme's functions.php file:

Deprecation Warning

The following method is only valid for WordPress installations older than 6.3.0. For newer installations, see the instructions on how to set the ID on a script tag on WordPress 6.3+.

/**
  * 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 );
  

Setting Options for WordPress Sites (WordPress Version ≥ 6.3)

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.

/**
  * 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 );
  

Browser Compatibility

The University Header is tested against the latest two versions of Chrome, Safari, Firefox and Edge, as well as Chrome for Android and Safari for iOS. Support for other browsers is not guaranteed.

Note: The University Header may not render properly if the <body> tag on your site has margins, padding, or other non-standard styles applied to it. Use a CSS Reset, CSS framework, or your own <body> tag styles to ensure consistent rendering across all browsers.