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
export default { | |
name: "figure", | |
title: "Image", | |
type: "image", | |
options: { | |
hotspot: true, | |
}, | |
fields: [ | |
{ | |
title: "Caption", |
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
import React from 'react' | |
import { getFluidGatsbyImage } from 'gatsby-source-sanity' | |
import Img from 'gatsby-image' | |
import { buildImageObj } from '../../lib/helpers' | |
import { imageUrlFor } from '../../lib/image-url' | |
import clientConfig from '../../../client-config' | |
function Figure(props) { | |
const data = props |
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
/** @jsx jsx */ | |
import { jsx, useColorMode } from "theme-ui" | |
import { buildImageObj } from '../../lib/helpers' | |
import { imageUrlFor } from '../../lib/image-url' | |
function DarkModeImage (props) { | |
const [colorMode] = useColorMode() | |
const SanityImageToggle = (colorMode == 'light') ? props.primaryImage : props.darkmodeImage | |
return ( | |
<figure> |
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
/** @jsx jsx */ | |
import { jsx, useColorMode } from "theme-ui" | |
import { buildImageObj } from '../../lib/helpers' | |
import { imageUrlFor } from '../../lib/image-url' | |
function DarkModeImages (props) { | |
const [colorMode] = useColorMode() | |
const SanityImageToggle = (colorMode == 'light') ? props.primaryImage : props.darkmodeImage | |
return ( | |
<figure> |
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
export default { | |
title: 'Shuffle Text Block', | |
name: 'shuffleTextBlock', | |
type: 'object', | |
description: 'Create mixture of shuffle text and normal text', | |
fields: [ | |
{ | |
title: 'Text Section', | |
name: 'textSection', | |
type: 'array', |
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
export default { | |
title: 'Shuffled Text Section', | |
name: 'shuffledTextSection', | |
type: 'object', | |
fields: [ | |
{ | |
title: 'Phrase', | |
type: 'array', | |
name: 'phrase', | |
of: [ |
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
export default { | |
title: 'Text', | |
name: 'standardText', | |
type: 'object', | |
fields: [ | |
{ | |
title: 'String', | |
name: 'string', | |
type: 'string' | |
}, |
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
export default { | |
title: 'Shuffled Text', | |
type: 'object', | |
name: 'shuffledText', | |
fields: [ | |
{ | |
title: 'Shuffled Text', | |
name: 'text', | |
type: 'array', | |
of: [ |
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
/** @jsx jsx */ | |
import { jsx } from "theme-ui" | |
import React, { useState } from 'react' | |
import TextScramble from './textShuffleMaster' | |
function ShuffleText (props) { | |
const Style = props.textSection[0].textStyle ? props.textSection[0].textStyle: 'span' | |
const ShuffleText = props.textSection && props.textSection[0].phrase | |
const [pause] = useState(false) | |
return ( |
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
curl 'https://<Project ID>.api.sanity.io/v1/data/mutate/production' \ | |
-H 'Authorization: Bearer <Token>' \ | |
-H 'Content-Type: application/json' \ | |
--data-binary '{"mutations":[ | |
{ | |
"delete": { | |
"id": "<Post ID>" | |
} | |
} | |
]}' |
OlderNewer