diff --git a/Client/src/app/components/home/home.component.html b/Client/src/app/components/home/home.component.html index 31984e2..f452364 100644 --- a/Client/src/app/components/home/home.component.html +++ b/Client/src/app/components/home/home.component.html @@ -1,5 +1,5 @@ -background image +background image
diff --git a/Client/src/app/components/image/image.component.css b/Client/src/app/components/image/image.component.css index e69de29..616d332 100644 --- a/Client/src/app/components/image/image.component.css +++ b/Client/src/app/components/image/image.component.css @@ -0,0 +1,16 @@ +.fab-buttons{ + display: none; +} + +.side-bar{ + position: fixed; +} + +@media(max-width:800px){ + .fab-buttons{ + display: inline-block; + position: fixed; + bottom: 20px; + right: 20px; + } +} \ No newline at end of file diff --git a/Client/src/app/components/image/image.component.html b/Client/src/app/components/image/image.component.html index 5dc8c88..7c9a253 100644 --- a/Client/src/app/components/image/image.component.html +++ b/Client/src/app/components/image/image.component.html @@ -1,8 +1,13 @@ -
+
+
+ +
- +
\ 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