Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional author information #507

Closed
marcoscaceres opened this issue Sep 28, 2015 · 4 comments
Closed

Additional author information #507

marcoscaceres opened this issue Sep 28, 2015 · 4 comments

Comments

@marcoscaceres
Copy link
Member

Authors would like to be able to add additional links to, for example, an ORCID, or even their twitter profile, linkedIn profile etc. As such, the author field should provide a means of adding additional links.

As part of the additional links, it would be good to allow authors to add a custom CSS class - that is, so they can style the link they way that they want.

In the document, it might appear like:

  • Marcos Caceres (twitter, linkedIn), Mozilla.

Or:

  • Ivan Herman (0000-0003-0782-2704, @ivan_herman), W3C.

Or some such...

@iherman
Copy link
Member

iherman commented Sep 29, 2015

Created a pull request for this, see #508. The approach is: for each name, the config file may include something of the form:

              ,   extras:     [{
                    name:  "0000-0003-0782-2704",
                    href:  "http://orcid.org/0000-0003-0782-2704",
                    label: "orcid"
                  }, {
                    name:  "@ivan_herman",
                    href:  "http://twitter.com/ivan_herman",
                    label: "twitter"
                  }]

where label and href are optional. The result is to add a comma separated list of span elements at the end of the name as follows:

<span class="LABEL VALUE"><a href="HREF VALUE">NAME VALUE</a></span>

In practice, the user can adapt the output with some CSS. For example, for the code above, the following CSS makes sense:

      span.twitter:before {
        content: url(figures/twitter_logo.png);
      }
      span.orcid:before {
        content: url(figures/orcid_logo.png);
        margin-right: 2px;
      }

(Unfortunately, neither twitter nor ORCID "servers" their logos from their site, at least not yet.)

@marcoscaceres
Copy link
Member Author

Few things:

  • label should really be class. Otherwise, people will ask why the label doesn't show up.
  • class should take an array. People might want multiple classes for whatever reason.

@marcoscaceres
Copy link
Member Author

Actually, let's just make class a string, like you have it now... people can just add "," :)

@iherman
Copy link
Member

iherman commented Sep 30, 2015

On 30 Sep 2015, at 24:27 , Marcos Caceres notifications@github.com wrote:

Few things:

label should really be class. Otherwise, people will ask why the label doesn't show up.
class should take an array. People might want multiple classes for whatever reason.

Changed label to class. Per your other comment, left the content unchanged

iherman added a commit that referenced this issue Oct 11, 2015
* Added an extra check to avoid a dangling ',' in the output

* Added a trim to the name of the extra entry, to avoid problems.

* Add initial config back to config object

* Force JSON parsing + recovery

* Add tests for author extras
@iherman iherman closed this as completed in 21efc4e Nov 1, 2015
marcoscaceres added a commit that referenced this issue Nov 4, 2015
* develop:
  v3.2.77
  Fix bug in editor name check
  Avoid double commas bug in WebIDL oldschool
  Bump to 4.2.1
  Adds additional author information (closes #507)
  Upgrade node to latest version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants