Name: orcid_in_respec
Owner: World Wide Web Consortium
Description: Script to add an ORCID reference to authors and editors in respec
Created: 2018-03-12 11:39:54.0
Updated: 2018-03-12 12:25:43.0
Pushed: 2018-03-12 14:41:10.0
Homepage: null
Size: 36
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
The orcid.js
script can be used to add an ORCID reference to an editor/author of a specification when editing it using respec. The reference is an image (the ORCID logo as provided by the ORCID site), added right after the name and affiliation of a person, and linking to the persons ORCID ID:
Copy the orcid.js
in a folder of choice, and add a reference to the script in the header of the respec source as:
ipt src="PATH_TO_FOLDER/orcid.js" class="remove"></script>
Add the following to the respecConfig
structure:
Process: [show_orcid],
This method is invoked by respec after all other respec processing is done. The link to the script does not appear in the generated HTML file (ie, the script is not needed for the final publication).
The author and/or editor structure should contain two entries: w3cid
(the identifier of the person at W3C, used for other purposes as well), and orcid
, that contains the person?s ORCID ID. For example:
ors: [
{
...
},
{
"name": "Ivan Herman",
...,
"w3cid": 7382,
"orcid": "0000-0003-0782-2704"
},
...
(The value of w3cid
can be found, for example, on one?s W3C user profile.)
The script generates the following structure into the DOM tree:
n class="orcid"><a href="https://orcid.org/ORCIDID"><img src="https://orcid.org/sites/default/files/images/orcid_16x16.gif"></a></span>
Ie, using the orcid
class the output can be styles. A typical CSS statement may be:
.orcid a {
border-bottom: none !important;
To avoid a bottom border on the ORCID logo.
Ivan Herman, ivan@w3.org, 2018
Copyright (c) 2018 W3CŪ (MIT, ERCIM, Keio, Beihang). See separate license for details.