* feat(BOOK-257): Added VideoPlayer with card component * feat(BOOK-257): Added queries and component for VideoCard block to Content and Collection pages * fix(BOOK-257): Only setting object-fit: cover on the video if it is not fullscreen * feat(BOOK-257): Added queries and component for VideoCard block to Startpage * feat(BOOK-257): Added queries and component for Video block to content/collection/start page Approved-by: Chuma Mcphoy (We Ahead)
167 lines
3.0 KiB
TypeScript
167 lines
3.0 KiB
TypeScript
import { gql } from "graphql-tag"
|
|
|
|
import { System } from "../System.graphql"
|
|
import { Video, VideoRef } from "../Video.graphql"
|
|
|
|
export const VideoQuoteCard = gql`
|
|
fragment VideoQuoteCard on VideoQuoteCard {
|
|
video {
|
|
...Video
|
|
}
|
|
style
|
|
quote
|
|
author
|
|
author_description
|
|
}
|
|
${Video}
|
|
`
|
|
|
|
export const VideoTextCard = gql`
|
|
fragment VideoTextCard on VideoTextCard {
|
|
video {
|
|
...Video
|
|
}
|
|
style
|
|
heading
|
|
text
|
|
}
|
|
${Video}
|
|
`
|
|
|
|
export const VideoCard_ContentPage = gql`
|
|
fragment VideoCard_ContentPage on ContentPageBlocksVideoCard {
|
|
__typename
|
|
video_card {
|
|
video_cardConnection {
|
|
edges {
|
|
node {
|
|
__typename
|
|
...VideoQuoteCard
|
|
...VideoTextCard
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
${VideoQuoteCard}
|
|
${VideoTextCard}
|
|
`
|
|
|
|
export const VideoCard_CollectionPage = gql`
|
|
fragment VideoCard_CollectionPage on CollectionPageBlocksVideoCard {
|
|
__typename
|
|
video_card {
|
|
video_cardConnection {
|
|
edges {
|
|
node {
|
|
__typename
|
|
...VideoQuoteCard
|
|
...VideoTextCard
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
${VideoQuoteCard}
|
|
${VideoTextCard}
|
|
`
|
|
|
|
export const VideoCard_StartPage = gql`
|
|
fragment VideoCard_StartPage on StartPageBlocksVideoCard {
|
|
__typename
|
|
video_card {
|
|
video_cardConnection {
|
|
edges {
|
|
node {
|
|
__typename
|
|
...VideoQuoteCard
|
|
...VideoTextCard
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
${VideoQuoteCard}
|
|
${VideoTextCard}
|
|
`
|
|
|
|
export const VideoQuoteCardRef = gql`
|
|
fragment VideoQuoteCardRef on VideoQuoteCard {
|
|
video {
|
|
...VideoRef
|
|
}
|
|
system {
|
|
...System
|
|
}
|
|
}
|
|
${VideoRef}
|
|
${System}
|
|
`
|
|
|
|
export const VideoTextCardRef = gql`
|
|
fragment VideoTextCardRef on VideoTextCard {
|
|
video {
|
|
...VideoRef
|
|
}
|
|
system {
|
|
...System
|
|
}
|
|
}
|
|
${VideoRef}
|
|
${System}
|
|
`
|
|
|
|
export const VideoCard_ContentPageRefs = gql`
|
|
fragment VideoCard_ContentPageRefs on ContentPageBlocksVideoCard {
|
|
video_card {
|
|
video_cardConnection {
|
|
edges {
|
|
node {
|
|
__typename
|
|
...VideoQuoteCardRef
|
|
...VideoTextCardRef
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
${VideoQuoteCardRef}
|
|
${VideoTextCardRef}
|
|
`
|
|
|
|
export const VideoCard_CollectionPageRefs = gql`
|
|
fragment VideoCard_CollectionPageRefs on CollectionPageBlocksVideoCard {
|
|
video_card {
|
|
video_cardConnection {
|
|
edges {
|
|
node {
|
|
__typename
|
|
...VideoQuoteCardRef
|
|
...VideoTextCardRef
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
${VideoQuoteCardRef}
|
|
${VideoTextCardRef}
|
|
`
|
|
|
|
export const VideoCard_StartPageRefs = gql`
|
|
fragment VideoCard_StartPageRefs on StartPageBlocksVideoCard {
|
|
video_card {
|
|
video_cardConnection {
|
|
edges {
|
|
node {
|
|
__typename
|
|
...VideoQuoteCardRef
|
|
...VideoTextCardRef
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
${VideoQuoteCardRef}
|
|
${VideoTextCardRef}
|
|
`
|