ink-elements
v2.0.1
Published
Custom elements for publishing documents via HTML and CSS
Downloads
6
Readme
Ink Elements
Custom elements for publishing documents via HTML and CSS. Requires use of paged.js Paged Media polyfill.
Demo
Install
Install the component:
$ npm install ink-elements --save
Or download as ZIP.
Usage
- Import polyfills:
<script src="https://unpkg.com/pagedjs/dist/paged.polyfill.js"></script>
<script src="node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
- Import custom element:
<script type="module" src="node_modules/ink-elements/ink-page-xref.js"></script>
- Start using it!
<p>See page <ink-page-xref ref="html-id"></ink-page-xref> for more information.</p>;
Development
In order to run, test and modify this project locally you'll need to follow these steps:
Install pre-requisites for Polymer CLI (git, npm, Node.js).
Install Polymer CLI:
npm install -g polymer-cli@next
Clone this repo:
git clone https://github.com/ink-elements/ink-elements.git
Change directory to the top-level project folder and install project dependencies:
cd ink-elements npm install
To preview your element, run the Polymer development server from the top-level project folder:
polymer serve --open
To verify code style run:
yarn build