@hanology/cham-browser 0.4.7 → 0.4.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanology/cham-browser",
3
- "version": "0.4.7",
3
+ "version": "0.4.9",
4
4
  "description": "CHAM — browser-compatible parser, serializer, and site generator for Classical Han Annotated Markdown",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -29,8 +29,8 @@ function filterAboutByLocale(html: string, loc: string): string {
29
29
  }
30
30
 
31
31
  const filteredAboutHtml = computed(() => {
32
- if (!aboutHtml.value) return ''
33
- let html = filterAboutByLocale(aboutHtml.value, locale.value)
32
+ if (!aboutHtml) return ''
33
+ let html = filterAboutByLocale(aboutHtml, locale.value)
34
34
  if (CHAM_VERSION || CHAM_BROWSER_VERSION) {
35
35
  const versionLine = `<div class="about-versions"><span>v${[CHAM_BROWSER_VERSION, CHAM_VERSION].filter(Boolean).join(' / cham@')}</span></div>`
36
36
  html += versionLine
@@ -85,9 +85,6 @@ function openBook(bookId: string) {
85
85
  <div v-if="isVertical" class="v-root">
86
86
  <SideNav @home="router.push('/')" @back="router.push('/')" />
87
87
  <div ref="vPageRef" class="v-page">
88
- <div v-if="aboutHtml" class="v-about-col">
89
- <button class="v-about-link" @click="aboutPane?.toggleAbout()">{{ t('nav.about') }}</button>
90
- </div>
91
88
  <section class="v-hero">
92
89
  <h1 class="v-title">{{ spacedTitle }}</h1>
93
90
  <p v-if="siteSubtitle" class="v-subtitle">{{ siteSubtitle }}</p>
@@ -117,7 +114,7 @@ function openBook(bookId: string) {
117
114
  <header class="lib-hero">
118
115
  <img v-if="logoUrl" :src="logoUrl" alt="" class="lib-logo" />
119
116
  <div v-else class="lib-seal">{{ displayTitle.slice(0, 2) }}</div>
120
- <h1>{{ displayTitle }} <button v-if="aboutHtml" class="lib-about-link" @click="aboutPane?.toggleAbout()">{{ t('nav.about') }}</button></h1>
117
+ <h1>{{ displayTitle }}</h1>
121
118
  <p v-if="siteSubtitle" class="lib-subtitle">{{ siteSubtitle }}</p>
122
119
  <div class="lib-stats-bar">
123
120
  <span class="lib-stat">{{ books.length }} {{ t('stat.books') }}</span>
@@ -174,33 +171,6 @@ function openBook(bookId: string) {
174
171
  justify-content: center;
175
172
  padding: 40px 20px;
176
173
  }
177
- .v-about-col {
178
- writing-mode: vertical-rl;
179
- text-orientation: mixed;
180
- flex-shrink: 0;
181
- height: 100vh;
182
- display: flex;
183
- align-items: center;
184
- justify-content: center;
185
- padding: 0 12px;
186
- border-right: 1px solid var(--border-light);
187
- }
188
- .v-about-link {
189
- font-size: 14px;
190
- color: var(--ink-faint);
191
- letter-spacing: 6px;
192
- font-family: var(--sans);
193
- padding: 12px 8px;
194
- border: 1px solid var(--border-light);
195
- border-radius: 2px;
196
- background: none;
197
- cursor: pointer;
198
- transition: all 0.2s;
199
- }
200
- .v-about-link:hover {
201
- color: var(--ink);
202
- border-color: var(--ink);
203
- }
204
174
  .v-title {
205
175
  font-size: 48px; font-weight: 900;
206
176
  letter-spacing: 16px; color: var(--ink);
@@ -345,25 +315,6 @@ function openBook(bookId: string) {
345
315
  }
346
316
  .lib-stat-sep { color: var(--border); }
347
317
 
348
- .lib-about-link {
349
- display: inline-block;
350
- font-family: var(--sans);
351
- font-size: 13px;
352
- color: var(--ink-faint);
353
- letter-spacing: 2px;
354
- padding: 4px 12px;
355
- border: 1px solid var(--border-light);
356
- border-radius: 4px;
357
- background: none;
358
- cursor: pointer;
359
- transition: all 0.2s;
360
- vertical-align: middle;
361
- }
362
- .lib-about-link:hover {
363
- color: var(--ink);
364
- border-color: var(--ink);
365
- }
366
-
367
318
  .lib-group { margin-bottom: 40px; }
368
319
  .lib-group-title {
369
320
  font-size: 15px;