From 90e139a22f1446f48881d3940b5f3c1752af1a57 Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Thu, 22 May 2025 19:03:58 -0500 Subject: [PATCH] feat: fix stuff --- public/scripts/index.js | 4 +--- public/scripts/models-of-production.js | 12 +++++------- .../posts/software/designing-this-website.mdx | 4 ++++ src/layouts/BaseLayout.astro | 14 ++++++++++++++ src/pages/[category].astro | 6 +----- src/pages/index.astro | 1 - src/utils/colors.js | 2 +- 7 files changed, 26 insertions(+), 17 deletions(-) diff --git a/public/scripts/index.js b/public/scripts/index.js index 788176d..d8cdc30 100644 --- a/public/scripts/index.js +++ b/public/scripts/index.js @@ -1,5 +1,3 @@ -import { getTopicColor } from "../../src/utils/colors.js"; - const TERMINAL_PROMPT = "barrett@ruth:~$ "; let typing = false; let clearing = false; @@ -108,7 +106,7 @@ document.addEventListener("DOMContentLoaded", function () { const topicName = topic.dataset.topic; topic.addEventListener("mouseenter", () => { - const color = getTopicColor(topicName); + const color = window.getTopicColor(topicName); topic.style.color = color; }); diff --git a/public/scripts/models-of-production.js b/public/scripts/models-of-production.js index 4437c94..17a99fc 100644 --- a/public/scripts/models-of-production.js +++ b/public/scripts/models-of-production.js @@ -1,5 +1,3 @@ -import { getTopicColor } from "../../src/utils/colors.js"; - function urlToTopic() { const path = window.location.pathname; const pathParts = path.split("/"); @@ -84,7 +82,7 @@ function drawSolowGraph() { .append("path") .datum(outputData) .attr("fill", "none") - .attr("stroke", getTopicColor(urlToTopic())) + .attr("stroke", window.getTopicColor(urlToTopic())) .attr("stroke-width", 2) .attr( "d", @@ -267,7 +265,7 @@ function drawRomerGraph() { .append("path") .datum(romerData) .attr("fill", "none") - .attr("stroke", getTopicColor(urlToTopic())) + .attr("stroke", window.getTopicColor(urlToTopic())) .attr("stroke-width", 2) .attr( "d", @@ -360,7 +358,7 @@ function drawRomerlGraph() { .append("path") .datum(romerData) .attr("fill", "none") - .attr("stroke", getTopicColor(urlToTopic())) + .attr("stroke", window.getTopicColor(urlToTopic())) .attr("stroke-width", 2) .attr( "d", @@ -506,7 +504,7 @@ function drawRomerSolowGraph() { .append("path") .datum(romerSolowData) .attr("fill", "none") - .attr("stroke", getTopicColor(urlToTopic())) + .attr("stroke", window.getTopicColor(urlToTopic())) .attr("stroke-width", 2) .attr( "d", @@ -603,7 +601,7 @@ function drawRomerSolowChangeGraph() { .append("path") .datum(romerSolowData) .attr("fill", "none") - .attr("stroke", getTopicColor(urlToTopic())) + .attr("stroke", window.getTopicColor(urlToTopic())) .attr("stroke-width", 2) .attr( "d", diff --git a/src/content/posts/software/designing-this-website.mdx b/src/content/posts/software/designing-this-website.mdx index 054cd7d..60478e8 100644 --- a/src/content/posts/software/designing-this-website.mdx +++ b/src/content/posts/software/designing-this-website.mdx @@ -3,6 +3,10 @@ title: "designing this website" date: "18/06/2024" --- +## Update: Port to Astro (22/05/2025) + +hi + ## HTML, JavaScript, and CSS That's all there is to it. diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index 57a3f07..f3625db 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -27,6 +27,20 @@ const {