Added a bullshit build without the CMS to make sure I can deploy something #5

Merged
Skydust merged 1 commits from f/added-bullshit-build into dev 2023-08-31 18:12:16 +00:00
4 changed files with 90 additions and 86 deletions
Showing only changes of commit 4209edf31e - Show all commits

View File

@@ -6,96 +6,96 @@ import { PageBlocksTestimonial } from "../../tina/__generated__/types";
import { tinaField } from "tinacms/dist/react";
export const Testimonial = ({ data }: { data: PageBlocksTestimonial }) => {
return (
<Section color={data.color}>
<Container size="large">
<blockquote>
<div
className={`relative z-10 max-w-3xl mx-auto text-4xl lg:text-5xl font-bold tracking-normal text-center title-font ${
data.color === "primary"
? `text-white`
: `text-gray-700 dark:text-gray-50`
}`}
>
<span
className={`block opacity-15 text-8xl absolute inset-y-1/2 transform translate-y-2 -left-4 leading-4 -z-1`}
>
return (
<Section color={ data.color }>
<Container size="large">
<blockquote>
<div
className={ `relative z-10 max-w-3xl mx-auto text-4xl lg:text-5xl font-bold tracking-normal text-center title-font ${
data.color === "primary"
? "text-white"
: "text-gray-700 dark:text-gray-50"
}` }
>
<span
className={ "block opacity-15 text-8xl absolute inset-y-1/2 transform translate-y-2 -left-4 leading-4 -z-1" }
>
&ldquo;
</span>
<p
data-tina-field={tinaField(data, `quote`)}
className="relative opacity-95"
>
{data.quote}
</p>
<span
className={`block opacity-15 text-8xl absolute inset-y-1/2 transform translate-y-3 -right-4 leading-4 -z-1`}
>
</span>
<p
data-tina-field={ tinaField(data, "quote") }
className="relative opacity-95"
>
{ data.quote }
</p>
<span
className={ "block opacity-15 text-8xl absolute inset-y-1/2 transform translate-y-3 -right-4 leading-4 -z-1" }
>
&rdquo;
</span>
</div>
<div className={`my-8 flex-grow-0`}>
<span
className={`block mx-auto h-0.5 w-1/6 ${
data.color === "primary"
? `bg-blue-600`
: `bg-gray-200 dark:bg-gray-700`
}`}
></span>
</div>
<footer className="text-center">
<p
data-tina-field={tinaField(data, `author`)}
className={`tracking-wide title-font font-bold text-lg ${
data.color === "primary"
? `text-blue-200`
: `text-blue-500 dark:text-blue-300`
}`}
>
{data.author}
</p>
</footer>
</blockquote>
</Container>
</Section>
);
</span>
</div>
<div className={ "my-8 flex-grow-0" }>
<span
className={ `block mx-auto h-0.5 w-1/6 ${
data.color === "primary"
? "bg-blue-600"
: "bg-gray-200 dark:bg-gray-700"
}` }
/>
</div>
<footer className="text-center">
<p
data-tina-field={ tinaField(data, "author") }
className={ `tracking-wide title-font font-bold text-lg ${
data.color === "primary"
? "text-blue-200"
: "text-blue-500 dark:text-blue-300"
}` }
>
{ data.author }
</p>
</footer>
</blockquote>
</Container>
</Section>
);
};
export const testimonialBlockSchema: Template = {
name: "testimonial",
label: "Testimonial",
ui: {
previewSrc: "/blocks/testimonial.png",
defaultItem: {
quote:
name: "testimonial",
label: "Testimonial",
ui: {
previewSrc: "/blocks/testimonial.png",
defaultItem: {
quote:
"There are only two hard things in Computer Science: cache invalidation and naming things.",
author: "Phil Karlton",
color: "primary",
author: "Phil Karlton",
color: "primary"
}
},
},
fields: [
{
type: "string",
ui: {
component: "textarea",
},
label: "Quote",
name: "quote",
},
{
type: "string",
label: "Author",
name: "author",
},
{
type: "string",
label: "Color",
name: "color",
options: [
{ label: "Default", value: "default" },
{ label: "Tint", value: "tint" },
{ label: "Primary", value: "primary" },
],
},
],
fields: [
{
type: "string",
ui: {
component: "textarea"
},
label: "Quote",
name: "quote"
},
{
type: "string",
label: "Author",
name: "author"
},
{
type: "string",
label: "Color",
name: "color",
options: [
{ label: "Default", value: "default" },
{ label: "Tint", value: "tint" },
{ label: "Primary", value: "primary" }
]
}
]
};

View File

@@ -1,4 +1,5 @@
module.exports = {
distDir: "build",
webpack(config) {
config.module.rules.push({
test: /\.svg$/i,

View File

@@ -7,7 +7,8 @@
"build": "tinacms build && next build",
"start": "tinacms build && next start",
"export": "npm run build && next export",
"lint": "eslint . --ext .ts,.tsx"
"lint": "eslint . --ext .ts,.tsx",
"bullshit:build": "tinacms dev -c \"next build\""
},
"devDependencies": {
"@svgr/webpack": "^6.3.1",

View File

@@ -44,6 +44,8 @@ export const getStaticProps = async ({ params }) => {
*
* So a blog post at "content/posts/hello.md" would
* be viewable at http://localhost:3000/posts/hello
*
* @returns {Promise} A promise with static paths.
*/
export const getStaticPaths = async () => {
const postsListData = await client.queries.postConnection();