From da49dcaabd684f847400f0469ef02f873900c1cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olov=20Ylinenp=C3=A4=C3=A4?= <51744858+olovy@users.noreply.github.com> Date: Mon, 28 Oct 2024 14:15:46 +0100 Subject: [PATCH] feat(lxl-web): clickable Identifier uri, e.g. ISNI (#1132) 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 --- lxl-web/src/app.css | 2 +- lxl-web/src/lib/assets/json/display-web.json | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lxl-web/src/app.css b/lxl-web/src/app.css index 4773c2fe5..252716ee7 100644 --- a/lxl-web/src/app.css +++ b/lxl-web/src/app.css @@ -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; } diff --git a/lxl-web/src/lib/assets/json/display-web.json b/lxl-web/src/lib/assets/json/display-web.json index 90887539e..9498979e8 100644 --- a/lxl-web/src/lib/assets/json/display-web.json +++ b/lxl-web/src/lib/assets/json/display-web.json @@ -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" + ] } } }, @@ -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",