diff --git a/app/components/exp_entry.tsx b/app/components/exp_entry.tsx index a5c44fd..ef7c5e6 100644 --- a/app/components/exp_entry.tsx +++ b/app/components/exp_entry.tsx @@ -1,5 +1,7 @@ import React from "react"; +import Image from 'next/image'; + import { Wiggle } from "../animations/wiggle"; import { motion } from "framer-motion"; @@ -48,7 +50,7 @@ export default function ExpEntry(props: expEntryProps){ }} > - {props.company} + {props.company} {scope.current?.removeChild(eq);} + return () => {scope_target.removeChild(eq);} }else{ - setTimeout(test_mathjax, 1000); + setTimeout(test_mathjax, 300); } - }, [isInview]); + }); return ; }; diff --git a/app/components/skills_radar.tsx b/app/components/skills_radar.tsx index 13c1ad2..ed68a02 100644 --- a/app/components/skills_radar.tsx +++ b/app/components/skills_radar.tsx @@ -1,37 +1,48 @@ -import React, { useEffect, useRef } from 'react'; +'use client' -import Sunburst from 'sunburst-chart'; +import React, { useEffect, useRef, useState } from 'react'; import data from '../data'; export default function SkillsRadar () { const skillgraph = useRef(null); + const [sunburstLoaded, setSunburstLoaded] = useState(false); + + const test_sunburst = () => { + if((window as any).Sunburst){ + setSunburstLoaded(true); // Used to trigger a rerender + } + } useEffect(() => { - const skills_div = skillgraph.current; - if (skills_div) { - Sunburst() - .data(data) - .size('size') - .width(600) - .height(600) - .excludeRoot(true) - .tooltipContent( - (_, node: any) => { - return node.data.text; - } - ) - .labelOrientation('angular') - .tooltipTitle((d, node: any) => {return node.data.name}) - .color('color') - (skills_div); + if ((window as any).Sunburst) { + const skills_div = skillgraph.current; + test_sunburst(); + if (skills_div) { + (window as any).Sunburst() + .data(data) + .size('size') + .width(400) + .height(400) + .excludeRoot(true) + .tooltipContent( + (_: any, node: any) => { + return node.data.text; + } + ) + .labelOrientation('angular') + .tooltipTitle((_: any, node: any) => {return node.data.name}) + .color('color') + (skills_div); + } + return () => { + if (skills_div) { + (skills_div as any).innerHTML = ''; + } + } + } else { + setTimeout(test_sunburst, 300); } - return () => { - const skills_div = skillgraph.current; - if (skills_div) { - (skills_div as any).innerHTML = ''; - } - } } , []); return
; diff --git a/app/data.js b/app/data.js index 1098191..54928e8 100644 --- a/app/data.js +++ b/app/data.js @@ -1,4 +1,4 @@ -export default { +let data = { name: 'Skills', color: '#81272e', text: "Some of my skills", @@ -296,4 +296,6 @@ export default { } ]} ] -}; \ No newline at end of file +}; + +export default data; diff --git a/app/data/jobs.json b/app/data/jobs.json deleted file mode 100644 index e69de29..0000000 diff --git a/app/layout.tsx b/app/layout.tsx index 547500e..02600e4 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -21,9 +21,8 @@ export default function RootLayout({ return ( - + + diff --git a/app/page.tsx b/app/page.tsx index c7523ed..18a4ce0 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1,4 +1,5 @@ 'use client' + import React from "react"; import ExperienceBlock from "./components/experience_block"; @@ -9,30 +10,33 @@ export default function Home() { return (
-
+
+
Jeffrey Berger, Ph.D.
-
- - -
+
-
- I specialize in building things for other people. If you are another person and you need something built go ahead and reach out. +
+
+ I specialize in building things for other people. If you are another person and you need something built go ahead and reach out. +
+
+ I have a summary of the skills I&aposve picked up over the years on the right that you can click through. +
diff --git a/app/types/index.d.ts b/app/types/index.d.ts index 7edee54..b1c3f95 100644 --- a/app/types/index.d.ts +++ b/app/types/index.d.ts @@ -3,5 +3,6 @@ export {}; declare global { interface Window { MathJax: any; + Sunburst: any; } } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index a6d160b..9f3e60a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,8 +14,7 @@ "next": "14.1.4", "p5": "^1.9.2", "react": "^18", - "react-dom": "^18", - "sunburst-chart": "^1.19.2" + "react-dom": "^18" }, "devDependencies": { "@types/d3": "^7.4.3", @@ -898,14 +897,6 @@ "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", "dev": true }, - "node_modules/accessor-fn": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/accessor-fn/-/accessor-fn-1.5.0.tgz", - "integrity": "sha512-dml7D96DY/K5lt4Ra2jMnpL9Bhw5HEGws4p1OAIxFFj9Utd/RxNfEO3T3f0QIWFNwQU7gNxH9snUfqF/zNkP/w==", - "engines": { - "node": ">=12" - } - }, "node_modules/acorn": { "version": "8.11.3", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", @@ -2794,18 +2785,6 @@ "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", "dev": true }, - "node_modules/float-tooltip": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/float-tooltip/-/float-tooltip-1.2.1.tgz", - "integrity": "sha512-7Qi2BSSJTDj3qwyjLXhbnO6ii1wQsGrRuN283TftmAxj5kb3lXoeV7kSsu21COvgvZfJRfrGEttxgiNTDhVAbA==", - "dependencies": { - "d3-selection": "2 - 3", - "kapsule": "^1.14" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/for-each": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", @@ -3748,17 +3727,6 @@ "node": ">=4.0" } }, - "node_modules/kapsule": { - "version": "1.14.5", - "resolved": "https://registry.npmjs.org/kapsule/-/kapsule-1.14.5.tgz", - "integrity": "sha512-H0iSpTynUzZw3tgraDmReprpFRmH5oP5GPmaNsurSwLx2H5iCpOMIkp5q+sfhB4Tz/UJd1E1IbEE9Z6ksnJ6RA==", - "dependencies": { - "lodash-es": "4" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", @@ -3834,11 +3802,6 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, - "node_modules/lodash-es": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", - "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==" - }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -5181,26 +5144,6 @@ "node": ">=16 || 14 >=14.17" } }, - "node_modules/sunburst-chart": { - "version": "1.19.2", - "resolved": "https://registry.npmjs.org/sunburst-chart/-/sunburst-chart-1.19.2.tgz", - "integrity": "sha512-4YDV1eCQYyiOrayJbc3rJu1X50toN+NihWGqF6U7vmnULqA/1RBS/Yef8/qdZ/kZkwZig98+XCM2saknuYXr4Q==", - "dependencies": { - "accessor-fn": "1", - "d3-hierarchy": "1 - 3", - "d3-interpolate": "1 - 3", - "d3-path": "1 - 3", - "d3-scale": "1 - 4", - "d3-selection": "2 - 3", - "d3-shape": "1 - 3", - "d3-transition": "2 - 3", - "float-tooltip": "1", - "kapsule": "1" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", diff --git a/package.json b/package.json index 52787d9..faf28c3 100644 --- a/package.json +++ b/package.json @@ -15,8 +15,7 @@ "next": "14.1.4", "p5": "^1.9.2", "react": "^18", - "react-dom": "^18", - "sunburst-chart": "^1.19.2" + "react-dom": "^18" }, "devDependencies": { "@types/d3": "^7.4.3",