diff --git a/package.json b/package.json index 1d3e545..7a7dd0e 100644 --- a/package.json +++ b/package.json @@ -6,13 +6,11 @@ "dependencies": { "@astrojs/mdx": "^8.0.3", "@astrojs/rss": "^4.0.19", - "@contentful/rich-text-html-renderer": "^16.6.10", "@georgedoescode/generative-utils": "^1.0.38", "@stackblitz/sdk": "^1.11.0", "@svgdotjs/svg.js": "^3.2.5", "@timohausmann/quadtree-js": "^1.2.6", "astro": "^7.3.8", - "contentful": "^11.12.1", "eslint": "^9.39.4", "markdown-it": "^14.1.1", "sanitize-html": "^2.17.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 20c31ce..78f8beb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -176,9 +176,6 @@ importers: '@astrojs/rss': specifier: ^4.0.19 version: 4.0.19 - '@contentful/rich-text-html-renderer': - specifier: ^16.6.10 - version: 16.6.10 '@georgedoescode/generative-utils': specifier: ^1.0.38 version: 1.0.38 @@ -194,9 +191,6 @@ importers: astro: specifier: ^7.3.8 version: 7.3.8(@types/node@24.19.2)(esbuild@0.28.2)(jiti@1.21.7)(yaml@2.9.1) - contentful: - specifier: ^11.12.1 - version: 11.12.10(debug@4.4.3(supports-color@7.2.0))(supports-color@7.2.0) eslint: specifier: ^9.39.4 version: 9.39.5(jiti@1.21.7)(supports-color@7.2.0) @@ -539,21 +533,6 @@ packages: '@codemirror/view@6.43.14': resolution: {integrity: sha512-hC45YnmJNR1rz42OF57BLoQNFMV12/13drnvibDsR2quNDmldcb4WvYVV81hFQg56i9lcqQMEDqilhX2QDcGQQ==} - '@contentful/content-source-maps@0.12.3': - resolution: {integrity: sha512-HzimXvs48eg+tjWtDuOIZzjbSYxfC8CLMZaTwzPqF6wW0TM5KoQIfDJZrGlnpGrZ66lXvyEc5nuYCa58ow8C7g==} - - '@contentful/rich-text-html-renderer@16.6.10': - resolution: {integrity: sha512-8PuC8l873cycCru2wCzkblb8li6pp+yWMBbgDq3XuokKOlgC+VqGluiB0lLRuAlC+ALA8TSbB92RJnQXv4blsg==} - engines: {node: '>=6.0.0'} - - '@contentful/rich-text-types@16.8.5': - resolution: {integrity: sha512-q18RJuJCOuYveGiCIjE5xLCQc5lZ3L2Qgxrlg/H2YEobDFqdtmklazRi1XwEWaK3tMg6yVXBzKKkQfLB4qW14A==} - engines: {node: '>=6.0.0'} - - '@contentful/rich-text-types@17.2.7': - resolution: {integrity: sha512-aIdozk8vk5gsYcallOrwEiL6+GSlMXZorDOmiVELfpbVaXMJPJPlf2CBw3LUzviAqCw0UPQcKHHCwG7SdY7u5w==} - engines: {node: '>=20.0.0'} - '@date-fns/tz@1.5.0': resolution: {integrity: sha512-lwYN/vDPeNRULcepoE/LO2Pgx+7/RV+S9ARfbc9lr2DtGkOD7pAiruHvbR1RX3Qyf6ja47EWJDMsNK5vK08DJg==} @@ -2562,9 +2541,6 @@ packages: '@upsetjs/venn.js@2.0.0': resolution: {integrity: sha512-WbBhLrooyePuQ1VZxrJjtLvTc4NVfpOyKx0sKqioq9bX1C1m7Jgykkn8gLrtwumBioXIqam8DLxp88Adbue6Hw==} - '@vercel/stega@1.1.0': - resolution: {integrity: sha512-DFOm3Gk78nKDkppQEG5aj8Wj8R8hPKu/xrz4Rtp0AfiaNbZNCoJbxn7VI6iMxqhGeLdUDy/8mTuTWMz/izAtPA==} - '@vitejs/plugin-react@4.7.0': resolution: {integrity: sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA==} engines: {node: ^14.18.0 || >=16.0.0} @@ -2609,10 +2585,6 @@ packages: engines: {node: '>=0.4.0'} hasBin: true - agent-base@6.0.2: - resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} - engines: {node: '>= 6.0.0'} - ajv@6.15.0: resolution: {integrity: sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==} @@ -2691,9 +2663,6 @@ packages: async-lock@1.4.1: resolution: {integrity: sha512-Az2ZTpuytrtqENulXwO3GGv1Bztugx6TT37NIo7imr/Qo0gsYiGtSdBa2B6fsXhTpVZDNfu1Qn3pk531e3q+nQ==} - asynckit@0.4.0: - resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} - attr-accept@2.2.5: resolution: {integrity: sha512-0bDNnY/u6pPwHDMoF0FieU354oBi0a8rD9FcsLwzcGWbc8KS8KPIi7y+s13OlVY+gMWc/9xEMUgNE6Qm8ZllYQ==} engines: {node: '>=4'} @@ -2710,9 +2679,6 @@ packages: resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} engines: {node: '>= 0.4'} - axios@1.20.0: - resolution: {integrity: sha512-r8aOh8j9cGKpgQAqpzrUHnSIc6a59Y3Xf/cv8sy1DrHCkZHzQGEuoq1tARk6qSyDdtQGSDgpb9kFlruzPvrgwg==} - axobject-query@4.1.0: resolution: {integrity: sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==} engines: {node: '>= 0.4'} @@ -2930,10 +2896,6 @@ packages: colorette@2.0.20: resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} - combined-stream@1.0.8: - resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} - engines: {node: '>= 0.8'} - comma-separated-tokens@2.0.3: resolution: {integrity: sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==} @@ -2979,18 +2941,6 @@ packages: resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==} engines: {node: '>= 0.6'} - contentful-resolve-response@2.0.1: - resolution: {integrity: sha512-IYjx6oI1G4wSlLecceDBKuXZRezVrNwZSxfmM0ZjwWtCeyR0B0iYPGNgEu3/p1kGJliFziZRFA61jM8wa1Trcg==} - engines: {node: '>=22'} - - contentful-sdk-core@10.0.0: - resolution: {integrity: sha512-4uNgDmAWYqvjQpc/nNQ2GkY/DuyFBivcoPPFFqvT9pWyQqLgxb46gTKdk5sc3YxjLv5tLSDKksRG/OC1uRbktw==} - engines: {node: '>=22'} - - contentful@11.12.10: - resolution: {integrity: sha512-/fUK6ySEZzLhiKFuUAxO7sFXxZeuEGKmhKQFdV/Iikm430up8v85PAkyi1N/dYTBS3l+yww9bfNssWHljExn+g==} - engines: {node: '>=18'} - convert-source-map@2.0.0: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} @@ -3303,10 +3253,6 @@ packages: delaunator@5.1.0: resolution: {integrity: sha512-AGrQ4QSgssa1NGmWmLPqN5NY2KajF5MqxetNEO+o0n3ZwZZeTmt7bBnvzHWrmkZFxGgr4HdyFgelzgi06otLuQ==} - delayed-stream@1.0.0: - resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} - engines: {node: '>=0.4.0'} - depd@2.0.0: resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} engines: {node: '>= 0.8'} @@ -3469,10 +3415,6 @@ packages: resolution: {integrity: sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==} engines: {node: '>= 0.4'} - es-set-tostringtag@2.1.0: - resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==} - engines: {node: '>= 0.4'} - es-toolkit@1.52.0: resolution: {integrity: sha512-XTNEJQh1tY1ZJVcf6ayP/2n4ZPyaHlW2FWs7xvw5ddPuhUVjLD3olQVQS7kf58JbAB48iL0uL/jerTrjtV3lDA==} @@ -3596,9 +3538,6 @@ packages: extend@3.0.2: resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} - fast-copy@3.1.0: - resolution: {integrity: sha512-IuCOCDFM1F/s4LtG7Bjr3yUUwPHybyhqN74xk2cMYoP51vVeErMy8+6HGFchi/+45lW8uzhs6lBeEqks2GWt6A==} - fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} @@ -3707,15 +3646,6 @@ packages: resolution: {integrity: sha512-9UbaD6XdAL97+k/n+N7JwX46K/M6Zc6KcFYskrYL8wbBV/Uyk0CTAMY0VT+qiK5PM7AIc9aTWYtq65U7T+aCNQ==} engines: {node: '>=8'} - follow-redirects@1.16.1: - resolution: {integrity: sha512-FNvFGzoMLWmE6Yj9spb/zjd7yiNCHiAW9/Tg9CXrQ8wuu32HtlJOwWO11OJafl5FfY3DxTdQ0vj42zU1kvv5jg==} - engines: {node: '>=4.0'} - peerDependencies: - debug: '*' - peerDependenciesMeta: - debug: - optional: true - fontace@0.4.1: resolution: {integrity: sha512-lDMvbAzSnHmbYMTEld5qdtvNH2/pWpICOqpean9IgC7vUbUJc3k+k5Dokp85CegamqQpFbXf0rAVkbzpyTA8aw==} @@ -3727,13 +3657,6 @@ packages: resolution: {integrity: sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==} engines: {node: '>= 0.4'} - foreach@2.0.6: - resolution: {integrity: sha512-k6GAGDyqLe9JaebCsFCoudPPWfihKu8pylYXRlqP1J7ms39iPoTtk2fviNglIeQEwdh0bQeKJ01ZPyuyQvKzwg==} - - form-data@4.0.6: - resolution: {integrity: sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==} - engines: {node: '>= 6'} - forwarded@0.2.0: resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} engines: {node: '>= 0.6'} @@ -3916,10 +3839,6 @@ packages: resolution: {integrity: sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==} engines: {node: '>= 0.8'} - https-proxy-agent@5.0.1: - resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} - engines: {node: '>= 6'} - human-signals@5.0.0: resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} engines: {node: '>=16.17.0'} @@ -4184,9 +4103,6 @@ packages: json-parse-even-better-errors@2.3.1: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} - json-pointer@0.6.2: - resolution: {integrity: sha512-vLWcKbOaXlO+jvRy4qNd+TI1QUPZzfJj1tpJ3vAXDych5XJf93ftpUKe5pKCrzyIIwgBJcOcCVRUfqQP25afBw==} - json-schema-traverse@0.4.1: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} @@ -5162,10 +5078,6 @@ packages: proxy-compare@2.6.0: resolution: {integrity: sha512-8xuCeM3l8yqdmbPoYeLbrAXCBWu19XEYc5/F28f5qOaoAIMyfmBUkl5axiK+x9olUvRlcekvnm98AP9RDngOIw==} - proxy-from-env@2.1.0: - resolution: {integrity: sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==} - engines: {node: '>=10'} - pump@3.0.4: resolution: {integrity: sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA==} @@ -5898,10 +5810,6 @@ packages: resolution: {integrity: sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==} engines: {node: '>=12.20'} - type-fest@4.41.0: - resolution: {integrity: sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==} - engines: {node: '>=16'} - type-is@1.6.18: resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} engines: {node: '>= 0.6'} @@ -6705,20 +6613,6 @@ snapshots: style-mod: 4.1.4 w3c-keyname: 2.2.8 - '@contentful/content-source-maps@0.12.3': - dependencies: - '@vercel/stega': 1.1.0 - json-pointer: 0.6.2 - - '@contentful/rich-text-html-renderer@16.6.10': - dependencies: - '@contentful/rich-text-types': 16.8.5 - escape-html: 1.0.3 - - '@contentful/rich-text-types@16.8.5': {} - - '@contentful/rich-text-types@17.2.7': {} - '@date-fns/tz@1.5.0': {} '@dnd-kit/accessibility@3.1.1(react@18.3.1)': @@ -8961,8 +8855,6 @@ snapshots: d3-selection: 3.0.0 d3-transition: 3.0.1(d3-selection@3.0.0) - '@vercel/stega@1.1.0': {} - '@vitejs/plugin-react@4.7.0(supports-color@7.2.0)(vite@7.3.7(@types/node@24.19.2)(jiti@1.21.7)(lightningcss@1.33.0)(yaml@2.9.1))': dependencies: '@babel/core': 7.29.7(supports-color@7.2.0) @@ -9014,12 +8906,6 @@ snapshots: acorn@8.8.2: {} - agent-base@6.0.2(supports-color@7.2.0): - dependencies: - debug: 4.4.3(supports-color@7.2.0) - transitivePeerDependencies: - - supports-color - ajv@6.15.0: dependencies: fast-deep-equal: 3.1.3 @@ -9170,8 +9056,6 @@ snapshots: async-lock@1.4.1: {} - asynckit@0.4.0: {} - attr-accept@2.2.5: {} auto-bind@4.0.0: {} @@ -9182,16 +9066,6 @@ snapshots: dependencies: possible-typed-array-names: 1.1.0 - axios@1.20.0(debug@4.4.3(supports-color@7.2.0))(supports-color@7.2.0): - dependencies: - follow-redirects: 1.16.1(debug@4.4.3(supports-color@7.2.0)) - form-data: 4.0.6 - https-proxy-agent: 5.0.1(supports-color@7.2.0) - proxy-from-env: 2.1.0 - transitivePeerDependencies: - - debug - - supports-color - axobject-query@4.1.0: {} b4a@1.9.0: {} @@ -9419,10 +9293,6 @@ snapshots: colorette@2.0.20: {} - combined-stream@1.0.8: - dependencies: - delayed-stream: 1.0.0 - comma-separated-tokens@2.0.3: {} commander@11.1.0: {} @@ -9449,33 +9319,6 @@ snapshots: content-type@1.0.5: {} - contentful-resolve-response@2.0.1: - dependencies: - fast-copy: 3.1.0 - - contentful-sdk-core@10.0.0: - dependencies: - fast-copy: 3.1.0 - lodash: 4.18.1 - process: 0.11.10 - qs: 6.16.0 - optionalDependencies: - '@rollup/rollup-linux-x64-gnu': 4.64.5 - - contentful@11.12.10(debug@4.4.3(supports-color@7.2.0))(supports-color@7.2.0): - dependencies: - '@contentful/content-source-maps': 0.12.3 - '@contentful/rich-text-types': 17.2.7 - axios: 1.20.0(debug@4.4.3(supports-color@7.2.0))(supports-color@7.2.0) - contentful-resolve-response: 2.0.1 - contentful-sdk-core: 10.0.0 - json-stringify-safe: 5.0.1 - tslib: 2.8.1 - type-fest: 4.41.0 - transitivePeerDependencies: - - debug - - supports-color - convert-source-map@2.0.0: {} cookie-es@1.2.3: {} @@ -9803,8 +9646,6 @@ snapshots: dependencies: robust-predicates: 3.0.3 - delayed-stream@1.0.0: {} - depd@2.0.0: {} dependency-graph@1.0.0: {} @@ -9942,13 +9783,6 @@ snapshots: dependencies: es-errors: 1.3.0 - es-set-tostringtag@2.1.0: - dependencies: - es-errors: 1.3.0 - get-intrinsic: 1.3.0 - has-tostringtag: 1.0.2 - hasown: 2.0.4 - es-toolkit@1.52.0: {} esbuild@0.28.2: @@ -10137,8 +9971,6 @@ snapshots: extend@3.0.2: {} - fast-copy@3.1.0: {} - fast-deep-equal@3.1.3: {} fast-glob@3.3.3: @@ -10259,10 +10091,6 @@ snapshots: flattie@1.1.1: {} - follow-redirects@1.16.1(debug@4.4.3(supports-color@7.2.0)): - optionalDependencies: - debug: 4.4.3(supports-color@7.2.0) - fontace@0.4.1: dependencies: fontkitten: 1.0.3 @@ -10275,16 +10103,6 @@ snapshots: dependencies: is-callable: 1.2.7 - foreach@2.0.6: {} - - form-data@4.0.6: - dependencies: - asynckit: 0.4.0 - combined-stream: 1.0.8 - es-set-tostringtag: 2.1.0 - hasown: 2.0.4 - mime-types: 2.1.35 - forwarded@0.2.0: {} framer-motion@12.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): @@ -10489,13 +10307,6 @@ snapshots: statuses: 2.0.2 toidentifier: 1.0.1 - https-proxy-agent@5.0.1(supports-color@7.2.0): - dependencies: - agent-base: 6.0.2(supports-color@7.2.0) - debug: 4.4.3(supports-color@7.2.0) - transitivePeerDependencies: - - supports-color - human-signals@5.0.0: {} husky@9.1.7: {} @@ -10689,10 +10500,6 @@ snapshots: json-parse-even-better-errors@2.3.1: {} - json-pointer@0.6.2: - dependencies: - foreach: 2.0.6 - json-schema-traverse@0.4.1: {} json-stable-stringify-without-jsonify@1.0.1: {} @@ -11874,8 +11681,6 @@ snapshots: proxy-compare@2.6.0: {} - proxy-from-env@2.1.0: {} - pump@3.0.4: dependencies: end-of-stream: 1.4.5 @@ -12986,8 +12791,6 @@ snapshots: type-fest@2.19.0: {} - type-fest@4.41.0: {} - type-is@1.6.18: dependencies: media-typer: 0.3.0 diff --git a/src/components/Bio.astro b/src/components/Bio.astro deleted file mode 100644 index f482852..0000000 --- a/src/components/Bio.astro +++ /dev/null @@ -1,12 +0,0 @@ ---- -import { contentfulClient } from '../lib/contentful'; -import { documentToHtmlString } from '@contentful/rich-text-html-renderer'; - -const bio = await contentfulClient.getEntries({ - content_type: 'description' -}) -.then((response) => { - return documentToHtmlString(response.items[0].fields.role) -}); ---- - diff --git a/src/components/List.astro b/src/components/List.astro deleted file mode 100644 index 08804f5..0000000 --- a/src/components/List.astro +++ /dev/null @@ -1,61 +0,0 @@ ---- -import { contentfulClient } from '../lib/contentful'; - -function shuffle(array) { - let counter = array.length; - - // While there are elements in the array - while (counter > 0) { - // Pick a random index - let index = Math.floor(Math.random() * counter); - - // Decrease counter by 1 - counter--; - - // And swap the last element with it - let temp = array[counter]; - array[counter] = array[index]; - array[index] = temp; - } - - return array; -} - -const achievements = await contentfulClient.getEntries({ - content_type: 'achievement', -}).then((response) => { - return { - items: shuffle(response.items), - }; -}) ---- -
-

- Achievements -

- -
- diff --git a/src/components/PortfolioPreview.astro b/src/components/PortfolioPreview.astro deleted file mode 100644 index f810e81..0000000 --- a/src/components/PortfolioPreview.astro +++ /dev/null @@ -1,49 +0,0 @@ ---- -import type { CollectionEntry } from "astro:content"; - -interface Props { - project: CollectionEntry<'work'>; -} - -const { project } = Astro.props; - -const date = new Date(data?.date).toLocaleDateString("en-gb", { - year: "numeric", - month: "long", -}); - -const fullLayout = Astro.props; ---- - -{ - fullLayout ? ( -
-
- -
-
- - {fields.title} - -
- Talis - -
-
-
- ) : ( -
- - {fields.title} - -
- Talis - -
-
- ) -} diff --git a/src/components/Quotes.astro b/src/components/Quotes.astro deleted file mode 100644 index 5259a33..0000000 --- a/src/components/Quotes.astro +++ /dev/null @@ -1,76 +0,0 @@ ---- -import { contentfulClient } from "../lib/contentful"; - -function shuffle(array) { - let counter = array.length; - - // While there are elements in the array - while (counter > 0) { - // Pick a random index - let index = Math.floor(Math.random() * counter); - - // Decrease counter by 1 - counter--; - - // And swap the last element with it - let temp = array[counter]; - array[counter] = array[index]; - array[index] = temp; - } - - return array; -} - -const quotes = await contentfulClient - .getEntries({ - content_type: "testimonial", - }) - .then((response) => { - return { - items: shuffle(response.items), - }; - }) - .then((response) => { - return { - items: response.items.slice(0, 9), - }; - }); ---- - -
-
-
    - { - quotes.items.map((quote) => ( -
  • -
    -

    {quote.fields.quote}

    -
    - {quote.fields.author && ( - {quote.fields.author} - )} - {quote.fields.authorOrganisation && ( - {quote.fields.authorOrganisation} - )} -
    - - - -
    -
  • - )) - } -
-
-
diff --git a/src/components/Work.astro b/src/components/Work.astro deleted file mode 100644 index fdbce4f..0000000 --- a/src/components/Work.astro +++ /dev/null @@ -1,24 +0,0 @@ ---- -import { contentfulClient } from '../lib/contentful'; -import type { portfolioEntry } from '../lib/contentful'; - -import PortfolioPreview from '../components/PortfolioPreview.astro'; - -const projects = await contentfulClient.getEntries({ - content_type: 'blogPost', - order: '-fields.date', -}); ---- -
-
-
    - { - projects.items.map((project, index) => ( -
  • - -
  • - )) - } -
-
-
diff --git a/src/lib/contentful.ts b/src/lib/contentful.ts deleted file mode 100644 index 4cb80e0..0000000 --- a/src/lib/contentful.ts +++ /dev/null @@ -1,20 +0,0 @@ -import * as contentful from 'contentful'; -import type { Document } from '@contentful/rich-text-types'; - -export interface portfolioEntry { - title: string; - date: string; - role: Array; - organisation: string; - summary: string; - portfolioContent: Document; - slug: string; -} - -export const contentfulClient = contentful.createClient({ - space: import.meta.env.CONTENTFUL_SPACE_ID, - accessToken: import.meta.env.DEV - ? import.meta.env.CONTENTFUL_PREVIEW_TOKEN - : import.meta.env.CONTENTFUL_DELIVERY_TOKEN, - host: import.meta.env.DEV ? 'preview.contentful.com' : 'cdn.contentful.com' -}); diff --git a/src/pages/index.astro b/src/pages/index.astro index 5e7704b..da8efde 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,8 +1,5 @@ --- import { getCollection } from "astro:content"; -import { contentfulClient } from "../lib/contentful"; - -import shuffle from "../utils/shuffle"; import HomeLayout from "../layouts/HomeLayout.astro"; import Hero from "../components/Hero.astro"; @@ -22,16 +19,6 @@ const projects = await getCollection("work", ({ data }) => { return data.draft !== true; }); -const quotes = await contentfulClient - .getEntries({ - content_type: "testimonial", - }) - .then((response) => { - return { - items: shuffle(response.items), - }; - }); - const title = "Accessibility and design systems consultant"; ---