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.
- package/components/SectionDivider.vue +29 -17
- package/package.json +1 -1
|
@@ -43,13 +43,16 @@
|
|
|
43
43
|
<!-- 通常の目次表示 -->
|
|
44
44
|
<div
|
|
45
45
|
v-if="!isAppendixSection"
|
|
46
|
-
:class="
|
|
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="
|
|
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="
|
|
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="
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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)
|