diff --git a/.gitignore b/.gitignore index 8f322f0..45c1abc 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,7 @@ yarn-error.log* # local env files .env*.local +.env # vercel .vercel diff --git a/components/content/carousel/index.tsx b/components/content/carousel/index.tsx index f852fd6..7deaa05 100644 --- a/components/content/carousel/index.tsx +++ b/components/content/carousel/index.tsx @@ -1,6 +1,9 @@ import React, { useState } from "react"; import Image from "next/image"; import { StaticImport } from "next/dist/shared/lib/get-img-props"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { faChevronCircleLeft, faChevronCircleRight } from "@fortawesome/free-solid-svg-icons"; +import IframeResizer from "iframe-resizer-react"; interface ContentCarouselProps { data: Array<{ @@ -19,13 +22,28 @@ const ContentCarousel = ({ const portfolioData = data[currentPageIdx]; return ( -
-
+
+ {(currentPageIdx > 0) && setCurrentPageIdx(currentPageIdx - 1)}>} +
{portfolioData.title}
{portfolioData.heroImgSrc &&
}
{portfolioData.description}
-
{}
+ {portfolioData.prototypeIframeURL &&
+ {} +
}
+ {(currentPageIdx < pageLength - 1) && setCurrentPageIdx(currentPageIdx + 1)}>}
); diff --git a/components/content/index.tsx b/components/content/index.tsx index be87a77..c09f26e 100644 --- a/components/content/index.tsx +++ b/components/content/index.tsx @@ -17,7 +17,7 @@ const Content = ({ return (
{title}
- {heroImgSrc &&
} + {heroImgSrc &&
}
{description}
{innerChildren}
diff --git a/package.json b/package.json index cdbc4f2..ba1bd0e 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "@fortawesome/fontawesome-svg-core": "^6.4.2", "@fortawesome/free-solid-svg-icons": "^6.4.2", "@fortawesome/react-fontawesome": "^0.2.0", + "iframe-resizer-react": "^1.1.0", "next": "latest", "react": "latest", "react-dom": "latest", diff --git a/pages/index.tsx b/pages/index.tsx index 8a6b7b3..d15522e 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -64,13 +64,15 @@ export default function Home() {
} {showModal && ( -
-
-
-
- setShowModal(false)}>X +
+
+
+
+
+ setShowModal(false)}>X +
+ {modalData.content}
- {modalData.content}
diff --git a/yarn.lock b/yarn.lock index 7a0067c..940e44f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1296,6 +1296,19 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" +iframe-resizer-react@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/iframe-resizer-react/-/iframe-resizer-react-1.1.0.tgz#5009e019b7a5c7f1c009bff5bcdf0dbf33557465" + integrity sha512-FrytSq91AIJaDgE+6uK/Vdd6IR8CrwLoZ6eGmL2qQMPTzF0xlSV2jaSzRRUh5V2fttD7vzl21jvBl97bV40eBw== + dependencies: + iframe-resizer "^4.3.0" + warning "^4.0.3" + +iframe-resizer@^4.3.0: + version "4.3.7" + resolved "https://registry.yarnpkg.com/iframe-resizer/-/iframe-resizer-4.3.7.tgz#fd07ee14b7ecb4d49f63f5019c49e476b97d4416" + integrity sha512-a3EGVScU9NtUpj6lWvGhVw3EfOw5AopRs5xGsQU385kWdgQt++OsD6PCnTV+8YkgBu/g28rLIh0EztFg9UQr1Q== + ignore@^5.2.0: version "5.2.4" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324"