Skip to content

Commit

Permalink
geocat: adapt UI to geocat mockups
Browse files Browse the repository at this point in the history
add TW safelist for title layout

Change title of app (#22)
  • Loading branch information
fgravin authored and jahow committed Nov 28, 2024
1 parent 0528af7 commit 07e14a4
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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 = [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
[label]="'datahub.search.back' | translate"
[icon]="'matArrowBack'"
[style.--navigation-button-color]="foregroundColor"
[style.--color-background]="'#ffffff'"
>
</gn-ui-navigation-button>
</div>
Expand All @@ -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"
></gn-ui-favorite-star>
<gn-ui-language-switcher
<!-- <gn-ui-language-switcher
*ngIf="showLanguageSwitcher"
class="language-switcher text-[13px] mt-0.5"
[style.--color-main]="foregroundColor"
[style.--color-gray-300]="foregroundColor"
[style.--color-primary-darker]="foregroundColor"
[style.--color-primary-black]="foregroundColor"
></gn-ui-language-switcher>
></gn-ui-language-switcher> -->
</div>
</div>
<div
Expand All @@ -41,7 +42,7 @@
</div>
<div
class="flex flex-row flex-wrap items-center gap-4 mb-4 ml-4 sm:mr-[332px]"
[style.color]="foregroundColor"
[style.color]="'#ffffff'"
>
<gn-ui-badge
*ngIf="(isGeodata$ | async) === true"
Expand Down
2 changes: 1 addition & 1 deletion apps/datahub/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en" class="overflow-y-scroll">
<head>
<meta charset="utf-8" />
<title>Datahub</title>
<title>geocat.ch</title>
<base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="assets/css/materials-symbols-outline.css" />
Expand Down
8 changes: 8 additions & 0 deletions apps/datahub/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<button
class="group flex items-center justify-center gap-1 backdrop-blur p-1 bg-primary-opacity-30 rounded content-center"
class="bg-white text-xs font-semibold group flex items-center justify-center gap-1 backdrop-blur py-1.5 px-2 bg-primary-opacity-30 rounded content-center"
>
<ng-icon [name]="icon" class="align-middle w-[18px]"></ng-icon>
<ng-icon [name]="icon" class="align-middle w-[18px] text-primary"></ng-icon>
<span
class="mx-2 mt-0.5 text-[16px] tracking-widest content-center opacity-75"
>{{ label.toUpperCase() }}</span
Expand Down
5 changes: 5 additions & 0 deletions tailwind.base.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module.exports = {
safelist: [],
theme: {
extend: {
colors: {
Expand Down Expand Up @@ -53,6 +54,10 @@ module.exports = {
'var(--font-family-title, ui-serif, Georgia, Cambria, "Times New Roman", Times, serif)', // alias for serif
mono: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',
},
// specific for geocat
fontWeight: {
title: '600',
},
fontSize: {
13: '13px',
21: [
Expand Down

0 comments on commit 07e14a4

Please sign in to comment.