create-fesd-app 1.0.0-bate.93 → 1.0.0-bate.95
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 +8 -8
- package/src/assets/css/layouts/_cookiePolicy.sass +75 -0
- package/src/assets/css/layouts/article4/_article4_2.0.sass +36 -10
- package/src/assets/css/layouts/article4/_article4_setting.sass +6 -2
- package/src/assets/css/style.sass +2 -0
- package/src/assets/js/apps/error/404/page.js +0 -1
- package/src/assets/js/apps/index/page.js +2 -2
- package/src/assets/js/commons/index.js +1 -1
- package/src/assets/js/commons/inits.js +24 -20
- package/src/assets/js/commons/pages/index.js +2 -0
- package/src/assets/js/commons/pages/page.cookiePolicy.js +51 -0
- 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,7 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "create-fesd-app",
|
3
|
-
"version": "1.0.0-bate.
|
3
|
+
"version": "1.0.0-bate.95",
|
4
4
|
"type": "module",
|
5
|
+
"scripts": {
|
6
|
+
"dev": "vite",
|
7
|
+
"build": "vite build",
|
8
|
+
"preview": "vite preview"
|
9
|
+
},
|
5
10
|
"bin": {
|
6
11
|
"create-fesd-app": "bin/create-fesd-app.mjs"
|
7
12
|
},
|
@@ -17,7 +22,7 @@
|
|
17
22
|
".gitignore"
|
18
23
|
],
|
19
24
|
"dependencies": {
|
20
|
-
"@xwadex/fesd": "0.0.
|
25
|
+
"@xwadex/fesd": "0.0.15",
|
21
26
|
"ansi-colors": "^4.1.3",
|
22
27
|
"chalk": "^5.3.0",
|
23
28
|
"colorthief": "^2.4.0",
|
@@ -44,10 +49,5 @@
|
|
44
49
|
"vite": "^5.4.8",
|
45
50
|
"vite-plugin-compression": "^0.5.1",
|
46
51
|
"vite-plugin-imagemin": "^0.6.1"
|
47
|
-
},
|
48
|
-
"scripts": {
|
49
|
-
"dev": "vite",
|
50
|
-
"build": "vite build",
|
51
|
-
"preview": "vite preview"
|
52
52
|
}
|
53
|
-
}
|
53
|
+
}
|
@@ -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
|
///////////// [ 個別類型設定 ] /////////////
|
@@ -214,10 +228,12 @@
|
|
214
228
|
&[mobile-rwd="on"]
|
215
229
|
._imgCover
|
216
230
|
order: 1
|
231
|
+
margin-bottom: 0
|
217
232
|
|
218
233
|
&.typeD
|
219
234
|
._imgCover
|
220
|
-
margin-bottom: #{-$cover-TB-gap + $img-cover-TB-gap}
|
235
|
+
// margin-bottom: #{-$cover-TB-gap + $img-cover-TB-gap}
|
236
|
+
margin-bottom: #{$img-cover-TB-gap - (-$cover-TB-gap + $img-cover-TB-gap)}
|
221
237
|
._wordCover
|
222
238
|
margin: 0
|
223
239
|
+rwdmax($basic_rwd)
|
@@ -237,6 +253,9 @@
|
|
237
253
|
width: 100%
|
238
254
|
._wordCover
|
239
255
|
margin-top: 0
|
256
|
+
&[mobile-rwd="on"]
|
257
|
+
._H
|
258
|
+
margin-top: 0
|
240
259
|
&.typeDL
|
241
260
|
._H
|
242
261
|
order: 1
|
@@ -468,11 +487,11 @@
|
|
468
487
|
&[img-row="x4"],
|
469
488
|
&[img-row="x5"]
|
470
489
|
._imgCover
|
471
|
-
margin: 0 #{-$cover-LR-gap_rwd * 0.5}
|
490
|
+
margin: 0 #{-$cover-LR-gap_rwd * 0.5} #{$img-cover-TB-gap_rwd + $cover-TB-gap_rwd - $img-cover-TB-gap_rwd}
|
472
491
|
width: calc(100% + #{$cover-LR-gap_rwd})
|
473
492
|
&[img-merge="on"]
|
474
493
|
._imgCover
|
475
|
-
margin: 0
|
494
|
+
margin: 0 0 #{-$cover-TB-gap_rwd + $img-cover-TB-gap_rwd} 0
|
476
495
|
width: 100%
|
477
496
|
&[mobile-rwd="on"]
|
478
497
|
._imgCover
|
@@ -568,6 +587,8 @@
|
|
568
587
|
&[img-swiper="on"]
|
569
588
|
._imgCover
|
570
589
|
position: relative
|
590
|
+
._cover
|
591
|
+
margin-bottom: 0
|
571
592
|
.swiper-button-cover
|
572
593
|
&:before
|
573
594
|
display: block
|
@@ -590,9 +611,10 @@
|
|
590
611
|
|
591
612
|
// img-row
|
592
613
|
@for $i from 2 through 5
|
593
|
-
&[img-row="x#{$i}"]
|
614
|
+
&[img-row="x#{$i}"],
|
615
|
+
&[swiper-num="#{$i}"]
|
594
616
|
._imgCover
|
595
|
-
margin: 0 #{-$cover-LR-gap * 0.5} #{-$cover-TB-gap + $img-cover-TB-gap} #{-$cover-LR-gap * 0.5}
|
617
|
+
// margin: 0 #{-$cover-LR-gap * 0.5} #{-$cover-TB-gap + $img-cover-TB-gap} #{-$cover-LR-gap * 0.5}
|
596
618
|
width: calc(100% + #{$cover-LR-gap})
|
597
619
|
._cover
|
598
620
|
margin-bottom: $cover-TB-gap
|
@@ -600,7 +622,7 @@
|
|
600
622
|
width: calc(100% / #{$i})
|
601
623
|
+rwdmax($basic_rwd)
|
602
624
|
._imgCover
|
603
|
-
margin: 0 #{-$cover-LR-gap_rwd * 0.5} #{-$cover-TB-gap_rwd + $img-cover-TB-gap_rwd}
|
625
|
+
// margin: 0 #{-$cover-LR-gap_rwd * 0.5} #{-$cover-TB-gap_rwd + $img-cover-TB-gap_rwd}
|
604
626
|
width: calc(100% + #{$cover-LR-gap_rwd})
|
605
627
|
._cover
|
606
628
|
margin-bottom: $cover-TB-gap_rwd
|
@@ -610,13 +632,17 @@
|
|
610
632
|
// img-merge
|
611
633
|
&[img-merge="on"]
|
612
634
|
._imgCover
|
613
|
-
margin: 0 0 $cover-TB-gap
|
614
635
|
width: 100%
|
636
|
+
margin-bottom: 0
|
615
637
|
._cover
|
616
638
|
padding: 0
|
617
|
-
|
618
|
-
|
619
|
-
|
639
|
+
&:not([swiper-num])
|
640
|
+
._imgCover
|
641
|
+
// margin: 0 0 $cover-TB-gap
|
642
|
+
._cover
|
643
|
+
margin-bottom: 0
|
644
|
+
._description
|
645
|
+
display: none
|
620
646
|
|
621
647
|
// article-flex
|
622
648
|
&[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
|
@@ -33,8 +33,8 @@ swiperHandler.banner = function () {
|
|
33
33
|
init() {
|
34
34
|
console.log('swiper init!!');
|
35
35
|
},
|
36
|
-
slideChangeTransitionStart() {
|
37
|
-
isVideo(
|
36
|
+
slideChangeTransitionStart(swiper) {
|
37
|
+
isVideo(swiper);
|
38
38
|
},
|
39
39
|
};
|
40
40
|
const banner = new SwiperV11('.swiper', { ...bannerConfig, on: bannerEvents });
|
@@ -11,29 +11,32 @@ import {
|
|
11
11
|
scrollUnlock
|
12
12
|
} from '@xwadex/fesd/tools';
|
13
13
|
import { toBackend } from "@/commons/methods";
|
14
|
+
import { cookiePolicyInit } from "@/commons/pages";
|
14
15
|
import { lazyLoadImg } from '@/plugins';
|
15
16
|
import { navbar } from '@/ui';
|
16
17
|
|
18
|
+
const firstEntryHandler = {}
|
19
|
+
|
17
20
|
// 進場
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
}
|
21
|
+
firstEntryHandler.saveState = () => {
|
22
|
+
// 進場動畫...
|
23
|
+
localStorage.setItem('firstEntry', true);
|
24
|
+
}
|
25
|
+
|
26
|
+
firstEntryHandler.active = () => {
|
27
|
+
$('.main-wrapper').addClass('show');
|
28
|
+
setTimeout(() => {
|
29
|
+
new Aost4('[data-aost]', {
|
30
|
+
start: 95,
|
31
|
+
});
|
32
|
+
}, 100);
|
33
|
+
}
|
34
|
+
|
35
|
+
firstEntryHandler.init = () => {
|
36
|
+
const firstEntry = localStorage.getItem('firstEntry');
|
37
|
+
if (!firstEntry) firstEntryHandler.saveState()
|
38
|
+
firstEntryHandler.active()
|
39
|
+
}
|
37
40
|
|
38
41
|
toBackend({ scrollLock, scrollUnlock });
|
39
42
|
|
@@ -48,8 +51,9 @@ export const inits = () => {
|
|
48
51
|
new ImageValidate();
|
49
52
|
// uiInit
|
50
53
|
navbar.init();
|
54
|
+
cookiePolicyInit();
|
51
55
|
// coding...
|
52
|
-
|
56
|
+
firstEntryHandler.init();
|
53
57
|
}
|
54
58
|
|
55
59
|
//Don't Move and Delete!!!
|
@@ -0,0 +1,51 @@
|
|
1
|
+
const cookiePolicy = {};
|
2
|
+
|
3
|
+
// 首次進入執行
|
4
|
+
cookiePolicy.firstEnterDetect = () => {
|
5
|
+
const { $cookiePolicy } = cookiePolicy;
|
6
|
+
|
7
|
+
// 請記得更改 cookie 存入的值
|
8
|
+
const agreeLocal = localStorage.getItem("frameworkCookie-agree");
|
9
|
+
const agreeSession = sessionStorage.getItem("frameworkCookie-agree");
|
10
|
+
|
11
|
+
if (agreeLocal !== "true" && agreeSession !== "false") {
|
12
|
+
$cookiePolicy.addClass("first-enter");
|
13
|
+
setTimeout(() => {
|
14
|
+
$cookiePolicy.addClass("show");
|
15
|
+
}, 800);
|
16
|
+
}
|
17
|
+
};
|
18
|
+
|
19
|
+
// 點擊事件
|
20
|
+
cookiePolicy.clickEvent = () => {
|
21
|
+
const { $cookiePolicy, $agreeBtn, $closeBtn } = cookiePolicy;
|
22
|
+
|
23
|
+
$agreeBtn.on("click", () => {
|
24
|
+
$cookiePolicy.addClass("agree");
|
25
|
+
localStorage.setItem("frameworkCookie-agree", "true");
|
26
|
+
sessionStorage.setItem("frameworkCookie-agree", "true");
|
27
|
+
});
|
28
|
+
|
29
|
+
$closeBtn.on("click", () => {
|
30
|
+
$cookiePolicy.addClass("hidden");
|
31
|
+
sessionStorage.setItem("frameworkCookie-agree", "false");
|
32
|
+
});
|
33
|
+
};
|
34
|
+
|
35
|
+
cookiePolicy.init = () => {
|
36
|
+
const $cookiePolicy = $(".cookie-check");
|
37
|
+
|
38
|
+
if (!$cookiePolicy.length) return;
|
39
|
+
|
40
|
+
cookiePolicy.$cookiePolicy = $cookiePolicy;
|
41
|
+
cookiePolicy.$agreeBtn = $cookiePolicy.find(".agree");
|
42
|
+
cookiePolicy.$closeBtn = $cookiePolicy.find(".close");
|
43
|
+
|
44
|
+
// 執行事件
|
45
|
+
cookiePolicy.firstEnterDetect();
|
46
|
+
cookiePolicy.clickEvent();
|
47
|
+
};
|
48
|
+
|
49
|
+
export const cookiePolicyInit = () => {
|
50
|
+
cookiePolicy.init();
|
51
|
+
};
|
@@ -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
|