create sdg component and add sdg img assets

deprecated
Alex Martzios 2 years ago
parent b2e9a76170
commit da544109aa

@ -9,6 +9,7 @@ const routes: Routes = [
//{ path: 'home', loadChildren: './home/home.module#HomeModule'},
{path: 'home', redirectTo: '', pathMatch: 'full'},
{path: 'mail-preferences', loadChildren: () => import('./userEmailPreferences/mailPrefs.module').then(m => m.LibMailPrefsModule)},
{path: 'sdg', loadChildren: () => import('./sdg/sdg.module').then(m => m.SdgModule)},
// ORCID Pages
{path: 'orcid', loadChildren: () => import('./orcid/orcid.module').then(m => m.LibOrcidModule)},
{path: 'my-orcid-links', loadChildren: () => import('./orcid/my-orcid-links/myOrcidLinks.module').then(m => m.LibMyOrcidLinksModule)},

@ -0,0 +1,13 @@
import {NgModule} from '@angular/core';
import {RouterModule} from '@angular/router';
import {SdgComponent} from './sdg.component';
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: SdgComponent, canDeactivate: [PreviousRouteRecorder] }
])
]
})
export class SdgRoutingModule { }

@ -0,0 +1,54 @@
.sdg-card {
color: #F9F9F9 !important;
}
.sdg-1 {
background-color: #E6233D;
}
.sdg-2 {
background-color: #DF9F00;
}
.sdg-3 {
background-color: #19A220;
}
.sdg-4 {
background-color: #D70023;
}
.sdg-5 {
background-color: #FF0B00;
}
.sdg-6 {
background-color: #00BFE8;
}
.sdg-7 {
background-color: #FFC300;
}
.sdg-8 {
background-color: #B10240;
}
.sdg-9 {
background-color: #FF5D00;
}
.sdg-10 {
background-color: #F50D86;
}
.sdg-11 {
background-color: #FF8A00;
}
.sdg-12 {
background-color: #CA8A03;
}
.sdg-13 {
background-color: #2B772B;
}
.sdg-14 {
background-color: #0098DF;
}
.sdg-15 {
background-color: #00B91C;
}
.sdg-16 {
background-color: #0069A2;
}
.sdg-17 {
background-color: #1C336A;
}

@ -0,0 +1,50 @@
<!-- <schema2jsonld *ngIf="url" [URL]="url" [name]="pageTitle" type="other" [description]="description"></schema2jsonld> -->
<div class="uk-container uk-container-large uk-section uk-section-small uk-padding-remove-bottom">
<div class="uk-padding-small">
<breadcrumbs [breadcrumbs]="breadcrumbs"></breadcrumbs>
</div>
</div>
<div class="uk-container uk-container-large uk-section" uk-scrollspy="target: [uk-scrollspy-class]; cls: uk-animation-slide-bottom-medium; delay: 200">
<div class="uk-grid uk-grid-large uk-grid-stack uk-padding-small" uk-grid>
<div class="uk-width-3-5@m uk-width-1-1@s">
<h1 uk-scrollspy-class>Lorem ipsum dolor sit amet, consetetur<span class="">.</span></h1>
<div uk-scrollspy-class>
We have implemented the UN Sustainable Development Goals ( SDGs) as a <br> classification scheme covering areas of research associated with one or more SDGs <br> (the majority of the SDGs are interrelated). The scheme uses automated allocation <br> of the 17 SDGs and their associated targets and indicators to all fitting documents in <br> Dimensions thereby addressing research areas aligned to the goals.
</div>
<a class="uk-display-inline-block uk-text-uppercase uk-button-text uk-margin-top" uk-scrollspy-class
routerLinkActive="router-link-active" routerLink="/">
<span class="uk-flex uk-flex-middle">
<span>Learn More</span>
</span>
</a>
</div>
<div class="uk-width-2-5@m uk-width-1-1@s uk-text-center">
<img src="../../assets/explore-assets/sdgs-badge.png" loading="lazy">
</div>
</div>
</div>
<div class="uk-container uk-container-large uk-section" uk-scrollspy="target: [uk-scrollspy-class]; cls: uk-animation-slide-bottom-medium; delay: 200">
<div *ngIf="sdgs && sdgs.length" class="uk-padding-small uk-grid uk-child-width-1-4@m" uk-grid>
<div *ngFor="let sdg of sdgs">
<a href="https://beta.explore.openaire.eu/search/advanced/research-outcomes?f0=sdg&fv0={{sdg.id}}" target="_blank">
<div class="uk-card uk-card-default uk-card-body" [class]="'sdg-card sdg-' + sdg.code">
<div class="uk-text-center uk-margin-bottom">
<div>
<span class="uk-text-large uk-text-bold">50</span>
<p class="uk-text-small" style="margin-top: 5px; margin-bottom: 5px;">Research Outcomes</p>
</div>
<div>
<img [src]="'../../assets/explore-assets/sdgs/g' + sdg.code + '.png'" alt="">
</div>
</div>
<div class="uk-text-small">
{{sdg.code}}
</div>
<div class="uk-text-small uk-text-bold uk-text-uppercase">
{{sdg.label}}
</div>
</div>
</a>
</div>
</div>
</div>

@ -0,0 +1,28 @@
import {HttpClient} from "@angular/common/http";
import {Component, OnInit} from "@angular/core";
import {Breadcrumb} from "../openaireLibrary/utils/breadcrumbs/breadcrumbs.component";
@Component({
selector: 'sdg',
templateUrl: 'sdg.component.html',
styleUrls: ['sdg.component.css']
})
export class SdgComponent implements OnInit {
public sdgs: any = [];
public breadcrumbs: Breadcrumb[] = [{name: 'home', route: '/'}, {name: 'SDG'}];
constructor(
private httpClient: HttpClient
) {}
ngOnInit() {
this.httpClient.get('/assets/vocabulary/sdg.json').subscribe(data => {
// console.log(data['sdg']);
this.sdgs = data['sdg'];
console.log(this.sdgs);
})
}
}

@ -0,0 +1,28 @@
import {CommonModule} from "@angular/common";
import {NgModule} from "@angular/core";
import {FormsModule} from "@angular/forms";
import {RouterModule} from "@angular/router";
import {PreviousRouteRecorder} from "../openaireLibrary/utils/piwik/previousRouteRecorder.guard";
import {BreadcrumbsModule} from "../openaireLibrary/utils/breadcrumbs/breadcrumbs.module";
import {SdgRoutingModule} from './sdg-routing.module';
import {SdgComponent} from './sdg.component';
@NgModule({
imports: [
CommonModule, FormsModule, RouterModule,
SdgRoutingModule, BreadcrumbsModule
],
declarations: [
SdgComponent
],
providers: [
PreviousRouteRecorder
],
exports: [
SdgComponent
]
})
export class SdgModule {
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 850 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 871 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 795 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 998 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 808 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 821 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -3,54 +3,54 @@
{
"code": "1",
"id": "1. No poverty",
"label": "1. No poverty"
"label": "No poverty"
},
{
"code": "2",
"id": "2. Zero hunger",
"label": "2. Zero hunger"
"label": "Zero hunger"
},{
"code": "3",
"id": "3. Good health",
"label": "3. Good health"
"label": "Good health"
},
{
"code": "4",
"id": "4. Education",
"label": "4. Education"
"label": "Education"
},
{
"code": "5",
"id": "5. Gender equality",
"label": "5. Gender equality"
"label": "Gender equality"
},{
"code": "6",
"id": "6. Clean water",
"label": "6. Clean water"
"label": "Clean water"
},
{
"code": "7",
"id": "7. Clean energy",
"label": "7. Clean energy"
"label": "Clean energy"
},
{
"code": "8",
"id": "8. Economic growth",
"label": "8. Economic growth"
"label": "Economic growth"
},{
"code": "9",
"id": "9. Industry and infrastructure",
"label": "9. Industry and infrastructure"
"label": "Industry and infrastructure"
},
{
"code": "10",
"id": "10. No inequality",
"label": "10. No inequality"
"label": "No inequality"
},
{
"code": "11",
"id": "11. Sustainability",
"label": "11. Sustainability"
"label": "Sustainability"
},{
"code": "12",
"id": "12. Responsible consumption",
@ -59,28 +59,26 @@
{
"code": "13",
"id": "13. Climate action",
"label": "13. Climate action"
"label": "Climate action"
},
{
"code": "14",
"id": "14. Life underwater",
"label": "14. Life underwater"
"label": "Life underwater"
},{
"code": "15",
"id": "15. Life on land",
"label": "15. Life on land"
"label": "Life on land"
},
{
"code": "16",
"id": "16. Peace & justice",
"label": "16. Peace & justice"
"label": "Peace & justice"
},
{
"code": "17",
"id": "17. Partnership",
"label": "17. Partnership"
"label": "Partnership"
}
]
}

Loading…
Cancel
Save