Skip to content

Commit

Permalink
Update Article download links list (#1263)
Browse files Browse the repository at this point in the history
  • Loading branch information
viktoria-mahmud authored May 12, 2023
1 parent a5b1866 commit 7d0e422
Show file tree
Hide file tree
Showing 12 changed files with 154 additions and 95 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
"items": [
{
"primary": {
"name": "Article",
"url": "#",
"link": {
"name": "Article",
"url": "#"
},
"attributes": [
{
"key": "foo",
Expand All @@ -22,14 +24,18 @@
},
{
"primary": {
"name": "Figures",
"url": "#"
"link": {
"name": "Figures",
"url": "#"
}
}
},
{
"primary": {
"name": "Executable version",
"url": "#eraLink"
"link": {
"name": "Executable version",
"url": "#eraLink"
}
},
"secondary": {
"name": "What are executable versions?",
Expand All @@ -43,21 +49,27 @@
"items": [
{
"primary": {
"name": "Mendeley",
"url": "#"
"link": {
"name": "Mendeley",
"url": "#"
}
}
},
{
"primary": {
"name": "ReadCube (broken)",
"url": "#",
"link": {
"name": "ReadCube (broken)",
"url": "#"
},
"checkPMC": "https://ncbi.nlm.nih.gov/pmc/utils/idconv/v1.0/?ids=10.7554/eLife.broken&format=json"
}
},
{
"primary": {
"name": "ReadCube (working)",
"url": "#",
"link": {
"name": "ReadCube (working)",
"url": "#"
},
"checkPMC": "https://ncbi.nlm.nih.gov/pmc/utils/idconv/v1.0/?ids=10.7554/eLife.73360&format=json"
}
}
Expand All @@ -71,14 +83,18 @@
"items": [
{
"primary": {
"name": "Download BibTex",
"url": "#"
"link": {
"name": "Download BibTex",
"url": "#"
}
}
},
{
"primary": {
"name": "Download RIS",
"url": "#"
"link": {
"name": "Download RIS",
"url": "#"
}
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
<span data-behaviour="CheckPMC" data-check-available="{{checkPMC}}" data-display-on-available="<a href='{{url}}' class='article-download-links-list__link'{{#attributes}} data-{{key}}{{#value}}='{{value}}'{{/value}}{{/attributes}}>{{{name}}}</a>"></span>
{{/checkPMC}}
{{^checkPMC}}
<a href="{{url}}"
<a href="{{link.url}}"
class="article-download-links-list__link"
{{#attributes}}data-{{key}}{{#value}}="{{value}}"{{/value}}{{/attributes}}
>{{{name}}}</a>
>{{{link.name}}}</a>
{{/checkPMC}}
{{/primary}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,8 @@ properties:
primary:
type: object
properties:
name:
type: string
minLength: 1
url:
type: string
minLength: 1
link:
$ref: ../../../non-pattern-schema/link.yaml
checkPMC:
type: string
minLength: 1
Expand All @@ -55,20 +51,9 @@ properties:
required:
- key
required:
- name
- url
- link
secondary:
type: object
properties:
name:
type: string
minLength: 1
url:
type: string
minLength: 1
required:
- name
- url
$ref: ../../../non-pattern-schema/link.yaml
required:
- primary
required:
Expand Down
18 changes: 12 additions & 6 deletions source/_patterns/04-pages/article--figures.json
Original file line number Diff line number Diff line change
Expand Up @@ -739,20 +739,26 @@
"items": [
{
"primary": {
"name": "Article PDF",
"url": "#"
"link": {
"name": "Article PDF",
"url": "#"
}
}
},
{
"primary": {
"name": "Figures PDF",
"url": "#"
"link": {
"name": "Figures PDF",
"url": "#"
}
}
},
{
"primary": {
"name": "Executable version",
"url": "#eraLink"
"link": {
"name": "Executable version",
"url": "#eraLink"
}
},
"secondary": {
"name": "What are executable versions?",
Expand Down
30 changes: 20 additions & 10 deletions source/_patterns/04-pages/article--magazine.json
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,10 @@
"items": [
{
"primary": {
"name": "Article PDF",
"url": "#"
"link": {
"name": "Article PDF",
"url": "#"
}
}
}
]
Expand All @@ -271,14 +273,18 @@
"items": [
{
"primary": {
"name": "Mendeley",
"url": "#"
"link": {
"name": "Mendeley",
"url": "#"
}
}
},
{
"primary": {
"name": "ReadCube",
"url": "#"
"link": {
"name": "ReadCube",
"url": "#"
}
}
}
]
Expand All @@ -291,14 +297,18 @@
"items": [
{
"primary": {
"name": "Download BibTex",
"url": "#"
"link": {
"name": "Download BibTex",
"url": "#"
}
}
},
{
"primary": {
"name": "Download RIS",
"url": "#"
"link": {
"name": "Download RIS",
"url": "#"
}
}
}
]
Expand Down
18 changes: 12 additions & 6 deletions source/_patterns/04-pages/article--research.json
Original file line number Diff line number Diff line change
Expand Up @@ -605,20 +605,26 @@
"items": [
{
"primary": {
"name": "Article PDF",
"url": "#"
"link": {
"name": "Article PDF",
"url": "#"
}
}
},
{
"primary": {
"name": "Figures PDF",
"url": "#"
"link": {
"name": "Figures PDF",
"url": "#"
}
}
},
{
"primary": {
"name": "Executable version",
"url": "#eraLink"
"link": {
"name": "Executable version",
"url": "#eraLink"
}
},
"secondary": {
"name": "What are executable versions?",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -654,20 +654,26 @@
"items": [
{
"primary": {
"name": "Article PDF",
"url": "#"
"link": {
"name": "Article PDF",
"url": "#"
}
}
},
{
"primary": {
"name": "Figures PDF",
"url": "#"
"link": {
"name": "Figures PDF",
"url": "#"
}
}
},
{
"primary": {
"name": "Executable version",
"url": "#eraLink"
"link": {
"name": "Executable version",
"url": "#eraLink"
}
},
"secondary": {
"name": "What are executable versions?",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,20 +245,26 @@
"items": [
{
"primary": {
"name": "Article PDF",
"url": "#"
"link": {
"name": "Article PDF",
"url": "#"
}
}
},
{
"primary": {
"name": "Figures PDF",
"url": "#"
"link": {
"name": "Figures PDF",
"url": "#"
}
}
},
{
"primary": {
"name": "Executable version",
"url": "#eraLink"
"link": {
"name": "Executable version",
"url": "#eraLink"
}
},
"secondary": {
"name": "What are executable versions?",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -387,20 +387,26 @@
"items": [
{
"primary": {
"name": "Article PDF",
"url": "#"
"link": {
"name": "Article PDF",
"url": "#"
}
}
},
{
"primary": {
"name": "Figures PDF",
"url": "#"
"link": {
"name": "Figures PDF",
"url": "#"
}
}
},
{
"primary": {
"name": "Executable version",
"url": "#eraLink"
"link": {
"name": "Executable version",
"url": "#eraLink"
}
},
"secondary": {
"name": "What are executable versions?",
Expand Down
Loading

0 comments on commit 7d0e422

Please sign in to comment.