Skip to content
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.

Financial-Times/o-header--theme-ic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This component is now deprecated

o-header--theme-ic

This component is a theme for o-header. It includes o-header and then the required CSS to give the Investors Chronicle branding.

A table of contents to help people find things

Usage

This component includes on o-header as a dependency, so you only need to explicitly include component in your project.

Markup

There is a lot of markup for this component, an illustrative version of it can be seen in the demos.

JavaScript

No code will run automatically unless you are using the Build Service. You must either construct an oHeader object or fire the o.DOMContentLoaded event, which oComponent listens for.

Constructing an oHeader object

const oHeader = require('o-header');

oHeader.init();

Firing an oDomContentLoaded event

document.addEventListener('DOMContentLoaded', function() {
	document.dispatchEvent(new CustomEvent('o.DOMContentLoaded'));
});

Sass

As with all Origami components, o-header--theme-ic has a silent mode. To use its compiled CSS (rather than using its mixins with your own Sass) set $o-o-header--theme-ic-is-silent : false; in your Sass after you've imported the o-header--theme-ic Sass.

Contributing

Please let the Origami team know if you'd like push access to this repository. Building Origami components locally all works in the same way:

  1. Clone this repository
  2. Install the Origami Build Tools globally: $ npm install -g origami-build-tools
  3. On the command line, in the o-header--theme-ic directory run:
    1. $ obt install // this will install all of this component's dependencies including bower and npm if you don't have them
    2. You may need to add a .bowerrc file to tell bower where to look for Origami dependencies. OBT will let you know if you need to do this and how to do it.
    3. $ obt build // this will build all of this component's dependencies
    4. $ obt demo --runServer --watch // this will run all of this projects demos, which you'll now be able to see in a browser
  4. You can now work on the Sass, JS, or demos of this project and see the results

Contact

If you have any questions or comments about this component, or need help using it, please either raise an issue, visit #ft-origami or email Origami Support.


Licence

This software is published by the Financial Times under the MIT licence.