+

+
+
+
\ No newline at end of file
diff --git a/Client/src/app/components/image/image.component.ts b/Client/src/app/components/image/image.component.ts
index 79ab59e..3a13395 100644
--- a/Client/src/app/components/image/image.component.ts
+++ b/Client/src/app/components/image/image.component.ts
@@ -1,5 +1,7 @@
import { BibleVerseService } from './../../services/bible-verse.service';
import { Component, OnInit } from '@angular/core';
+import { MatDialogConfig, MatDialog } from '@angular/material';
+import { SharePopupComponent } from '../popups/share-popup/share-popup.component';
@Component({
selector: 'image-component',
@@ -8,7 +10,9 @@ import { Component, OnInit } from '@angular/core';
})
export class ImageComponent implements OnInit {
- constructor() { }
+ public shareUrl: string;
+
+ constructor(private dialog: MatDialog) { }
ngOnInit() {
// this.bibleVerseService.randomVerse().subscribe(
@@ -18,4 +22,10 @@ export class ImageComponent implements OnInit {
// error => console.log(error) );
}
+ public share() {
+ let opts = new MatDialogConfig;
+ opts.data = { relativeUrl: '/covid', title: 'Coronavirus Anxiety', description: 'Ecouragement in uncertain times' };
+ let dialog = this.dialog.open(SharePopupComponent, opts);
+ }
+
}
diff --git a/Client/src/app/components/popups/share-popup/share-popup.component.ts b/Client/src/app/components/popups/share-popup/share-popup.component.ts
index e690fc5..017f054 100644
--- a/Client/src/app/components/popups/share-popup/share-popup.component.ts
+++ b/Client/src/app/components/popups/share-popup/share-popup.component.ts
@@ -30,6 +30,9 @@ export class SharePopupComponent implements OnInit {
this.id = data.id;
let port = this.document.location.port ? ":"+this.document.location.port : "";
this.shareUrl = this.document.location.protocol +'//'+ this.document.location.hostname + port + this.shareBaseUrl + data.prefix + this.id;
+ if (this.data.relativeUrl) {
+ this.shareUrl = this.document.location.protocol + '//' + this.document.location.hostname + port + this.data.relativeUrl;
+ }
this.facebookIframeUrl = this.urlPartA + this.shareUrl + this.urlPartB;
this.twitterUrl = this.twitterPartA + data.title + " - " + data.description + "&url=" + this.shareUrl;
}
diff --git a/Client/src/assets/images/home-images/tiny/wood.jpg b/Client/src/assets/images/home-images/tiny/wood.jpg
new file mode 100644
index 0000000..4f6e972
Binary files /dev/null and b/Client/src/assets/images/home-images/tiny/wood.jpg differ