Setup
Download
There are three ways to use Sparrow on your project:
- Download Sparrow directly from GitHub.
- Clone Sparrow from GitHub:
git@github.com:mashery/sparrow.git - Install Sparrow using your favorite package manager:
Quick Start
- Download and unzip Sparrow.
- Use
File Manager(underManage>Contentin Control Center) to upload your theme files, located in thedistfolder:css/main.cssjs/header.jsjs/main.js
- Link to your theme files under
Manage>Portal>Portal Settingsin Control Center:- Under
Custom JavaScript File Inclusion>Head JavaScript File URL, add/files/header.js. - Under
Custom JavaScript File Inclusion>Body JavaScript File URL, add/files/main.js. - Under
Custom CSS Files>Screen Stylesheet URL, add/files/main.css.
- Under
- In
Portal SettingsunderInline Javascript>Head Javascript, copy-and-paste the contents ofdist/templates/header.js. - In
Portal SettingsunderInline JavaScript>Body JavaScript, copy-and-paste the contents ofdist/templates/body.js. - In
Portal SettingsunderFooter Copyright, copy-and-paste the contents ofdist/templates/footer.html. - Click "Save."
- Head over to
Manage>Contentin Control Center and uncheck the box next toEnable TinyMCE. Copy-and-paste the contents ofdist/templates/landing-page.htmlinto theCustom Pagesdefault page. For Trial customers, usedist/templates/landing-page-trial.htmlinstead. - Add the Pattern Library.
Pattern Library
The Pattern Library is the living, interactive documentation for all of the features in Sparrow.
- Go to
Manage>Contentin Control Center. - Uncheck the box next to
Enable TinyMCE. - Create a new Custom Page called
Pattern Library. - Copy-and-paste the contents of
dist/templates/pattern-library.htmlinto the page and publish. - Click
Advanced Options. - Restrict access to this page to Portal admins and managers:
- Scroll down to
Page Visibility. - Select
Administratorfrom the dropdown menu. - Click
Add another roleand selectAPI Manager. - Repeat the previous step for
Content ManagerandPortal Manager.
- Scroll down to
- Change
DrafttoPublished. - Click "Save" to publish.
You can view the Pattern Library on your Portal at your-portal-url.com/pattern_library.