Skip to content

Commit c7b4e55

Browse files
jajupmochiclaude
andcommitted
fix(apps): mode toggle highlights only the current view, on all 3 modes
The Deck/Cards/Detailed toggle didn't reflect the current mode: - On the gallery, "Deck" was permanently maroon (parchment's global link rule), so it always looked active. Now only the active mode is filled-maroon; inactive items (incl. the Deck link) are the soft ink colour. Uses #galMode/#deckMode IDs to outrank parchment's high-specificity !important link rule. - The deck page had no trio at all, so "Deck" could never be shown active. Added the same [Deck | Cards | Detailed] pill to the deck ribbon with Deck active and Cards/Detailed linking to apps-gallery.html?view=cards|detailed (replacing the lone grid-view icon). Verified on both pages. Also: moved "read my CV" into the About headline as a "(my cv)" parenthetical link (per Linlin) instead of a separate About row; added to about.headline across all 4 locales (zh links to the zh CV). Removed the earlier CV row. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent cab6cf0 commit c7b4e55

7 files changed

Lines changed: 20 additions & 12 deletions

File tree

apps-deck.html

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,13 @@
159159
.deck-tools{ display:flex; align-items:center; gap:0.9em; }
160160
.deck-tools button, .deck-tools a{ background:transparent; border:none; color:var(--ink-soft); cursor:pointer; font-size:1rem; display:inline-flex; align-items:center; text-decoration:none; }
161161
.deck-tools button:hover, .deck-tools a:hover{ color:var(--maroon); }
162+
/* mode switcher (Deck active here) — mirrors the gallery's .mode pill so the
163+
Deck/Cards/Detailed trio highlights the current mode on every view. */
164+
.mode{ display:inline-flex; border:1px solid oklch(0.45 0.15 30 / 0.32); border-radius:999px; overflow:hidden; }
165+
.mode a, .mode span{ font-family:var(--mono); font-size:0.72rem; padding:0.36em 0.85em; background:none; cursor:pointer; display:inline-flex; align-items:center; gap:0.3em; text-decoration:none; white-space:nowrap; }
166+
#deckMode a:not(.on), #deckMode span:not(.on){ color:var(--ink-soft) !important; } /* ID beats parchment's global maroon link rule */
167+
#deckMode span.on, #deckMode a.on{ background:var(--maroon) !important; color:#fdf3e3 !important; cursor:default; }
168+
.mode a:hover:not(.on){ background:oklch(0.45 0.15 30 / 0.12); }
162169

163170
/* autoplay progress bar (very bottom) */
164171
.deck-prog{ position:fixed; left:0; bottom:0; height:3px; width:0; z-index:21; background:linear-gradient(90deg,var(--gilt),var(--cinnabar)); transition:width .15s linear; opacity:0.85; }
@@ -274,7 +281,11 @@
274281
<div class="deck-tools">
275282
<button id="btnAuto" title="Play / pause auto-leaf" aria-label="Play or pause autoplay"><i class="fas fa-pause" aria-hidden="true"></i></button>
276283
<button id="btnFull" title="Fullscreen" aria-label="Toggle fullscreen"><i class="fas fa-expand" aria-hidden="true"></i></button>
277-
<a href="apps-gallery.html?view=cards" title="Grid view" aria-label="Grid view"><i class="fas fa-table-cells-large" aria-hidden="true"></i></a>
284+
</div>
285+
<div class="mode" id="deckMode" role="group" aria-label="View mode">
286+
<span class="on" title="Deck — you are here"><i class="fas fa-clone" aria-hidden="true"></i> Deck</span>
287+
<a href="apps-gallery.html?view=cards"><i class="fas fa-table-cells-large" aria-hidden="true"></i> Cards</a>
288+
<a href="apps-gallery.html?view=detailed"><i class="fas fa-list" aria-hidden="true"></i> Detailed</a>
278289
</div>
279290
</header>
280291

apps-gallery.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,10 @@
3939
.pf-controls .section-controls { margin:0; }
4040
.mode { display:inline-flex; border:1px solid rgba(120,80,40,0.3); border-radius:999px; overflow:hidden; margin-left:auto; }
4141
.mode button, .mode a { font-family:'JetBrains Mono',monospace; font-size:0.74rem; padding:0.4em 0.9em; color:var(--soft); background:none; border:none; cursor:pointer; display:inline-flex; align-items:center; gap:0.35em; text-decoration:none; }
42-
.mode button.on { background:var(--maroon); color:#fdf3e3; }
43-
.mode a.mode-deck { color:var(--maroon); border-right:1px solid rgba(120,80,40,0.25); }
42+
#galMode button.on, #galMode a.on, #galMode span.on { background:var(--maroon) !important; color:#fdf3e3 !important; }
43+
.mode a.mode-deck { border-right:1px solid rgba(120,80,40,0.25); }
44+
/* ID beats parchment's high-specificity global maroon link rule, so only the active mode highlights */
45+
#galMode a:not(.on), #galMode button:not(.on) { color:var(--soft) !important; }
4446
.mode a.mode-deck:hover { background:rgba(120,80,40,0.12); }
4547
/* ---- gallery grids ---- */
4648
.gal { max-width:1600px; margin:0 auto; padding:1.2em 2vw 1em; }

index_en.html

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,11 +1162,6 @@ <h2 class="section-title"><i class="fas fa-user" aria-hidden="true"></i> <span d
11621162
<span class="about-row-label" data-i18n="about.row.looking.label">Looking</span>
11631163
<span class="about-row-value" data-i18n-html="about.row.looking.value"><strong>ML Research Scientist / Engineer</strong> roles · academia &amp; industry</span>
11641164
</div>
1165-
<div class="about-row">
1166-
<svg class="about-icon" aria-hidden="true"><use href="#ai-cap"/></svg>
1167-
<span class="about-row-label" data-i18n="about.row.cv.label">CV</span>
1168-
<span class="about-row-value" data-i18n-html="about.row.cv.value"><a href="res/cv/CV_Linlin_Jia_en.pdf" target="_blank" rel="noopener">Read my CV <span aria-hidden="true">&#8599;</span></a> &middot; PDF</span>
1169-
</div>
11701165
</div>
11711166
</div>
11721167
<div class="stats-grid">

locales/de.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@
275275
"label": "Gedanken & Texte"
276276
},
277277
"about": {
278-
"headline": "<strong>Graph-Repräsentationslernen</strong> über Domänen hinweg aufbauen: <strong>Algorithmen</strong>, <strong>Modelle</strong>, <strong>Open-Source-Tools</strong> und <strong>KI-Infrastruktur</strong> für Wissenschaft &amp; Industrie.",
278+
"headline": "<strong>Graph-Repräsentationslernen</strong> über Domänen hinweg aufbauen: <strong>Algorithmen</strong>, <strong>Modelle</strong>, <strong>Open-Source-Tools</strong> und <strong>KI-Infrastruktur</strong> für Wissenschaft &amp; Industrie. (<a href=\"res/cv/CV_Linlin_Jia_en.pdf\" target=\"_blank\" rel=\"noopener\">mein CV</a>)",
279279
"row": {
280280
"now": {
281281
"label": "Aktuell",

locales/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@
275275
"label": "Thoughts & Writing"
276276
},
277277
"about": {
278-
"headline": "Building <strong>graph representation learning</strong> across domains: <strong>algorithms</strong>, <strong>models</strong>, <strong>open-source tools</strong>, and <strong>AI infrastructure</strong> for research &amp; industry.",
278+
"headline": "Building <strong>graph representation learning</strong> across domains: <strong>algorithms</strong>, <strong>models</strong>, <strong>open-source tools</strong>, and <strong>AI infrastructure</strong> for research &amp; industry. (<a href=\"res/cv/CV_Linlin_Jia_en.pdf\" target=\"_blank\" rel=\"noopener\">my cv</a>)",
279279
"row": {
280280
"now": {
281281
"label": "Now",

locales/fr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@
275275
"label": "Pensées & écrits"
276276
},
277277
"about": {
278-
"headline": "Construire <strong>l'apprentissage de représentations sur graphes</strong> à travers les domaines : <strong>algorithmes</strong>, <strong>modèles</strong>, <strong>outils open source</strong>, et <strong>infrastructure IA</strong> pour la recherche &amp; l'industrie.",
278+
"headline": "Construire <strong>l'apprentissage de représentations sur graphes</strong> à travers les domaines : <strong>algorithmes</strong>, <strong>modèles</strong>, <strong>outils open source</strong>, et <strong>infrastructure IA</strong> pour la recherche &amp; l'industrie. (<a href=\"res/cv/CV_Linlin_Jia_en.pdf\" target=\"_blank\" rel=\"noopener\">mon CV</a>)",
279279
"row": {
280280
"now": {
281281
"label": "Actuel",

locales/zh.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@
275275
"label": "所思所写"
276276
},
277277
"about": {
278-
"headline": "从事<strong>图表示学习</strong>研究及跨领域应用,构建<strong>算法</strong>、<strong>模型</strong>、<strong>开源工具</strong>以及面向研究与产业的 <strong>AI 基础设施</strong>。",
278+
"headline": "从事<strong>图表示学习</strong>研究及跨领域应用,构建<strong>算法</strong>、<strong>模型</strong>、<strong>开源工具</strong>以及面向研究与产业的 <strong>AI 基础设施</strong>。(<a href=\"res/cv/CV_Linlin_Jia_zh.pdf\" target=\"_blank\" rel=\"noopener\">我的简历</a>)",
279279
"row": {
280280
"now": {
281281
"label": "现在",

0 commit comments

Comments
 (0)