mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Add related videos to listing template
This commit is contained in:
parent
6acaee1b5a
commit
b3a4bffdf8
2 changed files with 27 additions and 3 deletions
|
|
@ -7,6 +7,7 @@ import {
|
||||||
|
|
||||||
import Aliases from '~/src/components/listing-parts/aliases.astro'
|
import Aliases from '~/src/components/listing-parts/aliases.astro'
|
||||||
import RelatedLinks from '~/src/components/listing-parts/related-links.astro'
|
import RelatedLinks from '~/src/components/listing-parts/related-links.astro'
|
||||||
|
import RelatedVideos from '~/src/components/listing-parts/related-videos.astro'
|
||||||
|
|
||||||
import AllUpdatesSubscribe from '~/components/all-updates-subscribe.vue'
|
import AllUpdatesSubscribe from '~/components/all-updates-subscribe.vue'
|
||||||
|
|
||||||
|
|
@ -47,9 +48,9 @@ const details = new ListingDetails( listing )
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="links space-y-6 sm:space-x-6">
|
<RelatedVideos
|
||||||
<!-- { relatedLinksHtml } -->
|
listing={ listing }
|
||||||
</div>
|
/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
23
src/components/listing-parts/related-videos.astro
Normal file
23
src/components/listing-parts/related-videos.astro
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
---
|
||||||
|
import Heading from './heading.astro'
|
||||||
|
import VideoRow from '~/src/components/video/row.astro'
|
||||||
|
|
||||||
|
const {
|
||||||
|
listing
|
||||||
|
} = Astro.props
|
||||||
|
|
||||||
|
const hasRelatedVideos = listing.relatedVideos.length > 0
|
||||||
|
|
||||||
|
---
|
||||||
|
<div
|
||||||
|
class="related-videos w-full"
|
||||||
|
>
|
||||||
|
<Heading text="Related Videos" />
|
||||||
|
<VideoRow
|
||||||
|
videos={listing.relatedVideos}
|
||||||
|
/>
|
||||||
|
<VideoRow
|
||||||
|
videos={listing.relatedVideos}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue