Skip to content

Add computed durations next to jobs/roles - #6

Merged
dbertram merged 6 commits into
mainfrom
add-durations
Apr 11, 2026
Merged

Add computed durations next to jobs/roles#6
dbertram merged 6 commits into
mainfrom
add-durations

Conversation

@dbertram

@dbertram dbertram commented Apr 7, 2026

Copy link
Copy Markdown
Owner
  • for positions with an end date, compute the duration at build time
  • for positions without an end date (i.e., ongoing positions), leave a hidden element to be populated on the client using the viewer's current date
    • starts hidden, then made visible via client-side JS
    • respects prefers-reduced-motion: reduce
    • uses animations to fade in + "roll" the digits to their current values to emphasize their ongoing nature
  • introduces a client-side JS bundle for date math and animations
  • extracts date-range macros for the start/end dates + optional duration portion of the templates
  • adds a new duration stylesheet partial for duration-related styles/animations/transitions
  • adds vitest and basic test coverage for date and duration related functions

Unrelated changes:

  • update .gitignore to ignore .codex scratch file
  • adds checks npm script that runs lint + format + test + build
  • updates pr-checks GH workflow to also run npm run build as part of PR checks

@netlify

netlify Bot commented Apr 7, 2026

Copy link
Copy Markdown

Deploy Preview for danebertram ready!

Name Link
🔨 Latest commit c007a5a
🔍 Latest deploy log https://app.netlify.com/projects/danebertram/deploys/69da4ee9feed7c00087a741a
😎 Deploy Preview https://deploy-preview-6--danebertram.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@dbertram
dbertram force-pushed the add-durations branch 3 times, most recently from 23135c2 to 1d6593b Compare April 11, 2026 13:27
…xperience section

- add a reusable Nunjucks date-range component for education and experience entries
  - renderDateRange covers how we rendered date ranges before
  - renderDateRangeWithDuration adds calculated duration support
- compute human-readable month/year durations in shared date utilities
- enhance ongoing roles client-side with animated “and counting” durations
- add duration-specific styles and accessibility support for reduced motion
- wire the new asset entry and duration filter through Eleventy/Vite
- ensure we compute durations consistently (we were mixing UTC/local dates previously)
- add Vitest and basic config for the Eleventy/Vite codebase
- cover shared date parsing, formatting, and month-diff helpers
- cover client-side enhancement for ongoing duration displays
- verify the experience template renders ended and ongoing durations correctly
- add a `test:watch` script and include tests in the `checks` workflow
- ensure tests aren't copied to output directory during builds
@dbertram
dbertram merged commit 758fc42 into main Apr 11, 2026
4 checks passed
@dbertram
dbertram deleted the add-durations branch April 11, 2026 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant