This file contains hidden or 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
| import { Flex, Stack, Text } from '@sanity/ui' | |
| import React, { useCallback } from 'react' | |
| import { set, StringInputProps, unset } from 'sanity' | |
| type ColorCircleProps = { | |
| colorName: string | |
| hex: string | |
| active: boolean | |
| onClickHandler: (val: string) => void | |
| } |
This file contains hidden or 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
| import type { RouteLocationNormalized } from '#vue-router'; | |
| import type { RouterConfig } from 'nuxt/schema'; | |
| import { START_LOCATION } from 'vue-router'; | |
| import { useNuxtApp } from '#app/nuxt'; | |
| function calculatePosition( | |
| to: RouteLocationNormalized, | |
| savedPosition: ScrollToOptions | null, |
This file contains hidden or 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
| <script setup> | |
| const query = groq`*[_type == "page" && slug.current == $slug]|order(_updatedAt desc)[0] { | |
| ... // your schema data | |
| }` | |
| // Create slug | |
| const route = useRoute() | |
| const params = { | |
| slug: route.params.slug | |
| } |
This file contains hidden or 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
| import { gsap } from 'gsap' | |
| import { CustomEase } from 'gsap/CustomEase' | |
| import { ScrollTrigger } from 'gsap/ScrollTrigger' | |
| import { ScrollToPlugin } from 'gsap/ScrollToPlugin' | |
| export default defineNuxtPlugin(async () => { | |
| gsap.registerPlugin(CustomEase, ScrollToPlugin, ScrollTrigger) | |
| return { | |
| provide: { gsap, CustomEase, ScrollToPlugin, ScrollTrigger } |
This file contains hidden or 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
| <nuxt-page :transition="globalTransition" /> |
This file contains hidden or 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
| _type == "picture" => { | |
| _type, | |
| "image": { | |
| ..., | |
| "height": asset->metadata.dimensions.height, | |
| "width": asset->metadata.dimensions.width, | |
| "dimensions": asset->metadata.dimensions, | |
| "blurhash": asset->metadata.blurHash, | |
| "lqip": asset->metadata.lqip | |
| } |
This file contains hidden or 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
| export default { | |
| name: 'ProductReference', | |
| props: { | |
| product: { | |
| type: Object, | |
| required: true | |
| } | |
| }, |