@ewc-lib/ewc-footer-notes
v1.1.3-alpha
Published
![Screenshot](./screenshot.png)
Downloads
23
Keywords
Readme
Screenshot
A simple footnote with 2 lines: 1st line is a note, 2nd line is a fixed text ("Source: Eurostat - ") and a link (access to dataset).
API
There are the following attributes:
- note - sets the text of the footnote (the first line).
- If text is omitted, line is omitted as well.
- Can be changed during runtime.
- url - sets the URL for the link (2nd line).
- Opens link in the same tab.
- Can be changed during runtime.
Usage with WebPack
package.json
"dependencies": {
"@ewc-lib/ewc-footer-notes": "latest"
}
index.html
<!DOCTYPE html>
<html>
<head>
<style>
body{
font-family: 'Arial', sans-serif;
margin: 0;
}
</style>
</head>
<body>
<script src="bundle.js"></script>
<ewc-footer-notes
note="This is a demonstration of a footer note."
url="https://ec.europa.eu/eurostat/">
</ewc-footer-notes>
<script>
document.getElementsByTagName("ewc-footer-notes")[0].setAttribute("note","Footnote and URL changed!")
document.getElementsByTagName("ewc-footer-notes")[0].setAttribute("url","https://duckduckgo.com")
</script>
</body>
</html>
index.js
import "@ewc-lib/ewc-footer-notes"