-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1652 from tinacms/quote-block
Quote block
- Loading branch information
Showing
11 changed files
with
233 additions
and
149 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
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,28 @@ | ||
import type { TinaTemplate } from 'tinacms' | ||
|
||
export const quoteTemplate: TinaTemplate = { | ||
label: 'Quote', | ||
name: 'quote', | ||
ui: { | ||
// previewSrc: '/img/blocks/columns.png', | ||
}, | ||
fields: [ | ||
{ | ||
label: 'Title', | ||
name: 'title2', | ||
ui: { component: "textarea" }, | ||
type: 'string', | ||
}, | ||
{ | ||
label: 'Sub Text', | ||
name: 'subtext', | ||
ui: { component: "textarea" }, | ||
type: 'string', | ||
}, | ||
{ | ||
label: 'logo', | ||
name: 'logo', | ||
type: 'image', | ||
} | ||
], | ||
} |
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,24 @@ | ||
import React from 'react' | ||
import { tinaField } from 'tinacms/dist/react' | ||
import { Container } from './Container' | ||
|
||
export const QuoteBlock = ({ data, index }) => { | ||
return ( | ||
<> | ||
<section | ||
className="relative z-10 py-16 lg:py-24 bg-[url('/svg/orange-bg.svg')] bg-cover bg-center text-white"> | ||
<Container width="wide"> | ||
<div className="flex flex-col items-center lg:justify-center gap-12 lg:gap-36 perspective lg:flex-row"> | ||
<div className="lg:w-1/5 flex flex-col gap-6 lg:gap-8 max-w-sm"> | ||
<img src={data.logo} /> | ||
</div> | ||
<div className="min-w-0 lg:w-1/2 "> | ||
<blockquote className="text-3xl italic mb-2" data-tina-field={tinaField(data, 'title2')}>{data.title2}</blockquote> | ||
<p data-tina-field={tinaField(data, 'subtext')}>{data.subtext}</p> | ||
</div> | ||
</div> | ||
</Container> | ||
</section > | ||
</> | ||
) | ||
} |
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.
6cde927
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
tina-io – ./
tina-io-tinacms.vercel.app
tina.io
tina-io-git-master-tinacms.vercel.app