Skip to content

Components and Utilities

Jo Dickson edited this page Jun 7, 2019 · 1 revision

In addition to having access to Athena Framework styles, the components and utilities listed below are available for use with the UCF WordPress Theme:

Navigation

Components

Utilities


Chevron lists

Demo of basic horizontal chevron lists

Add extra emphasis to an unordered list with gold chevron icons (using FontAwesome).

Gold chevrons will grow and shrink relative to the font size of the unordered list.

Basic usage

<ul class="list-chevrons">
<li>list item</li>
<li>list item</li>
<li>list item</li>
</ul>

The .list-chevrons list can be combined with other utility classes to modify the space between each list item, or re-arrange how they're stacked:

Vertical list

<ul class="list-chevrons d-flex flex-column">
<li>list item</li>
<li>list item</li>
<li>list item</li>
</ul>

Horizontal list with increased space between each list item

<ul class="list-chevrons">
<li class="mr-3">list item</li>
<li class="mr-3">list item</li>
<li>list item</li>
</ul>

NOTE: Chevron lists are currently not compatible with Athena's .nav classes.


Count up (animated number increments)

Demo of number animation

Animate numbers on page load using the .count-up class and optional data attributes. The animation will only run once.

Supports numbers that include commas, but other characters are not supported (e.g. decimals, dollar signs) and are removed when the increment animation begins.

Use sparingly! This feature is best suited for promotional/marketing percentages and statistics.

Usage

Basic

<span class="count-up">12,345</span>

With "$", "%", other characters

Need to increment a percentage, dollar amount, or decimal value? Wrap valid numbers in separate <span>'s, like so:

<span class="count-up">75</span>%

$<span class="count-up">12,345</span>.<span class="count-up">67</span>

Options

Option Description Default
data-start The number the animation should start from 0
data-num The number that the animation should complete with The number wrapped within the .count-up element

Usage with data-attribute options

<span class="count-up" data-start="5" data-num="10">10</span>

Fact grids, icons

Demo of basic fact grid

Demo of fact grid using Athena grid classes

Fact grids provide a large, stylized option for displaying statistics and other pieces of information. The fact grid classes are designed to be used on their own, or in conjunction with Athena rows and columns for more advanced layout generation.

By default, fact blocks will be 100% width stacked at the -xs breakpoint, then be 50% wide at -sm+ (creating rows of 2 blocks each). If Athena grid classes are also used, the .col- sizes will take effect instead.

Fact grid usage

Basic usage

Creates a 2x2 fact grid:

<div class="fact-grid-wrap">
  <div class="fact-grid">
    <div class="fact-block">...</div>
    <div class="fact-block">...</div>
    <div class="fact-block">...</div>
    <div class="fact-block">...</div>
  </div>
</div>

With Athena rows + columns

Creates a 1x3 row of blocks. (Example uses the Athena Shortcodes Plugin)

[container class="fact-grid-wrap"]
[row class="fact-grid"]
[col sm="4" class="fact-block"]...[/col]
[col sm="4" class="fact-block"]...[/col]
[col sm="4" class="fact-block"]...[/col]
[/row]
[/container]

Fact block usage

Fact grids are expected to contain an even number of fact blocks.

Fact blocks should consist of two parts: a header (either an icon, or arbitrary text), and some descriptive content.

With a text header

Text-based fact headers are expected to be used in conjunction with other utility classes to modify font face, size, etc. Remember to test your font overrides at all breakpoints to ensure your text fits at all supported screen sizes.

<div class="fact-block">
  <aside>
    <div class="fact-header">123,456</div>
    <p>My description</p>
  </aside>
</div>

With an image/icon header

If your image contains text not included in the fact description, remember to add it to the <img> alt text!

<div class="fact-block">
  <aside>
    <img class="fact-header fact-header-icon img-fluid" src="..." alt="...">
    <p>My description</p>
  </aside>
</div>

Using image/icon and text headers together

Use the .fact-header-lg class in conjunction with .fact-header to enforce fixed heights and vertical positioning across all fact headers within a grid.

<div class="fact-block">
  <aside>
    <div class="fact-header fact-header-lg">123,456</div>
    <p>My description</p>
  </aside>
</div>
<div class="fact-block">
  <aside>
    <img class="fact-header fact-header-lg fact-header-icon img-fluid" src="..." alt="...">
    <p>My description</p>
  </aside>
</div>

Classes

.fact-grid-wrap

The outer wrapper element for a fact grid. Required. Can be combined with Athena .container's.

.fact-grid-row

Contains single rows of fact blocks. Required. Can be combined with Athena .row's.

.fact-block

Outermost element for a single fact block. Required. Can be combined with Athena's .col-* classes.

.fact-header

Represents a header within a fact block. Required for all fact headers (image or text).

.fact-header-lg

Optional header modifier class that enforces a fixed height on the fact header for consistency across all blocks in the grid.

.fact-header-icon

Header modifier class for image-based fact headers only. Enforces a fixed height for image/icon fact headers at the -xs breakpoint.


Media background video start/stop buttons

Demo of media background video toggle button

This theme comes with built-in JavaScript and utility classes for defining buttons that pause/play media background videos. Playback settings are stored per-user via a cookie. If a user disables playback on one page, it is disabled on subsequent page loads.

This button is always applied to page headers that include video. This button should always be included on any media background video for accessibility reasons; do not attempt to hide, disable, or exclude it.

Need to include a media background programatically in a child theme? Use existing media background utility functions to generate a media background; see includes/media-backgrounds.php.

Usage

<div class="media-background-container">
  <video class="hidden-xs-down media-background media-background-video object-fit-cover" muted>
    ...
  </video>
  <button class="media-background-video-toggle btn play-enabled hidden-xs-up" type="button" data-toggle="button" aria-pressed="false" aria-label="Play or pause background videos">
    <span class="fa fa-pause media-background-video-pause" aria-hidden="true"></span>
    <span class="fa fa-play media-background-video-play" aria-hidden="true"></span>
  </button>
</div>

Box shadows

Example of soft and hard box shadows

Hard and soft box shadow utility classes allow you to add emphasis to block-level elements. Use sparingly!

Classes

.box-shadow-soft

Adds a soft, spread, dark shadow.

.box-shadow-soft-inverse

Adds a soft, spread, white shadow.

.box-shadow-hard

Adds a sharp, 1px dark shadow.

.box-shadow-hard-inverse

Adds a sharp, 1px white shadow.


Rotate

Example of left- and right-rotated images

Rotation utilities are available to add visual contrast for block-level elements. Useful for showcasing things like publications, viewbooks, etc. Use sparingly!

Not recommended for text, buttons, etc. due to readability concerns.

Classes

.rotate-left

Rotates the element at a slight left angle.

.rotate-right

Rotates the element at a slight right angle.


Text shadows

Example of soft and hard text shadows

Hard and soft text shadow utility classes allow you to add emphasis to text. Use sparingly!

Best suited for text overlaid on top of high-contrast media background images/video to help improve readability.

Classes

.text-shadow-soft

Adds a soft, spread, dark shadow.

.text-shadow-soft-inverse

Adds a soft, spread, white shadow.

.text-shadow-hard

Adds a sharp, 1px dark shadow.

.text-shadow-hard-inverse

Adds a sharp, 1px white shadow.

Clone this wiki locally