forked from geonetwork/geonetwork-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request geonetwork#765 from geonetwork/DH/redesign-header
[Datahub] [Resdesign] Header section
- Loading branch information
Showing
20 changed files
with
173 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 50 additions & 24 deletions
74
apps/datahub/src/app/record/header-record/header-record.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,62 @@ | ||
<header class="w-full h-[231px]" [style.background]="backgroundCss"> | ||
<header class="w-full h-[255px]" [style.background]="backgroundCss"> | ||
<div | ||
class="h-full container-lg mx-auto flex flex-col justify-center relative" | ||
class="h-full container-lg mx-auto flex flex-col justify-between relative" | ||
> | ||
<gn-ui-favorite-star | ||
*ngIf="metadata?.uniqueIdentifier" | ||
[record]="metadata" | ||
class="absolute text-background top-[0.85em] right-[0.85em]" | ||
[style.color]="foregroundColor" | ||
[style.--star-toggle-enabled-color]="'var(--color-primary)'" | ||
[style.--star-toggle-disabled-color]="foregroundColor" | ||
></gn-ui-favorite-star> | ||
<div class="flex flex-row justify-between content-center mt-3"> | ||
<div class="ml-4"> | ||
<gn-ui-navigation-button | ||
(click)="back()" | ||
[label]="'datahub.search.back' | translate" | ||
[icon]="'arrow_back'" | ||
> | ||
</gn-ui-navigation-button> | ||
</div> | ||
<div class="flex flex-row mr-6 content-center gap-3"> | ||
<gn-ui-favorite-star | ||
*ngIf="metadata?.uniqueIdentifier" | ||
[record]="metadata" | ||
[displayCount]="false" | ||
class="flex text-background content-center" | ||
[style.color]="foregroundColor" | ||
[style.--star-toggle-enabled-color]="foregroundColor" | ||
[style.--star-toggle-disabled-color]="foregroundColor" | ||
></gn-ui-favorite-star> | ||
<gn-ui-language-switcher | ||
*ngIf="showLanguageSwitcher" | ||
class="language-switcher text-[13px] text-white bg-opacity-0 border border-white rounded mt-0.5" | ||
></gn-ui-language-switcher> | ||
</div> | ||
</div> | ||
<div | ||
*ngIf="metadata" | ||
class="font-title text-center px-2 text-[28px] mb-[41px] line-clamp-4 sm:mx-48" | ||
class="font-title text-[28px] max-w-screen-sm line-clamp-4 ml-4" | ||
[style.color]="foregroundColor" | ||
> | ||
{{ metadata.title }} | ||
</div> | ||
|
||
<div class="absolute" style="left: 16px; top: 16px"> | ||
<gn-ui-navigation-button | ||
(click)="back()" | ||
[label]="'datahub.search.back' | translate" | ||
[icon]="'navigate_before'" | ||
<div class="flex flex-row text-white gap-2 mb-4 ml-4"> | ||
<div | ||
*ngIf="(isGeodata$ | async) === true" | ||
class="flex flex-row bg-primary-darker rounded" | ||
> | ||
</gn-ui-navigation-button> | ||
<span class="material-symbols-outlined mt-0.5 ml-2 text-[20px]"> | ||
my_location | ||
</span> | ||
<p class="text-white ml-2 mr-2" translate>record.metadata.type</p> | ||
</div> | ||
<div *ngIf="metadata.recordUpdated" class="flex flex-row gap-1"> | ||
<p class="text-white" translate>record.metadata.lastUpdate</p> | ||
<p class="text-white"> | ||
{{ lastUpdate }} | ||
</p> | ||
</div> | ||
<div *ngIf="metadata.status" class="flex flex-row gap-2"> | ||
<p>•</p> | ||
<p | ||
class="text-white" | ||
[innerHTML]="'domain.record.status.' + metadata.status | translate" | ||
></p> | ||
</div> | ||
</div> | ||
</div> | ||
</header> | ||
|
||
<div | ||
class="container-lg mt-[-40px] z-20 sticky lg:mx-auto inset-x-0 top-[10px]" | ||
> | ||
<datahub-navigation-bar></datahub-navigation-bar> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 12 additions & 4 deletions
16
libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,18 @@ | ||
<div> | ||
<span class="align-text-top mr-1.5 favorite-count" *ngIf="hasFavoriteCount">{{ | ||
favoriteCount | ||
}}</span> | ||
<div class="flex flex-row content-center"> | ||
<span | ||
class="align-text-top mr-1.5 mt-1.5 favorite-count" | ||
*ngIf="hasFavoriteCount && displayCount" | ||
>{{ favoriteCount }}</span | ||
> | ||
<gn-ui-star-toggle | ||
[toggled]="isFavorite$ | async" | ||
(newValue)="toggleFavorite($event)" | ||
[disabled]="loading || (isAnonymous$ | async)" | ||
class="mt-1" | ||
></gn-ui-star-toggle> | ||
<span | ||
class="align-text-top ml-1.5 favorite-count mt-1.5" | ||
*ngIf="!displayCount" | ||
translate="datahub.record.addToFavorites" | ||
></span> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 8 additions & 3 deletions
11
libs/ui/inputs/src/lib/navigation-button/navigation-button.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
<button | ||
class="group flex items-center justify-center backdrop-blur p-1 bg-primary-opacity-50 text-white rounded" | ||
class="group flex items-center justify-center gap-1 backdrop-blur p-1 bg-primary-opacity-30 text-white rounded content-center" | ||
> | ||
<mat-icon class="material-symbols-outlined align-middle">{{ icon }}</mat-icon> | ||
<span class="mx-2 hidden group-hover:inline">{{ label }}</span> | ||
<mat-icon class="material-symbols-outlined align-middle w-[18px]">{{ | ||
icon | ||
}}</mat-icon> | ||
<span | ||
class="mx-2 mt-0.5 text-[16px] tracking-widest content-center opacity-75" | ||
>{{ label.toUpperCase() }}</span | ||
> | ||
</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.