diff --git a/src/apis/index.php b/src/apis/index.php index 2505490..830ff2e 100644 --- a/src/apis/index.php +++ b/src/apis/index.php @@ -72,6 +72,7 @@ switch($_GET['query']) { } else if($_GET['type'] == 'works') { $item->type = $re['type']; $item->videos = $re['videos']; + $item->gallery = $re['gallery']; $item->exhibitions = array(); $qx = mysqli_query($conn,"SELECT id,title FROM `exhibitions` WHERE id IN (".$re['exhibitions'].")"); while($re = mysqli_fetch_array($qx)) { diff --git a/src/app/detail/detail.component.html b/src/app/detail/detail.component.html index 3840c58..02f93e2 100644 --- a/src/app/detail/detail.component.html +++ b/src/app/detail/detail.component.html @@ -4,6 +4,19 @@

{{details.title}}

+ + +
from on diff --git a/src/app/detail/detail.component.scss b/src/app/detail/detail.component.scss index e7516ba..6fa4c52 100644 --- a/src/app/detail/detail.component.scss +++ b/src/app/detail/detail.component.scss @@ -43,6 +43,31 @@ } } + .gallery { + padding-top: 40px; + + .gallery-title { + font-size: $font-18; + font-weight: bold; + padding-bottom: 5px; + } + + .gallery-container { + position: relative; + //padding-bottom: 56.25%; + height: 180px; + + .image{ + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + object-fit: cover; + } + } + } + .videos { .video-title { font-size: $font-18; diff --git a/src/app/detail/detail.component.ts b/src/app/detail/detail.component.ts index 724e402..f620e03 100644 --- a/src/app/detail/detail.component.ts +++ b/src/app/detail/detail.component.ts @@ -42,6 +42,7 @@ export class DetailComponent implements OnInit { e.code = e.url.split('/').pop() e.embed = this.sanitizer.bypassSecurityTrustResourceUrl(`https://www.youtube.com/embed/${e.code}`) }) + detail.gallery = detail.gallery ? JSON.parse(detail.gallery) : [] this.details = detail console.log(response.item)