Skip to content

Commit

Permalink
SectionTeaserCard
Browse files Browse the repository at this point in the history
  • Loading branch information
jendiamond committed Jul 24, 2024
1 parent fc0c997 commit ea70b53
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 44 deletions.
3 changes: 3 additions & 0 deletions app.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<script setup>
import { provideTheme } from '@/composables/provideTheme'
provideTheme()
const { enabled, state } = usePreviewMode()
</script>

<template>
<div>
<NuxtLoadingIndicator
Expand Down
59 changes: 30 additions & 29 deletions gql/queries/FTVAEventDetail.gql
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ query FTVAEventDetail($slug: [String!]) {
typeHandle
slug
uri

imageCarousel {
...on imageCarousel_imageCarousel_BlockType {
image {
Expand All @@ -27,6 +28,28 @@ query FTVAEventDetail($slug: [String!]) {
guestSpeaker
acknowledements: richText

ftvaEventScreeningDetails {
...on ftvaEventScreeningDetails_screeningDetails_BlockType {
screeningTitle
alternateTitle
languageTranslated
year
country
languageInfo
runtime
screeningTags {
title
}
descriptionOfScreening
trailer
image {
...on mediaAndDocuments_Asset {
...Image
}
}
}
}

# SIDEBAR
# BlockEventDetail
startDateWithTime
Expand All @@ -38,42 +61,21 @@ query FTVAEventDetail($slug: [String!]) {
publicUrl
address
}

# BlockInfo / Ticket Info
ftvaTicketInformation {
title
uri
}

ftvaEventRegistration {
...on ftvaEventRegistration_eventRegistration_BlockType {
registrationText
registrationUrlLink
}
}

ftvaEventScreeningDetails {
...on ftvaEventScreeningDetails_screeningDetails_BlockType {
screeningTitle
alternateTitle
languageTranslated
year
country
languageInfo
runtime
screeningTags {
title
}
descriptionOfScreening
trailer
image {
...on mediaAndDocuments_Asset {
...Image
}
}
}
}
}

# SectionTeaserCard
ftvaEventSeries: entries(
section: "ftvaEventSeries", orderBy: "postDate",
relatedToEntries: {section: "ftvaEvent", slug: $slug}) {
Expand All @@ -84,12 +86,11 @@ query FTVAEventDetail($slug: [String!]) {
title
ftvaEvent {
... on ftvaEvent_ftvaEvent_Entry {
id
title
startDate: startDateWithTime @formatDateTime(format: "Y-m-d", timezone: "America/Los_Angeles")
startTime: startDateWithTime @formatDateTime(format: "TH:i:s", timezone: "America/Los_Angeles")

image: ftvaImage {
id
title
startDate: startDateWithTime @formatDateTime(format: "Y-m-d", timezone: "America/Los_Angeles")
startTime: startDateWithTime @formatDateTime(format: "TH:i:s", timezone: "America/Los_Angeles")
media: ftvaImage {
...Image
}
}
Expand Down
21 changes: 6 additions & 15 deletions pages/events/[slug].vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<script setup>
// COMPONENTS
// import { SectionWrapper, DividerWayFinder, NavBreadcrumb, ResponsiveImage, FlexibleMediaGalleryNewLightbox, CardMeta, RichText, BlockInfo, SectionScreeningDetails, SectionCardWithImage } from 'ucla-library-website-components'
// HELPERS
import _get from 'lodash/get'
Expand Down Expand Up @@ -104,22 +102,15 @@ const parsedStartTime = computed(() => {
parent-title="All Events"
/>

<h4>{{ parsedImage }}</h4>
<h3>ResponsiveImage 1</h3>
<ResponsiveImage
:media="parsedImage[0].media[0]"
class="responsive-image"
/>


<h3>ResponsiveImage 2</h3>
<responsive-image :media="parsedImage[0].media[0]">
<responsive-image :media="parsedImage[0].image[0]">
<template v-slot:credit>
Photo by John Doe
</template>
</responsive-image>
<hr>

<h3>FlexibleMediaGalleryNewLightbox </h3>
<h4>parsedImage-- {{ parsedImage }}</h4>
<FlexibleMediaGalleryNewLightbox :items="parsedImage" />

<SectionWrapper>
Expand Down Expand Up @@ -149,17 +140,17 @@ const parsedStartTime = computed(() => {
<SectionScreeningDetails :items="page.ftvaEventScreeningDetails" />
</SectionWrapper>

<h3>series[0].ftvaEvent--{{ series[0].ftvaEvent }}</h3>
<SectionWrapper
v-if="series && series.length > 0"
section-title="Explore upcoming events in this series"
>
<h3>CardWithImage</h3>
<code v-if="series[0].ftvaEvent"> series.ftvaEvent:: {{ series[0].ftvaEvent }} </code>

<SectionCardWithImage
<SectionTeaserCard
v-if="series && series.length > 0"
:items="series[0].ftvaEvent"
/>

</SectionWrapper>

<SectionWrapper section-title="SIDEBAR">
Expand Down

0 comments on commit ea70b53

Please sign in to comment.