jeawin-astro 3.0.46 → 3.0.49
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.
|
|
3
|
+
"version": "3.0.49",
|
|
4
4
|
"author": "chaegumi <chaegumi@qq.com>",
|
|
5
5
|
"description": "",
|
|
6
6
|
"license": "MIT",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"@types/alpinejs": "^3.13.11",
|
|
66
66
|
"alpinejs": "^3.14.9",
|
|
67
67
|
"aos": "3.0.0-beta.6",
|
|
68
|
-
"astro": "^5.
|
|
68
|
+
"astro": "^5.7.0",
|
|
69
69
|
"astro-color-scheme": "^1.1.5",
|
|
70
70
|
"astro-embed": "^0.9.0",
|
|
71
71
|
"astro-icon": "^1.1.5",
|
|
@@ -116,7 +116,7 @@ const menus = await jeawinapi.get_menu_tree({ menu_id: 1 });
|
|
|
116
116
|
menus.map((menu: any) =>
|
|
117
117
|
menu.children ? (
|
|
118
118
|
<Fragment>
|
|
119
|
-
{menu.style
|
|
119
|
+
{menu.style > 0 ? (
|
|
120
120
|
<MegaMenu menu={menu} menu_root_link_id={menu_root_link_id}>
|
|
121
121
|
<Fragment
|
|
122
122
|
set:html={Astro.slots.render("megamenu", [menu])}
|
|
@@ -74,7 +74,7 @@ import "smartmenus/dist/css/smartmenus.min.css"
|
|
|
74
74
|
menus.map((menu: any) =>
|
|
75
75
|
menu.children ? (
|
|
76
76
|
<Fragment>
|
|
77
|
-
{menu.style
|
|
77
|
+
{menu.style > 0 ? (
|
|
78
78
|
<MegaMenu menu={menu} menu_root_link_id={menu_root_link_id}>
|
|
79
79
|
<Fragment
|
|
80
80
|
set:html={Astro.slots.render("megamenu", [menu])}
|
package/src/scripts/util.d.ts
CHANGED
package/src/scripts/util.js
CHANGED
|
@@ -344,4 +344,14 @@ export function is_pagefind(language_id) {
|
|
|
344
344
|
*/
|
|
345
345
|
export function render_lang(all_langs, key){
|
|
346
346
|
return render_value(all_langs, key, key);
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* 去除内容中的toc
|
|
351
|
+
*/
|
|
352
|
+
export function without_toc(content){
|
|
353
|
+
const $ = cheerio.load(content);
|
|
354
|
+
$('script')?.remove();
|
|
355
|
+
$('.toc-anchor')?.remove();
|
|
356
|
+
return $.html();
|
|
347
357
|
}
|