slidev-theme-gtlabo 2.0.3 → 2.0.4

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.
@@ -43,13 +43,16 @@
43
43
  <!-- 通常の目次表示 -->
44
44
  <div
45
45
  v-if="!isAppendixSection"
46
- :class="gridClasses"
46
+ :class="layoutClasses"
47
47
  >
48
48
  <div
49
49
  v-for="(chapter, index) in regularChapters"
50
50
  :key="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'"
51
+ class="flex flex-col break-inside-avoid"
52
+ :class="[
53
+ isNextChapter(chapter.key) ? 'border-sky-500 border-l-8 pl-6' : 'border-slate-200 border-l-4 pl-7',
54
+ itemMarginBottomClasses
55
+ ]"
53
56
  >
54
57
  <!-- 次の章インジケーター - sky-500アクセント -->
55
58
  <div
@@ -95,13 +98,16 @@
95
98
  <!-- 付録の目次表示 -->
96
99
  <div
97
100
  v-else
98
- :class="gridClasses"
101
+ :class="layoutClasses"
99
102
  >
100
103
  <div
101
104
  v-for="(chapter, index) in appendixChapters"
102
105
  :key="chapter.key"
103
- class="flex flex-col"
104
- :class="isNextChapter(chapter.key) ? 'border-sky-500 border-l-8 pl-6' : 'border-slate-200 border-l-4 pl-7'"
106
+ class="flex flex-col break-inside-avoid"
107
+ :class="[
108
+ isNextChapter(chapter.key) ? 'border-sky-500 border-l-8 pl-6' : 'border-slate-200 border-l-4 pl-7',
109
+ itemMarginBottomClasses
110
+ ]"
105
111
  >
106
112
  <!-- 次の章インジケーター -->
107
113
  <div
@@ -274,11 +280,12 @@ const isNextChapter = (chapterKey) => {
274
280
  // サイズ設定 - 縦幅を大幅削減
275
281
  const sizeConfigs = {
276
282
  xs: {
277
- columns: 4,
283
+ columns: "columns-4",
278
284
  headerPadding: 'pt-3 pb-1 px-6',
279
285
  headerTitle: 'text-lg',
280
286
  mainPadding: 'px-6 py-6',
281
- gridGap: 'gap-x-4 gap-y-4',
287
+ columnGap: 'gap-4',
288
+ itemMarginBottom: 'mb-4',
282
289
  chapterNumber: 'text-2xl',
283
290
  chapterTitle: 'text-[11px]',
284
291
  chapterHeader: 'mb-2',
@@ -288,11 +295,12 @@ const sizeConfigs = {
288
295
  nextBadge: 'mb-2 px-1.5 py-0.5 text-[8px]'
289
296
  },
290
297
  sm: {
291
- columns: 3,
298
+ columns: "columns-3",
292
299
  headerPadding: 'pt-6 pb-2 px-8',
293
300
  headerTitle: 'text-xl',
294
301
  mainPadding: 'px-8 py-8',
295
- gridGap: 'gap-x-6 gap-y-5',
302
+ columnGap: 'gap-6',
303
+ itemMarginBottom: 'mb-5',
296
304
  chapterNumber: 'text-3xl',
297
305
  chapterTitle: 'text-xs',
298
306
  chapterHeader: 'mb-2.5',
@@ -302,11 +310,12 @@ const sizeConfigs = {
302
310
  nextBadge: 'mb-2.5 px-2 py-0.5 text-[9px]'
303
311
  },
304
312
  md: {
305
- columns: 2,
313
+ columns: "columns-2",
306
314
  headerPadding: 'pt-12 px-12',
307
315
  headerTitle: 'text-3xl',
308
316
  mainPadding: 'px-12 py-14',
309
- gridGap: 'gap-x-12 gap-y-6',
317
+ columnGap: 'gap-12',
318
+ itemMarginBottom: 'mb-6',
310
319
  chapterNumber: 'text-6xl',
311
320
  chapterTitle: 'text-2xl',
312
321
  chapterHeader: 'mb-3',
@@ -316,11 +325,12 @@ const sizeConfigs = {
316
325
  nextBadge: 'mb-3 px-2.5 py-1 text-md'
317
326
  },
318
327
  lg: {
319
- columns: 2,
328
+ columns: "columns-2",
320
329
  headerPadding: 'pt-8 pb-4 px-16',
321
330
  headerTitle: 'text-4xl',
322
331
  mainPadding: 'px-16 py-18',
323
- gridGap: 'gap-x-16 gap-y-8',
332
+ columnGap: 'gap-16',
333
+ itemMarginBottom: 'mb-8',
324
334
  chapterNumber: 'text-7xl',
325
335
  chapterTitle: 'text-xl',
326
336
  chapterHeader: 'mb-4',
@@ -330,11 +340,12 @@ const sizeConfigs = {
330
340
  nextBadge: 'mb-4 px-3 py-1.5 text-xs'
331
341
  },
332
342
  xl: {
333
- columns: 1,
343
+ columns: "columns-1",
334
344
  headerPadding: 'pt-10 pb-5 px-20',
335
345
  headerTitle: 'text-6xl',
336
346
  mainPadding: 'px-20 py-24',
337
- gridGap: 'gap-x-20 gap-y-12',
347
+ columnGap: 'gap-20',
348
+ itemMarginBottom: 'mb-12',
338
349
  chapterNumber: 'text-8xl',
339
350
  chapterTitle: 'text-3xl',
340
351
  chapterHeader: 'mb-6',
@@ -351,7 +362,8 @@ const currentConfig = computed(() => sizeConfigs[props.size])
351
362
  const headerClasses = computed(() => `text-left ${currentConfig.value.headerPadding}`)
352
363
  const headerTitleClasses = computed(() => currentConfig.value.headerTitle)
353
364
  const mainContentClasses = computed(() => `flex-1 ${currentConfig.value.mainPadding}`)
354
- const gridClasses = computed(() => `grid grid-cols-${currentConfig.value.columns} ${currentConfig.value.gridGap}`)
365
+ const layoutClasses = computed(() => `${currentConfig.value.columns} ${currentConfig.value.columnGap} block`)
366
+ const itemMarginBottomClasses = computed(() => currentConfig.value.itemMarginBottom)
355
367
  const chapterHeaderClasses = computed(() => currentConfig.value.chapterHeader)
356
368
  const chapterNumberClasses = computed(() => currentConfig.value.chapterNumber)
357
369
  const chapterTitleClasses = computed(() => currentConfig.value.chapterTitle)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "slidev-theme-gtlabo",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "description": "A Slidev theme for laboratory presentations with customizable components",
5
5
  "author": "mksmkss",
6
6
  "license": "MIT",