Skip to content

Commit

Permalink
Merge branch 'feature/445289_home_corrections' into 'develop'
Browse files Browse the repository at this point in the history
feature/445289_home_corrections

See merge request upm-inesdata/inesdata-public-portal-frontend!15
  • Loading branch information
ralconada-gmv committed Oct 9, 2024
2 parents 6f481de + 6ff1fe9 commit b82b303
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 19 deletions.
18 changes: 4 additions & 14 deletions src/app/pages/home/home.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
style="background-image: url('{{landingPageContent.welcomeBlock.backgroundImageUrl}}');">
<div class="absolute w-6 h-6 bottom-0 left-0 border-round p-4 font-bold ">
<h1 class="welcome-text">{{ landingPageContent.welcomeBlock.text }}</h1>
<button type="button" routerLink="/catalog"
class="cursor-pointer btn bg-primary-700 text-0 px-3 py-2 text-base border-none border-round-2xl flex flex-center">
<span>{{ landingPageContent.welcomeBlock.buttonText }}</span>
<img class="ml-2" src="../../../assets/images/arrow-right.svg" alt="Flecha derecha">
</button>
</div>
</div>
</div>
Expand All @@ -25,14 +20,13 @@ <h4 class="home-catalogo__subtitle">{{ landingPageContent.catalogBlock.descripti
<div *ngFor="let dataset of datasets | slice:0:5" class="home-catalogo__item" style="background-image: url('{{landingPageContent.catalogBlock.backgroundImageUrl}}')">
<div class="home-catalogo__item__content">
<div class="flex flex-justify-between">
<span class="home-catalogo__item-data">Tipo de Dataset</span>
<span class="home-catalogo__item-data">Tipo de Fuente</span>
<span class="home-catalogo__item-data">Tipo de Formato</span>
<span class="home-catalogo__item-data">{{ dataset.properties.assetType }}</span>
<span class="home-catalogo__item-data">{{ dataset.properties.format }}</span>
</div>
<h4 class="home-catalogo__item-title">{{!!dataset.properties.name ? dataset.properties.name : dataset.assetId}}</h4>
<p class="home-catalogo__item-description">Pellentesque suscipit fringilla libero eu ullamcorper. Cras risus eros, faucibus sit amet augue id, tempus pellentesque eros. In imperdiet tristique tincidunt.</p>
<p class="home-catalogo__item-description">{{ dataset.properties.shortDescription }}</p>
<div class="flex flex-justify-right">
<button class="home-catalogo__item-btn">
<button class="home-catalogo__item-btn" (click)="viewDataset(dataset)">
<span>Ver más</span>
<img class="ml-1" src="../../../assets/images/arrow-right-blue.svg" alt="arrow-right-blue">
</button>
Expand Down Expand Up @@ -63,10 +57,6 @@ <h1>{{ landingPageContent.getToKnowUsBlock.title }}</h1>
<div class="flex flex-column">
<h1 class="home-unete__title">{{ landingPageContent.joinBlock.title }}</h1>
<p class="home-unete__description">{{ landingPageContent.joinBlock.description }}</p>
<button type="button" class="btn bg-primary-700 text-0 px-3 py-2 text-base border-none border-round-2xl flex flex-center home-unete__btn">
<span>{{ landingPageContent.joinBlock.buttonText }}</span>
<img class="ml-2" src="../../../assets/images/arrow-right.svg" alt="Flecha derecha">
</button>
</div>
</div>

Expand Down
7 changes: 6 additions & 1 deletion src/app/pages/home/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { LandingPage } from 'src/app/shared/models/landing-page';
import { LandingPageService } from '../../shared/services/landing-page.service';
import { CatalogBrowserService } from '../../shared/services/catalog-browser.service';
import { QuerySpec } from '@think-it-labs/edc-connector-client';
import { Router } from '@angular/router';

/**
* Home component
Expand All @@ -25,7 +26,8 @@ export class HomeComponent {
* Component constructor
*/
constructor(private landingPageService: LandingPageService,
private catalogService: CatalogBrowserService) { }
private catalogService: CatalogBrowserService,
private router: Router) { }

ngOnInit() {
this.landingPageContent$ = this.fetch$
Expand All @@ -51,4 +53,7 @@ export class HomeComponent {
});
}

viewDataset(dataset: DataOffer) {
this.router.navigate(['/catalog', dataset.properties.participantId, dataset.assetId]);
}
}
3 changes: 1 addition & 2 deletions src/app/shared/models/catalog-block.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export interface CatalogBlock {
title: String,
description: String,
backgroundImageUrl: String,
buttonText: String
backgroundImageUrl: String
}
3 changes: 1 addition & 2 deletions src/app/shared/models/join-block.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export interface JoinBlock {
title: String,
description: String,
imageUrl: String,
buttonText: String
imageUrl: String
}

0 comments on commit b82b303

Please sign in to comment.