0.0.7 • Published 1 year ago
wc-wikimage v0.0.7
A web component for images from wikimedia commons
Installation
Installation
npm i wc-wikimage
Import from NPM
<script type="module" src="node_modules/wc-wikimage/index.js"></script>
Import from CDN TODO
<script
type="module"
src="https://cdn.jsdelivr.net/???gh/????/wc-wikimage/index.js"
></script>
Usage
Two attributes are handled:
title
: mandatory allow to fetch data from wikimedia apis.caption
: will add a caption to the figure.
<wc-wikimage title="Arts_et_Metiers_Pascaline_dsc03869.jpg"></wc-wikimage>
<wc-wikimage title="Bistability_graph.svg"></wc-wikimage>
<wc-wikimage title="WheelGraph.png" caption="wheel graphs" ></wc-wikimage>
Special thanks
- Web component architecture: https://github.com/vanillawc/