From 8a57c35eaba8c85a85babcbe554955d287b2b053 Mon Sep 17 00:00:00 2001 From: Olivia Guyot Date: Fri, 13 Oct 2023 00:09:09 +0200 Subject: [PATCH] use carrousel in datahub record API and links lists --- .../src/lib/data-apis/data-apis.component.css | 18 ++++++++++++++++ .../lib/data-apis/data-apis.component.html | 21 +++++++++++++------ .../data-otherlinks.component.css | 18 ++++++++++++++++ .../data-otherlinks.component.html | 20 ++++++++++++++---- 4 files changed, 67 insertions(+), 10 deletions(-) diff --git a/libs/feature/record/src/lib/data-apis/data-apis.component.css b/libs/feature/record/src/lib/data-apis/data-apis.component.css index e69de29bb2..fdbe6cd0c8 100644 --- a/libs/feature/record/src/lib/data-apis/data-apis.component.css +++ b/libs/feature/record/src/lib/data-apis/data-apis.component.css @@ -0,0 +1,18 @@ +/* + this computes the space outside of the main column when using `container-lg px-4` + FIXME: this component is dependant on the datahub context and should be in the app instead +*/ +:host { + --container-outside-width: calc(50vw - 1024px / 2); +} +@media (max-width: 1024px) { + :host { + --container-outside-width: 1rem; + } +} + +gn-ui-carousel { + display: block; + margin-left: calc(-1 * var(--container-outside-width)); + margin-right: calc(-1 * var(--container-outside-width)); +} diff --git a/libs/feature/record/src/lib/data-apis/data-apis.component.html b/libs/feature/record/src/lib/data-apis/data-apis.component.html index 4aa7bd198b..b7b623d5e7 100644 --- a/libs/feature/record/src/lib/data-apis/data-apis.component.html +++ b/libs/feature/record/src/lib/data-apis/data-apis.component.html @@ -1,16 +1,25 @@

record.metadata.api

-
-
+ diff --git a/libs/feature/record/src/lib/data-otherlinks/data-otherlinks.component.css b/libs/feature/record/src/lib/data-otherlinks/data-otherlinks.component.css index e69de29bb2..fdbe6cd0c8 100644 --- a/libs/feature/record/src/lib/data-otherlinks/data-otherlinks.component.css +++ b/libs/feature/record/src/lib/data-otherlinks/data-otherlinks.component.css @@ -0,0 +1,18 @@ +/* + this computes the space outside of the main column when using `container-lg px-4` + FIXME: this component is dependant on the datahub context and should be in the app instead +*/ +:host { + --container-outside-width: calc(50vw - 1024px / 2); +} +@media (max-width: 1024px) { + :host { + --container-outside-width: 1rem; + } +} + +gn-ui-carousel { + display: block; + margin-left: calc(-1 * var(--container-outside-width)); + margin-right: calc(-1 * var(--container-outside-width)); +} diff --git a/libs/feature/record/src/lib/data-otherlinks/data-otherlinks.component.html b/libs/feature/record/src/lib/data-otherlinks/data-otherlinks.component.html index 7dae5599f6..91be0773da 100644 --- a/libs/feature/record/src/lib/data-otherlinks/data-otherlinks.component.html +++ b/libs/feature/record/src/lib/data-otherlinks/data-otherlinks.component.html @@ -1,13 +1,25 @@

record.metadata.links

-
+ -
+