From 5bd0cfc533810f7b7bc0271d8551e32813e1cc80 Mon Sep 17 00:00:00 2001 From: "Brady Stroud [SSW]" Date: Sun, 13 Aug 2023 19:04:58 +1000 Subject: [PATCH] delete a bunch of stuff --- assets/img/scores/lighthouse.svg | 1 - .../img/scores/lighthouse_accessibility.svg | 1 - .../img/scores/lighthouse_best-practices.svg | 1 - assets/img/scores/lighthouse_performance.svg | 1 - assets/img/scores/lighthouse_pwa.svg | 1 - assets/img/scores/lighthouse_seo.svg | 1 - components/blocks/features.tsx | 3 - components/blocks/hero.tsx | 12 +- components/fields/color.tsx | 52 ----- components/fields/icon.tsx | 131 ----------- components/layout/footer/footer.tsx | 55 +---- components/layout/header.tsx | 30 +-- components/layout/index.tsx | 1 - components/layout/layout.tsx | 29 +-- components/layout/theme.tsx | 73 ------- components/posts/post.tsx | 205 ------------------ components/posts/posts.tsx | 81 ------- components/posts/reviews.tsx | 19 +- components/util/actions.tsx | 14 +- components/util/icon.tsx | 169 --------------- components/util/section.tsx | 10 +- tailwind.config.js | 9 +- tina/config.tsx | 2 - tina/tina-lock.json | 2 +- 24 files changed, 30 insertions(+), 873 deletions(-) delete mode 100644 assets/img/scores/lighthouse.svg delete mode 100644 assets/img/scores/lighthouse_accessibility.svg delete mode 100644 assets/img/scores/lighthouse_best-practices.svg delete mode 100644 assets/img/scores/lighthouse_performance.svg delete mode 100644 assets/img/scores/lighthouse_pwa.svg delete mode 100644 assets/img/scores/lighthouse_seo.svg delete mode 100644 components/fields/color.tsx delete mode 100644 components/fields/icon.tsx delete mode 100644 components/layout/theme.tsx delete mode 100644 components/posts/post.tsx delete mode 100644 components/posts/posts.tsx delete mode 100644 components/util/icon.tsx diff --git a/assets/img/scores/lighthouse.svg b/assets/img/scores/lighthouse.svg deleted file mode 100644 index 8b661f2..0000000 --- a/assets/img/scores/lighthouse.svg +++ /dev/null @@ -1 +0,0 @@ -lighthouse: 88%lighthouse88% \ No newline at end of file diff --git a/assets/img/scores/lighthouse_accessibility.svg b/assets/img/scores/lighthouse_accessibility.svg deleted file mode 100644 index f869c8d..0000000 --- a/assets/img/scores/lighthouse_accessibility.svg +++ /dev/null @@ -1 +0,0 @@ -lighthouse accessibility: 100%lighthouse accessibility100% \ No newline at end of file diff --git a/assets/img/scores/lighthouse_best-practices.svg b/assets/img/scores/lighthouse_best-practices.svg deleted file mode 100644 index a65fba4..0000000 --- a/assets/img/scores/lighthouse_best-practices.svg +++ /dev/null @@ -1 +0,0 @@ -lighthouse best-practices: 100%lighthouse best-practices100% \ No newline at end of file diff --git a/assets/img/scores/lighthouse_performance.svg b/assets/img/scores/lighthouse_performance.svg deleted file mode 100644 index 1268e55..0000000 --- a/assets/img/scores/lighthouse_performance.svg +++ /dev/null @@ -1 +0,0 @@ -lighthouse performance: 100%lighthouse performance100% \ No newline at end of file diff --git a/assets/img/scores/lighthouse_pwa.svg b/assets/img/scores/lighthouse_pwa.svg deleted file mode 100644 index 65b27c4..0000000 --- a/assets/img/scores/lighthouse_pwa.svg +++ /dev/null @@ -1 +0,0 @@ -lighthouse pwa: 42%lighthouse pwa42% \ No newline at end of file diff --git a/assets/img/scores/lighthouse_seo.svg b/assets/img/scores/lighthouse_seo.svg deleted file mode 100644 index 4d30d4e..0000000 --- a/assets/img/scores/lighthouse_seo.svg +++ /dev/null @@ -1 +0,0 @@ -lighthouse seo: 100%lighthouse seo100% \ No newline at end of file diff --git a/components/blocks/features.tsx b/components/blocks/features.tsx index 5d53071..7930049 100644 --- a/components/blocks/features.tsx +++ b/components/blocks/features.tsx @@ -1,8 +1,6 @@ import { Actions } from "../util/actions"; import { Section } from "../util/section"; import { Container } from "../util/container"; -import { Icon } from "../util/icon"; -import { iconSchema } from "../util/icon"; export const Feature = ({ featuresColor, data, tinaField }) => { return ( @@ -98,7 +96,6 @@ export const featureBlockSchema = { }, }, fields: [ - iconSchema, { type: "string", label: "Title", diff --git a/components/blocks/hero.tsx b/components/blocks/hero.tsx index 7b0344a..bbb4ee6 100644 --- a/components/blocks/hero.tsx +++ b/components/blocks/hero.tsx @@ -2,12 +2,10 @@ import * as React from "react"; import { Actions } from "../util/actions"; import { Container } from "../util/container"; import { Section } from "../util/section"; -import { useTheme } from "../layout"; import { TinaMarkdown } from "tinacms/dist/rich-text"; import type { TinaTemplate } from "tinacms"; export const Hero = ({ data, parentField }) => { - const theme = useTheme(); const headlineColorClasses = { blue: "from-blue-400 to-blue-600", teal: "from-teal-400 to-teal-600", @@ -40,15 +38,7 @@ export const Hero = ({ data, parentField }) => { data-tinafield={`${parentField}.headline`} className={`w-full relative mb-10 text-5xl font-extrabold tracking-normal leading-tight title-font`} > - - {data.headline} - + {data.headline} )} {data.text && ( diff --git a/components/fields/color.tsx b/components/fields/color.tsx deleted file mode 100644 index b84064d..0000000 --- a/components/fields/color.tsx +++ /dev/null @@ -1,52 +0,0 @@ -import * as React from "react"; -import { wrapFieldsWithMeta } from "tinacms"; - -export const colorOptions = [ - "blue", - "teal", - "green", - "yellow", - "orange", - "red", - "pink", - "purple", - "white", -]; - -export const ColorPickerInput = wrapFieldsWithMeta(({ input }) => { - const inputClasses = { - blue: "bg-blue-500 border-blue-600", - teal: "bg-teal-500 border-teal-600", - green: "bg-green-500 border-green-600", - yellow: "bg-yellow-500 border-yellow-600", - orange: "bg-orange-500 border-orange-600", - red: "bg-red-500 border-red-600", - pink: "bg-pink-500 border-pink-600", - purple: "bg-purple-500 border-purple-600", - white: "bg-white border-gray-150", - }; - - return ( - <> - -
- {colorOptions.map((color) => { - return ( - - ); - })} -
- - ); -}); diff --git a/components/fields/icon.tsx b/components/fields/icon.tsx deleted file mode 100644 index ee1958f..0000000 --- a/components/fields/icon.tsx +++ /dev/null @@ -1,131 +0,0 @@ -import * as React from "react"; -import { GoCircleSlash } from "react-icons/go"; -import { Button, wrapFieldsWithMeta } from "tinacms"; -import { Popover, Transition } from "@headlessui/react"; -import { Icon, IconOptions } from "../util/icon"; -import { BiChevronRight } from "react-icons/bi"; - -const parseIconName = (name: string) => { - const splitName = name.split(/(?=[A-Z])/); - if (splitName.length > 1) { - return splitName.slice(1).join(" "); - } else { - return name; - } -}; - -export const IconPickerInput = wrapFieldsWithMeta(({ input }) => { - const [filter, setFilter] = React.useState(""); - const filteredBlocks = React.useMemo(() => { - return Object.keys(IconOptions).filter((name) => { - return name.toLowerCase().includes(filter.toLowerCase()); - }); - }, [filter]); - - const inputLabel = Object.keys(IconOptions).includes(input.value) - ? parseIconName(input.value) - : "Select Icon"; - const InputIcon = IconOptions[input.value] ? IconOptions[input.value] : null; - - return ( -
- - - {({ open }) => ( - <> - - - -
- - - {({ close }) => ( -
-
- { - event.stopPropagation(); - event.preventDefault(); - }} - value={filter} - onChange={(event: any) => { - setFilter(event.target.value); - }} - placeholder="Filter..." - /> -
- {filteredBlocks.length === 0 && ( - - No matches found - - )} - {filteredBlocks.length > 0 && ( -
- - {filteredBlocks.map((name) => { - return ( - - ); - })} -
- )} -
- )} -
-
-
- - )} -
-
- ); -}); diff --git a/components/layout/footer/footer.tsx b/components/layout/footer/footer.tsx index 798042b..efc3dcd 100644 --- a/components/layout/footer/footer.tsx +++ b/components/layout/footer/footer.tsx @@ -4,11 +4,8 @@ import { FaFacebookF, FaGithub, FaTwitter } from "react-icons/fa"; import { AiFillInstagram } from "react-icons/ai"; import { Container } from "../../util/container"; import { RawRenderer } from "./rawRenderer"; -import { useTheme } from ".."; -import { Icon } from "../../util/icon"; export const Footer = ({ data, icon, rawData }) => { - const theme = useTheme(); const socialIconClasses = "h-7 w-auto"; const socialIconColorClasses = { blue: "text-blue-500 dark:text-blue-400 hover:text-blue-300", @@ -37,28 +34,10 @@ export const Footer = ({ data, icon, rawData }) => { }, }; - const footerColorCss = - data.color === "primary" - ? footerColor.primary[theme.color] - : footerColor.default; - return ( -