- Create structured projects collection with schema - Add new dev page and navigation link - Refactor hero animation for view transitions - Update project descriptions and tags - Add new projects: Summit Painting, United Tattoos, etc. - Trapped in endless work, despise this commit Hubert The Eunuch
8.7 KiB
8.7 KiB
Continuity Log
Template for New Entries
## YYYY-MM-DD - <Milestone>
### Changes Made
- Created X, Y, Z files
- Implemented feature A using pattern B
### Decisions
- Chose X over Y because...
- Pattern for Z is...
### How to Test
1. Navigate to...
2. Click...
3. Verify...
### Next Steps
- [ ] Item 1
- [ ] Item 2
Example: postMessage Pattern (Reference)
Parent sends to iframe:
// lib/communication/iframe-controller.ts
export function selectElement(iframe: HTMLIFrameElement, nodeId: string) {
iframe.contentWindow?.postMessage(
{ type: 'SELECT_ELEMENT', payload: { nodeId } },
'http://localhost:4321' // Always explicit origin
)
}
Iframe sends to parent:
// Injected script in iframe
window.parent.postMessage(
{ type: 'ELEMENT_SELECTED', payload: { nodeId, rect, astroSource } },
'http://localhost:3000'
)
Parent receives:
// lib/communication/message-handler.ts
window.addEventListener('message', (event) => {
if (event.origin !== 'http://localhost:4321') return
switch (event.data.type) {
case 'ELEMENT_SELECTED':
handleElementSelected(event.data.payload)
break
// ... other handlers
}
})
Example: Zustand Store Pattern (Reference)
// lib/store/editor-store.ts
import { create } from 'zustand'
interface EditorStore {
selectedElement: SelectedElement | null
setSelectedElement: (el: SelectedElement | null) => void
}
export const useEditorStore = create<EditorStore>((set) => ({
selectedElement: null,
setSelectedElement: (el) => set({ selectedElement: el }),
}))
Usage:
const selectedElement = useEditorStore((state) => state.selectedElement)
const setSelectedElement = useEditorStore((state) => state.setSelectedElement)
Example: File Update Pattern (Reference)
// lib/astro/class-updater.ts
import { parse, walk } from '@astrojs/compiler'
export async function updateClasses(
filePath: string,
line: number,
col: number,
newClasses: string
): Promise<string> {
const source = await fs.readFile(filePath, 'utf-8')
const ast = await parse(source)
// Walk AST to find element at line:col
let targetNode = null
walk(ast, (node) => {
if (node.position?.start.line === line &&
node.position?.start.column === col) {
targetNode = node
}
})
// Update class attribute in source string
// ... implementation
return updatedSource
}
2026-01-02 - Client Router Implementation
Changes Made
- Updated
src/layouts/BaseLayout.astroto use<ClientRouter />fromastro:transitions. - Modified theme initialization script to handle
astro:after-swapevents for persistent theming during navigation. - Removed legacy "Intent-Based Prefetch" script as it is superseded by Astro's built-in router capabilities.
Decisions
- Adopted Astro's
ClientRouterto provide a smoother, SPA-like user experience with view transitions. - Consolidated theme logic into a function
applyTheme()that runs on both initial load and after view transitions to prevent theme flickering or resetting.
How to Test
- Open the site in a browser.
- Toggle the theme to a non-default state (e.g., Light mode if default is Dark).
- Click a navigation link (e.g., "Blog").
- Verify the new page loads without a full refresh (no white flash).
- Verify the selected theme persists on the new page.
Next Steps
- Monitor for any script re-execution issues common with View Transitions.
- Consider adding custom transition animations for specific elements if needed.
2026-01-02 - Work Page & Projects Collection Implementation
Changes Made
- Updated
src/content.config.tsto include a newprojectscollection with schema for title, description, link, category, and tags. - Created
src/content/projects/directory and addedunited-tattoos.mdxandthe-highering-agency.mdx. - Created
src/components/ProjectCard.astrofor modular project display. - Created
src/pages/work.astroto list development and design projects. - Updated
src/components/Navigation.astroto include "Work" in desktop and mobile menus.
Decisions
- Created a separate
projectscollection rather than overloadingpagesto allow for structured, queryable project data. - Placed "Work" between "Home" and "Blog" in navigation to emphasize the portfolio aspect.
- Included a VFX/Technical Art section at the bottom of the Work page to bridge the gap between web dev and the existing VFX portfolio.
How to Test
- Navigate to the new
/workpage. - Verify both "United Tattoos" and "The Highering Agency" are displayed with correct information and links.
- Test navigation from Home -> Work and Work -> Blog using the new Client Router.
- Verify mobile menu contains the "Work" link and functions correctly.
Next Steps
- Add screenshots/images to the projects in
src/content/projects/. - Expand the
ProjectCardto support hover effects or mini-galleries if desired.
2026-01-02 - Project Descriptions Update
Changes Made
- Updated
src/content/projects/the-highering-agency.mdxdescription to reflect its status as a cannabis staffing agency with specific features like direct hire and executive search. - Updated
src/content/projects/united-tattoos.mdxdescription and tags based on its official README, highlighting Astro 5, booking system features, and editorial design.
Decisions
- Ensured project descriptions are accurate and highlight the specific technical and business value of each project.
- Added relevant tags like "Astro", "GSAP", "Booking System" to United Tattoo to showcase technical depth.
How to Test
- Navigate to
/work. - Verify the text for "The Highering Agency" mentions cannabis staffing and recruitment services.
- Verify "United Tattoo" description mentions "Official marketing website", "Astro 5", and "Booking System".
2026-01-02 - Hero Animation Fix for Client Router
Changes Made
- Refactored
src/components/sections/Hero.astroscript. - Wrapped initialization logic (intro, clock, grid, pulse) in
initHero()function. - Added event listener for
astro:page-loadto runinitHero()on every navigation. - Added
cleanup()function triggered onastro:before-swapto clear timers (clockTimer,pulseInterval).
Decisions
- Moving logic to
astro:page-loadis required for View Transitions (ClientRouter) because standardwindow.onloadonly fires on the first page visit. - Explicit cleanup prevents memory leaks and double-firing timers when navigating back and forth.
How to Test
- Load the homepage directly. Verify Hero animations (text fade-in, grid pulse) work.
- Navigate to another page (e.g.,
/work). - Click "Home" in the navigation.
- Verify Hero animations re-trigger correctly without a full page reload.
- Check console for any errors (none expected).
2026-01-02 - Dev Page Redesign & Rename
Changes Made
- Renamed
src/pages/work.astrotosrc/pages/dev.astro. - Updated
src/components/Navigation.astroto link to/devlabeled "DEV". - Redesigned
src/pages/dev.astrocompletely:- Layout: Switched from a sparse grid to a dense, 2-column "System Module" layout.
- Aesthetics: Aligned with the homepage's Industrial Dark Mode (scanlines, mono fonts, technical overlays).
- Visuals: Added CSS-based animated mesh backgrounds and SVG decorators to cards, eliminating the need for screenshots while maintaining a high-tech feel.
- Typography: Updated headers to be massive and uppercase, matching the Hero section.
Decisions
- Renaming to "Dev" better reflects the technical nature of the portfolio and distinguishes it from the VFX work.
- The previous card layout was too simple and looked "sloppy" without images. The new "System Module" design uses CSS/SVG abstracts to look finished and professional without requiring assets.
- Integrated "secondary specialization" section (VFX) with better styling to act as a bridge between the two portfolio halves.
How to Test
- Navigate to
/devvia the new navigation link. - Verify the page title is "DEV LOG".
- Check that the project cards look like technical modules with animated backgrounds.
- Hover over cards to see the accent color shift.
- Verify the "Initialize Uplink" buttons link to the correct project URLs.
2026-01-02 - Project Added: Summit Painting & Handyman
Changes Made
- Created
src/content/projects/summit-painting.mdxwith details from its official README. - Set the preview link to
https://summit-painting-and-handyman-services.pages.dev/. - Updated tags and description to highlight Astro 5 and React 19 usage.
Decisions
- Added as the third project in the Dev list to maintain a chronological or curated flow.
- Highlights the transition to Astro 5 and content-driven design patterns common in recent work.