jeawin-astro 3.0.97 → 3.0.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jeawin-astro",
3
- "version": "3.0.97",
3
+ "version": "3.0.99",
4
4
  "author": "chaegumi <chaegumi@qq.com>",
5
5
  "description": "",
6
6
  "license": "MIT",
@@ -24,6 +24,7 @@ interface Props extends astroHTML.JSX.HTMLAttributes {
24
24
  block_title?: any; // 标题
25
25
  block_subtitle?: any; // 副标题
26
26
  block_items?: BlockItemsItem[]; // 项
27
+ block_items_title_tag?: any;
27
28
  }
28
29
  const {
29
30
  bgcolor = "bg-white",
@@ -32,8 +33,11 @@ const {
32
33
  block_title,
33
34
  block_subtitle,
34
35
  block_items = [],
36
+ block_items_title_tag = 'h3',
35
37
  ...other_props
36
38
  } = Astro.props;
39
+
40
+ const BLOCKITEMSTITLETAG = block_items_title_tag;
37
41
  ---
38
42
 
39
43
  <SectionContainer bgcolor={bgcolor} max_width_screen={max_width_screen}>
@@ -54,7 +58,7 @@ const {
54
58
  <Fragment set:html={itm.icon} />
55
59
  </div>
56
60
  </div>
57
- <div class="mb-3 text-lg">{itm.title}</div>
61
+ <BLOCKITEMSTITLETAG class="mb-3 text-lg">{itm.title}</BLOCKITEMSTITLETAG>
58
62
  <div class="text-sm text-[#666] leading-relaxed">
59
63
  {itm.content}
60
64
  </div>
@@ -18,6 +18,7 @@ interface Props extends astroHTML.JSX.HTMLAttributes {
18
18
  block_title?: any;
19
19
  block_subtitle?: any;
20
20
  block_items?: any;
21
+ block_items_title_tag?: any;
21
22
  }
22
23
  const {
23
24
  bgcolor = "bg-white",
@@ -25,8 +26,11 @@ const {
25
26
  block_title,
26
27
  block_subtitle,
27
28
  block_items,
29
+ block_items_title_tag = 'h3',
28
30
  ...other_props
29
31
  } = Astro.props;
32
+
33
+ const BLOCKITEMSTITLETAG = block_items_title_tag;
30
34
  ---
31
35
 
32
36
  <SectionContainer bgcolor={bgcolor} max_width_screen={max_width_screen}>
@@ -55,7 +59,7 @@ const {
55
59
  <Fragment set:html={itm.sub_item1_icon} />
56
60
  </div>
57
61
  </div>
58
- <div class="text-2xl mb-3">{itm.sub_item1_title}</div>
62
+ <BLOCKITEMSTITLETAG class="text-2xl mb-3">{itm.sub_item1_title}</BLOCKITEMSTITLETAG>
59
63
  <div class="text-sm text-[#666] leading-relaxed">
60
64
  {itm.sub_item1_content}
61
65
  </div>
@@ -66,7 +70,7 @@ const {
66
70
  <Fragment set:html={itm.sub_item2_icon} />
67
71
  </div>
68
72
  </div>
69
- <div class="text-2xl mb-3">{itm.sub_item2_title}</div>
73
+ <BLOCKITEMSTITLETAG class="text-2xl mb-3">{itm.sub_item2_title}</BLOCKITEMSTITLETAG>
70
74
  <div class="text-sm text-[#666] leading-relaxed">
71
75
  {itm.sub_item2_content}
72
76
  </div>
@@ -82,7 +86,7 @@ const {
82
86
  <Fragment set:html={itm.sub_item1_icon} />
83
87
  </div>
84
88
  </div>
85
- <div class="text-2xl mb-3">{itm.sub_item1_title}</div>
89
+ <BLOCKITEMSTITLETAG class="text-2xl mb-3">{itm.sub_item1_title}</BLOCKITEMSTITLETAG>
86
90
  <div class="text-sm text-[#666] leading-relaxed">
87
91
  {itm.sub_item1_content}
88
92
  </div>
@@ -93,7 +97,7 @@ const {
93
97
  <Fragment set:html={itm.sub_item2_icon} />
94
98
  </div>
95
99
  </div>
96
- <div class="text-2xl mb-3">{itm.sub_item2_title}</div>
100
+ <BLOCKITEMSTITLETAG class="text-2xl mb-3">{itm.sub_item2_title}</BLOCKITEMSTITLETAG>
97
101
  <div class="text-sm text-[#666] leading-relaxed">
98
102
  {itm.sub_item2_content}
99
103
  </div>
@@ -10,7 +10,7 @@
10
10
  */
11
11
  import JeawinApi from "../scripts/cms.js";
12
12
  import Pagination from "./pagination.astro";
13
- const { field_id, rel_id, uri, page, limit, no_fields } = Astro.props;
13
+ const { field_id, rel_id, uri, page, limit, no_fields, limit_type } = Astro.props;
14
14
  const { jeawin_apikey, jeawin_api_domain, jeawin_api_path, sticky_top_height, is_preview } = Astro.locals;
15
15
  const jeawinapi = new JeawinApi({
16
16
  apikey: jeawin_apikey,
@@ -27,6 +27,7 @@ let per_page = 15;
27
27
  if (limit) {
28
28
  per_page = limit;
29
29
  }
30
+
30
31
  // console.log(count);
31
32
  let current_page = 1;
32
33
  let total_pages = 0;
@@ -51,9 +52,8 @@ const html = await Astro.slots.render("default", [nodes]);
51
52
  ---
52
53
 
53
54
  <Fragment set:html={html} />
54
-
55
55
  {
56
- limit ? null : (
56
+ limit_type && limit_type !== "page" ? null : (
57
57
  <Pagination
58
58
  uri={uri}
59
59
  total={total}