create-fesd-app 1.0.0-bate.95 → 1.0.0-bate.99
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 +1 -1
- package/src/assets/css/layouts/article4/_article4_2.0.sass +21 -4
- package/src/assets/js/apps/about/page.js +2 -2
- package/src/assets/js/apps/index/page.js +5 -4
- package/src/assets/js/commons/inits.js +2 -2
- package/src/assets/js/commons/methods.js +38 -7
- package/src/assets/js/commons/pages/page.cookiePolicy.js +32 -46
- package/src/assets/js/commons/utils.js +0 -32
- package/src/pages/ajax/ajax_igDemo.pug +1 -1
package/package.json
CHANGED
@@ -161,6 +161,8 @@
|
|
161
161
|
._wordCover
|
162
162
|
margin: 0
|
163
163
|
margin-bottom: $img-cover-TB-gap
|
164
|
+
._cover
|
165
|
+
margin-bottom: 0
|
164
166
|
&[img-row="x2"],
|
165
167
|
&[img-row="x3"],
|
166
168
|
&[img-row="x4"],
|
@@ -170,14 +172,24 @@
|
|
170
172
|
+rwdmax($basic_rwd)
|
171
173
|
._wordCover
|
172
174
|
margin-bottom: $img-cover-TB-gap_rwd
|
175
|
+
._imgCover
|
176
|
+
margin-bottom: 0
|
173
177
|
&[mobile-rwd="on"]
|
174
178
|
._H
|
175
|
-
|
179
|
+
// 2025.04.21 新增 important
|
180
|
+
margin-top: $img-cover-TB-gap_rwd !important
|
176
181
|
._imgCover
|
177
|
-
margin-top: 0
|
182
|
+
margin-top: 0 !important
|
178
183
|
order: -1
|
179
184
|
._wordCover
|
180
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}
|
181
193
|
|
182
194
|
&.typeUL,
|
183
195
|
&.typeUR
|
@@ -232,8 +244,7 @@
|
|
232
244
|
|
233
245
|
&.typeD
|
234
246
|
._imgCover
|
235
|
-
|
236
|
-
margin-bottom: #{$img-cover-TB-gap - (-$cover-TB-gap + $img-cover-TB-gap)}
|
247
|
+
margin-bottom: #{-$cover-TB-gap + $img-cover-TB-gap}
|
237
248
|
._wordCover
|
238
249
|
margin: 0
|
239
250
|
+rwdmax($basic_rwd)
|
@@ -585,10 +596,16 @@
|
|
585
596
|
|
586
597
|
// swiper
|
587
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)}
|
588
603
|
._imgCover
|
589
604
|
position: relative
|
605
|
+
margin: 0 #{-$swiper-cover-LR-gap * 0.5}
|
590
606
|
._cover
|
591
607
|
margin-bottom: 0
|
608
|
+
padding: 0 #{$swiper-cover-LR-gap * 0.5}
|
592
609
|
.swiper-button-cover
|
593
610
|
&:before
|
594
611
|
display: block
|
@@ -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,8 +27,10 @@ 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
|
},
|
@@ -37,8 +38,9 @@ swiperHandler.banner = function () {
|
|
37
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,7 +11,7 @@ import {
|
|
11
11
|
scrollUnlock
|
12
12
|
} from '@xwadex/fesd/tools';
|
13
13
|
import { toBackend } from "@/commons/methods";
|
14
|
-
import {
|
14
|
+
import { cookiePolicy } from "@/commons/pages";
|
15
15
|
import { lazyLoadImg } from '@/plugins';
|
16
16
|
import { navbar } from '@/ui';
|
17
17
|
|
@@ -51,7 +51,7 @@ export const inits = () => {
|
|
51
51
|
new ImageValidate();
|
52
52
|
// uiInit
|
53
53
|
navbar.init();
|
54
|
-
|
54
|
+
cookiePolicy();
|
55
55
|
// coding...
|
56
56
|
firstEntryHandler.init();
|
57
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
|
}
|
@@ -1,51 +1,37 @@
|
|
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 = () => {
|
1
|
+
export const cookiePolicy = () => {
|
36
2
|
const $cookiePolicy = $(".cookie-check");
|
37
|
-
|
38
3
|
if (!$cookiePolicy.length) return;
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
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
|
+
};
|
43
33
|
|
44
34
|
// 執行事件
|
45
|
-
|
46
|
-
|
47
|
-
};
|
48
|
-
|
49
|
-
export const cookiePolicyInit = () => {
|
50
|
-
cookiePolicy.init();
|
35
|
+
firstEnterDetect();
|
36
|
+
clickEvent();
|
51
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
|
-
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
modern-modal(data-modal-id="video-ig-template" video-template data-modal-template-setting="destroy")
|
2
2
|
.close-button(data-modal-destroy="data-modal-destroy")
|
3
3
|
//- 純展示使用, 後端那邊會有自己的 ajax 燈箱結構
|
4
|
+
//- 以下可自行修改, 放 ig 嵌入碼
|
4
5
|
<blockquote class="instagram-media" data-instgrm-captioned data-instgrm-permalink="https://www.instagram.com/p/C1O1Sh-vAIW/?img_index=1"></blockquote><script async src="//https://www.instagram.com/embed.js"></script>
|
5
|
-
<script async src="//www.instagram.com/embed.js"></script>
|