jeawin-astro 3.0.73 → 3.0.75

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jeawin-astro",
3
- "version": "3.0.73",
3
+ "version": "3.0.75",
4
4
  "author": "chaegumi <chaegumi@qq.com>",
5
5
  "description": "",
6
6
  "license": "MIT",
@@ -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
- fetchpriority: "high",
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: "lazy",
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
- fetchpriority: "high",
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: "lazy",
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
  }
@@ -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
- <Fragment set:html={img_change_attrs(pic, {width:'50', height:'50', 'loading':'lazy'}, {})} />
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
- <Fragment set:html={pic} />
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
  )}
@@ -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: {