create-fesd-app 1.0.1 → 1.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.
@@ -81,6 +81,21 @@ $typeFull-content-padding_rwd: 20px
81
81
  $pagination-TB-gap: 20px
82
82
  $pagination-TB-gap_rwd: 10px
83
83
 
84
+ // 表格與其他物件上下間的距離
85
+ $table-TB-gap: 20px
86
+ $table-TB-gap_rwd: 20px
87
+
88
+ // 表格最小寬度
89
+ $table-min-width: 100px
90
+ $freeze-table-height: 500px
91
+
92
+ // 表格間距
93
+ $table-padding: 15px 30px
94
+ $table-padding_rwd: 10px 15px
95
+
96
+ // 引言與其他物件上下間的距離
97
+ $quote-TB-gap: 20px
98
+
84
99
  /////////////////////////////////////////////
85
100
  ////////////////// [ 內容 ] /////////////////
86
101
  /////////////////////////////////////////////
@@ -203,6 +218,8 @@ $pagination-TB-gap_rwd: 10px
203
218
  width: 100%
204
219
  // 以下可修改
205
220
  font-size: 14px
221
+ font-weight: 400
222
+ line-height: 1.5
206
223
  +rwdmax($basic_rwd)
207
224
  // 以下可修改
208
225
  font-size: 12px
@@ -301,3 +318,246 @@ $pagination-TB-gap_rwd: 10px
301
318
  transform: translate(0, -50%) rotate(45deg)
302
319
  border-left: 2px solid #000
303
320
  border-bottom: 2px solid #000
321
+
322
+
323
+ // 20250528 新增
324
+ %quote
325
+ ._quote
326
+ // 顯示符號
327
+ quotes: '“' '”' '"' '"' "'" "'"
328
+ // 以下可修改
329
+ font-size: px(20)
330
+ line-height: 1.8
331
+ font-weight: 600
332
+ &::before
333
+ margin-right: 10px
334
+ &:after
335
+ margin-left: 10px
336
+
337
+ %table
338
+ // @extend %table_solid_single
339
+ // @extend %table_solid_striped
340
+ // @extend %table_border_rows
341
+ // @extend %table_border_full
342
+ @extend %table_solidSingle_borderColumn
343
+ table
344
+ th, td
345
+ // text-align: left
346
+ background: #fff
347
+ // 以下可修改
348
+ span
349
+ display: block
350
+ font-size: 14px
351
+ line-height: 1.8
352
+ thead
353
+ th
354
+ span
355
+ display: block
356
+ // 以下可修改
357
+ font-size: 16px
358
+ font-weight: 600
359
+
360
+ %table_tipText
361
+ // 以下可修改
362
+ gap: 10px
363
+ font-size: 14px
364
+ font-weight: 500
365
+ line-height: 1.5
366
+ letter-spacing: 0.5px
367
+ i.icon-drag
368
+ font-size: px(20)
369
+
370
+ // 以下可修改 - 可新增 / 自訂表格樣式
371
+ // 表格內框線樣式建議使用 偽元素製作以避免凍結合併時出錯
372
+ %table_solid_single
373
+ ._table
374
+ border-bottom: 5px solid #6AA8FF
375
+ &:not(:has(thead))
376
+ border-top: 5px solid #6AA8FF
377
+ table
378
+ thead
379
+ th
380
+ color: #fff
381
+ background-color: #6AA8FF
382
+ tbody
383
+ tr:nth-child(even)
384
+ td
385
+ background-color: #F2F2F2
386
+ %table_solid_striped
387
+ ._table
388
+ border-bottom: 5px solid #6AA8FF
389
+ &:not(:has(thead))
390
+ border-top: 5px solid #6AA8FF
391
+ table
392
+ thead
393
+ color: #fff
394
+ th:nth-child(odd)
395
+ background-color: #6AA8FF
396
+ th:nth-child(even)
397
+ background-color: #3287FF
398
+ tbody
399
+ tr:nth-child(even)
400
+ td
401
+ background-color: #F2F2F2
402
+ %table_border_rows
403
+ ._table
404
+ border-bottom: 2px solid #000
405
+ &:not(:has(thead))
406
+ border-top: 2px solid #000
407
+ table
408
+ thead
409
+ th
410
+ color: #00C5B1
411
+ position: relative
412
+ &::before
413
+ content: ''
414
+ position: absolute
415
+ width: 100%
416
+ height: 2px
417
+ left: 0
418
+ top: 0
419
+ background: #000
420
+ tr:last-child
421
+ th::after
422
+ content: ''
423
+ position: absolute
424
+ width: 100%
425
+ height: 2px
426
+ bottom: 0
427
+ left: 0
428
+ background: #000
429
+ tbody
430
+ tr:not(:first-child)
431
+ td
432
+ position: relative
433
+ &::after
434
+ content: ''
435
+ position: absolute
436
+ width: 100%
437
+ height: 1px
438
+ top: 0
439
+ left: 0
440
+ background-color: rgba(#000, .2)
441
+ %table_border_full
442
+ ._table
443
+ border-bottom: 2px solid #000
444
+ &:not(:has(thead))
445
+ border-top: 2px solid #000
446
+ table
447
+ thead
448
+ th
449
+ position: relative
450
+ &::before
451
+ content: ''
452
+ position: absolute
453
+ width: 100%
454
+ height: 2px
455
+ bottom: 0
456
+ left: 0
457
+ background-color: #000
458
+ z-index: 5
459
+ &:not(:last-child)
460
+ &:after
461
+ content: ''
462
+ position: absolute
463
+ top: 50%
464
+ right: 0
465
+ width: 1px
466
+ height: 20px
467
+ transform: translate3d(50%, -50%, 0)
468
+ background-color: #000
469
+ tbody
470
+ td
471
+ position: relative
472
+ tr:not(:first-child)
473
+ td
474
+ &::after
475
+ content: ''
476
+ position: absolute
477
+ width: 100%
478
+ height: 1px
479
+ top: 0
480
+ left: 0
481
+ background-color: rgba(#000, .2)
482
+ tr
483
+ td
484
+ &:not(:last-child)
485
+ &::before
486
+ content: ''
487
+ position: absolute
488
+ width: 1px
489
+ height: 100%
490
+ top: 0
491
+ right: 0
492
+ background-color: rgba(#000, .2)
493
+ %table_solidSingle_borderColumn
494
+ @extend %table_solid_single
495
+ table
496
+ thead
497
+ th
498
+ &:not(:last-child)
499
+ position: relative
500
+ &:after
501
+ content: ''
502
+ position: absolute
503
+ top: 50%
504
+ right: 0
505
+ width: 1px
506
+ height: 100%
507
+ z-index: 3
508
+ transform: translate3d(50%, -50%, 0)
509
+ background-color: #fff
510
+ tbody
511
+ td:not(:last-child)
512
+ position: relative
513
+ &::after
514
+ content: ''
515
+ position: absolute
516
+ top: 0
517
+ right: 0
518
+ width: 1px
519
+ height: 100%
520
+ background-color: rgba(#000, .2)
521
+
522
+ // markdown文字樣式
523
+ %table_markdown_style
524
+ [data-center]
525
+ text-align: center
526
+ ol
527
+ list-style: decimal
528
+ ul
529
+ list-style: disc
530
+ ol, ul
531
+ padding-left: 16px
532
+ li
533
+ line-height: 1.2
534
+ &:not(:first-child)
535
+ margin-top: 10px
536
+ h1
537
+ font-size: 28px
538
+ line-height: 1.2
539
+ h2
540
+ font-size: 26px
541
+ line-height: 1.2
542
+ h3
543
+ font-size: 24px
544
+ line-height: 1.2
545
+ h4
546
+ font-size: 22px
547
+ line-height: 1.2
548
+ h5
549
+ font-size: 20px
550
+ line-height: 1.2
551
+ h6
552
+ font-size: 18px
553
+ line-height: 1.2
554
+ p
555
+ font-size: 16px
556
+ line-height: 1.2
557
+ white-space: pre
558
+ em
559
+ font-style: italic
560
+ a
561
+ color: #004cc5
562
+
563
+
@@ -82,7 +82,7 @@
82
82
  &[data-align='left']
83
83
  .txtBox
84
84
  margin-right: auto
85
-
85
+
86
86
  // 麵包屑
87
87
  .breadCrumbs
88
88
  width: 100%
@@ -5,7 +5,7 @@ $(async () => {
5
5
  // common Init
6
6
  common.inits()
7
7
  // pluginInit
8
- new Article4('._articleBlock')
8
+ const article4 = new Article4('._articleBlock')
9
9
  // coding...
10
10
  methods.noContentCheck();
11
- })
11
+ })
@@ -0,0 +1,153 @@
1
+ //- ========================
2
+ //- mixin: article
3
+ //- ========================
4
+ mixin article(data, HTag='h4', subHTag='h5')
5
+ - const complexTypes = ['base', 'typeSL', 'typeSR', 'typeU', 'typeUL', 'typeUR', 'typeD', 'typeDL', 'typeDR']
6
+ - const isComplex = complexTypes.includes(data.articleType)
7
+
8
+ article(class=`_article ${data.articleType || ''}`)&attributes(data.attributes || {})
9
+ ._contentWrap
10
+ if isComplex && data.H
11
+ +dynamicHeading(HTag , '_H', data.H)
12
+ +backgroundWrap(data.backgroundPC, data.backgroundMobile)
13
+ +imgSwiperBlock(data.SwiperImg)
14
+ +imgCoverBlock(data.img)
15
+ +wordBlock(data, isComplex, HTag, subHTag)
16
+ +quoteBlock(data)
17
+ +tableBlock(d, data.tableData, HTag)
18
+ if block
19
+ block
20
+
21
+
22
+ //- ========================
23
+ //- mixin: dynamicHeading
24
+ //- ========================
25
+ mixin dynamicHeading(tag, className, content)
26
+ - const validTags = ['h2', 'h3', 'h4', 'h5', 'h6']
27
+ - const seoTag = validTags.includes(tag) ? tag : 'h4'
28
+ if seoTag === 'h1'
29
+ h1(class=className)= content
30
+ else if seoTag === 'h2'
31
+ h2(class=className)= content
32
+ else if seoTag === 'h3'
33
+ h3(class=className)= content
34
+ else if seoTag === 'h4'
35
+ h4(class=className)= content
36
+ else if seoTag === 'h5'
37
+ h5(class=className)= content
38
+ else if seoTag === 'h6'
39
+ h6(class=className)= content
40
+ else
41
+ p(class=className)= content
42
+
43
+ //- ========================
44
+ //- mixin: backgroundWrap
45
+ //- ========================
46
+ mixin backgroundWrap(backgroundPC, backgroundMobile)
47
+ if backgroundPC || backgroundMobile
48
+ ._backgroundWrap
49
+ if backgroundPC
50
+ ._pc(style=`background-image: url(${backgroundPC})`)
51
+ if backgroundMobile
52
+ ._mobile(style=`background-image: url(${backgroundMobile})`)
53
+
54
+ //- ========================
55
+ //- mixin: imgSwiperBlock
56
+ //- ========================
57
+ mixin imgSwiperBlock(images)
58
+ if Array.isArray(images) && images.length
59
+ ._imgCover
60
+ .swiper
61
+ .swiper-wrapper
62
+ each img in images
63
+ ._cover.swiper-slide
64
+ ._photo&attributes(img.videoAttributes || {})
65
+ if img.img
66
+ img(src=img.img alt='')
67
+ if img.description
68
+ p._description= img.description
69
+ .swiper-button-cover
70
+
71
+ //- ========================
72
+ //- mixin: imgCoverBlock
73
+ //- ========================
74
+ mixin imgCoverBlock(images)
75
+ if Array.isArray(images) && images.length
76
+ ._imgCover
77
+ each img in images
78
+ ._cover
79
+ ._photo&attributes(img.videoAttributes || {})
80
+ if img.img
81
+ img(src=img.img alt='')
82
+ if img.description
83
+ p._description= img.description
84
+
85
+ //- ========================
86
+ //- mixin: wordBlock
87
+ //- ========================
88
+ mixin wordBlock(d, isComplex, HTag, subHTag)
89
+ - const isFloat = d.articleType === 'typeLR' || d.articleType === 'typeRR'
90
+ if isFloat
91
+ if d.H
92
+ +dynamicHeading(HTag, '_H', d.H)
93
+ if d.subH
94
+ +dynamicHeading(subHTag, '_subH', d.subH)
95
+ if d.P
96
+ ._P
97
+ p= d.P
98
+ if d.button
99
+ span._buttonCover
100
+ a._button(href='javascript:;')= d.button
101
+ else
102
+ if d.H || d.subH || d.P
103
+ ._wordCover
104
+ if !isComplex && d.H
105
+ +dynamicHeading(d.titleTag || 'h4', '_H', d.H)
106
+ if d.subH
107
+ +dynamicHeading(d.subTitleTag || 'h5', '_subH', d.subH)
108
+ if d.P
109
+ ._P
110
+ p= d.P
111
+ if d.button
112
+ span._buttonCover
113
+ a._button(href='javascript:;')= d.button
114
+
115
+ //- ========================
116
+ //- mixin: quoteBlock
117
+ //- ========================
118
+ mixin quoteBlock(d)
119
+ if d.quote
120
+ q._quote= d.quote
121
+ if d.quoteP
122
+ ._P
123
+ p= d.quoteP
124
+
125
+
126
+ //- ========================
127
+ //- mixin: tableBlock
128
+ //- ========================
129
+ mixin tableBlock(d,tableData)
130
+ if tableData
131
+ if tableData.H
132
+ +dynamicHeading(HTag, '_H', tableData.H)
133
+ ._tableCover
134
+ p._tipText
135
+ i.icon-drag
136
+ span !{tableData.tipText ? tableData.tipText : '左右托拉查看表格資訊'}
137
+ if tableData.table
138
+ ._table
139
+ table
140
+ thead
141
+ each head in tableData.table.head
142
+ tr
143
+ each th in head
144
+ th=th
145
+ tbody
146
+ each body in tableData.table.body
147
+ tr
148
+ each td in body
149
+ td=td
150
+ if block
151
+ ._table
152
+ block
153
+ p._description !{tableData.description}