# For passwoard Use API Key (Jfrog -> Edit Profile -> API Key)
# For email: use your official email id
# Copy the token from ./.npmrc file and store in the env file
You need to configure the VP_ARTIFACTORY_TOKEN environment variable in your system. To retrieve the value, please log in to jfrog and configure your npm client by login into it.
The html tag must have a lang attribute whose value is the language tag for that locale's language and region, using the language and region subtags. For instance, the language tag for Irish English would be en-IE, while the language tag for United States Spanish would be es-US.
<!DOCTYPEhtml>
<htmllang="en-IE">
<!--
en-IE is for Ireland and English specifically;
use the value appropriate for the user's locale and language
Most pages will need only the the Graphik webfont. (If a page design specifies MarkWeb, consult your designer first before you add it. That font was used on the monolith for older VistaPrint site designs, and isn't part of our current branding.)
SWAN exports utility methods to retrieve the URLs for our hosted stylesheets, as shown below. Using these, you can add either hashed and versioned files.
If you are manually typing the URLs its advisable to use the versioned one.
<head>
<!--After configuring Fonts-->
<!--Configure StyleSheets: Note we are using versioned strategy, since getting hashed file name is not easy, use script approach for that. -->
<!--Replace {version} with the library version eg. 1.0.0 -->
<!--Replace default cdn domain name with locale based domain path-->
Most of our components are CSS and HTML only, and don't need any additional JavaScript. The components below require JavaScript, and we provide a vanilla JS implementation:
Accordion
Alert Box
core
Modal Dialog
Popover
Progress
Progressive Image
Tabs
Toggle Switch
<body>
<div>You Content</div>
<!--Replace {version} with the library version eg. 1.0.0 -->
<!--Replace default cdn domain name with locale based domain path-->
There are separate instructions on how to use SWAN design tokens in your project's stylesheets.
If you’re using node-sass in your project, we recommend that you use sass instead of node-sass with SWAN. The sass project works with all the major bundlers and frameworks (eg. gatsby, webpack, snowpack, parcel, etc) without you needing to change anything in the configuration.
npm uninstall node-sass # if already installed npm i sass -D
Configuring the Body
SWAN is built to be interoperable with other design systems to allow incremental adoption. In order to achieve this, everything related to swan must be within the swan class.
Page Structure
Pages need a single, consistent set of HTML tags and CSS classes for wrapping major elements of the page, to provide a standard layout, and to support any behaviors we want to be consistent across the site. Your individual environment may already be providing some of these tags, e.g. through SwanProvider when using the visage library. If so, do not duplicate them.
<bodyclass="swan">
<!-- this tag should be the first child of the body tag -->
<divclass="swan-site-content">
<!--Skip Link should be first focusable element for accessibility-->
<ahref="#maincontentstart"class="swan-skip-link">Skip to main content</a>
<!-- header goes here -->
<header>
Add your page header and navigation, generally added via bookends
</header>
<mainclass="swan-site-main">
<spanid="maincontentstart"></span>
<!-- for accessibility support -->
<!-- your page content goes here, bounded content is not requried, but is mostly used -->
<divclass="swan-bounded-content"></div>
</main>
<!-- footer goes here -->
<footer>Page footer, generally added via bookends</footer>