|
@@ -10,6 +10,7 @@ import Pgp from "../components/pgp.astro";
|
|
|
import Projects from "../components/projects.astro";
|
|
import Projects from "../components/projects.astro";
|
|
|
import Duolingo from "../components/duolingo.astro";
|
|
import Duolingo from "../components/duolingo.astro";
|
|
|
import GitHubGraph from "../components/githubgraph.astro";
|
|
import GitHubGraph from "../components/githubgraph.astro";
|
|
|
|
|
+import SearchWidget from "../components/searchwidget.astro";
|
|
|
|
|
|
|
|
// Projects
|
|
// Projects
|
|
|
import Summize from "../components/projects/summize.astro";
|
|
import Summize from "../components/projects/summize.astro";
|
|
@@ -253,6 +254,7 @@ apps = apps.map((item) => {
|
|
|
<Aboutme />
|
|
<Aboutme />
|
|
|
<Redirect />
|
|
<Redirect />
|
|
|
<Contact />
|
|
<Contact />
|
|
|
|
|
+ <SearchWidget />
|
|
|
<Projects projects={projectsArr} />
|
|
<Projects projects={projectsArr} />
|
|
|
<Summize />
|
|
<Summize />
|
|
|
<Notion />
|
|
<Notion />
|
|
@@ -355,15 +357,22 @@ apps = apps.map((item) => {
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
|
button.addEventListener("click", () => {
|
|
button.addEventListener("click", () => {
|
|
|
- window.classList.add("closed")
|
|
|
|
|
|
|
+ window.classList.add("closed");
|
|
|
|
|
+ removeFromTaskbar(window.id);
|
|
|
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- window.classList.remove("closed")
|
|
|
|
|
|
|
+ const onEnd = () => {
|
|
|
|
|
+ window.classList.remove("closed");
|
|
|
window.style.display = "none";
|
|
window.style.display = "none";
|
|
|
- }, 100)
|
|
|
|
|
|
|
+ };
|
|
|
|
|
+ window.addEventListener('animationend', onEnd, { once: true });
|
|
|
|
|
|
|
|
- // window.style.display = "none";
|
|
|
|
|
- removeFromTaskbar(window.id);
|
|
|
|
|
|
|
+ // If no CSS animation runs, ensure the window still closes.
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ if (window.style.display !== 'none') {
|
|
|
|
|
+ window.classList.remove('closed');
|
|
|
|
|
+ window.style.display = 'none';
|
|
|
|
|
+ }
|
|
|
|
|
+ }, 250);
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
@@ -536,46 +545,14 @@ apps = apps.map((item) => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // Function to show Duolingo with animation
|
|
|
|
|
- function showDuolingo() {
|
|
|
|
|
- const duolingoWindow = document.getElementById("duolingo");
|
|
|
|
|
- duolingoWindow.style.display = "block";
|
|
|
|
|
- duolingoWindow.classList.add("show");
|
|
|
|
|
- raiseUpSpec("duolingo");
|
|
|
|
|
-
|
|
|
|
|
- // Remove animation class after it completes
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- duolingoWindow.classList.remove("show");
|
|
|
|
|
- }, 400);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // Function to show GitHub graph with animation
|
|
|
|
|
- function showGitHubGraph() {
|
|
|
|
|
- const githubWindow = document.getElementById("github-graph");
|
|
|
|
|
- githubWindow.style.display = "block";
|
|
|
|
|
- githubWindow.classList.add("show");
|
|
|
|
|
- raiseUpSpec("github-graph");
|
|
|
|
|
-
|
|
|
|
|
- // Remove animation class after it completes
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- githubWindow.classList.remove("show");
|
|
|
|
|
- }, 400);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // Track start button clicks
|
|
|
|
|
- let startButtonClicks = 0;
|
|
|
|
|
- const startButton = document.getElementById("start-button");
|
|
|
|
|
|
|
+ // Start button: bring SimoSearch to front (and show it if closed).
|
|
|
|
|
+ const startButton = document.querySelector('button[aria-label="startButton"]');
|
|
|
if (startButton) {
|
|
if (startButton) {
|
|
|
- startButton.addEventListener("click", () => {
|
|
|
|
|
- startButtonClicks++;
|
|
|
|
|
- if (startButtonClicks === 1) {
|
|
|
|
|
- showGitHubGraph();
|
|
|
|
|
-
|
|
|
|
|
- } else if (startButtonClicks === 2) {
|
|
|
|
|
- showDuolingo();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ startButton.addEventListener('click', () => {
|
|
|
|
|
+ const w = document.getElementById('SimoSearch');
|
|
|
|
|
+ if (!w) return;
|
|
|
|
|
+ w.style.display = 'block';
|
|
|
|
|
+ raiseUpSpec('SimoSearch');
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- // Don't auto-show Duolingo anymore - wait for start button click
|
|
|
|
|
</script>
|
|
</script>
|