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
>Content
in Control Center) to upload your theme files, located in thedist
folder:css/main.css
js/header.js
js/main.js
- Link to your theme files under
Manage
>Portal
>Portal Settings
in 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 Settings
underInline Javascript
>Head Javascript
, copy-and-paste the contents ofdist/templates/header.js
. - In
Portal Settings
underInline JavaScript
>Body JavaScript
, copy-and-paste the contents ofdist/templates/body.js
. - In
Portal Settings
underFooter Copyright
, copy-and-paste the contents ofdist/templates/footer.html
. - Click "Save."
- Head over to
Manage
>Content
in Control Center and uncheck the box next toEnable TinyMCE
. Copy-and-paste the contents ofdist/templates/landing-page.html
into theCustom Pages
default page. For Trial customers, usedist/templates/landing-page-trial.html
instead. - Add the Pattern Library.
Pattern Library
The Pattern Library is the living, interactive documentation for all of the features in Sparrow.
- Go to
Manage
>Content
in 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.html
into the page and publish. - Click
Advanced Options
. - Restrict access to this page to Portal admins and managers:
- Scroll down to
Page Visibility
. - Select
Administrator
from the dropdown menu. - Click
Add another role
and selectAPI Manager
. - Repeat the previous step for
Content Manager
andPortal Manager
.
- Scroll down to
- Change
Draft
toPublished
. - Click "Save" to publish.
You can view the Pattern Library on your Portal at your-portal-url.com/pattern_library
.