Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 4 additions & 94 deletions app/app.vue
Original file line number Diff line number Diff line change
@@ -1,100 +1,10 @@
<template>
<!-- <div id="custom-cursor">
<div class="cursor-fill"></div>
</div> -->
<div class="flex flex-col justify-evenly min-h-[calc(100vh-32px)]">
<Navigation />
<main class="grow">
<NuxtPage />
</main>
<Footer />
</div>
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
</template>

<!-- <script setup lang="ts">
let cursor: HTMLElement | null = null;

onMounted(() => {
cursor = document.getElementById("custom-cursor");

const moveCursor = (e: MouseEvent) => {
const { clientX: x, clientY: y } = e;
if (cursor) {
cursor.style.left = x + "px";
cursor.style.top = y + "px";
}
};

const handleMouseDown = () => {
cursor?.classList.add("cursor-clicked");
};

const handleMouseUp = () => {
cursor?.classList.remove("cursor-clicked");
};

window.addEventListener("mousemove", moveCursor);
window.addEventListener("mousedown", handleMouseDown);
window.addEventListener("mouseup", handleMouseUp);

// Add and remove cursor-hover class
document.body.addEventListener("mouseover", (e) => {
if (
e.target instanceof HTMLElement &&
e.target.matches("a, button, input, textarea")
) {
cursor?.classList.add("cursor-hover");
}
});

document.body.addEventListener("mouseout", (e) => {
if (
e.target instanceof HTMLElement &&
e.target.matches("a, button, input, textarea")
) {
cursor?.classList.remove("cursor-hover");
}
});

onUnmounted(() => {
window.removeEventListener("mousemove", moveCursor);
window.removeEventListener("mousedown", handleMouseDown);
window.removeEventListener("mouseup", handleMouseUp);
});
});
</script>

<style>
#custom-cursor {
width: 40px;
height: 40px;
border: 2px solid #ee6f5388;
background: #ee6f5344;
border-radius: 50%;
position: fixed;
pointer-events: none;
z-index: 9999;
transition: all 0.3s ease-out;
transform: translate(-50%, -50%);
}

.cursor-clicked {
transform: translate(-50%, -50%) scale(1.5) !important;
}

/* Hide cursor on touch devices */
@media (hover: none) and (pointer: coarse) {
#custom-cursor {
display: none;
}

body {
cursor: auto;
}
}
</style> -->

<script setup>
<script setup lang="ts">
useHead({
script: [
{
Expand Down
15 changes: 1 addition & 14 deletions app/components/BlogCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class="relative h-auto overflow-hidden bg-[#faf8f4] hover:bg-[#fcf4f0] group"
>
<img
:src="getHeroImage(post.hero)"
:src="`/blog/${post.hero}`"
:alt="post.title"
class="w-full h-full object-cover transition-transform duration-500 group-hover:scale-[106.25%] hover:transform hover:scale-[1.0625]"
/>
Expand Down Expand Up @@ -68,19 +68,6 @@ const props = defineProps({
},
});

const blogImages = import.meta.glob("~/assets/img/blog/*", {
eager: true,
import: "default",
}) as Record<string, string>;

const getHeroImage = (hero: string | undefined): string => {
if (!hero) return "/blog-placeholder.png";
const matchingKey = Object.keys(blogImages).find((k) =>
k.endsWith(`/assets/img/blog/${hero}`),
);
return matchingKey ? blogImages[matchingKey] : "/placeholder.png";
};

const formatDate = (date: string) => {
if (!date) return "";
return new Date(date).toLocaleDateString("en-US", {
Expand Down
Loading