Skip to content

Add moon-area bilingual datetime and lunar hour display#8

Merged
Heersin merged 1 commit into
mainfrom
codex/display-date-and-lunar-date-in-two-lines
Feb 26, 2026
Merged

Add moon-area bilingual datetime and lunar hour display#8
Heersin merged 1 commit into
mainfrom
codex/display-date-and-lunar-date-in-two-lines

Conversation

@Heersin
Copy link
Copy Markdown
Owner

@Heersin Heersin commented Feb 26, 2026

Motivation

  • Add a two-line datetime under the moon to show an English Gregorian date/time and a Chinese lunar date with 时辰, and visually align the bottom of that block with the intro copy baseline as requested.

Description

  • Inserted a moon-datetime container with two lines in layouts/index.html and set aria-live="polite" for dynamic updates.
  • Extended assets/js/moon-phase.js to keep the moon-phase logic and also populate the first line with Gregorian datetime using Intl.DateTimeFormat('en-US') (24h with seconds) and the second line with lunar month/day using Intl.DateTimeFormat('zh-CN-u-ca-chinese') plus the computed earthly-branch hour (时辰).
  • Adjusted assets/css/main.css by converting .moon-wrap to a column flex layout and adding .moon-datetime / .moon-datetime-line styles so the two-line block sits at the bottom of the moon column and matches the visual alignment.
  • Preserved existing moon phase rendering and accessibility label behavior.

Testing

  • Ran hugo --source exampleSite --themesDir .. --destination /tmp/bitblog-public, which failed because hugo is not installed in this environment (error: command not found).
  • Attempted a Playwright page screenshot of http://127.0.0.1:1313, which failed with ERR_EMPTY_RESPONSE because no local dev server was running.
  • No theme/unit tests were available to run here; recommend building the site with hugo and visually verifying the alignment in a browser once the dev environment is available.

Codex Task

@Heersin Heersin merged commit 8b5bffb into main Feb 26, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant