-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: grofmt bug, object modei naked groq synntax error
- Loading branch information
1 parent
81b0565
commit 9961262
Showing
24 changed files
with
393 additions
and
262 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import React, {FC, ReactElement} from 'react' | ||
import "./styles.css"; | ||
|
||
interface Props { | ||
src: string | ||
} | ||
|
||
export const Video = ({src}: Props) => { | ||
return ( | ||
<div style={{width: '100%', height: '100%'}}> | ||
<video src={src} playsInline muted autoPlay loop style={{objectFit: 'cover'}} /> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,80 @@ | ||
import { | ||
inlineResolver0, | ||
inlineResolver1, | ||
localeString, | ||
inlineResolver2, | ||
} from "../resolver"; | ||
|
||
// prettier-ignore | ||
export const getPageBySlug = /* groq */` | ||
*[_type == "page" && slug.current == $slug] { ..., ${inlineResolver0("seoTitle")}, ${inlineResolver1("pageHeader")}, gallery { ..., ${localeString("sectionTitle")}, slides[] { ..., slide { ..., ${inlineResolver2("title")} } } }, sections[] { ..., gallerySection { ..., ${localeString("sectionTitle")}, slides[] { ..., slide { ..., ${localeString("title")} } } }, textSection { ..., ${localeString("title")} }, featuresSection { ..., ${localeString("title")}, ${localeString("subtitle")} } } }[0] ` | ||
export const getPageBySlug = /* groq */ ` | ||
*[_type == "page" && slug.current == $slug] { | ||
..., | ||
"pageHeader": { | ||
"title": pageHeader.title, | ||
"subtitle": pageHeader.subtitle | ||
}, | ||
featuredImage { | ||
_type, | ||
type, | ||
type == "image" => { | ||
image { | ||
"title": asset->.title, | ||
"altText": asset->.altText, | ||
"src": asset->.url, | ||
"metaData": { | ||
"crop": crop, | ||
"hotspot": hotspot, | ||
"width": asset->.metadata.dimensions.width, | ||
"height": asset->.metadata.dimensions.height | ||
} | ||
} | ||
}, | ||
type == "video" => { | ||
"player": player.asset-> { | ||
"playbackId": playbackId, | ||
"ratio": data.aspect_ratio, | ||
thumbTime | ||
}, | ||
"mood": mood.asset-> { | ||
"playbackId": playbackId, | ||
"ratio": data.aspect_ratio | ||
} | ||
} | ||
}, | ||
"seoTitle": coalesce(seoTitle[$lang], seoTitle.en), | ||
sections[] { | ||
..., | ||
_type == "gallerySection" => { | ||
..., | ||
"sectionTitle": coalesce(sectionTitle[$lang], sectionTitle.en), | ||
slides[] { | ||
..., | ||
slide { | ||
_type, | ||
type, | ||
type == "image" => { | ||
image { | ||
"title": asset->.title, | ||
"altText": asset->.altText, | ||
"src": asset->.url, | ||
"metaData": { | ||
"crop": crop, | ||
"hotspot": hotspot, | ||
"width": asset->.metadata.dimensions.width, | ||
"height": asset->.metadata.dimensions.height | ||
} | ||
} | ||
}, | ||
type == "video" => { | ||
"player": player.asset-> { | ||
"playbackId": playbackId, | ||
"ratio": data.aspect_ratio, | ||
thumbTime | ||
}, | ||
"mood": mood.asset-> { | ||
"playbackId": playbackId, | ||
"ratio": data.aspect_ratio | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
_type == "textSection" => { | ||
..., | ||
"title": coalesce(title[$lang], title.en) | ||
} | ||
} | ||
}[0] | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,80 @@ | ||
import { | ||
inlineResolver0, | ||
inlineResolver1, | ||
localeString, | ||
inlineResolver2, | ||
} from "../resolver"; | ||
|
||
// prettier-ignore | ||
export const getPages = /* groq */` | ||
*[_type == "page"] { ..., ${inlineResolver0("seoTitle")}, ${inlineResolver1("pageHeader")}, gallery { ..., ${localeString("sectionTitle")}, slides[] { ..., slide { ..., ${inlineResolver2("title")} } } }, sections[] { ..., gallerySection { ..., ${localeString("sectionTitle")}, slides[] { ..., slide { ..., ${localeString("title")} } } }, textSection { ..., ${localeString("title")} }, featuresSection { ..., ${localeString("title")}, ${localeString("subtitle")} } } }[0] ` | ||
export const getPages = /* groq */ ` | ||
*[_type == "page"] { | ||
..., | ||
"pageHeader": { | ||
"title": pageHeader.title, | ||
"subtitle": pageHeader.subtitle | ||
}, | ||
featuredImage { | ||
_type, | ||
type, | ||
type == "image" => { | ||
image { | ||
"title": asset->.title, | ||
"altText": asset->.altText, | ||
"src": asset->.url, | ||
"metaData": { | ||
"crop": crop, | ||
"hotspot": hotspot, | ||
"width": asset->.metadata.dimensions.width, | ||
"height": asset->.metadata.dimensions.height | ||
} | ||
} | ||
}, | ||
type == "video" => { | ||
"player": player.asset-> { | ||
"playbackId": playbackId, | ||
"ratio": data.aspect_ratio, | ||
thumbTime | ||
}, | ||
"mood": mood.asset-> { | ||
"playbackId": playbackId, | ||
"ratio": data.aspect_ratio | ||
} | ||
} | ||
}, | ||
"seoTitle": coalesce(seoTitle[$lang], seoTitle.en), | ||
sections[] { | ||
..., | ||
_type == "gallerySection" => { | ||
..., | ||
"sectionTitle": coalesce(sectionTitle[$lang], sectionTitle.en), | ||
slides[] { | ||
..., | ||
slide { | ||
_type, | ||
type, | ||
type == "image" => { | ||
image { | ||
"title": asset->.title, | ||
"altText": asset->.altText, | ||
"src": asset->.url, | ||
"metaData": { | ||
"crop": crop, | ||
"hotspot": hotspot, | ||
"width": asset->.metadata.dimensions.width, | ||
"height": asset->.metadata.dimensions.height | ||
} | ||
} | ||
}, | ||
type == "video" => { | ||
"player": player.asset-> { | ||
"playbackId": playbackId, | ||
"ratio": data.aspect_ratio, | ||
thumbTime | ||
}, | ||
"mood": mood.asset-> { | ||
"playbackId": playbackId, | ||
"ratio": data.aspect_ratio | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
_type == "textSection" => { | ||
..., | ||
"title": coalesce(title[$lang], title.en) | ||
} | ||
} | ||
}[0] | ||
`; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.