Skip to content

Commit 54bb8f9

Browse files
chenchaoyiclaude
andcommitted
Surface the journal on the homepage
- New #journal section between Portfolio and Contact with the three latest entries and a Read-the-full-Journal CTA - Scroll spy skips #journal (no matching hash nav item) - CLAUDE.md: note to keep the homepage list in sync with blog.html Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 3da170d commit 54bb8f9

2 files changed

Lines changed: 27 additions & 1 deletion

File tree

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ Editorial / literary. Warm cream page with deep ink type, a single terracotta ac
8383
- `Film` → "Movie Reviews"
8484
- `Game` → "Game Reviews"
8585
4. External links (WeChat articles) use `target="_blank" rel="noopener"` and the arrow becomes ``.
86+
5. The homepage `#journal` section mirrors the **three most recent** entries of `blog.html` (same `<li>` markup, minus `data-cat`/`data-date`). If the new post lands in the top three, update `index.html` accordingly.
8687

8788
### Adding a new book to the Portfolio
8889
Edit the `.portfolio-grid` in `index.html`. Use an `<a class="book">` with a `.cover img`, `.meta` (h3 + `.kind` label), and a `<p>` blurb. Cover image goes in `images/` as a JPG.

index.html

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,31 @@ <h3>Ongoing Books</h3>
166166
</div>
167167
</section>
168168

169+
<!-- JOURNAL -->
170+
<section id="journal" class="bleed">
171+
<div class="wrap">
172+
<div class="sec-head">
173+
<div>
174+
<h2>I also keep a <em>journal</em>.</h2>
175+
<p class="desc">Essays, book &amp; movie reviews, drawings and the occasional poem. Here's what's new:</p>
176+
</div>
177+
</div>
178+
179+
<ul class="post-list">
180+
<li><a class="post-link" href="https://mp.weixin.qq.com/s/HRNHbyNktUCZ4AtcW1BZoA" target="_blank" rel="noopener"><span class="pdate">Jun 1 2026</span><span class="pmeta"><span class="ptitle">📚 A Mind Appears</span><span class="pblurb">A book review of <i><b style="color: #3498db">A World Appears</b></i></span></span><span class="parrow"></span></a></li>
181+
182+
<li><a class="post-link" href="https://mp.weixin.qq.com/s/n2BJqs67dgX15xpnOwmn9g" target="_blank" rel="noopener"><span class="pdate">Mar 22 2026</span><span class="pmeta"><span class="ptitle">🎬 An Unremarkable School Teacher Who Saved Earth With An Alien</span><span class="pblurb">A movie review of <i><b style="color: #3498db">Project Hail Mary</b></i></span></span><span class="parrow"></span></a></li>
183+
184+
<li><a class="post-link" href="blogs/some-recent-drawings-post.html"><span class="pdate">Feb 23 2026</span><span class="pmeta"><span class="ptitle">Some Recent Drawings</span><span class="pblurb">Seven drawings from this month — and the poodle behind one of them</span></span><span class="parrow"></span></a></li>
185+
</ul>
186+
187+
<div class="work-footnote" style="margin-top: 3rem;">
188+
<p>There's plenty more where these came from.</p>
189+
<a href="blog.html" class="btn btn-primary">Read the full Journal <span class="arrow"></span></a>
190+
</div>
191+
</div>
192+
</section>
193+
169194
<!-- CONTACT -->
170195
<section id="contact" class="bleed">
171196
<div class="wrap">
@@ -250,7 +275,7 @@ <h4>Scan WeChat QR Code</h4>
250275
const setActive = () => {
251276
const y = window.scrollY + window.innerHeight * 0.3;
252277
let current = 'top';
253-
document.querySelectorAll('section[id]').forEach(s => {
278+
document.querySelectorAll('section[id]:not(#journal)').forEach(s => {
254279
if (y >= s.offsetTop) current = s.id;
255280
});
256281
if (window.scrollY < 200) current = 'top';

0 commit comments

Comments
 (0)