Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion backend/components/project/blockquote-block.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@
"collectionName": "components_project_blockquote_blocks",
"info": {
"name": "blockquoteBlock",
"icon": "align-right"
"icon": "align-right",
"description": ""
},
"options": {},
"attributes": {
"text": {
"type": "string"
},
"author": {
"type": "string"
}
}
}
1,357 changes: 699 additions & 658 deletions backend/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion frontend/.env.environment
Original file line number Diff line number Diff line change
@@ -1 +1 @@
NEXT_PUBLIC_STRAPI_URL=http://localhost:1337
NEXT_PUBLIC_STRAPI_URL=https://strapi.inkofpixel.com
4 changes: 2 additions & 2 deletions frontend/codegen.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
overwrite: true
schema: "http://localhost:1337/graphql"
schema: "https://strapi.inkofpixel.com/graphql"
documents: "./graphql/**/*.graphql"
generates:
./graphql/generated.ts:
plugins:
- "typescript"
- "typescript-operations"
- "typescript-document-nodes"
- typescript-document-nodes
config:
documentMode: "string"
./graphql.schema.json:
Expand Down
2 changes: 1 addition & 1 deletion frontend/config/env.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const STRAPI_URL = checkEnv(
"http://localhost:1337",
"https://strapi.inkofpixel.com",
"NEXT_PUBLIC_STRAPI_URL"
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ export type CardBlockData = BlockTemplateData<
{
id: string;
image?: Nullable<CardImage>;
title: string;
description: string;
title: Nullable<string>;
description: Nullable<string>;
link: LinkData;
}
>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export function ProjectListSection({
flexDir="column"
w={{
base: "full",
xl: "1200px",
xl: "container.xl",
}}
px={{
base: "10",
Expand Down
95 changes: 95 additions & 0 deletions frontend/features/project/blocks/BlockquoteBlock.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
import React from "react";
import {
Block,
BlockComponentProps,
BlocksControls,
InlineText,
} from "react-tinacms-inline";

import { Box, Text } from "@chakra-ui/react";

export type BlockquoteBlockData = BlockTemplateData<
"blockquote",
{
id: string;
text: string;
author: string;
}
>;

export default function BlockquoteBlock() {
return (
<Box
as="blockquote"
px="10"
py="14"
bgColor="rgb(234, 247, 247)"
w={{ base: "full", md: "container.md" }}
mx="auto"
my="8"
pos="relative"
>
<Text
as="p"
w="full"
pos="relative"
color="emerald.700"
fontWeight="700"
fontStyle="italic"
_before={{
display: "block",
content: "“",
top: "-10px",
left: "-30px",
pos: "absolute",
color: "emerald.500",
opacity: "0.4",
fontSize: "8xl",
}}
_after={{
display: "block",
bottom: "-50px",
content: "”",
pos: "absolute",
color: "emerald.500",
opacity: "0.4",
fontSize: "8xl",
}}
></Text>
<Box
as="ul"
listStyleType="none"
pt="14"
textAlign="right"
lineHeight="1.8em"
mx="auto"
my="14"
w={{ base: "full", md: "container.md" }}
pl="5"
>
<Box as="li" color="emerald.700" mb="-5">
<InlineText name="author" />
</Box>
</Box>
</Box>
);
}

function BlockComponent({ index, data }: BlockComponentProps) {
return (
<BlocksControls index={index} focusRing={{ offset: 0 }} insetControls>
<BlockquoteBlock {...data} />
</BlocksControls>
);
}

export const blockquoteBlock: Block = {
Component: BlockComponent,
template: {
label: "Blockquote block",
defaultItem: {
blocks: [],
},
fields: [],
},
};
Loading