0.2.0 • Published 9 years ago
comic-viewer-tag v0.2.0
comic-viewer
A comic viewer built on Riot.js.
See this demo.
<comic-viewer title="Sample" pages="images/[000-012].jpg"></comic-viewer>
<script src="https://cdnjs.cloudflare.com/ajax/libs/riot/3.3.1/riot.min.js"></script>
<script src="comic-viewer.js"></script>
<script>riot.mount('comic-viewer')</script>Configure via attributes
<comic-viewer
title="Sample"
first-page-spread="no"
direction="manga"
pages="images/[000-012].jpg"
height="400"
width="700"
></comic-viewer>title: set title if needed (default empty)first-page-spread: setyesto make the first view double-faced (defaultno)direction: setcomicfor LtoR (defaultmanga)pages: set image urls likeimages/[000-003].jpg.[000-003]will expand to000001002003.height: set height of viewwidth: set width of view (default 100%)
Note: pages attribute is always required.
License
MIT © Tsutomu Kawamura