create-fesd-app 1.0.0-bate.94 → 1.0.0-bate.96
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 +2 -2
- package/src/assets/css/layouts/_cookiePolicy.sass +75 -0
- package/src/assets/css/layouts/article4/_article4_2.0.sass +54 -11
- package/src/assets/css/layouts/article4/_article4_setting.sass +6 -2
- package/src/assets/css/style.sass +2 -0
- package/src/assets/js/apps/about/page.js +2 -2
- package/src/assets/js/apps/error/404/page.js +0 -1
- package/src/assets/js/apps/index/page.js +7 -6
- package/src/assets/js/commons/index.js +1 -1
- package/src/assets/js/commons/inits.js +2 -0
- package/src/assets/js/commons/methods.js +38 -7
- package/src/assets/js/commons/pages/index.js +2 -0
- package/src/assets/js/commons/pages/page.cookiePolicy.js +37 -0
- package/src/assets/js/commons/utils.js +0 -32
- package/src/layouts/_template.pug +4 -0
- package/src/layouts/components/_cookiePolicy.pug +9 -0
- package/src/pages/about.pug +684 -5
- package/src/pages/ajax/ajax_igDemo.pug +5 -0
- package/src/pages/index.pug +1 -1
- package/src/assets/js/apps/404/page.js +0 -27
- package/src/assets/js/apps/500/page.js +0 -27
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "create-fesd-app",
|
3
|
-
"version": "1.0.0-bate.
|
3
|
+
"version": "1.0.0-bate.96",
|
4
4
|
"type": "module",
|
5
5
|
"scripts": {
|
6
6
|
"dev": "vite",
|
@@ -22,7 +22,7 @@
|
|
22
22
|
".gitignore"
|
23
23
|
],
|
24
24
|
"dependencies": {
|
25
|
-
"@xwadex/fesd": "0.0.
|
25
|
+
"@xwadex/fesd": "0.0.15",
|
26
26
|
"ansi-colors": "^4.1.3",
|
27
27
|
"chalk": "^5.3.0",
|
28
28
|
"colorthief": "^2.4.0",
|
@@ -0,0 +1,75 @@
|
|
1
|
+
.cookie-check
|
2
|
+
padding: 20px
|
3
|
+
display: flex
|
4
|
+
opacity: 0
|
5
|
+
width: 100%
|
6
|
+
height: 100%
|
7
|
+
z-index: 101
|
8
|
+
overflow: hidden
|
9
|
+
position: fixed
|
10
|
+
right: 0
|
11
|
+
bottom: 0
|
12
|
+
transition: opacity .5s
|
13
|
+
pointer-events: none
|
14
|
+
&.first-enter
|
15
|
+
opacity: 1
|
16
|
+
.cookie-main
|
17
|
+
pointer-events: auto
|
18
|
+
transform: translate3d(0,0,0)
|
19
|
+
&.agree,&.hidden
|
20
|
+
.cookie-main
|
21
|
+
pointer-events: none
|
22
|
+
transform: translate3d(0,calc(100% + 40px),0)
|
23
|
+
.cookie-main
|
24
|
+
margin: auto 0 0 auto
|
25
|
+
padding: 40px
|
26
|
+
max-width: 600px
|
27
|
+
width: 100%
|
28
|
+
background: #fff
|
29
|
+
border-radius: 5px
|
30
|
+
transform: translate3d(0,100%,0)
|
31
|
+
transition: transform .5s
|
32
|
+
box-shadow: 0px 0px 20px 0px rgba(90, 70, 42, .15)
|
33
|
+
.cookie-container
|
34
|
+
.title-block
|
35
|
+
margin-right: 20px
|
36
|
+
// width: 634/824*100%
|
37
|
+
width: 100%
|
38
|
+
.title
|
39
|
+
font-size: px(20)
|
40
|
+
.text
|
41
|
+
margin-top: 10px
|
42
|
+
.button-group
|
43
|
+
margin: 20px 0 0 auto
|
44
|
+
display: flex
|
45
|
+
gap: 10px 20px
|
46
|
+
.cookie-btn
|
47
|
+
display: flex
|
48
|
+
align-items: center
|
49
|
+
cursor: pointer
|
50
|
+
gap: 10px
|
51
|
+
transition: opacity .5s
|
52
|
+
&::before
|
53
|
+
display: block
|
54
|
+
background: #000000
|
55
|
+
width: 5px
|
56
|
+
height: 5px
|
57
|
+
content: ''
|
58
|
+
+hover
|
59
|
+
opacity: .5
|
60
|
+
+rwdmax(767)
|
61
|
+
.cookie-main
|
62
|
+
margin: auto auto 0 auto
|
63
|
+
.cookie-container
|
64
|
+
flex-direction: column
|
65
|
+
.title-block
|
66
|
+
width: 100%
|
67
|
+
.button-group
|
68
|
+
margin-top: 30px
|
69
|
+
display: flex
|
70
|
+
flex-direction: row
|
71
|
+
width: 100%
|
72
|
+
+rwdmax(575)
|
73
|
+
.cookie-container
|
74
|
+
.button-group
|
75
|
+
flex-direction: column
|
@@ -75,6 +75,20 @@
|
|
75
75
|
&[swiper-pagination-dynamic="on"]
|
76
76
|
.swiper-pagination
|
77
77
|
left: 50%
|
78
|
+
// 點點深淺模式樣式
|
79
|
+
// 以下可客製化更改
|
80
|
+
&[nav-theme="dark"]
|
81
|
+
.swiper-pagination
|
82
|
+
.swiper-pagination-bullet
|
83
|
+
background-color: #C4C4C4
|
84
|
+
&.swiper-pagination-bullet-active
|
85
|
+
background-color: #000
|
86
|
+
&[nav-theme="light"]
|
87
|
+
.swiper-pagination
|
88
|
+
.swiper-pagination-bullet
|
89
|
+
background-color: #ffffff7e
|
90
|
+
&.swiper-pagination-bullet-active
|
91
|
+
background-color: #ffffff
|
78
92
|
|
79
93
|
/////////////////////////////////////////////
|
80
94
|
///////////// [ 個別類型設定 ] /////////////
|
@@ -147,6 +161,8 @@
|
|
147
161
|
._wordCover
|
148
162
|
margin: 0
|
149
163
|
margin-bottom: $img-cover-TB-gap
|
164
|
+
._cover
|
165
|
+
margin-bottom: 0
|
150
166
|
&[img-row="x2"],
|
151
167
|
&[img-row="x3"],
|
152
168
|
&[img-row="x4"],
|
@@ -156,14 +172,24 @@
|
|
156
172
|
+rwdmax($basic_rwd)
|
157
173
|
._wordCover
|
158
174
|
margin-bottom: $img-cover-TB-gap_rwd
|
175
|
+
._imgCover
|
176
|
+
margin-bottom: 0
|
159
177
|
&[mobile-rwd="on"]
|
160
178
|
._H
|
161
|
-
|
179
|
+
// 2025.04.21 新增 important
|
180
|
+
margin-top: $img-cover-TB-gap_rwd !important
|
162
181
|
._imgCover
|
163
|
-
margin-top: 0
|
182
|
+
margin-top: 0 !important
|
164
183
|
order: -1
|
165
184
|
._wordCover
|
166
185
|
margin: 0
|
186
|
+
// 2025.04.21 新增判斷
|
187
|
+
&[img-row="x2"],
|
188
|
+
&[img-row="x3"],
|
189
|
+
&[img-row="x4"],
|
190
|
+
&[img-row="x5"]
|
191
|
+
._imgCover
|
192
|
+
margin-bottom: #{-$cover-TB-gap_rwd}
|
167
193
|
|
168
194
|
&.typeUL,
|
169
195
|
&.typeUR
|
@@ -214,6 +240,7 @@
|
|
214
240
|
&[mobile-rwd="on"]
|
215
241
|
._imgCover
|
216
242
|
order: 1
|
243
|
+
margin-bottom: 0
|
217
244
|
|
218
245
|
&.typeD
|
219
246
|
._imgCover
|
@@ -237,6 +264,9 @@
|
|
237
264
|
width: 100%
|
238
265
|
._wordCover
|
239
266
|
margin-top: 0
|
267
|
+
&[mobile-rwd="on"]
|
268
|
+
._H
|
269
|
+
margin-top: 0
|
240
270
|
&.typeDL
|
241
271
|
._H
|
242
272
|
order: 1
|
@@ -468,11 +498,11 @@
|
|
468
498
|
&[img-row="x4"],
|
469
499
|
&[img-row="x5"]
|
470
500
|
._imgCover
|
471
|
-
margin: 0 #{-$cover-LR-gap_rwd * 0.5}
|
501
|
+
margin: 0 #{-$cover-LR-gap_rwd * 0.5} #{$img-cover-TB-gap_rwd + $cover-TB-gap_rwd - $img-cover-TB-gap_rwd}
|
472
502
|
width: calc(100% + #{$cover-LR-gap_rwd})
|
473
503
|
&[img-merge="on"]
|
474
504
|
._imgCover
|
475
|
-
margin: 0
|
505
|
+
margin: 0 0 #{-$cover-TB-gap_rwd + $img-cover-TB-gap_rwd} 0
|
476
506
|
width: 100%
|
477
507
|
&[mobile-rwd="on"]
|
478
508
|
._imgCover
|
@@ -566,8 +596,16 @@
|
|
566
596
|
|
567
597
|
// swiper
|
568
598
|
&[img-swiper="on"]
|
599
|
+
&.typeD
|
600
|
+
._imgCover
|
601
|
+
// margin-bottom: #{-$cover-TB-gap + $img-cover-TB-gap}
|
602
|
+
margin-bottom: #{$img-cover-TB-gap - (-$cover-TB-gap + $img-cover-TB-gap)}
|
569
603
|
._imgCover
|
570
604
|
position: relative
|
605
|
+
margin: 0 #{-$swiper-cover-LR-gap / 2}
|
606
|
+
._cover
|
607
|
+
margin-bottom: 0
|
608
|
+
padding: 0 #{$swiper-cover-LR-gap / 2}
|
571
609
|
.swiper-button-cover
|
572
610
|
&:before
|
573
611
|
display: block
|
@@ -590,9 +628,10 @@
|
|
590
628
|
|
591
629
|
// img-row
|
592
630
|
@for $i from 2 through 5
|
593
|
-
&[img-row="x#{$i}"]
|
631
|
+
&[img-row="x#{$i}"],
|
632
|
+
&[swiper-num="#{$i}"]
|
594
633
|
._imgCover
|
595
|
-
margin: 0 #{-$cover-LR-gap * 0.5} #{-$cover-TB-gap + $img-cover-TB-gap} #{-$cover-LR-gap * 0.5}
|
634
|
+
// margin: 0 #{-$cover-LR-gap * 0.5} #{-$cover-TB-gap + $img-cover-TB-gap} #{-$cover-LR-gap * 0.5}
|
596
635
|
width: calc(100% + #{$cover-LR-gap})
|
597
636
|
._cover
|
598
637
|
margin-bottom: $cover-TB-gap
|
@@ -600,7 +639,7 @@
|
|
600
639
|
width: calc(100% / #{$i})
|
601
640
|
+rwdmax($basic_rwd)
|
602
641
|
._imgCover
|
603
|
-
margin: 0 #{-$cover-LR-gap_rwd * 0.5} #{-$cover-TB-gap_rwd + $img-cover-TB-gap_rwd}
|
642
|
+
// margin: 0 #{-$cover-LR-gap_rwd * 0.5} #{-$cover-TB-gap_rwd + $img-cover-TB-gap_rwd}
|
604
643
|
width: calc(100% + #{$cover-LR-gap_rwd})
|
605
644
|
._cover
|
606
645
|
margin-bottom: $cover-TB-gap_rwd
|
@@ -610,13 +649,17 @@
|
|
610
649
|
// img-merge
|
611
650
|
&[img-merge="on"]
|
612
651
|
._imgCover
|
613
|
-
margin: 0 0 $cover-TB-gap
|
614
652
|
width: 100%
|
653
|
+
margin-bottom: 0
|
615
654
|
._cover
|
616
655
|
padding: 0
|
617
|
-
|
618
|
-
|
619
|
-
|
656
|
+
&:not([swiper-num])
|
657
|
+
._imgCover
|
658
|
+
// margin: 0 0 $cover-TB-gap
|
659
|
+
._cover
|
660
|
+
margin-bottom: 0
|
661
|
+
._description
|
662
|
+
display: none
|
620
663
|
|
621
664
|
// article-flex
|
622
665
|
&[article-flex="up"]
|
@@ -51,6 +51,9 @@ $button-cover-gap_rwd: 20px
|
|
51
51
|
$cover-LR-gap: 12px
|
52
52
|
$cover-LR-gap_rwd: 12px
|
53
53
|
|
54
|
+
// 輪播左右間的距離
|
55
|
+
$swiper-cover-LR-gap: 12px
|
56
|
+
|
54
57
|
// 影像上下間的距離
|
55
58
|
$cover-TB-gap: 30px
|
56
59
|
$cover-TB-gap_rwd: 10px
|
@@ -244,7 +247,8 @@ $pagination-TB-gap_rwd: 10px
|
|
244
247
|
|
245
248
|
// swiper 結構
|
246
249
|
%swiper_pagination
|
247
|
-
margin: calc(#{$pagination-TB-gap} - #{$cover-TB-gap}) 0 0
|
250
|
+
// margin: calc(#{$pagination-TB-gap} - #{$cover-TB-gap}) 0 0
|
251
|
+
margin: $pagination-TB-gap 0 0
|
248
252
|
display: block
|
249
253
|
position: relative
|
250
254
|
top: auto
|
@@ -252,7 +256,7 @@ $pagination-TB-gap_rwd: 10px
|
|
252
256
|
left: auto
|
253
257
|
right: auto
|
254
258
|
+rwdmax($basic_rwd)
|
255
|
-
margin:
|
259
|
+
margin: $pagination-TB-gap_rwd 0 0
|
256
260
|
|
257
261
|
%swiper_pagination_bullet
|
258
262
|
margin: 0 10px
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Article4 } from '@xwadex/fesd';
|
2
|
-
import { common,
|
2
|
+
import { common, methods } from "@/commons";
|
3
3
|
|
4
4
|
$(async () => {
|
5
5
|
// common Init
|
@@ -7,5 +7,5 @@ $(async () => {
|
|
7
7
|
// pluginInit
|
8
8
|
new Article4('._articleBlock')
|
9
9
|
// coding...
|
10
|
-
noContentCheck();
|
10
|
+
methods.noContentCheck();
|
11
11
|
})
|
@@ -16,7 +16,6 @@ import {
|
|
16
16
|
} from '@xwadex/fesd/tools';
|
17
17
|
import {
|
18
18
|
common,
|
19
|
-
collapseEvent,
|
20
19
|
methods
|
21
20
|
} from "@/commons"
|
22
21
|
// flatpickr
|
@@ -28,17 +27,20 @@ import { bannerConfig } from "@/configs"
|
|
28
27
|
// swiper
|
29
28
|
const { SwiperV11 } = SwiperVer11
|
30
29
|
const swiperHandler = {};
|
30
|
+
|
31
31
|
swiperHandler.banner = function () {
|
32
32
|
const bannerEvents = {
|
33
|
+
...bannerConfig,
|
33
34
|
init() {
|
34
35
|
console.log('swiper init!!');
|
35
36
|
},
|
36
|
-
slideChangeTransitionStart() {
|
37
|
-
isVideo(
|
37
|
+
slideChangeTransitionStart(swiper) {
|
38
|
+
isVideo(swiper);
|
38
39
|
},
|
39
40
|
};
|
40
|
-
const banner = new SwiperV11('.swiper',
|
41
|
+
const banner = new SwiperV11('.swiper', bannerEvents );
|
41
42
|
};
|
43
|
+
|
42
44
|
swiperHandler.all = function () {
|
43
45
|
this.banner();
|
44
46
|
};
|
@@ -123,7 +125,7 @@ const s4Handler = function () {
|
|
123
125
|
|
124
126
|
const s6Handler = function () {
|
125
127
|
// 簡易版
|
126
|
-
collapseEvent('[data-collapse-click]', '[data-collapse]', true, true)
|
128
|
+
methods.collapseEvent('[data-collapse-click]', '[data-collapse]', true, true)
|
127
129
|
// 公版
|
128
130
|
collapse: new Collapse4('[partnerCollapse-wrapper]', {
|
129
131
|
defaultOpen: false,
|
@@ -151,7 +153,6 @@ const s8Handler = function () {
|
|
151
153
|
});
|
152
154
|
wddForm.addEventListener('submit', function () {
|
153
155
|
console.log('submit', wddForm.value);
|
154
|
-
|
155
156
|
});
|
156
157
|
};
|
157
158
|
// -- 方法 給後端
|
@@ -11,6 +11,7 @@ import {
|
|
11
11
|
scrollUnlock
|
12
12
|
} from '@xwadex/fesd/tools';
|
13
13
|
import { toBackend } from "@/commons/methods";
|
14
|
+
import { cookiePolicy } from "@/commons/pages";
|
14
15
|
import { lazyLoadImg } from '@/plugins';
|
15
16
|
import { navbar } from '@/ui';
|
16
17
|
|
@@ -50,6 +51,7 @@ export const inits = () => {
|
|
50
51
|
new ImageValidate();
|
51
52
|
// uiInit
|
52
53
|
navbar.init();
|
54
|
+
cookiePolicy();
|
53
55
|
// coding...
|
54
56
|
firstEntryHandler.init();
|
55
57
|
}
|
@@ -1,11 +1,42 @@
|
|
1
1
|
export const toBackend = (contents) => {
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
if (!contents) return
|
3
|
+
if (!document || !document?.body) return
|
4
|
+
if (!document.body?.fesd) document.body.fesd = {}
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
for (const [key, value] of Object.entries(contents)) {
|
7
|
+
document.body.fesd[key] = value
|
8
|
+
}
|
9
9
|
|
10
|
-
|
10
|
+
return document.body.fesd
|
11
|
+
}
|
12
|
+
|
13
|
+
// collapse
|
14
|
+
export function collapseEvent(clickTarget, parentBox, anchor = false, single = false) {
|
15
|
+
if (!clickTarget || !parentBox) return;
|
16
|
+
|
17
|
+
const $clickTarget = $(clickTarget);
|
18
|
+
const $parentBoxes = $(parentBox);
|
19
|
+
if (!$clickTarget.length || !$parentBoxes.length) return;
|
20
|
+
|
21
|
+
$clickTarget.on('click', function () {
|
22
|
+
const $parent = $(this).closest(parentBox);
|
23
|
+
if (!$parent.length) return;
|
24
|
+
if ($parent.hasClass('open')) return $parent.removeClass('open');
|
25
|
+
|
26
|
+
$parent.addClass('open');
|
27
|
+
if (single) $parentBoxes.not($parent).removeClass('open');
|
28
|
+
if (anchor) setTimeout(() => Anchor4.run({ target: $parent[0] }), 500);
|
29
|
+
});
|
30
|
+
}
|
31
|
+
|
32
|
+
export function noContentCheck() {
|
33
|
+
const params = new URLSearchParams(document.location.search);
|
34
|
+
const val = params.get('debug');
|
35
|
+
const contentBox = $('[data-content]')
|
36
|
+
const noContentBox = $('[data-noContent]')
|
37
|
+
if (!val || !contentBox || !noContentBox) return
|
38
|
+
if (val.toLowerCase() === 'nocontent') {
|
39
|
+
contentBox.hide();
|
40
|
+
noContentBox.show();
|
41
|
+
}
|
11
42
|
}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
export const cookiePolicy = () => {
|
2
|
+
const $cookiePolicy = $(".cookie-check");
|
3
|
+
if (!$cookiePolicy.length) return;
|
4
|
+
|
5
|
+
const $agreeBtn = $cookiePolicy.find(".agree");
|
6
|
+
const $closeBtn = $cookiePolicy.find(".close");
|
7
|
+
|
8
|
+
const firstEnterDetect = () => {
|
9
|
+
// 請記得更改 cookie 存入的值
|
10
|
+
const agreeLocal = localStorage.getItem("frameworkCookie-agree");
|
11
|
+
const agreeSession = sessionStorage.getItem("frameworkCookie-agree");
|
12
|
+
|
13
|
+
if (agreeLocal !== "true" && agreeSession !== "false") {
|
14
|
+
$cookiePolicy.addClass("first-enter");
|
15
|
+
setTimeout(() => {
|
16
|
+
$cookiePolicy.addClass("show");
|
17
|
+
}, 800);
|
18
|
+
}
|
19
|
+
};
|
20
|
+
|
21
|
+
// 點擊事件
|
22
|
+
const clickEvent = () => {
|
23
|
+
$agreeBtn.on("click", () => {
|
24
|
+
$cookiePolicy.addClass("agree");
|
25
|
+
localStorage.setItem("frameworkCookie-agree", "true");
|
26
|
+
});
|
27
|
+
|
28
|
+
$closeBtn.on("click", () => {
|
29
|
+
$cookiePolicy.addClass("hidden");
|
30
|
+
sessionStorage.setItem("frameworkCookie-agree", "false");
|
31
|
+
});
|
32
|
+
};
|
33
|
+
|
34
|
+
// 執行事件
|
35
|
+
firstEnterDetect();
|
36
|
+
clickEvent();
|
37
|
+
};
|
@@ -1,32 +0,0 @@
|
|
1
|
-
import { Anchor4 } from '@xwadex/fesd';
|
2
|
-
|
3
|
-
// collapse
|
4
|
-
export function collapseEvent(clickTarget, parentBox, anchor = false, single = false) {
|
5
|
-
if (!clickTarget || !parentBox) return;
|
6
|
-
|
7
|
-
const $clickTarget = $(clickTarget);
|
8
|
-
const $parentBoxes = $(parentBox);
|
9
|
-
if (!$clickTarget.length || !$parentBoxes.length) return;
|
10
|
-
|
11
|
-
$clickTarget.on('click', function () {
|
12
|
-
const $parent = $(this).closest(parentBox);
|
13
|
-
if (!$parent.length) return;
|
14
|
-
if ($parent.hasClass('open')) return $parent.removeClass('open');
|
15
|
-
|
16
|
-
$parent.addClass('open');
|
17
|
-
if (single) $parentBoxes.not($parent).removeClass('open');
|
18
|
-
if (anchor) setTimeout(() => Anchor4.run({ target: $parent[0] }), 500);
|
19
|
-
});
|
20
|
-
}
|
21
|
-
|
22
|
-
export function noContentCheck() {
|
23
|
-
const params = new URLSearchParams(document.location.search);
|
24
|
-
const val = params.get('debug');
|
25
|
-
const contentBox = $('[data-content]')
|
26
|
-
const noContentBox = $('[data-noContent]')
|
27
|
-
if (!val || !contentBox || !noContentBox) return
|
28
|
-
if (val.toLowerCase() === 'nocontent') {
|
29
|
-
contentBox.hide();
|
30
|
-
noContentBox.show();
|
31
|
-
}
|
32
|
-
}
|
@@ -40,6 +40,10 @@ html(lang="zh-Hant-TW" data-overlayscrollbars-initialize)
|
|
40
40
|
// 頁腳
|
41
41
|
block footer
|
42
42
|
include ./_footer.pug
|
43
|
+
|
44
|
+
// cookie
|
45
|
+
block cookie
|
46
|
+
include ./components/_cookiePolicy.pug
|
43
47
|
|
44
48
|
modern-modal(data-modal-id="my-modal" data-modal-animate="clip-right")
|
45
49
|
.close-btn(data-modal-close)
|
@@ -0,0 +1,9 @@
|
|
1
|
+
.cookie-check
|
2
|
+
.cookie-main
|
3
|
+
.cookie-container
|
4
|
+
.title-block
|
5
|
+
p.title Cookie
|
6
|
+
p.text Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
7
|
+
.button-group
|
8
|
+
.cookie-btn.agree Agree
|
9
|
+
.cookie-btn.close Disagree
|