From 40f370c3fcbe56c38d248169afd2661fd40d9f3e Mon Sep 17 00:00:00 2001 From: gradedSystem Date: Thu, 27 Feb 2025 15:36:29 +0800 Subject: [PATCH 1/3] [UI/UX][xs] API button out of line fix --- ckanext/nhs/fanstatic/sass/theme/_general.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ckanext/nhs/fanstatic/sass/theme/_general.scss b/ckanext/nhs/fanstatic/sass/theme/_general.scss index a09ba13a..75a450ab 100644 --- a/ckanext/nhs/fanstatic/sass/theme/_general.scss +++ b/ckanext/nhs/fanstatic/sass/theme/_general.scss @@ -837,7 +837,7 @@ a.btn-primary.active.focus { } .resource_actions { - display: flex; + display: inline-block; align-items: center; } .user-page-action { From f5c792591399d3ebda0338bd2909f25aa071cd78 Mon Sep 17 00:00:00 2001 From: gradedSystem Date: Thu, 27 Feb 2025 16:11:14 +0800 Subject: [PATCH 2/3] [UI/UX] Fixing li tag margin-bottom --- ckanext/nhs/fanstatic/css/nhsuk.css | 2 +- ckanext/nhs/fanstatic/sass/theme/_general.scss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ckanext/nhs/fanstatic/css/nhsuk.css b/ckanext/nhs/fanstatic/css/nhsuk.css index ebe23497..995b6db6 100644 --- a/ckanext/nhs/fanstatic/css/nhsuk.css +++ b/ckanext/nhs/fanstatic/css/nhsuk.css @@ -565,7 +565,7 @@ ul { .nhsuk-list>li, ol>li, ul>li { - margin-bottom: 8px + margin-bottom: 8px !important; } @media (min-width:40.0625em) { diff --git a/ckanext/nhs/fanstatic/sass/theme/_general.scss b/ckanext/nhs/fanstatic/sass/theme/_general.scss index 75a450ab..a09ba13a 100644 --- a/ckanext/nhs/fanstatic/sass/theme/_general.scss +++ b/ckanext/nhs/fanstatic/sass/theme/_general.scss @@ -837,7 +837,7 @@ a.btn-primary.active.focus { } .resource_actions { - display: inline-block; + display: flex; align-items: center; } .user-page-action { From 391178d56846e35d643cd91286629affa1642a1e Mon Sep 17 00:00:00 2001 From: Sneha Sharma Date: Thu, 15 May 2025 15:01:35 +0400 Subject: [PATCH 3/3] Fix[m]: Fixed fullscreen preview with filters --- ckanext/nhs/fanstatic/css/nhs.css | 23 +++++++ .../package/snippets/resource_view.html | 68 +++++++++++++++++-- 2 files changed, 87 insertions(+), 4 deletions(-) diff --git a/ckanext/nhs/fanstatic/css/nhs.css b/ckanext/nhs/fanstatic/css/nhs.css index 231a5db9..509f9392 100644 --- a/ckanext/nhs/fanstatic/css/nhs.css +++ b/ckanext/nhs/fanstatic/css/nhs.css @@ -1912,3 +1912,26 @@ blockquote { align-content: flex-start !important; } } /*# sourceMappingURL=nhs.css.map */ + + +/* Base style */ +#resource-view-iframe-fullscreen { + position: relative; +} + +#resource-view-iframe-fullscreen.is-fullscreen { + background: #fff; + overflow: auto; + padding: 1rem; + width: 100vw; + height: 100vh; + position: fixed; + top: 0; + left: 0; + z-index: 9999; +} + +/* Adjust .actions position when fullscreen-mode class is active */ +.fullscreen-mode .module-resource .actions { + right: 0 !important; +} diff --git a/ckanext/nhs/templates/package/snippets/resource_view.html b/ckanext/nhs/templates/package/snippets/resource_view.html index ce6d7058..8ac8a468 100644 --- a/ckanext/nhs/templates/package/snippets/resource_view.html +++ b/ckanext/nhs/templates/package/snippets/resource_view.html @@ -25,9 +25,10 @@
- + {{ _("Fullscreen") }} @@ -81,9 +82,15 @@ {# When previewing we need to stick the whole resource_view as a param as there is no other way to pass to information on to the iframe #} {% set src = h.url_for(qualified=true, controller='package', action='resource_view', id=package['name'], resource_id=resource['id']) + '?' + h.urlencode({'resource_view': h.dump_json(resource_view)}) %} {% endif %} +
+ +
{% endif %}