Skip to content

Commit

Permalink
Feat: added a conf card to the UI
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyNahas committed Jan 9, 2018
1 parent 0e9bc16 commit 4b490fd
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 16 deletions.
42 changes: 29 additions & 13 deletions demo-app/src/app/app.component.html
@@ -1,10 +1,11 @@
<mat-toolbar color="primary">
<mat-icon style="padding-right: 1rem">menu</mat-icon>
<mat-icon style="padding-right: 1rem">photo</mat-icon>
<span>ngx-image-gallery</span>

<span class="fill-remaining"></span>

<mat-icon>code</mat-icon>
<!--todo-->
<mat-icon>info</mat-icon>
</mat-toolbar>

<div fxLayout="row"
Expand All @@ -28,8 +29,19 @@
(onImageChange)="galleryImageChanged($event)"
(onDelete)="deleteImage($event)">
</ngx-image-gallery>

<mat-list *ngFor="let entry of ngxImageGallery.activeImage | keys">
<mat-list-item>
<code class="prettyprint">
{{entry.key}}: {{entry.value.toString()}}
</code>
</mat-list-item>
</mat-list>
</mat-card-content>

<mat-card-footer>
</mat-card-footer>

<mat-card-actions fxLayoutAlign="space-between center">
<button color="accent" mat-raised-button (click)="prevImage()">Previous</button>
<button color="accent" mat-raised-button (click)="nextImage()">Next</button>
Expand All @@ -38,19 +50,23 @@

<mat-card fxFlex="20" style="margin: 2rem">
<mat-card-title-group>
<mat-card-title>Information</mat-card-title>
<mat-card-subtitle>Configuration</mat-card-subtitle>
<mat-card-title>Configuration</mat-card-title>
<mat-card-subtitle>Image Index:
<code class="prettyprint">
{{ngxImageGallery.activeImageIndex}}
</code>
</mat-card-subtitle>
</mat-card-title-group>
<mat-card-content>
<mat-list *ngFor="let entry of conf | keys">
<mat-list-item>
<code class="prettyprint">
{{entry.key}}: {{entry.value}}
</code>
</mat-list-item>
</mat-list>
</mat-card-content>
</mat-card>
<mat-card-content>
3
<mat-list>
<mat-list-item>
<p>test</p>
</mat-list-item>
</mat-list>
</mat-card-content>

</div>


2 changes: 2 additions & 0 deletions demo-app/src/app/app.component.ts
Expand Up @@ -9,6 +9,8 @@ import {GALLERY_CONF, GALLERY_IMAGE, NgxImageGalleryComponent} from "ngx-image-g
})
export class AppComponent {

public showConf: boolean = true;

@ViewChild('ngxImageGallery') ngxImageGallery: NgxImageGalleryComponent;

title = 'Demo App';
Expand Down
4 changes: 3 additions & 1 deletion demo-app/src/app/app.module.ts
Expand Up @@ -8,11 +8,13 @@ import {
MatToolbarModule
} from "@angular/material";
import {FlexLayoutModule} from "@angular/flex-layout";
import { KeysPipe } from './pipe/keys.pipe';


@NgModule({
declarations: [
AppComponent
AppComponent,
KeysPipe
],
imports: [
BrowserModule,
Expand Down
3 changes: 2 additions & 1 deletion demo-app/src/index.html
Expand Up @@ -7,8 +7,9 @@

<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>
</head>
<body>
<app-root></app-root>
<app-root></app-root>
</body>
</html>
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4b490fd

Please sign in to comment.