Commit 40040842 by Tuukka Kivilahti

some stuff before lint

1 parent 200495bc
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
"prefix": "app", "prefix": "app",
"mobile": false, "mobile": false,
"styles": [ "styles": [
"styles.css", "../node_modules/bootstrap/dist/css/bootstrap.min.css",
"../node_modules/bootstrap/dist/css/bootstrap.min.css" "styles.css"
], ],
"scripts": [], "scripts": [],
"environmentSource": "environments/environment.ts", "environmentSource": "environments/environment.ts",
...@@ -57,5 +57,10 @@ ...@@ -57,5 +57,10 @@
"pipe": true, "pipe": true,
"service": true "service": true
} }
} },
"lint": [
{
"project": "src/tsconfig.json"
}
]
} }
#top-container { #top-container {
width: 100%;
display: flex; display: flex;
} }
...@@ -16,9 +17,11 @@ ...@@ -16,9 +17,11 @@
} }
#topbar { #topbar {
border: 1px solid red; margin-bottom: 30px;
} }
#content { #content {
border: 1px solid yellow; border: 1px solid yellow;
display: flex;
flex-direction: row;
} }
...@@ -33,7 +33,7 @@ const appRoutes: Routes = [ ...@@ -33,7 +33,7 @@ const appRoutes: Routes = [
{ path: 'info', { path: 'info',
children: [ children: [
{ path: '', component: InfoMenuComponent, outlet: "left-menu" }, { path: '', component: InfoMenuComponent, outlet: "left-menu" },
{ path: '', pathMatch: 'full', component: InfoComponent }, { path: '', pathMatch: 'full', component: OldMoyaComponent },
{ path: 'old', component: OldMoyaComponent }, { path: 'old', component: OldMoyaComponent },
] ]
}, },
......
#topNav {
padding: 10px 10px 10px 30px;
display: flex;
background-color: white;
}
.topNavItem {
display: inline-block;
padding: 10px 20px 10px 20px;
margin-right: 10px;
font-family: Roboto;
font-size: 14px;
color: #FFFFFF;
letter-spacing: 0;
opacity: 0.5;
min-width: 100px;
text-align: center;
}
.topNavItem.active {
opacity: 1.0;
}
#userTopNav {
background: #2b2c3a;
}
#infoTopNav {
background: #de821f;
}
#adminTopNav {
background: #69B1A1;
}
<nav> <nav id="topNav">
<a class="topNavItem" id="userTopNav" routerLink="/user" routerLinkActive="active" i18n>USER</a> <a class="topNavItem" id="userTopNav" routerLink="/user" routerLinkActive="active" i18n>Kävijänäkymä</a>
<a class="topNavItem" id="infoTopNav" routerLink="/info" routerLinkActive="active" i18n>INFO</a> <a class="topNavItem" id="infoTopNav" routerLink="/info" routerLinkActive="active" [queryParams]="{p: 'useradmin/list.jsf'}" i18n>Infonäkymä</a>
<a class="topNavItem" id="adminTopNav" routerLink="/admin" routerLinkActive="active" i18n>ADMIN</a> <a class="topNavItem" id="adminTopNav" routerLink="/admin" routerLinkActive="active" i18n>Ylläpitonäkymä</a>
</nav> </nav>
:host {
display: flex;
flex-grow: 1;
}
#oldMoyaFrame {
flex-grow: 1;
}
<iframe [src]="frameUrl | safe" width="100%" [height]="height" #iframe (load)="changeUrl()" frameborder="0"></iframe><br /> <iframe id="oldMoyaFrame" [src]="frameUrl | safe" [height]="height" #iframe (load)="changeUrl()" frameborder="0"></iframe>
...@@ -4,7 +4,7 @@ import {NavigationExtras, ActivatedRoute, Router} from "@angular/router"; ...@@ -4,7 +4,7 @@ import {NavigationExtras, ActivatedRoute, Router} from "@angular/router";
import {Observable} from "rxjs"; import {Observable} from "rxjs";
@Component({ @Component({
selector: 'app-old-moya', selector: 'old-moya',
providers: [Location, {provide: LocationStrategy, useClass: PathLocationStrategy}], providers: [Location, {provide: LocationStrategy, useClass: PathLocationStrategy}],
templateUrl: './old-moya.component.html', templateUrl: './old-moya.component.html',
styleUrls: ['./old-moya.component.css'] styleUrls: ['./old-moya.component.css']
...@@ -17,7 +17,7 @@ export class OldMoyaComponent implements OnInit { ...@@ -17,7 +17,7 @@ export class OldMoyaComponent implements OnInit {
@ViewChild('iframe') iframe: any; @ViewChild('iframe') iframe: any;
height: string = "1000px"; height: string = "700px";
...@@ -41,9 +41,13 @@ export class OldMoyaComponent implements OnInit { ...@@ -41,9 +41,13 @@ export class OldMoyaComponent implements OnInit {
this.location.replaceState(this.location.path(false).split("?", 1)[0] + "?p=" + tmpFrameUrl[1]); this.location.replaceState(this.location.path(false).split("?", 1)[0] + "?p=" + tmpFrameUrl[1]);
} }
console.log(this.iframe.nativeElement.contentWindow.document.body.height);
this.height = this.iframe.nativeElement.contentWindow.document.body.scrollHeight + "px"; this.height = this.iframe.nativeElement.contentWindow.document.body.scrollHeight + "px";
console.log(this.height);
} }
......
/* You can add global styles to this file, and also import other style files */ /* You can add global styles to this file, and also import other style files */
@import url('https://fonts.googleapis.com/css?family=Roboto');
@import '~@angular/material/prebuilt-themes/indigo-pink.css'; @import '~@angular/material/prebuilt-themes/indigo-pink.css';
body {
background-color: #f2f3f9;
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!