diff --git a/src/pages/developerTools/DeveloperToolCard.astro b/src/components/DeveloperToolCard/DeveloperToolCard.astro similarity index 59% rename from src/pages/developerTools/DeveloperToolCard.astro rename to src/components/DeveloperToolCard/DeveloperToolCard.astro index bfb441c..d6835ef 100644 --- a/src/pages/developerTools/DeveloperToolCard.astro +++ b/src/components/DeveloperToolCard/DeveloperToolCard.astro @@ -3,6 +3,12 @@ import "./developer-tools-card.css"; const { url, imageSrc, title, content, id } = Astro.props; --- + + +
diff --git a/src/pages/developerTools/developer-tools-card.css b/src/components/DeveloperToolCard/developer-tools-card.css similarity index 100% rename from src/pages/developerTools/developer-tools-card.css rename to src/components/DeveloperToolCard/developer-tools-card.css diff --git a/src/components/DeveloperToolCard/developer-tools-card.ts b/src/components/DeveloperToolCard/developer-tools-card.ts new file mode 100644 index 0000000..256d064 --- /dev/null +++ b/src/components/DeveloperToolCard/developer-tools-card.ts @@ -0,0 +1,3 @@ +import { hi } from "./fn"; + +document.addEventListener("click", hi); diff --git a/src/components/DeveloperToolCard/fn.ts b/src/components/DeveloperToolCard/fn.ts new file mode 100644 index 0000000..85cdcfe --- /dev/null +++ b/src/components/DeveloperToolCard/fn.ts @@ -0,0 +1,3 @@ +export function hi() { + alert("hi"); +} diff --git a/src/pages/developerTools/index.astro b/src/pages/developerTools/index.astro index d862c97..61dc1ca 100644 --- a/src/pages/developerTools/index.astro +++ b/src/pages/developerTools/index.astro @@ -1,6 +1,6 @@ --- import BaseLayout from "../../layouts/BaseLayout.astro"; -import DeveloperToolCard from "./DeveloperToolCard.astro"; +import DeveloperToolCard from "../../components/DeveloperToolCard/DeveloperToolCard.astro"; import "./index.css"; ---