https://github.com/emilymclean/wikicite
Easy Wikipedia style citations using jQuery
https://github.com/emilymclean/wikicite
citation javascript jquery
Last synced: 10 days ago
JSON representation
Easy Wikipedia style citations using jQuery
- Host: GitHub
- URL: https://github.com/emilymclean/wikicite
- Owner: emilymclean
- License: gpl-3.0
- Created: 2019-12-12T07:25:44.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-10-01T13:02:19.000Z (over 4 years ago)
- Last Synced: 2024-12-18T20:16:47.101Z (2 months ago)
- Topics: citation, javascript, jquery
- Language: JavaScript
- Homepage:
- Size: 31.3 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WikiCite
Only requires jQuery!Easy Wikipedia style citations using jQuery. Demo at https://bushfi.re or https://arctro.com/open/WikiCite

## Usage
To use WikiCite, first create either an inline or linked citation.
### Inline
``` htmlContent that the citation is attached to.
```
### Linked
``` jsvar linkedCitations = [
new Citation("identifier", "Citation text")
];```
...
``` htmlContent that the citation is attached to.
```
Once you have input citations, you can then call:
``` js
$("body").cite(linkedCitations, [configuration, callback]);
```
to automatically create citation markers.You can also add a general reference box by creating a container with the id "complete-citation-container", like such:
``` html
```## Configuration
WikiCite can be configured by an optional configuration object
``` js
CitationConfiguration(
enableCompleteCitationContainer = true, // Enable the general reference box
completeCitationContainer = "#complete-citation-container", // Set the id of the general reference box container
completeCitationContainerTitle = "References
", // Set the title of the general reference box
enableHoverContainer = true, // Enable the hover reference box
hoverArrowOffset = 30, // Where the center of the hover arrow is
hoverContainerFadeLength = 50) // How long the hover box fade should take
```## Future
* I plan on adding structured citations with formatting
* I also plan on adding little "link to use" markers to the general reference box