jeawin-astro 3.0.72 → 3.0.74
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/components/banner_swiper.astro +19 -9
- package/src/components/cards/news_grid_card1.astro +4 -3
- package/src/components/cards/news_grid_card2.astro +6 -4
- package/src/components/cards/news_grid_card3.astro +6 -5
- package/src/components/cards/news_grid_card4.astro +6 -4
- package/src/components/cards/news_grid_card5.astro +5 -3
- package/src/components/cards/news_list_card.astro +3 -2
- package/src/components/cards/news_list_card1.astro +5 -3
- package/src/components/detail_images.astro +15 -6
- package/src/components/logo.astro +2 -2
- package/src/components/news_card.astro +3 -1
- package/src/components/swiper.astro +6 -0
package/package.json
CHANGED
|
@@ -96,9 +96,10 @@ const banners = await jeawinapi.get_nodes({ channel_id: 5 });
|
|
|
96
96
|
banner.node_picurl_html,
|
|
97
97
|
{
|
|
98
98
|
width: "100%",
|
|
99
|
-
|
|
99
|
+
loading: "lazy",
|
|
100
|
+
fetchpriority: "low",
|
|
100
101
|
},
|
|
101
|
-
["class"]
|
|
102
|
+
["class", "loading"]
|
|
102
103
|
)}
|
|
103
104
|
/>
|
|
104
105
|
) : (
|
|
@@ -107,8 +108,8 @@ const banners = await jeawinapi.get_nodes({ channel_id: 5 });
|
|
|
107
108
|
banner.node_picurl_html,
|
|
108
109
|
{
|
|
109
110
|
width: "100%",
|
|
110
|
-
class:
|
|
111
|
-
loading: "
|
|
111
|
+
class: '',
|
|
112
|
+
loading: "eager",
|
|
112
113
|
fetchpriority: "high",
|
|
113
114
|
},
|
|
114
115
|
["class"]
|
|
@@ -124,9 +125,10 @@ const banners = await jeawinapi.get_nodes({ channel_id: 5 });
|
|
|
124
125
|
banner.node_picurl_html,
|
|
125
126
|
{
|
|
126
127
|
width: "100%",
|
|
127
|
-
|
|
128
|
+
loading: "lazy",
|
|
129
|
+
fetchpriority: "low",
|
|
128
130
|
},
|
|
129
|
-
["class"]
|
|
131
|
+
["class", "loading"]
|
|
130
132
|
)}
|
|
131
133
|
/>
|
|
132
134
|
) : (
|
|
@@ -136,7 +138,7 @@ const banners = await jeawinapi.get_nodes({ channel_id: 5 });
|
|
|
136
138
|
{
|
|
137
139
|
width: "100%",
|
|
138
140
|
class: "",
|
|
139
|
-
loading: "
|
|
141
|
+
loading: "eager",
|
|
140
142
|
fetchpriority: "high",
|
|
141
143
|
},
|
|
142
144
|
["class"]
|
|
@@ -165,10 +167,18 @@ const banners = await jeawinapi.get_nodes({ channel_id: 5 });
|
|
|
165
167
|
constructor() {
|
|
166
168
|
super();
|
|
167
169
|
|
|
168
|
-
initSwiper(".banner_swiper"
|
|
170
|
+
initSwiper(".banner_swiper", {
|
|
171
|
+
pagination: {
|
|
172
|
+
clickable: true
|
|
173
|
+
}
|
|
174
|
+
});
|
|
169
175
|
|
|
170
176
|
document.addEventListener("astro:after-swap", function () {
|
|
171
|
-
initSwiper(".banner_swiper"
|
|
177
|
+
initSwiper(".banner_swiper", {
|
|
178
|
+
pagination: {
|
|
179
|
+
clickable: true
|
|
180
|
+
}
|
|
181
|
+
});
|
|
172
182
|
});
|
|
173
183
|
}
|
|
174
184
|
}
|
|
@@ -68,18 +68,19 @@ const final_content = truncate(content, {
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
<div class="p-6">
|
|
71
|
-
<div
|
|
71
|
+
{category_name ? (<div
|
|
72
72
|
class="tracking-widest text-sm title-font font-medium text-gray-600 mb-1"
|
|
73
73
|
>
|
|
74
74
|
{category_name}
|
|
75
|
-
</div>
|
|
75
|
+
</div>) : null}
|
|
76
|
+
|
|
76
77
|
<TitleTag class:list={["title-font text-2xl font-medium text-gray-900 mb-3", title_class]}>
|
|
77
78
|
<a href={render_url(node_url, base, null, url_suffix)} title={title}>{title}</a>
|
|
78
79
|
</TitleTag>
|
|
79
80
|
|
|
80
81
|
{
|
|
81
82
|
final_content ? (
|
|
82
|
-
<div class="mb-3">
|
|
83
|
+
<div class="mb-3 line-clamp-3">
|
|
83
84
|
<Fragment set:html={final_content} />
|
|
84
85
|
</div>
|
|
85
86
|
) : null
|
|
@@ -39,11 +39,12 @@ const final_content = truncate(content, {
|
|
|
39
39
|
<div
|
|
40
40
|
class="h-full bg-gray-100/75 px-8 pt-16 pb-24 p-2 md:py-8 md:px-4 bg-white rounded-lg shadow-lg transition-transform duration-300 hover:-translate-y-[5px] overflow-hidden text-center relative"
|
|
41
41
|
>
|
|
42
|
-
<div
|
|
42
|
+
{category_name ? ( <div
|
|
43
43
|
class="tracking-widest text-base title-font font-medium text-gray-600 mb-1"
|
|
44
44
|
>
|
|
45
45
|
{category_name}
|
|
46
|
-
</div>
|
|
46
|
+
</div>) : null}
|
|
47
|
+
|
|
47
48
|
<TitleTag
|
|
48
49
|
class:list={["title-font text-2xl font-medium text-gray-900 mb-3", title_class]}
|
|
49
50
|
>
|
|
@@ -52,9 +53,10 @@ const final_content = truncate(content, {
|
|
|
52
53
|
<p class="mb-3 text-base text-gray-600">
|
|
53
54
|
{render_date(siteinfo.language_id, publish_time)}
|
|
54
55
|
</p>
|
|
55
|
-
<p class="leading-relaxed mb-3">
|
|
56
|
+
{final_content ? ( <p class="leading-relaxed mb-3 line-clamp-3">
|
|
56
57
|
<Fragment set:html={final_content} />
|
|
57
|
-
</p>
|
|
58
|
+
</p>) : null}
|
|
59
|
+
|
|
58
60
|
<div
|
|
59
61
|
class="text-center mt-2 leading-none flex justify-center absolute bottom-0 left-0 w-full py-4"
|
|
60
62
|
>
|
|
@@ -40,19 +40,20 @@ const final_content = truncate(content, {
|
|
|
40
40
|
<div
|
|
41
41
|
class="p-2 md:py-8 md:px-4 bg-white rounded-lg shadow-lg transition-transform duration-300 hover:-translate-y-[5px] flex flex-col items-start"
|
|
42
42
|
>
|
|
43
|
-
|
|
43
|
+
{category_name ? (<span
|
|
44
44
|
class="inline-block py-1 px-2 rounded-sm text-base font-medium tracking-widest"
|
|
45
45
|
>{category_name}</span
|
|
46
|
-
>
|
|
46
|
+
>) : null}
|
|
47
|
+
|
|
47
48
|
<TitleTag
|
|
48
49
|
class:list={["sm:text-3xl text-2xl title-font font-medium text-gray-900 mt-4 mb-4", title_class]}
|
|
49
50
|
>
|
|
50
51
|
<a href={render_url(node_url, base, null, url_suffix)} title={title}>{title}</a>
|
|
51
52
|
</TitleTag>
|
|
52
|
-
|
|
53
|
-
<p class="leading-relaxed mb-8">
|
|
53
|
+
{final_content ? ( <p class="leading-relaxed mb-8 line-clamp-3">
|
|
54
54
|
<Fragment set:html={final_content} />
|
|
55
|
-
</p>
|
|
55
|
+
</p>) : null}
|
|
56
|
+
|
|
56
57
|
<div
|
|
57
58
|
class="flex items-center flex-wrap pb-4 mb-4 border-b-2 border-gray-100 mt-auto w-full"
|
|
58
59
|
>
|
|
@@ -53,14 +53,16 @@ const date = render_date(siteinfo.language_id, publish_time, "DD");
|
|
|
53
53
|
>
|
|
54
54
|
</div>
|
|
55
55
|
<div class="flex-grow pl-6">
|
|
56
|
-
<div class="tracking-widest text-sm title-font font-medium mb-1">
|
|
56
|
+
{category_name ? (<div class="tracking-widest text-sm title-font font-medium mb-1">
|
|
57
57
|
{category_name}
|
|
58
|
-
</div>
|
|
58
|
+
</div>) : null}
|
|
59
|
+
|
|
59
60
|
<TitleTag class:list={["title-font text-2xl font-medium text-gray-900 mb-3", title_class]}>
|
|
60
61
|
<a href={render_url(node_url, base, null, url_suffix)} title={title}>{title}</a>
|
|
61
62
|
</TitleTag>
|
|
62
|
-
<p class="leading-relaxed mb-5">
|
|
63
|
+
{final_content ? (<p class="leading-relaxed mb-5 line-clamp-3">
|
|
63
64
|
<Fragment set:html={final_content} />
|
|
64
|
-
</p>
|
|
65
|
+
</p>) : null}
|
|
66
|
+
|
|
65
67
|
</div>
|
|
66
68
|
</div>
|
|
@@ -76,15 +76,17 @@ const final_content = truncate(content, {
|
|
|
76
76
|
}
|
|
77
77
|
</div>
|
|
78
78
|
<div class="card-content">
|
|
79
|
-
<div class="card-tags">
|
|
79
|
+
{category_name ? (<div class="card-tags">
|
|
80
80
|
<a class="tag" href={render_url(category_url, base, null, url_suffix)} title={category_name}
|
|
81
81
|
>{category_name}</a
|
|
82
82
|
>
|
|
83
|
-
</div>
|
|
83
|
+
</div>) : null}
|
|
84
|
+
|
|
84
85
|
<TitleTag class:list={["h4 card-title", title_class]}>
|
|
85
86
|
<a href={render_url(node_url, base, null, url_suffix)} title={title}>{title}</a>
|
|
86
87
|
</TitleTag>
|
|
87
|
-
<
|
|
88
|
+
{final_content ? (<div class=" line-clamp-3">{final_content}</div>) : null}
|
|
89
|
+
|
|
88
90
|
<div class="card-footer mt-6 flex space-x-4">
|
|
89
91
|
<span class="inline-flex gap-2 items-center text-sm text-[#666]"
|
|
90
92
|
><Icon name="fa6-solid:clock" />{
|
|
@@ -52,9 +52,10 @@ const final_content = truncate(content, {
|
|
|
52
52
|
<TitleTag class:list={["text-2xl mb-3", title_class]}>
|
|
53
53
|
<a href={render_url(node_url, base, null, url_suffix)} title={title}>{title}</a>
|
|
54
54
|
</TitleTag>
|
|
55
|
-
<div class="mb-3 text-sm text-[#666] leading-relaxed">
|
|
55
|
+
{final_content ? (<div class="mb-3 text-sm text-[#666] leading-relaxed line-clamp-3">
|
|
56
56
|
<Fragment set:html={final_content} />
|
|
57
|
-
</div>
|
|
57
|
+
</div>) : null}
|
|
58
|
+
|
|
58
59
|
<div class="flex items-center gap-3 text-[#6c757d] fill-[#6c757d] text-sm">
|
|
59
60
|
<div class="flex items-center gap-1">
|
|
60
61
|
<Icon name="fa6-solid:clock" class="size-4" />{
|
|
@@ -41,7 +41,8 @@ const final_content = truncate(content, {
|
|
|
41
41
|
class="py-8 flex flex-wrap md:flex-nowrap p-2 md:py-8 md:px-4 bg-white rounded-lg shadow-lg transition-transform duration-300 hover:-translate-y-[5px]"
|
|
42
42
|
>
|
|
43
43
|
<div class="md:w-64 md:mb-0 mb-6 shrink-0 flex flex-col">
|
|
44
|
-
<span class="font-semibold title-font text-gray-700">{category_name}</span>
|
|
44
|
+
{category_name ? (<span class="font-semibold title-font text-gray-700">{category_name}</span>) : null}
|
|
45
|
+
|
|
45
46
|
<span class="mt-1 text-gray-500 text-sm"
|
|
46
47
|
>{render_date(siteinfo.language_id, publish_time)}</span
|
|
47
48
|
>
|
|
@@ -50,8 +51,9 @@ const final_content = truncate(content, {
|
|
|
50
51
|
<TitleTag class:list={["text-2xl font-medium text-gray-900 title-font mb-2", title_class]}>
|
|
51
52
|
<a href={render_url(node_url, base, null, url_suffix)} title={title}>{title}</a>
|
|
52
53
|
</TitleTag>
|
|
53
|
-
<
|
|
54
|
+
{final_content ? (<div class="leading-relaxed line-clamp-3">
|
|
54
55
|
<Fragment set:html={final_content} />
|
|
55
|
-
</
|
|
56
|
+
</div>) : null}
|
|
57
|
+
|
|
56
58
|
</div>
|
|
57
59
|
</div>
|
|
@@ -16,6 +16,7 @@ import Vimeo from "./vimeo.astro";
|
|
|
16
16
|
import { img_add_link, render_value,img_change_attrs } from "../scripts/util.js";
|
|
17
17
|
import view360img from "../assets/images/360_view.svg";
|
|
18
18
|
import IframeVideo from "./iframe_video.astro";
|
|
19
|
+
import JeawinImage from "./image.astro";
|
|
19
20
|
|
|
20
21
|
type JWVIDEO = {
|
|
21
22
|
poster: string; // 图片
|
|
@@ -102,7 +103,7 @@ if(num > 1){
|
|
|
102
103
|
]}
|
|
103
104
|
>
|
|
104
105
|
<div class="content-wrapper border border-white p-1 cursor-pointer overflow-hidden h-[60px] w-[60px] flex items-center justify-center">
|
|
105
|
-
<
|
|
106
|
+
<JeawinImage img_html={img_change_attrs(pic, {width:'50', height:'50'}, {})} add_classes="lazyload" />
|
|
106
107
|
</div>
|
|
107
108
|
</swiper-slide>
|
|
108
109
|
))
|
|
@@ -148,14 +149,14 @@ if(num > 1){
|
|
|
148
149
|
{
|
|
149
150
|
nodepics.map((pic: any, idx: number) => (
|
|
150
151
|
<swiper-slide lazy={idx > 0 ? "true" : "false"} class:list={["swiper-slide", "magnifier", { hidden: idx > 0 }]}>
|
|
151
|
-
<
|
|
152
|
+
<JeawinImage img_html={pic} loading={idx > 0 ? "lazy" : "eager"} fetchpriority={idx > 0 ? 'low' : 'high'} />
|
|
152
153
|
</swiper-slide>
|
|
153
154
|
))
|
|
154
155
|
}
|
|
155
156
|
|
|
156
157
|
{
|
|
157
158
|
video ? (
|
|
158
|
-
<swiper-slide class="swiper-slide hidden">
|
|
159
|
+
<swiper-slide class="swiper-slide hidden" lazy="true">
|
|
159
160
|
<div class="flex min-h-[343px] xl:min-h-[605px] w-full">
|
|
160
161
|
<img src={video.poster} alt={video.title ? video.title : node_title} />
|
|
161
162
|
<button
|
|
@@ -178,7 +179,7 @@ if(num > 1){
|
|
|
178
179
|
|
|
179
180
|
{
|
|
180
181
|
view360 ? (
|
|
181
|
-
<swiper-slide class="swiper-slide hidden">
|
|
182
|
+
<swiper-slide class="swiper-slide hidden" lazy="true">
|
|
182
183
|
<div class="cloudimage-360 swiper-no-swiping" data-image-list-x={`${JSON.stringify(view360)}`} data-magnifier="2" data-fullscreen>
|
|
183
184
|
</div>
|
|
184
185
|
</swiper-slide>
|
|
@@ -379,7 +380,11 @@ src="/js-cloudimage-360-view/build/js-cloudimage-360-view.min.js" async defer
|
|
|
379
380
|
|
|
380
381
|
const view360 = this.dataset.view360;
|
|
381
382
|
|
|
382
|
-
initSwiper(".mainSwiper"
|
|
383
|
+
initSwiper(".mainSwiper", {
|
|
384
|
+
pagination:{
|
|
385
|
+
clickable: true
|
|
386
|
+
}
|
|
387
|
+
});
|
|
383
388
|
initSwiper(".thumbSwiper", {
|
|
384
389
|
direction: this.dataset.thumbs_position=='left' ? "vertical" : 'horizontal',
|
|
385
390
|
navigation: {
|
|
@@ -439,7 +444,11 @@ src="/js-cloudimage-360-view/build/js-cloudimage-360-view.min.js" async defer
|
|
|
439
444
|
|
|
440
445
|
|
|
441
446
|
document.addEventListener("astro:after-swap", () => {
|
|
442
|
-
initSwiper(".mainSwiper"
|
|
447
|
+
initSwiper(".mainSwiper", {
|
|
448
|
+
pagination:{
|
|
449
|
+
clickable: true
|
|
450
|
+
}
|
|
451
|
+
});
|
|
443
452
|
initSwiper(".thumbSwiper", {
|
|
444
453
|
direction: "horizontal",
|
|
445
454
|
breakpoints: {
|
|
@@ -27,11 +27,11 @@ const {base} = Astro.locals;
|
|
|
27
27
|
<RemoteImage
|
|
28
28
|
remote_url={sitelogo}
|
|
29
29
|
alt={logo_title}
|
|
30
|
-
class_str={`mx-auto md:m-0 ${logo_class}`}
|
|
30
|
+
class_str={`mx-auto md:m-0 max-h-25 w-auto ${logo_class}`}
|
|
31
31
|
is_lcp="1"
|
|
32
32
|
/>
|
|
33
33
|
) : (
|
|
34
|
-
<DefaultImage class={`mx-auto md:m-0 ${logo_class}`} />
|
|
34
|
+
<DefaultImage class={`mx-auto md:m-0 max-h-25 w-auto ${logo_class}`} />
|
|
35
35
|
)}
|
|
36
36
|
</Fragment>
|
|
37
37
|
)}
|
|
@@ -44,7 +44,9 @@ const TitleTag = title_tag || "div";
|
|
|
44
44
|
<a href={render_url(node_url, base, null, url_suffix)} title={title}>{title}</a>
|
|
45
45
|
</TitleTag>
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
{
|
|
48
|
+
category_name ? (<div class="mb-2 text-sm"><span class="bg-gray-200 py-[1px] px-[8px]">{category_name}</span></div>) : null
|
|
49
|
+
}
|
|
48
50
|
|
|
49
51
|
<div class="flex items-center gap-3 text-[#6c757d] fill-[#6c757d] text-sm">
|
|
50
52
|
<div class="flex items-center gap-1">
|
|
@@ -83,6 +83,9 @@ if (Astro.slots.has("default")) {
|
|
|
83
83
|
const mdSpaceBetween = Number(this.dataset.md_space_between);
|
|
84
84
|
|
|
85
85
|
initSwiper(`#${swiperID}`, {
|
|
86
|
+
pagination:{
|
|
87
|
+
clickable: true
|
|
88
|
+
},
|
|
86
89
|
breakpoints: {
|
|
87
90
|
// when window width is >= 320px
|
|
88
91
|
768: {
|
|
@@ -102,6 +105,9 @@ if (Astro.slots.has("default")) {
|
|
|
102
105
|
|
|
103
106
|
document.addEventListener("astro:after-swap", function () {
|
|
104
107
|
initSwiper(`#${swiperID}`, {
|
|
108
|
+
pagination:{
|
|
109
|
+
clickable: true
|
|
110
|
+
},
|
|
105
111
|
breakpoints: {
|
|
106
112
|
// when window width is >= 320px
|
|
107
113
|
768: {
|