diff --git a/src/app/pages/external-app/card-links/card-links.component.html b/src/app/pages/external-app/card-links/card-links.component.html new file mode 100644 index 0000000000000000000000000000000000000000..7406b1e7878a730741c15638976b54a89ee8c95f --- /dev/null +++ b/src/app/pages/external-app/card-links/card-links.component.html @@ -0,0 +1,18 @@ +<div class="d-flex justify-content-center align-items-center h-100"> +<mat-card class="col-6" *ngFor="let c of cards"> + <mat-card-header> + <div mat-card-avatar> <img mat-card-image src="/assets/images/oia.png" > </div> + <mat-card-title>{{c.title}}</mat-card-title> + <mat-card-subtitle>{{c.subtitle}}</mat-card-subtitle> + </mat-card-header> + <img mat-card-image src="/assets/images/oia-page.png" alt="Photo of a Shiba Inu"> + <mat-card-content> + <p> + {{c.description}} + </p> + </mat-card-content> + <mat-card-actions class="d-flex justify-content-center"> + <a href="{{c.url}}" mat-button>OPEN</a> + </mat-card-actions> + </mat-card> +</div> \ No newline at end of file diff --git a/src/app/pages/external-app/card-links/card-links.component.scss b/src/app/pages/external-app/card-links/card-links.component.scss new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/app/pages/external-app/card-links/card-links.component.spec.ts b/src/app/pages/external-app/card-links/card-links.component.spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..5f825f9a3f33d455ce0441e6c39531879dd52ac7 --- /dev/null +++ b/src/app/pages/external-app/card-links/card-links.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { CardLinksComponent } from './card-links.component'; + +describe('CardLinksComponent', () => { + let component: CardLinksComponent; + let fixture: ComponentFixture<CardLinksComponent>; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ CardLinksComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(CardLinksComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/pages/external-app/card-links/card-links.component.ts b/src/app/pages/external-app/card-links/card-links.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..d47c906225b3a6f35260b38591aad2479de50c67 --- /dev/null +++ b/src/app/pages/external-app/card-links/card-links.component.ts @@ -0,0 +1,35 @@ +import { Component, OnInit } from '@angular/core'; +import { ConfigService } from '@ngx-config/core'; + +class Card { + url: string; //url link + title: string; //application name + image: string; //path into assets + description: string; //application description + responsible_partner?:string; + subtitle?:string; + avatar?:string; + + constructor(init?: Partial<Card>) { + Object.assign(this, init); + } + +} + +@Component({ + selector: 'ngx-card-links', + templateUrl: './card-links.component.html', + styleUrls: ['./card-links.component.scss'] +}) +export class CardLinksComponent implements OnInit { + + constructor(private configService: ConfigService) { } + + cards = Array<Card>(); + + ngOnInit(): void { + this.cards = this.configService.getSettings("external-application-cards"); + console.log(this.cards) + } + +} diff --git a/src/app/pages/external-app/external-app-routing.module.ts b/src/app/pages/external-app/external-app-routing.module.ts new file mode 100644 index 0000000000000000000000000000000000000000..38a66edc222d471e4aa31596daf106bfdec9b0cf --- /dev/null +++ b/src/app/pages/external-app/external-app-routing.module.ts @@ -0,0 +1,26 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; +import { ExternalAppComponent } from './external-app.component'; +import { CardLinksComponent } from './card-links/card-links.component'; +import { IframesComponent } from './iframes/iframes.component'; + + + +const routes: Routes = [{ + path: '', + component: ExternalAppComponent, + children: [{ + path: 'card-links', + component: CardLinksComponent, + }, { + path: 'iframes', + component: IframesComponent, + } + ], +}]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule], +}) +export class ExternalAppRoutingModule { } diff --git a/src/app/pages/external-app/external-app.component.ts b/src/app/pages/external-app/external-app.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..afe685b5ed56cf50f07130539644589ba9501e49 --- /dev/null +++ b/src/app/pages/external-app/external-app.component.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'ngx-external-app', + template: ` + <router-outlet></router-outlet> + `, +}) +export class ExternalAppComponent { +} diff --git a/src/app/pages/external-app/external-app.module.ts b/src/app/pages/external-app/external-app.module.ts new file mode 100644 index 0000000000000000000000000000000000000000..767274a7dfd8bdd55df867a1bed01d9b92a612e7 --- /dev/null +++ b/src/app/pages/external-app/external-app.module.ts @@ -0,0 +1,25 @@ +import { NgModule } from '@angular/core'; +import { CardLinksComponent } from './card-links/card-links.component'; +import { IframesComponent } from './iframes/iframes.component'; +import { ExternalAppComponent } from './external-app.component'; +import { ThemeModule } from '../../@theme/theme.module'; +import { ExternalAppRoutingModule } from './external-app-routing.module'; +import { NbCardModule } from '@nebular/theme'; +import {MatCardModule} from '@angular/material/card'; + +const components = [ + ExternalAppComponent, + CardLinksComponent, + IframesComponent, +]; + +@NgModule({ + declarations: [...components], + imports: [ + ThemeModule, + ExternalAppRoutingModule, + NbCardModule, + MatCardModule + ] +}) +export class ExternalAppModule { } diff --git a/src/app/pages/external-app/iframes/iframes.component.html b/src/app/pages/external-app/iframes/iframes.component.html new file mode 100644 index 0000000000000000000000000000000000000000..41bb86f8b07ca2ce7e3b0923c1dcc1735a753027 --- /dev/null +++ b/src/app/pages/external-app/iframes/iframes.component.html @@ -0,0 +1 @@ +<iframe src="https://idra.eng.it" width="100%" height="680" frameborder="0"></iframe> \ No newline at end of file diff --git a/src/app/pages/external-app/iframes/iframes.component.scss b/src/app/pages/external-app/iframes/iframes.component.scss new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/app/pages/external-app/iframes/iframes.component.spec.ts b/src/app/pages/external-app/iframes/iframes.component.spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..76906c839a768d32a27974bbde36e4bece79c447 --- /dev/null +++ b/src/app/pages/external-app/iframes/iframes.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { IframesComponent } from './iframes.component'; + +describe('IframesComponent', () => { + let component: IframesComponent; + let fixture: ComponentFixture<IframesComponent>; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ IframesComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(IframesComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/pages/external-app/iframes/iframes.component.ts b/src/app/pages/external-app/iframes/iframes.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..7139edf34e56d805588deb6afbf60c7eabbc566e --- /dev/null +++ b/src/app/pages/external-app/iframes/iframes.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'ngx-iframes', + templateUrl: './iframes.component.html', + styleUrls: ['./iframes.component.scss'] +}) +export class IframesComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/pages/pages-menu.ts b/src/app/pages/pages-menu.ts index c9e6d63f324ea20e7b478266d9c9d353e692e2ef..f99ad0ceff8eeb2978ecc2741f2b0e2384bd4383 100644 --- a/src/app/pages/pages-menu.ts +++ b/src/app/pages/pages-menu.ts @@ -5,25 +5,6 @@ export const MENU_ITEMS: NbMenuItem[] = [ title: 'SERVICES', group: true, }, - { - title: 'UI Features', - icon: 'keypad-outline', - link: '/pages/ui-features', - children: [ - { - title: 'Grid', - link: '/pages/ui-features/grid', - }, - { - title: 'Icons', - link: '/pages/ui-features/icons', - }, - { - title: 'Typography', - link: '/pages/ui-features/typography', - } - ], - }, { title: 'Maps', icon: 'map-outline', @@ -53,13 +34,38 @@ export const MENU_ITEMS: NbMenuItem[] = [ ], }, { - title: 'Miscellaneous', - icon: 'shuffle-2-outline', + title: 'External App', + icon: 'external-link-outline', + link: '/pages/external-app', + children: [ + { + title: 'Card Links', + link: '/pages/external-app/card-links', + }, + { + title: 'Iframes', + link: '/pages/external-app/iframes', + } + ], + }, + { + title: 'UI Features', + icon: 'keypad-outline', + link: '/pages/ui-features', children: [ { - title: '404', - link: '/pages/miscellaneous/404', + title: 'Grid', + link: '/pages/ui-features/grid', + }, + { + title: 'Icons', + link: '/pages/ui-features/icons', }, + { + title: 'Typography', + link: '/pages/ui-features/typography', + } ], }, + ]; diff --git a/src/app/pages/pages-routing.module.ts b/src/app/pages/pages-routing.module.ts index 1492c12ed7e75509e6a5b2f4a84edf8b6f8dff2e..fedfdf6be0f3ff9a4708332bb72a264f276fe1d2 100644 --- a/src/app/pages/pages-routing.module.ts +++ b/src/app/pages/pages-routing.module.ts @@ -9,16 +9,16 @@ const routes: Routes = [{ component: PagesComponent, children: [ + { + path: 'external-app', + loadChildren: () => import('./external-app/external-app.module') + .then(m => m.ExternalAppModule), + }, { path: 'ui-features', loadChildren: () => import('./ui-features/ui-features.module') .then(m => m.UiFeaturesModule), }, - { - path: 'miscellaneous', - loadChildren: () => import('./miscellaneous/miscellaneous.module') - .then(m => m.MiscellaneousModule), - }, { path: 'maps', loadChildren: () => import('./maps/maps.module') @@ -31,7 +31,7 @@ const routes: Routes = [{ }, { path: '', - redirectTo: 'ui-features', + redirectTo: 'external-app', pathMatch: 'full', }, { diff --git a/src/assets/config.json b/src/assets/config.json index a514dfe8a033285b938e7e0dd7e20e43c993f8e3..3faac0842b78aa9a8ac7143c91e9b6ac67769616 100644 --- a/src/assets/config.json +++ b/src/assets/config.json @@ -1,3 +1,13 @@ { - + "external-application-cards":[ + { + "url": "http://217.172.12.141:8080", + "title": "Open Innovation Area", + "subtitle":"The collaboration environment where you can be an active user.", + "avatar": "/assets/images/oia.png", + "image": "/assets/images/oia-page.png", + "description": "The Open Innovation Area (OIA) is an evolved Idea Management System that allows the stakeholders to track real needs and to address them by adopting a co-creation and innovation approach.", + "responsible_partner":"ENG" + } + ] } \ No newline at end of file diff --git a/src/assets/images/oia-page.png b/src/assets/images/oia-page.png new file mode 100644 index 0000000000000000000000000000000000000000..d6c8d405285916b56c374dfe5ee0aa7a5548c6e8 Binary files /dev/null and b/src/assets/images/oia-page.png differ diff --git a/src/assets/images/oia.png b/src/assets/images/oia.png new file mode 100644 index 0000000000000000000000000000000000000000..f916573a1f9eabe6b615dbc41e9322520082f2c0 Binary files /dev/null and b/src/assets/images/oia.png differ