Skip to content

Commit

Permalink
1246 add preview images (#2855)
Browse files Browse the repository at this point in the history
* Add preview images for tina components

* updated google maps jpg to use kebab casing

* πŸ’„ Update preview images for Tina components

* Fixed image links with typos

* πŸ’„ Update Preview Images Blocks

* Update Tina Lock

* fixed typo in CustomDownloadButton url

* updated package.json

* Fix linting errors

* Update Event Booking Preview Image

* Update client list preview

* added preview for newsletters

* added thumbnail for clients list component

---------

Co-authored-by: Calinator444 <[email protected]>
Co-authored-by: Tylah Kapa <[email protected]>
  • Loading branch information
3 people authored Jul 26, 2024
1 parent ef35c50 commit f1ecb0d
Show file tree
Hide file tree
Showing 91 changed files with 129 additions and 17 deletions.
3 changes: 3 additions & 0 deletions components/blocks/CustomDownloadButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ export const CustomDownloadButton = ({ data }) => {
export const customDownloadButtonSchema: Template = {
name: "CustomDownloadButton",
label: "Custom Download Button",
ui: {
previewSrc: "/images/thumbs/tina/custom-download-button.jpg",
},
fields: [
{
type: "string",
Expand Down
4 changes: 4 additions & 0 deletions components/blocks/aboutUs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,10 @@ export const aboutUsBlock = {
export const aboutUsBlockSchema: Template = {
name: "AboutUs",
label: "About Us",

ui: {
previewSrc: "/images/thumbs/tina/about-us.jpg",
},
fields: [
{
type: "string",
Expand Down
4 changes: 4 additions & 0 deletions components/blocks/agenda.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ export const agendaBlockConstant = {
export const agendaSchema: Template = {
label: "Agenda",
name: agendaBlockConstant.value,

ui: {
previewSrc: "/images/thumbs/tina/agenda.jpg",
},
fields: [
{
type: "string",
Expand Down
3 changes: 3 additions & 0 deletions components/blocks/builtOnAzure.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ export const builtOnAzureBlock = {
export const builtOnAzureBlockSchema: Template = {
name: "BuiltOnAzure",
label: "Built on Azure",
ui: {
previewSrc: "/images/thumbs/tina/built-on-azure.jpg",
},
// Todo: Turn into util field
fields: [
{
Expand Down
2 changes: 1 addition & 1 deletion components/blocks/carousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export const carouselBlockSchema: Template = {
name: "Carousel",
label: "Carousel",
ui: {
previewSrc: "/blocks/hero.png",
previewSrc: "/images/thumbs/tina/carousel.jpg",
},
fields: [
{
Expand Down
3 changes: 3 additions & 0 deletions components/blocks/clientLogos.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ export const ClientLogos = () => {
export const clientLogosBlockSchema: Template = {
name: "ClientLogos",
label: "Client Logos",
ui: {
previewSrc: "/images/thumbs/tina/client-logos.jpg",
},
// Todo: Find a way to have no fields - the one below is to satisfy compiler
fields: [
{
Expand Down
3 changes: 3 additions & 0 deletions components/blocks/colorBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ const ColorRow = (props: ColorRow) => {
export const colorBlockSchema: Template = {
name: "ColorBlock",
label: "Color block",
ui: {
previewSrc: "/images/thumbs/tina/color-block.jpg",
},
fields: [
{
type: "string",
Expand Down
3 changes: 3 additions & 0 deletions components/blocks/colorPalette.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ export const ColorPalette = () => {
export const colorPaletteSchema: Template = {
name: "ColorPalette",
label: "Color Palette",
ui: {
previewSrc: "/images/thumbs/tina/color-palette.jpg",
},
fields: [
{
type: "string",
Expand Down
2 changes: 1 addition & 1 deletion components/blocks/content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export const contentBlockSchema: Template = {
name: "Content",
label: "Content",
ui: {
previewSrc: "/blocks/content.png",
previewSrc: "/images/thumbs/tina/content.jpg",
defaultItem: {
body: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.",
},
Expand Down
2 changes: 1 addition & 1 deletion components/blocks/contentCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const contentCardBlockSchema: Template = {
name: "ContentCard",
label: "Content Card",
ui: {
previewSrc: "/blocks/content.png",
previewSrc: "/images/thumbs/tina/content-card.jpg",
defaultItem: {
content:
"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.",
Expand Down
4 changes: 4 additions & 0 deletions components/blocks/customImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ export const CustomImage = ({ data }: { data: CustomImageProps }) => {
export const customImageBlockSchema: Template = {
name: "CustomImage",
label: "Custom Image",

ui: {
previewSrc: "/images/thumbs/tina/custom-image.jpg",
},
fields: [
{
type: "image",
Expand Down
3 changes: 3 additions & 0 deletions components/blocks/domainFromQuery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ export const DomainFromQuery = (props: DomainFromQueryProps) => {
export const domainFromQuerySchema: Template = {
name: "DomainFromQuery",
label: "Domain from query",
ui: {
previewSrc: "/images/thumbs/tina/domain-from-query.jpg",
},
fields: [
{
name: "title",
Expand Down
3 changes: 3 additions & 0 deletions components/blocks/downloadBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ const DownloadButton = (data) => {
export const downloadBlockSchema: Template = {
name: "DownloadBlock",
label: "Download Block",
ui: {
previewSrc: "/images/thumbs/tina/download-block.jpg",
},
fields: [
{
type: "string",
Expand Down
3 changes: 3 additions & 0 deletions components/blocks/eventLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ export const EventLink = ({
export const eventLinkSchema: Template = {
name: "EventLink",
label: "Event Link",
ui: {
previewSrc: "/images/thumbs/tina/event-link.jpg",
},
fields: [
{
type: "rich-text",
Expand Down
3 changes: 3 additions & 0 deletions components/blocks/fixedColumns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ export const FixedColumns = ({ data }: FixedColumnsProps) => {
export const fixedColumnsSchema: Template = {
name: "FixedColumns",
label: "Fixed Column Layout (2 columns)",
ui: {
previewSrc: "/images/thumbs/tina/fixed-columns.jpg",
},
fields: [
{
type: "rich-text",
Expand Down
3 changes: 3 additions & 0 deletions components/blocks/fixedTabsLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ const renderTabButton = (tab, selectedTab, onTabBtnClicked) => {
export const fixedTabsLayoutSchema: Template = {
name: "FixedTabsLayout",
label: "Fixed Tabs Layout",
ui: {
previewSrc: "/images/thumbs/tina/fixed-tabs-layout.jpg",
},
fields: [
{
type: "string",
Expand Down
3 changes: 3 additions & 0 deletions components/blocks/flag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ export const Flag = ({ country, height, width, className = "" }: FlagProps) => {
export const flagSchema: Template = {
name: "Flag",
label: "Flag Image",
ui: {
previewSrc: "/images/thumbs/tina/flag-image.jpg",
},
fields: [
{
type: "string",
Expand Down
3 changes: 3 additions & 0 deletions components/blocks/googleMapsWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ export const GoogleMapsWrapper = (props: GoogleMapsWrapperProps) => (
export const googleMapsSchema: Template = {
label: "Google Maps",
name: "GoogleMaps",
ui: {
previewSrc: "/images/thumbs/tina/google-maps.jpg",
},
fields: [
{
type: "string",
Expand Down
12 changes: 8 additions & 4 deletions components/blocks/gridLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import Image from "next/image";
import type { Template } from "tinacms";
import { TinaMarkdown, TinaMarkdownContent } from "tinacms/dist/rich-text";
import { tinaField } from "tinacms/dist/react";
import Image from "next/image";
import { TinaMarkdown, TinaMarkdownContent } from "tinacms/dist/rich-text";

import { Section } from "../util/section";
import { Container } from "../util/container";
import { utilityButtonSchema } from "../button/utilityButton";
import { Container } from "../util/container";
import { Section } from "../util/section";
import { componentRenderer } from "./mdxComponentRenderer";

type GridLayoutProps = {
Expand Down Expand Up @@ -93,6 +93,10 @@ export const GridLayout = ({ data }: GridLayoutProps) => {
export const gridLayoutSchema: Template = {
label: "Grid Layout",
name: "GridLayout",

ui: {
previewSrc: "/images/thumbs/tina/grid-layout.jpg",
},
fields: [
{
type: "string",
Expand Down
4 changes: 3 additions & 1 deletion components/blocks/horizontalCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ const Card = (card: CardType) => {
export const horizontalBlockSchema: Template = {
name: "HorizontalCard",
label: "Horizontal Card",
ui: {},
ui: {
previewSrc: "/images/thumbs/tina/horizontal-card.jpg",
},
fields: [
{
type: "object",
Expand Down
2 changes: 1 addition & 1 deletion components/blocks/internalCarousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export const internalCarouselBlockSchema: Template = {
name: "InternalCarousel",
label: "Internal Carousel",
ui: {
previewSrc: "/blocks/hero.png",
previewSrc: "/images/thumbs/tina/internal-carousel.jpg",
itemProps: (item) => ({ label: item.items.header }),
},
fields: [
Expand Down
3 changes: 3 additions & 0 deletions components/blocks/jotFormEmbed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ export const JotFormEmbed: React.FC<JotFormEmbedProps> = ({
export const jotFormEmbedSchema: Template = {
name: "JotFormEmbed",
label: "JotForm Embed",
ui: {
previewSrc: "/images/thumbs/tina/jotform-embed.jpg",
},
fields: [
{
type: "string",
Expand Down
3 changes: 3 additions & 0 deletions components/blocks/newslettersTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ export const NewslettersTable: React.FC<{ data: { headerText: string } }> = ({
export const newslettersTableBlockSchema: Template = {
name: "NewslettersTable",
label: "Newsletters Table",
ui: {
previewSrc: "/images/thumbs/tina/newsletters-table.jpg",
},
fields: [
{
type: "string",
Expand Down
3 changes: 3 additions & 0 deletions components/blocks/payment-block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ export const paymentBlockConstants = {
export const paymentBlockSchema: Template = {
label: "Payment Block",
name: paymentBlockConstants.value,
ui: {
previewSrc: "/images/thumbs/tina/payment-block.jpg",
},
fields: [
{
type: "string",
Expand Down
3 changes: 3 additions & 0 deletions components/blocks/recurringEvent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ export const RecurringEvent = ({ data }) => {
export const recurringEventSchema: Template = {
label: "Recurring Event",
name: "RecurringEvent",
ui: {
previewSrc: "/images/thumbs/tina/recurring-event.jpg",
},
fields: [
{
type: "string",
Expand Down
1 change: 1 addition & 0 deletions components/blocks/sectionHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const sectionHeaderSchema: Template = {
name: "SectionHeader",
label: "Section Header",
ui: {
previewSrc: "/images/thumbs/tina/section-header.jpg",
itemProps: (item) => ({ label: item?.headerText }),
},
fields: [
Expand Down
2 changes: 1 addition & 1 deletion components/blocks/serviceCards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ export const serviceCardsBlockSchema: Template = {
name: "ServiceCards",
label: "Service Cards",
ui: {
previewSrc: "/blocks/hero.png",
previewSrc: "/images/thumbs/tina/services-cards.jpg",
},
fields: [
{
Expand Down
3 changes: 3 additions & 0 deletions components/blocks/tableLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ export const TableLayout = ({ data }: { data: TableLayoutProps }) => {
export const tableBlockSchema: Template = {
label: "Table Layout",
name: "TableLayout",
ui: {
previewSrc: "/images/thumbs/tina/table-layout.jpg",
},
fields: [
{
label: "Table Style",
Expand Down
3 changes: 3 additions & 0 deletions components/blocks/testimonialsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ export const TestimonialsList = ({ data: { excludedCategories = [] } }) => {
export const testimonialsListSchema: Template = {
name: "TestimonialsList",
label: "Testimonials List",
ui: {
previewSrc: "/images/thumbs/tina/testimonials.jpg",
},
fields: [
{
type: "object",
Expand Down
4 changes: 2 additions & 2 deletions components/blocks/upcomingEvents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import type { Template } from "tinacms";
import { tinaField } from "tinacms/dist/react";

import { useFormatDates } from "../../hooks/useFormatDates";
import client from "../../tina/__generated__/client";
import { CustomLink } from "../customLink";
import { EventsRelativeBox } from "../events/eventsRelativeBox";
import client from "../../tina/__generated__/client";
import { EventTrimmed } from "../filter/events";

export const UpcomingEvents = ({ data }) => {
Expand Down Expand Up @@ -128,7 +128,7 @@ export const upcomingEventsBlockSchema: Template = {
name: "UpcomingEvents",
label: "Upcoming Events",
ui: {
previewSrc: "/blocks/content.png",
previewSrc: "/images/thumbs/tina/upcoming-events.jpg",
defaultItem: {
title: "Upcoming Events",
numberOfEvents: 30,
Expand Down
3 changes: 3 additions & 0 deletions components/blocks/verticalListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ export const VerticalListItem = ({ data }) => {
export const verticalListItemSchema: Template = {
label: "List Item",
name: "VerticalListItem",
ui: {
previewSrc: "/images/thumbs/tina/vertical-list-item.jpg",
},
fields: [
{
type: "rich-text",
Expand Down
2 changes: 1 addition & 1 deletion components/bookingButton/bookingButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const bookingButtonSchema: Template = {
name: "BookingButton",
label: "Booking Button",
ui: {
previewSrc: "/blocks/hero.png",
previewSrc: "/images/thumbs/tina/booking-button.jpg",
itemProps: (item) => ({ label: item?.btnText }),
},
fields: [
Expand Down
2 changes: 1 addition & 1 deletion components/button/utilityButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export const utilityButtonSchema: Template = {
name: "UtilityButton",
label: "Utility Button",
ui: {
previewSrc: "/blocks/hero.png",
previewSrc: "/images/thumbs/tina/utility-button.jpg",
itemProps: (item) => ({ label: item?.btnText }),
},
fields: [
Expand Down
4 changes: 4 additions & 0 deletions components/company/clientList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ const clientListBlocks: Template[] = [
export const clientListSchema: Template = {
label: "Client List",
name: "ClientList",
ui: {
previewSrc: "/images/thumbs/tina/clients-list.jpg",
},
fields: [
{
type: "object",
Expand Down Expand Up @@ -88,6 +91,7 @@ export const clientListSchema: Template = {
label: "Clients list",
list: true,
ui: {
previewSrc: "/images/thumbs/tina/clients-list.jpg",
itemProps: (item) => {
return { label: item?.name };
},
Expand Down
3 changes: 3 additions & 0 deletions components/embeds/tweetEmbed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ export const TweetEmbed = (props: TweetEmbedProps) => {
export const tweetEmbedSchema: Template = {
label: "Tweet Embed",
name: "TweetEmbed",
ui: {
previewSrc: "/images/thumbs/tina/tweet-embed.jpg",
},
fields: [
{
type: "string",
Expand Down
3 changes: 3 additions & 0 deletions components/events/interestForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ export const InterestForm = (props) => {
export const interestFormSchema: Template = {
label: "Interest Form",
name: "InterestForm",
ui: {
previewSrc: "/images/thumbs/tina/interest-form.jpg",
},
fields: [
{
type: "string",
Expand Down
Loading

0 comments on commit f1ecb0d

Please sign in to comment.