Below are simple and complex code snippets to be used enterprise-wide for things like sidebar content, buttons and accordions. If you do not have HTML experience or have issues using the snippets, let your Web Project Manager know.
We are using Twitter Bootstrap as a code base. In the below snippets there have been styles added for enterprise use. You are welcome to use Bootstrap solutions not seen here for your site, however if extra styling is needed eHC will need be involved.
Icon Library
A list of approved icons for use in HUT sites
Code Snippets
Icons
To add icons to the page, follow this format:
Example:
Notes:
- Request icon options from your WPM. Some icons are set in stone and others are more flexible. Here are list of the set icons.
- Replace 'x' in the example above with icon class name.
Buttons
To add buttons to the page, follow these formats:
Regular Button Small Button Button Spans Container
To add an icon button, follow this format:
Find Location & Directions
Example
Find Location & DirectionsNotes:
The addition of the class 'btn-primary' to all buttons will bring in the primary color for the background when we upgrade to BootStrap 3. Please start to use this as your standard.
Enable Side Navigation
To display side navigation add the following code to the /local/config.vtl file on your host. If you do not have access to this file, assign this task to your eHC migrator or FED assisting with your site build.
#*_________________________________*# #* Enable Sub Navigation *# #set ($enable_subnav_aside_left = true) ##set ($enable_subnav_aside_right = false)
Notes:
- Only set one of the values to true. If the other is false, be sure to put the two hash marks to the left of the 'set' in order to disable the line of code
- The navigation will not display on the No Asides and Three Even Sections templates
- When set to left, the navigation will not display on Page Aside Right and Two Asides Right
- When set to right, the navigation will not display on Page Aside Left and Two Asides Left
Aside Cards
The styles are written for the sidebars A and B, not the main content. When using this, do not remove the 'hr' tags or change any of the other mark-up unless it's adding list items or paragraphes. To add these aside cards to the page sidebar, follow this format:
Mark Up For Aside Cards
Use the style class="card card-aside" in order to style your aside cards that do not have ready made content. Evaluate the content for this area to be sure it does not need a structure created.
Items already having a ready made cards or content pulls are:
My Button That Goes Nowhere
- Locations
- Sub-Nav
- Related Physicians (either through Website Segment or the Clinician Spotlight)
Notes:
- Add 'filled' to the div class only if you want a solid background (live example).
- There is also an example of this snippet in the sidebar.
Floats
To float content we are using classes built into Twitter Bootstrap. We ask that you wrap the content you wish to float with 'span' tags and follow this format.
pull me left pull me right
To float an image to the left or right with the appropriate margin use the following:
pull me left with margin pull me right with margin
If you want to float content side by side, we have classes for widths to choose from.
- span1 - span12
Example to follow
Example:
Pull-Left
I'm using the pull-left class for both of these columns. The float is from Twitter Bootstrap.
Span6
I'm using the span6 class to use the enterprise styles that give two columns.
Notes:
Quotes & Call-Outs
To style quotes, follow this format:
Information
Example:
This is information I would like to call attention to.
Accordion
To add an accordion, follow this format:
Note: Do NOT use WYSIWYG mode when implementing or editing this mark-up. The CMS will remove tags code that will break the accordion on the page.
Anim pariatur cliche...
Anim pariatur cliche...
Example:
There are two places that hold the 'collapseOne' value. When you create a new 'accordion-group' you will need to replace that value with the next number in sequence.
- The 'in' class is on the previous 'accordion group' and not on this one. That is why the first group starts out open'
Notes:
- To add another accordion group copy the following section and be sure to change both occurances of collapseOne to the next consecutive number. In this case it would be #collapseThree.
Anim pariatur cliche...
- In the 'div' with the class 'accordion-body' there is an 'in' value that commands the accordion to start open. If you do not want this function remove it from the div.
Carousel
To add a photo carousel, follow this format:
Example:
Notes:
- Comment tags can be used around areas that need hidden such as the image title and description.
- Live Example
CRM
Formatting content in the 'pre' and 'post' containers for the CRM module:
My information here