Skip to content

Commit

Permalink
Update Additional asset (#1261)
Browse files Browse the repository at this point in the history
  • Loading branch information
viktoria-mahmud authored May 9, 2023
1 parent 856473c commit a5b1866
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

{{#downloadLink}}
<div>
<a class="additional-asset__link additional-asset__link--download" href="{{url}}"{{#fileName}} download="{{fileName}}"{{/fileName}}>{{{downloadLink.name}}}</a>
<a class="additional-asset__link additional-asset__link--download" href="{{link.url}}"{{#fileName}} download="{{fileName}}"{{/fileName}}>{{{link.name}}}</a>
</div>
{{/downloadLink}}
</dd>
11 changes: 3 additions & 8 deletions source/_patterns/01-molecules/components/additional-asset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,13 @@ properties:
downloadLink:
type: object
properties:
url:
type: string
minLength: 1
name:
type: string
minLength: 1
link:
$ref: ../../../non-pattern-schema/link.yaml
fileName:
type: string
minLength: 1
required:
- url
- name
- link
allOf:
-
required:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
},

"downloadLink": {
"url": "#downloadLink",
"name": "Download me",
"link": {
"url": "#",
"name": "Download me"
},
"fileName": "#download-me.png"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@
},

"downloadLink": {
"url": "#downloadLink",
"name": "Download me",
"link": {
"url": "#downloadLink",
"name": "Download me"
},
"fileName": "#download-me.png"
}
},
Expand All @@ -72,8 +74,10 @@
},

"downloadLink": {
"url": "#downloadLink",
"name": "Download me",
"link": {
"url": "#downloadLink",
"name": "Download me"
},
"fileName": "#download-me.png"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@
},

"downloadLink": {
"url": "#downloadLink",
"name": "Download me",
"link": {
"url": "#downloadLink",
"name": "Download me"
},
"fileName": "#download-me.png"
}
},
Expand All @@ -71,8 +73,10 @@
},

"downloadLink": {
"url": "#downloadLink",
"name": "Download me",
"link": {
"url": "#downloadLink",
"name": "Download me"
},
"fileName": "#download-me.png"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@
},

"downloadLink": {
"url": "#downloadLink",
"name": "Download me",
"link": {
"url": "#downloadLink",
"name": "Download me"
},
"fileName": "#download-me.png"
}
},
Expand All @@ -73,8 +75,10 @@
},

"downloadLink": {
"url": "#downloadLink",
"name": "Download me",
"link": {
"url": "#downloadLink",
"name": "Download me"
},
"fileName": "#download-me.png"
}

Expand All @@ -97,8 +101,10 @@
},

"downloadLink": {
"url": "#downloadLink",
"name": "Download me",
"link": {
"url": "#downloadLink",
"name": "Download me"
},
"fileName": "#download-me.png"
}
},
Expand All @@ -116,8 +122,10 @@
},

"downloadLink": {
"url": "#downloadLink",
"name": "Download me",
"link": {
"url": "#downloadLink",
"name": "Download me"
},
"fileName": "#download-me.png"
}

Expand Down
12 changes: 8 additions & 4 deletions source/_patterns/02-organisms/components/additional-assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
"nonDoiLink": "https://example.com/a-non-doi-link",

"downloadLink": {
"url": "#downloadLink",
"name": "Download me",
"link": {
"url": "#downloadLink",
"name": "Download me"
},
"fileName": "#download-me.png"
}
},
Expand All @@ -30,8 +32,10 @@
},

"downloadLink": {
"url": "#downloadLink",
"name": "Download me",
"link": {
"url": "#downloadLink",
"name": "Download me"
},
"fileName": "#download-me.png"
}
}
Expand Down
12 changes: 8 additions & 4 deletions source/_patterns/04-pages/article--figures.json
Original file line number Diff line number Diff line change
Expand Up @@ -670,8 +670,10 @@
"nonDoiLink": "https://example.com/a-non-doi-link",

"downloadLink": {
"url": "#downloadLink",
"name": "Download me",
"link": {
"url": "#downloadLink",
"name": "Download me"
},
"fileName": "#download-me.png"
}
},
Expand All @@ -688,8 +690,10 @@
},

"downloadLink": {
"url": "#downloadLink",
"name": "Download me",
"link": {
"url": "#downloadLink",
"name": "Download me"
},
"fileName": "#download-me.png"
}
}
Expand Down

0 comments on commit a5b1866

Please sign in to comment.