From 550db619b58c1f7c58b5520c42fade7784b0df1e Mon Sep 17 00:00:00 2001 From: Florent Gravin Date: Mon, 18 Sep 2023 10:10:16 +0200 Subject: [PATCH] geocat: adapt UI to geocat mockups add TW safelist for title layout Change title of app (#22) --- .../home/navigation-menu/navigation-menu.component.html | 2 +- .../home/navigation-menu/navigation-menu.component.ts | 4 ++-- .../record/header-record/header-record.component.html | 9 +++++---- apps/datahub/src/index.html | 2 +- apps/datahub/tailwind.config.js | 8 ++++++++ .../navigation-button/navigation-button.component.html | 4 ++-- tailwind.base.config.js | 5 +++++ 7 files changed, 24 insertions(+), 10 deletions(-) diff --git a/apps/datahub/src/app/home/navigation-menu/navigation-menu.component.html b/apps/datahub/src/app/home/navigation-menu/navigation-menu.component.html index 926a4b9a1..6ae2e0b86 100644 --- a/apps/datahub/src/app/home/navigation-menu/navigation-menu.component.html +++ b/apps/datahub/src/app/home/navigation-menu/navigation-menu.component.html @@ -6,7 +6,7 @@ ? 'decoration-primary' : 'decoration-transparent hover:decoration-primary transition-colors' " - class="hidden sm:block sm:py-4 uppercase truncate underline decoration-4 underline-offset-[19px]" + class="hidden sm:block sm:py-4 uppercase truncate font-title text-sm underline decoration-4 underline-offset-[19px]" [style.color]="foregroundColor" translate > diff --git a/apps/datahub/src/app/home/navigation-menu/navigation-menu.component.ts b/apps/datahub/src/app/home/navigation-menu/navigation-menu.component.ts index 076889164..147dedce8 100644 --- a/apps/datahub/src/app/home/navigation-menu/navigation-menu.component.ts +++ b/apps/datahub/src/app/home/navigation-menu/navigation-menu.component.ts @@ -9,7 +9,7 @@ import { ROUTER_ROUTE_NEWS, ROUTER_ROUTE_ORGANIZATIONS, } from '../../router/constants' -import { getThemeConfig } from '@geonetwork-ui/util/app-config' +// import { getThemeConfig } from '@geonetwork-ui/util/app-config' marker('datahub.header.news') marker('datahub.header.datasets') @@ -21,7 +21,7 @@ marker('datahub.header.organizations') changeDetection: ChangeDetectionStrategy.OnPush, }) export class NavigationMenuComponent { - foregroundColor = getThemeConfig().HEADER_FOREGROUND_COLOR || '#ffffff' + foregroundColor = /*getThemeConfig().HEADER_FOREGROUND_COLOR ||*/ '#ffffff' displayMobileMenu = false tabLinks = [ { diff --git a/apps/datahub/src/app/record/header-record/header-record.component.html b/apps/datahub/src/app/record/header-record/header-record.component.html index b4ceefb0a..ea7cff5a7 100644 --- a/apps/datahub/src/app/record/header-record/header-record.component.html +++ b/apps/datahub/src/app/record/header-record/header-record.component.html @@ -9,6 +9,7 @@ [label]="'datahub.search.back' | translate" [icon]="'matArrowBack'" [style.--navigation-button-color]="foregroundColor" + [style.--color-background]="'#ffffff'" > @@ -17,19 +18,19 @@ *ngIf="metadata?.uniqueIdentifier" [record]="metadata" [displayCount]="false" - class="flex text-background content-center" + class="flex text-background content-center bg-white rounded px-2 items-center justify-center font-semibold text-sm leading-5" [style.color]="foregroundColor" [style.--star-toggle-enabled-color]="foregroundColor" [style.--star-toggle-disabled-color]="foregroundColor" > - + > -->
- Datahub + geocat.ch diff --git a/apps/datahub/tailwind.config.js b/apps/datahub/tailwind.config.js index a08fdfc69..11f1ffeba 100644 --- a/apps/datahub/tailwind.config.js +++ b/apps/datahub/tailwind.config.js @@ -4,6 +4,14 @@ const { join } = require('path') module.exports = { ...baseConfig, + safelist: [ + ...baseConfig.safelist, + 'w-max', + 'items-end', + 'sm:h-36', + 'md:h-[10.5rem]', + 'h-20', + ], theme: { ...baseConfig.theme, extend: { diff --git a/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.html b/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.html index 29aca4a84..43a80493f 100644 --- a/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.html +++ b/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.html @@ -1,7 +1,7 @@