fix(ui): flat readable document, ~3s pacing, skip + replay controls

Argon review of the live page (2026-11-13) called the current experience
unshippable on three counts: a ~1.5s blank start, the CV locked in a 70vh
inner-scroll box (77% hidden on desktop, ~11% visible on a phone), and no
way out of a ~10s animation. Changes:

- document scrolls normally: #content is a flex row with natural height and
  the code pane is position:sticky (verified sticky at scrollY 400/1200 and
  releasing at the container end); the resume has no nested scrollbar, so
  Ctrl+F, selection and native print work again
- mobile: the code pane is a 100px live strip instead of 47vh, so the CV
  starts at ~140px down the page (was ~450px)
- resume renders at ~1.2s (was 3.5s); the whole animation settles in ~2.8s
  (charsPerTick 5 -> 18) without gating the content
- "Skip animation" pill while typing, "Replay animation" afterwards, plus
  the existing prefers-reduced-motion short-circuit; repeat visitors get the
  finished page immediately via localStorage hoelee_cv_seen
- a11y: decorative code pane aria-hidden, resume pane tabindex=0 with
  aria-live off->polite, all typing loops honour a cancelled flag
- thank-you panel is content-sized (min-height 0) with a 68ch centred
  text block instead of a tall half-empty beige box
This commit is contained in:
hoelee committed 2026-11-14 00:35:11 +08:00
1 parent 5727ab0c8a
commit a20a79c855
6 files changed
+203 -24

No files matched your search

+1
View File
@@ -68,3 +68,4 @@ NUL
# .netlify/
# .vercel/
.codegraph/
YT-Banner-Hoelee/
+70 -9
View File
@@ -1,8 +1,10 @@
<template>
<div id="app">
<button v-if="animating" class="skip-btn" type="button" @click="finishAll">Skip animation →</button>
<button v-else class="skip-btn replay-btn" type="button" @click="replay">↻ Replay animation</button>
<div id="content">
<StyleEditor ref="styleEditor" :code="currentStyle"></StyleEditor>
<ResumeEditor ref="resumeEditor" :markdown="currentMarkdown" :enableHtml="enableHtml"></ResumeEditor>
<ResumeEditor ref="resumeEditor" :markdown="currentMarkdown" :enableHtml="enableHtml" :settled="!animating"></ResumeEditor>
</div>
<div id="foot">
<ThankEditor ref="thankEditor" :markdown="currentThankMarkdown" :enableHtml="enableHtml"></ThankEditor>
@@ -33,23 +35,53 @@
enableHtml: false,
htmlShown: false,
thanksShown: false,
animating: true,
cancelled: false,
styleFull: profile.desktopStyles.join('')
}
},
created() {
// Respect the OS "reduce motion" setting: render the finished page immediately
// instead of animating ~10 s of typing.
// Show the finished page immediately for anyone who asked for less motion
// or who has already sat through the animation once.
const reduce = window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches
if (reduce) {
this.currentStyle = this.styleFull
this.currentMarkdown = this.fullMarkdown
this.enableHtml = true
this.currentThankMarkdown = this.thanksMarkdown
let seen = false
try { seen = window.localStorage.getItem('hoelee_cv_seen') === '1' } catch (e) { seen = false }
if (reduce || seen) {
this.finishAll()
return
}
this.makeResume()
this.makeResume().then(() => {
try { window.localStorage.setItem('hoelee_cv_seen', '1') } catch (e) { /* private mode */ }
})
},
methods: {
// Jump straight to the finished state: used by the skip button, reduced
// motion, and repeat visitors.
finishAll() {
this.cancelled = true
this.currentStyle = this.styleFull
this.currentMarkdown = this.fullMarkdown
this.currentThankMarkdown = this.thanksMarkdown
this.enableHtml = true
this.htmlShown = true
this.thanksShown = true
this.animating = false
},
// Replay is the only way back to the animation once it has been seen.
replay() {
this.cancelled = false
this.currentStyle = ''
this.currentMarkdown = ''
this.currentThankMarkdown = ''
this.enableHtml = false
this.htmlShown = false
this.thanksShown = false
this.animating = true
try { window.localStorage.removeItem('hoelee_cv_seen') } catch (e) { /* ignore */ }
this.makeResume().then(() => {
try { window.localStorage.setItem('hoelee_cv_seen', '1') } catch (e) { /* ignore */ }
})
},
makeResume: async function () {
// Both editors appear (background + borders), then the CSS types in the
// left pane. During this the right pane is NOT blank: the resume editor
@@ -64,6 +96,7 @@
await this.typeStyleRemaining()
await this.showThanks()
await this.progressivelyShowThanks()
this.animating = false
},
typeStyleUpToMarker(marker) {
return new Promise((resolve) => {
@@ -105,6 +138,7 @@
const total = this.styleFull.length
const step = this.increment(total)
const tick = () => {
if (this.cancelled) return resolve()
if (this.currentStyle.length < total) {
step()
setTimeout(tick, this.interval)
@@ -117,6 +151,7 @@
progressivelyShowStylePartial(target, resolve) {
const step = this.increment(target)
const tick = () => {
if (this.cancelled) return resolve()
if (this.currentStyle.length < target) {
step()
setTimeout(tick, this.interval)
@@ -147,6 +182,7 @@
const interval = this.interval
const cpt = this.charsPerTick
const showThanks = () => {
if (this.cancelled) return resolve()
if (this.currentThankMarkdown.length < length) {
this.currentThankMarkdown = this.thanksMarkdown.substring(0, Math.min(length, this.currentThankMarkdown.length + cpt))
const prevChar = this.currentThankMarkdown[this.currentThankMarkdown.length - 2]
@@ -172,6 +208,31 @@
-moz-osx-font-smoothing: grayscale;
}
.skip-btn {
position: fixed;
top: .75em;
right: 1em;
z-index: 20;
padding: .45em .9em;
font: inherit;
font-size: .85rem;
color: #d7efe8;
background: rgba(0, 32, 32, .85);
border: 1px solid rgba(215, 239, 232, .45);
border-radius: 999px;
cursor: pointer;
}
.replay-btn {
opacity: .6;
}
.skip-btn:hover,
.skip-btn:focus-visible {
background: rgba(0, 48, 48, .95);
border-color: #d7efe8;
}
* {
box-sizing: border-box;
}
+59 -8
View File
@@ -1,7 +1,9 @@
<template>
<div id="app">
<button v-if="animating" class="skip-btn" type="button" @click="finishAll">Skip animation →</button>
<button v-else class="skip-btn replay-btn" type="button" @click="replay">↻ Replay animation</button>
<StyleEditor ref="styleEditor" :code="currentStyle"></StyleEditor>
<ResumeEditor ref="resumeEditor" :markdown="currentMarkdown" :enableHtml="enableHtml"></ResumeEditor>
<ResumeEditor ref="resumeEditor" :markdown="currentMarkdown" :enableHtml="enableHtml" :settled="!animating"></ResumeEditor>
<ThankEditor ref="thankEditor" :markdown="currentThankMarkdown" :enableHtml="enableHtml"></ThankEditor>
</div>
</template>
@@ -27,27 +29,54 @@
currentMarkdown: '',
currentThankMarkdown: '',
enableHtml: false,
animating: true,
cancelled: false,
styleFull: profile.mobileStyles.join('')
}
},
created() {
// Respect the OS "reduce motion" setting: render the finished page immediately.
// Finished page immediately for reduced motion or a repeat visit.
const reduce = window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches
if (reduce) {
this.currentStyle = this.styleFull
this.currentMarkdown = this.fullMarkdown
this.enableHtml = true
this.currentThankMarkdown = this.thanksMarkdown
let seen = false
try { seen = window.localStorage.getItem('hoelee_cv_seen') === '1' } catch (e) { seen = false }
if (reduce || seen) {
this.finishAll()
return
}
this.makeResume()
this.makeResume().then(() => {
try { window.localStorage.setItem('hoelee_cv_seen', '1') } catch (e) { /* private mode */ }
})
},
methods: {
finishAll() {
this.cancelled = true
this.currentStyle = this.styleFull
this.currentMarkdown = this.fullMarkdown
this.currentThankMarkdown = this.thanksMarkdown
this.enableHtml = true
this.animating = false
},
// Replay is the only way back to the animation once it has been seen.
replay() {
this.cancelled = false
this.currentStyle = ''
this.currentMarkdown = ''
this.currentThankMarkdown = ''
this.enableHtml = false
this.htmlShown = false
this.thanksShown = false
this.animating = true
try { window.localStorage.removeItem('hoelee_cv_seen') } catch (e) { /* ignore */ }
this.makeResume().then(() => {
try { window.localStorage.setItem('hoelee_cv_seen', '1') } catch (e) { /* ignore */ }
})
},
makeResume: async function () {
await this.typeStyleUpToMarker('/* Start writing resume */')
await this.showHtml()
await this.typeStyleRemaining()
await this.progressivelyShowThanks()
this.animating = false
},
typeStyleUpToMarker(marker) {
return new Promise((resolve) => {
@@ -75,6 +104,7 @@
const total = this.styleFull.length
const step = this.increment(total)
const tick = () => {
if (this.cancelled) return resolve()
if (this.currentStyle.length < total) {
step()
setTimeout(tick, this.interval)
@@ -87,6 +117,7 @@
progressivelyShowStylePartial(target, resolve) {
const step = this.increment(target)
const tick = () => {
if (this.cancelled) return resolve()
if (this.currentStyle.length < target) {
step()
setTimeout(tick, this.interval)
@@ -115,6 +146,7 @@
const interval = this.interval
const cpt = this.charsPerTick
const showThanks = () => {
if (this.cancelled) return resolve()
if (this.currentThankMarkdown.length < length) {
this.currentThankMarkdown = this.thanksMarkdown.substring(0, Math.min(length, this.currentThankMarkdown.length + cpt))
// No auto-scroll while typing: yanking the page to the bottom on every tick
@@ -146,4 +178,23 @@
*{
box-sizing: border-box;
}
.skip-btn {
position: fixed;
top: .6em;
right: .75em;
z-index: 20;
padding: .4em .8em;
font: inherit;
font-size: .8rem;
color: #d7efe8;
background: rgba(0, 32, 32, .85);
border: 1px solid rgba(215, 239, 232, .45);
border-radius: 999px;
cursor: pointer;
}
.replay-btn {
opacity: .6;
}
</style>
+2 -2
View File
@@ -1,5 +1,5 @@
<template>
<div class="resumeEditor" :class="{htmlMode:enableHtml}" ref="container">
<div class="resumeEditor" :class="{htmlMode:enableHtml}" ref="container" :aria-live="settled ? 'polite' : 'off'" tabindex="0">
<div v-if="enableHtml" v-html="result"></div>
<pre v-else>{{result}}</pre>
</div>
@@ -8,7 +8,7 @@
<script>
import { marked } from 'marked'
export default {
props: ['markdown', 'enableHtml'],
props: ['markdown', 'enableHtml', 'settled'],
name: 'ResumeEditor',
computed: {
result: function () {
+1 -1
View File
@@ -1,5 +1,5 @@
<template>
<div class="styleEditor" ref="container">
<div class="styleEditor" ref="container" aria-hidden="true">
<div class="code" v-html="codeInStyleTag"></div>
<pre class="" v-html="highlightedCode"></pre>
</div>
+70 -4
View File
@@ -9,7 +9,7 @@ export default {
// Effective speed = typingSpeed / charsPerTick. Lower delay = faster;
// higher charsPerTick = fewer setTimeout hops = much faster and smoother.
typingSpeed: 1,
charsPerTick: 5,
charsPerTick: 18,
// Resume content in Markdown
resumeMarkdown: `Mr. Hoelee (Lee Teong Hoe)
@@ -31,7 +31,7 @@ Core Skills
- Languages: PHP, Java, Python, JavaScript, TypeScript, SQL, Bash, Solidity
- Backend & APIs: Spring Boot, CodeIgniter 4, Node.js, REST API Architecture, Webhooks, Queue & Worker Patterns, Cron Loops, Transactional Email (Postfix/Dovecot/DKIM)
- Databases & Storage: PostgreSQL (pgvector), MySQL / MariaDB, MySQL Master/Replica, SQLite (WAL mode), Redis, NocoDB
- DevOps & Infrastructure: Docker, Docker Compose, Portainer, Traefik (custom bot filter, automated ACME TLS), Nginx, Cloudflare / Cloudflare Tunnel, Linux (Debian/Ubuntu), Synology DSM, unRaid, Gitea Actions CI/CD, restic automated backups, Prometheus / Grafana / cAdvisor monitoring, Tor hidden-service publishing
- DevOps & Infrastructure: Docker, Docker Compose, Portainer, Traefik (custom bot filter, automated ACME TLS), Nginx, Cloudflare / Cloudflare Tunnel, Linux (Debian/Ubuntu), Synology DSM, unRaid, Gitea Actions CI/CD, restic automated backups, Prometheus / Grafana / cAdvisor monitoring
- AI & Autonomous Agents: Hermes Agent, Model Context Protocol (MCP), OpenAI API, LLM Integration, OmniRoute gateway, n8n, fal.ai / FLUX.1 Kontext image compositing, OCR receipt verification, Local LLM Inference (LM Studio, llama.cpp GGUF, Qwen MoE), ComfyUI, whisper.cpp STT
- Security & Identity: Authentik (OIDC / OAuth2 SSO), Passbolt, Ed25519 Cryptography, Fail2ban, Secret Management
- Frontend: JavaScript, TypeScript, Vue 3 + Vite, Astro, React (component practice), HTML5/CSS3, Responsive UI
@@ -93,7 +93,6 @@ Currently Exploring
----
- Solidity and smart-contract development (ERC-20 / ERC-721 with Foundry and Hardhat) — self-directed exploration.
- Autonomous Agent runtimes, tool protocols (MCP), and local MoE model orchestration.
- Tor hidden-service (onion) publishing, so the same public services stay reachable when the clearnet path does not.
`,
@@ -118,7 +117,7 @@ I'm open to Senior Full-Stack, Platform / DevOps, and AI Systems Engineering rol
Where I deliver immediate value:
* Full-stack application architecture (Java Spring Boot, PHP CodeIgniter, TypeScript, Vue 3, PostgreSQL, SQLite WAL)
* Autonomous AI Agents & agentic workflows (Hermes Agent, MCP, OmniRoute, n8n, fal.ai, OCR, local GPU inference)
* Self-hosted infrastructure & DevOps (Docker, Linux, Traefik, authentik SSO, CI/CD, Prometheus/Grafana, restic, Cloudflare Tunnel / Tor egress)
* Self-hosted infrastructure & DevOps (Docker, Linux, Traefik, authentik SSO, CI/CD, Prometheus/Grafana, restic, Cloudflare Tunnel)
* Legacy system modernization, reliability hardening, and operational automation
`,
@@ -317,6 +316,54 @@ body{
overflow-x: hidden;
}
`,
`/*
* Readability pass (2026-11-13 review): a 70vh inner-scroll box hid 77% of the
* resume behind a nested scrollbar and broke Ctrl+F / native print. The page
* scrolls now and only the code pane stays pinned while it types.
*/
#content{
display: flex;
align-items: flex-start;
height: auto;
overflow: visible;
}
#foot{
min-height: 0;
}
.styleEditor{
position: sticky;
top: .5em;
flex: 0 0 calc(50vw - 1em);
height: auto;
max-height: 85vh;
margin: .5em 0 .5em .5em;
overflow: auto;
-webkit-transform: none;
transform: none;
}
.resumeEditor{
position: static;
flex: 0 0 calc(50vw - 1em);
height: auto;
max-height: none;
margin: .5em .5em .5em 0;
overflow: visible;
}
.resumeEditor > div{
padding-bottom: .5em;
max-width: 100%;
overflow-wrap: anywhere;
}
.thankEditor{
min-height: 0;
-webkit-transform: none;
transform: none;
}
.thankEditor > div{
max-width: 68ch;
margin: 0 auto;
}
`],
mobileStyles: [
@@ -479,5 +526,24 @@ html, body {
overflow-y: auto;
max-width: 100%;
}
/*
* Readability pass (2026-11-13 review): the code pane was eating 47vh above the
* CV and the resume sat in a 48.5vh inner-scroll box (11% visible on a phone).
* The code pane is a 100px live strip now; the document itself scrolls.
*/
.styleEditor{
height: 12vh;
max-height: 100px;
overflow: auto;
}
.resumeEditor{
height: auto;
max-height: none;
overflow: visible;
}
.thankEditor{
overflow: visible;
}
`]
}