slidev-theme-gtlabo 2.0.1 → 2.0.2

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.
@@ -1,18 +1,44 @@
1
1
  <!-- components/TableOfContents.vue -->
2
2
  <template>
3
- <div class="table-of-contents-container flex flex-col justify-center bg-theme-color">
4
- <!-- ヘッダー -->
3
+ <div class="table-of-contents-container flex flex-col justify-start bg-white overflow-hidden relative">
4
+ <!-- 厳密な背景グリッド - Swiss Styleの基礎 -->
5
+ <div class="absolute inset-0 z-0 pointer-events-none opacity-10"
6
+ style="background-image: linear-gradient(#0f172a 1px, transparent 1px), linear-gradient(to right, #0f172a 1px, transparent 1px); background-size: 50px 50px;">
7
+ </div>
8
+
9
+ <!-- 非対称の幾何学的構成要素 - 左上の強調 -->
10
+ <div class="absolute top-0 left-0 w-2 h-32 bg-slate-900 z-5"></div>
11
+ <div class="absolute top-0 left-0 w-32 h-2 bg-slate-900 z-5"></div>
12
+
13
+ <!-- 非対称の幾何学的構成要素 - 右下のアクセント -->
14
+ <div class="absolute bottom-0 right-0 w-48 h-2 bg-slate-900 z-5"></div>
15
+ <div class="absolute bottom-12 right-0 w-1 h-48 bg-slate-900 opacity-30 z-5"></div>
16
+
17
+ <!-- 右側の装飾バー群 - cover.vueと同じスタイル -->
18
+ <div class="absolute right-0 top-0 w-1/4 h-full z-0 pointer-events-none">
19
+ <div class="absolute right-0 top-0 w-full h-full bg-slate-50" />
20
+ <div class="absolute right-[15%] top-0 w-32 h-[35%] bg-sky-600/10" />
21
+ <div class="absolute right-0 bottom-0 w-2 h-[40%] bg-slate-900" />
22
+ </div>
23
+
24
+ <!-- 機能的なsky-500のアクセントブロック -->
25
+ <div class="absolute right-0 top-1/4 w-[12%] h-24 bg-sky-500/30 z-5"></div>
26
+
27
+ <!-- ヘッダー - 付録セクション用 -->
5
28
  <div
6
29
  v-if="isAppendixSection"
7
30
  :class="headerClasses"
31
+ class="relative z-10"
8
32
  >
9
- <p :class="headerTitleClasses">
10
- 付録
11
- </p>
33
+ <div class="flex items-start space-x-6">
34
+ <div :class="headerTitleClasses" class="font-bold uppercase tracking-widest text-slate-800 leading-none">
35
+ APPENDIX
36
+ </div>
37
+ </div>
12
38
  </div>
13
39
 
14
- <!-- メインコンテンツ -->
15
- <div :class="mainContentClasses">
40
+ <!-- メインコンテンツ - 厳密なグリッドベース -->
41
+ <div :class="mainContentClasses" class="relative z-10">
16
42
  <div class="max-w-full w-full">
17
43
  <!-- 通常の目次表示 -->
18
44
  <div
@@ -22,41 +48,43 @@
22
48
  <div
23
49
  v-for="(chapter, index) in regularChapters"
24
50
  :key="chapter.key"
25
- class="flex flex-col"
26
- :class="{ 'relative': isNextChapter(chapter.key) }"
51
+ class="flex flex-col "
52
+ :class="isNextChapter(chapter.key) ? 'border-sky-500 border-l-8 pl-6' : 'border-slate-200 border-l-4 pl-7'"
27
53
  >
28
- <!-- 次の章の強調表示 -->
29
- <div
30
- v-if="isNextChapter(chapter.key)"
31
- :class="highlightBorderClasses"
32
- />
54
+ <!-- 次の章インジケーター - sky-500アクセント -->
33
55
  <div
34
56
  v-if="isNextChapter(chapter.key)"
35
57
  :class="nextBadgeClasses"
58
+ class="bg-sky-500 text-white font-bold uppercase tracking-widest leading-none"
36
59
  >
37
60
  NEXT
38
61
  </div>
39
62
 
40
- <!-- 章番号とタイトル -->
63
+ <!-- 章番号とタイトル - 左揃え、明確なヒエラルキー -->
41
64
  <div :class="chapterHeaderClasses">
42
- <div :class="chapterNumberClasses">
43
- {{ String(index + 1).padStart(2, '0') }}
44
- </div>
45
- <div class="flex-1 border-b border-white pb-2">
46
- <span :class="chapterTitleClasses">
47
- {{ chapter.title }}
48
- </span>
65
+ <div class="flex items-end space-x-3 w-full">
66
+ <div :class="chapterNumberClasses" class="flex text-slate-900 font-bold tabular-nums leading-none">
67
+ {{ String(index + 1).padStart(2, '0') }}
68
+ </div>
69
+ <div class="flex-1">
70
+ <div class="border-b border-slate-900 mb-2">
71
+ <span :class="chapterTitleClasses" class="text-slate-900 font-bold leading-tight">
72
+ {{ chapter.title }}
73
+ </span>
74
+ </div>
75
+ </div>
49
76
  </div>
50
77
  </div>
51
78
 
52
- <!-- セクション一覧(重複除去済み) -->
79
+ <!-- セクション一覧 - 機能的な情報構造 -->
53
80
  <div :class="sectionListClasses">
54
81
  <div
55
82
  v-for="(sectionData, sectionIndex) in chapter.uniqueSections"
56
83
  :key="`${chapter.key}-${sectionIndex}`"
57
- :class="sectionItemClasses"
84
+ class="flex items-start"
58
85
  >
59
- <span :class="sectionTextClasses">
86
+ <span class="w-1 h-1 bg-slate-400 mr-2 mt-1.5 flex-shrink-0 rounded-full"></span>
87
+ <span :class="sectionTextClasses" class="text-slate-600 leading-snug">
60
88
  {{ sectionData.title }}
61
89
  </span>
62
90
  </div>
@@ -73,40 +101,42 @@
73
101
  v-for="(chapter, index) in appendixChapters"
74
102
  :key="chapter.key"
75
103
  class="flex flex-col"
76
- :class="{ 'relative': isNextChapter(chapter.key) }"
104
+ :class="isNextChapter(chapter.key) ? 'border-sky-500 border-l-8 pl-6' : 'border-slate-200 border-l-4 pl-7'"
77
105
  >
78
- <!-- 次の章の強調表示 -->
79
- <div
80
- v-if="isNextChapter(chapter.key)"
81
- :class="highlightBorderClasses"
82
- />
106
+ <!-- 次の章インジケーター -->
83
107
  <div
84
108
  v-if="isNextChapter(chapter.key)"
85
109
  :class="nextBadgeClasses"
110
+ class="bg-sky-500 text-white font-bold uppercase tracking-widest leading-none"
86
111
  >
87
112
  NEXT
88
113
  </div>
89
114
 
90
115
  <!-- 付録番号とタイトル -->
91
- <div :class="chapterHeaderClasses">
92
- <div :class="appendixNumberClasses">
93
- A{{ index + 1 }}
94
- </div>
95
- <div class="flex-1 border-b border-white pb-2">
96
- <h2 :class="chapterTitleClasses">
97
- {{ chapter.title }}
98
- </h2>
116
+ <div :class="chapterHeaderClasses">
117
+ <div class="flex items-end space-x-3 w-full">
118
+ <div :class="chapterNumberClasses" class="flex text-slate-900 font-bold tabular-nums leading-none">
119
+ A{{ index + 1 }}
120
+ </div>
121
+ <div class="flex-1">
122
+ <div class="border-b border-slate-900 mb-2">
123
+ <span :class="chapterTitleClasses" class="text-slate-900 font-bold leading-none">
124
+ {{ chapter.title }}
125
+ </span>
126
+ </div>
127
+ </div>
99
128
  </div>
100
129
  </div>
101
130
 
102
- <!-- セクション一覧(重複除去済み) -->
131
+ <!-- セクション一覧 -->
103
132
  <div :class="sectionListClasses">
104
133
  <div
105
134
  v-for="(sectionData, sectionIndex) in chapter.uniqueSections"
106
135
  :key="`${chapter.key}-${sectionIndex}`"
107
- :class="sectionItemClasses"
136
+ class="flex items-start"
108
137
  >
109
- <span :class="sectionTextClasses">
138
+ <span class="w-1 h-1 bg-slate-400 mr-2 mt-1.5 flex-shrink-0 rounded-full"></span>
139
+ <span :class="sectionTextClasses" class="text-slate-600 leading-snug">
110
140
  {{ sectionData.title }}
111
141
  </span>
112
142
  </div>
@@ -115,6 +145,11 @@
115
145
  </div>
116
146
  </div>
117
147
  </div>
148
+
149
+ <!-- タイポグラフィックな署名 - 客観性の表明 -->
150
+ <div class="absolute bottom-4 left-6 text-[10px] font-mono text-slate-800 uppercase tracking-widest z-20">
151
+ CONTENTS
152
+ </div>
118
153
  </div>
119
154
  </template>
120
155
 
@@ -236,77 +271,77 @@ const isNextChapter = (chapterKey) => {
236
271
  return props.nextChapter === chapterKey
237
272
  }
238
273
 
239
- // サイズ設定に基づく動的スタイル
274
+ // サイズ設定 - 縦幅を大幅削減
240
275
  const sizeConfigs = {
241
276
  xs: {
242
277
  columns: 4,
243
- headerPadding: 'pt-6 pb-3 px-4 ',
244
- headerTitle: 'text-2xl',
245
- mainPadding: 'px-4 py-4',
246
- gridGap: 'gap-x-4 gap-y-2',
278
+ headerPadding: 'pt-3 pb-1 px-6',
279
+ headerTitle: 'text-lg',
280
+ mainPadding: 'px-6 py-6',
281
+ gridGap: 'gap-x-4 gap-y-4',
247
282
  chapterNumber: 'text-2xl',
248
- chapterTitle: 'text-sm font-bold',
249
- chapterHeader: 'mb-1',
250
- sectionList: 'ml-8 space-y-0.5',
251
- sectionText: 'text-xs',
252
- appendixNumber: 'text-lg',
253
- nextBadge: 'px-1 py-0.5 text-xs'
283
+ chapterTitle: 'text-[11px]',
284
+ chapterHeader: 'mb-2',
285
+ sectionList: 'mt-2 space-y-1',
286
+ sectionText: 'text-[9px]',
287
+ appendixNumber: 'text-xl',
288
+ nextBadge: 'mb-2 px-1.5 py-0.5 text-[8px]'
254
289
  },
255
290
  sm: {
256
291
  columns: 3,
257
- headerPadding: 'pt-8 pb-4 px-6',
258
- headerTitle: 'text-3xl',
259
- mainPadding: 'px-6 py-6',
260
- gridGap: 'gap-x-6 gap-y-3',
292
+ headerPadding: 'pt-6 pb-2 px-8',
293
+ headerTitle: 'text-xl',
294
+ mainPadding: 'px-8 py-8',
295
+ gridGap: 'gap-x-6 gap-y-5',
261
296
  chapterNumber: 'text-3xl',
262
- chapterTitle: 'text-base',
263
- chapterHeader: 'mb-2',
264
- sectionList: 'ml-10 space-y-1',
265
- sectionText: 'text-sm',
297
+ chapterTitle: 'text-xs',
298
+ chapterHeader: 'mb-2.5',
299
+ sectionList: 'mt-2.5 space-y-1',
300
+ sectionText: 'text-[10px]',
266
301
  appendixNumber: 'text-2xl',
267
- nextBadge: 'px-2 py-1 text-xs'
302
+ nextBadge: 'mb-2.5 px-2 py-0.5 text-[9px]'
268
303
  },
269
304
  md: {
270
305
  columns: 2,
271
- headerPadding: 'pt-14 pb-8 px-10',
272
- headerTitle: 'text-5xl',
273
- mainPadding: 'px-6 py-40',
274
- gridGap: 'gap-x-12 gap-y-2',
306
+ headerPadding: 'pt-12 px-12',
307
+ headerTitle: 'text-3xl',
308
+ mainPadding: 'px-12 py-14',
309
+ gridGap: 'gap-x-12 gap-y-6',
275
310
  chapterNumber: 'text-6xl',
276
311
  chapterTitle: 'text-2xl',
277
- chapterHeader: 'mb-4',
278
- sectionList: 'ml-20 space-y-2',
312
+ chapterHeader: 'mb-3',
313
+ sectionList: 'mt-3 space-y-1.5',
279
314
  sectionText: 'text-lg',
280
315
  appendixNumber: 'text-4xl',
281
- nextBadge: 'px-3 py-1 text-sm'
316
+ nextBadge: 'mb-3 px-2.5 py-1 text-md'
282
317
  },
283
318
  lg: {
284
319
  columns: 2,
285
- headerPadding: 'pt-16 pb-10 px-12',
286
- headerTitle: 'text-6xl',
287
- mainPadding: 'px-16 py-16',
288
- gridGap: 'gap-x-20 gap-y-10',
320
+ headerPadding: 'pt-8 pb-4 px-16',
321
+ headerTitle: 'text-4xl',
322
+ mainPadding: 'px-16 py-18',
323
+ gridGap: 'gap-x-16 gap-y-8',
289
324
  chapterNumber: 'text-7xl',
290
- chapterTitle: 'text-3xl',
291
- chapterHeader: 'mb-6',
292
- sectionList: 'ml-24 space-y-3',
293
- sectionText: 'text-xl',
325
+ chapterTitle: 'text-xl',
326
+ chapterHeader: 'mb-4',
327
+ sectionList: 'mt-4 space-y-2',
328
+ sectionText: 'text-base',
294
329
  appendixNumber: 'text-5xl',
295
- nextBadge: 'px-4 py-2 text-base'
330
+ nextBadge: 'mb-4 px-3 py-1.5 text-xs'
296
331
  },
297
332
  xl: {
298
333
  columns: 1,
299
- headerPadding: 'pt-20 pb-12 px-16',
300
- headerTitle: 'text-8xl',
301
- mainPadding: 'px-20 py-20',
302
- gridGap: 'gap-x-24 gap-y-12',
303
- chapterNumber: 'text-9xl',
304
- chapterTitle: 'text-5xl',
305
- chapterHeader: 'mb-8',
306
- sectionList: 'ml-32 space-y-4',
307
- sectionText: 'text-3xl',
334
+ headerPadding: 'pt-10 pb-5 px-20',
335
+ headerTitle: 'text-6xl',
336
+ mainPadding: 'px-20 py-24',
337
+ gridGap: 'gap-x-20 gap-y-12',
338
+ chapterNumber: 'text-8xl',
339
+ chapterTitle: 'text-3xl',
340
+ chapterHeader: 'mb-6',
341
+ sectionList: 'mt-6 space-y-3',
342
+ sectionText: 'text-xl',
308
343
  appendixNumber: 'text-7xl',
309
- nextBadge: 'px-5 py-2 text-lg'
344
+ nextBadge: 'mb-6 px-4 py-2 text-sm'
310
345
  }
311
346
  }
312
347
 
@@ -314,21 +349,19 @@ const currentConfig = computed(() => sizeConfigs[props.size])
314
349
 
315
350
  // 動的クラス
316
351
  const headerClasses = computed(() => `text-left ${currentConfig.value.headerPadding}`)
317
- const headerTitleClasses = computed(() => `${currentConfig.value.headerTitle} font-bold text-white`)
352
+ const headerTitleClasses = computed(() => currentConfig.value.headerTitle)
318
353
  const mainContentClasses = computed(() => `flex-1 ${currentConfig.value.mainPadding}`)
319
354
  const gridClasses = computed(() => `grid grid-cols-${currentConfig.value.columns} ${currentConfig.value.gridGap}`)
320
- const chapterHeaderClasses = computed(() => `flex items-center ${currentConfig.value.chapterHeader} relative z-5`)
321
- const chapterNumberClasses = computed(() => `${currentConfig.value.chapterNumber} font-bold text-white mr-2`)
322
- const chapterTitleClasses = computed(() => `${currentConfig.value.chapterTitle} font-bold text-white`)
355
+ const chapterHeaderClasses = computed(() => currentConfig.value.chapterHeader)
356
+ const chapterNumberClasses = computed(() => currentConfig.value.chapterNumber)
357
+ const chapterTitleClasses = computed(() => currentConfig.value.chapterTitle)
323
358
  const sectionListClasses = computed(() => currentConfig.value.sectionList)
324
- const sectionItemClasses = computed(() => 'flex items-start')
325
- const sectionTextClasses = computed(() => `text-white ${currentConfig.value.sectionText} leading-relaxed`)
326
- const appendixNumberClasses = computed(() => `${currentConfig.value.appendixNumber} font-bold text-white mr-6 pb-2`)
327
- const highlightBorderClasses = computed(() => 'absolute -inset-2 border-4 border-yellow-400 rounded-lg opacity-80')
328
- const nextBadgeClasses = computed(() => `absolute -top-2 -right-2 bg-yellow-400 text-black ${currentConfig.value.nextBadge} rounded-full font-bold z-10`)
359
+ const sectionTextClasses = computed(() => currentConfig.value.sectionText)
360
+ const appendixNumberClasses = computed(() => currentConfig.value.appendixNumber)
361
+ const nextBadgeClasses = computed(() => currentConfig.value.nextBadge)
329
362
  </script>
330
363
 
331
- <style>
364
+ <style scoped>
332
365
  /* このコンポーネント専用のスタイル */
333
366
  .table-of-contents-container {
334
367
  /* ページ全体をカバーする背景 */
@@ -343,8 +376,15 @@ const nextBadgeClasses = computed(() => `absolute -top-2 -right-2 bg-yellow-400
343
376
  z-index: 0 !important;
344
377
  }
345
378
 
346
- /* 背景色を確実に適用 */
347
- .table-of-contents-container.bg-theme-color {
348
- background-color: rgba(2, 132, 199, 1) !important;
379
+ /* タイポグラフィの最適化 - Swiss Styleの核心 */
380
+ div, span, h2, p {
381
+ font-feature-settings: "palt", "kern";
382
+ -webkit-font-smoothing: antialiased;
383
+ -moz-osx-font-smoothing: grayscale;
384
+ }
385
+
386
+ /* タブラーナンバーの最適化 */
387
+ .tabular-nums {
388
+ font-variant-numeric: tabular-nums;
349
389
  }
350
390
  </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "slidev-theme-gtlabo",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "A Slidev theme for laboratory presentations with customizable components",
5
5
  "author": "mksmkss",
6
6
  "license": "MIT",