Skip to content

Commit

Permalink
feat(lxl-web): clickable Identifier uri, e.g. ISNI (#1132)
Browse files Browse the repository at this point in the history
Display uri in Identifier as external link.

* Add uri to Identifier-chips
* Use uriToId() to make uri a "fake @id" for Identifier
* Only show ext-link arrow on 'a' elements
  • Loading branch information
olovy authored Oct 28, 2024
1 parent 838d91f commit da49dca
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lxl-web/src/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
@apply mx-auto px-4 sm:px-8;
}

.ext-link::after {
a.ext-link::after {
content: '\2009↗';
@apply align-[10%] text-icon;
}
Expand Down
13 changes: 12 additions & 1 deletion lxl-web/src/lib/assets/json/display-web.json
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,17 @@
"@type": "fresnel:Lens",
"showProperties": ["name", "qualifier"],
"classLensDomain": "Bibliography"
},
"Identifier": {
"@id": "Identifier-chips",
"@type": "fresnel:Lens",
"classLensDomain": "Identifier",
"showProperties": [
{ "alternateProperties": ["value", "marc:hiddenValue"] },
"typeNote",
"hasNote",
"uri"
]
}
}
},
Expand Down Expand Up @@ -487,7 +498,7 @@
"@id": "Identifier-format",
"@type": "fresnel:Format",
"fresnel:classFormatDomain": ["Identifier"],
"fresnel:resourceStyle": ["displayType()"]
"fresnel:resourceStyle": ["ext-link", "displayType()", "uriToId()"]
},
"contribution-format": {
"@id": "contribution-format",
Expand Down

0 comments on commit da49dca

Please sign in to comment.