jeawin-astro 4.0.5 → 4.0.7
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 +10 -10
- package/src/components/share_button.astro +30 -19
- package/src/index.ts +0 -1
- package/src/integrations/jeawin-common-route/index.ts +6 -0
- package/src/integrations/jeawin-common-route/routes/consent.js +948 -0
- package/src/integrations/jeawin-common-route/routes/consent.js.ts +16 -0
- package/src/layouts/Layout.astro +7 -1
- package/src/layouts/category.astro +16 -4
- package/src/layouts/channel.astro +3 -2
- package/src/layouts/page.astro +9 -3
- package/src/scripts/util.js +4 -1
- package/src/components/consent.astro +0 -928
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jeawin-astro",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.7",
|
|
4
4
|
"author": "chaegumi <chaegumi@qq.com>",
|
|
5
5
|
"description": "Astro components for Jeawin CMS",
|
|
6
6
|
"license": "MIT",
|
|
@@ -62,13 +62,13 @@
|
|
|
62
62
|
"astro": ">=5.0.0"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@astrojs/alpinejs": "^0.
|
|
66
|
-
"@astrojs/check": "^0.9.
|
|
67
|
-
"@astrojs/cloudflare": "^
|
|
68
|
-
"@astrojs/rss": "^4.0.
|
|
69
|
-
"@astrojs/sitemap": "3.
|
|
70
|
-
"@astrojs/ts-plugin": "^1.10.
|
|
71
|
-
"@astrojs/vue": "^
|
|
65
|
+
"@astrojs/alpinejs": "^0.5.0",
|
|
66
|
+
"@astrojs/check": "^0.9.7",
|
|
67
|
+
"@astrojs/cloudflare": "^13.0.2",
|
|
68
|
+
"@astrojs/rss": "^4.0.17",
|
|
69
|
+
"@astrojs/sitemap": "3.7.1",
|
|
70
|
+
"@astrojs/ts-plugin": "^1.10.7",
|
|
71
|
+
"@astrojs/vue": "^6.0.0",
|
|
72
72
|
"@iconify-json/fa6-brands": "^1.2.6",
|
|
73
73
|
"@iconify-json/fa6-solid": "^1.2.4",
|
|
74
74
|
"@iconify/tools": "^4.2.0",
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"zod": "^3.25.76"
|
|
107
107
|
},
|
|
108
108
|
"devDependencies": {
|
|
109
|
-
"@astrojs/node": "^
|
|
109
|
+
"@astrojs/node": "^10.0.0",
|
|
110
110
|
"@babel/core": "^7.29.0",
|
|
111
111
|
"@babel/preset-env": "^7.29.0",
|
|
112
112
|
"@rollup/plugin-babel": "^6.1.0",
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
120
120
|
"@types/lodash": "^4.17.24",
|
|
121
121
|
"@types/sprintf-js": "^1.1.4",
|
|
122
|
-
"astro": "^
|
|
122
|
+
"astro": "^6.0.2",
|
|
123
123
|
"autoprefixer": "^10.4.27",
|
|
124
124
|
"chai": "^5.3.3",
|
|
125
125
|
"mocha": "^10.8.2",
|
|
@@ -135,24 +135,35 @@ const medias = [
|
|
|
135
135
|
)}&summary=${encodeURIComponent(seo_description)}`,
|
|
136
136
|
},
|
|
137
137
|
];
|
|
138
|
+
|
|
139
|
+
let html = '';
|
|
140
|
+
if (Astro.slots.has('default')) {
|
|
141
|
+
html = await Astro.slots.render('default', [medias]);
|
|
142
|
+
}
|
|
138
143
|
---
|
|
144
|
+
{
|
|
145
|
+
Astro.slots.has('default') ? (
|
|
146
|
+
<Fragment set:html={html} />
|
|
147
|
+
) : (
|
|
148
|
+
<div class="flex gap-2" {...other_props}>
|
|
149
|
+
<div>{render_lang(all_langs, "Share on")}</div>
|
|
150
|
+
<ul class="flex gap-2 flex-wrap m-0 p-0">
|
|
151
|
+
{
|
|
152
|
+
medias.map((media) => (
|
|
153
|
+
<li class="px-2 list-none">
|
|
154
|
+
<a
|
|
155
|
+
href={media.url}
|
|
156
|
+
title={media.title}
|
|
157
|
+
rel="nofollow noopener noreferrer"
|
|
158
|
+
target="_blank"
|
|
159
|
+
>
|
|
160
|
+
<Fragment set:html={media.icon} />
|
|
161
|
+
</a>
|
|
162
|
+
</li>
|
|
163
|
+
))
|
|
164
|
+
}
|
|
165
|
+
</ul>
|
|
166
|
+
</div>
|
|
167
|
+
)
|
|
168
|
+
}
|
|
139
169
|
|
|
140
|
-
<div class="flex gap-2" {...other_props}>
|
|
141
|
-
<div>{render_lang(all_langs, "Share on")}</div>
|
|
142
|
-
<ul class="flex gap-2 flex-wrap m-0 p-0">
|
|
143
|
-
{
|
|
144
|
-
medias.map((media) => (
|
|
145
|
-
<li class="px-2 list-none">
|
|
146
|
-
<a
|
|
147
|
-
href={media.url}
|
|
148
|
-
title={media.title}
|
|
149
|
-
rel="nofollow noopener noreferrer"
|
|
150
|
-
target="_blank"
|
|
151
|
-
>
|
|
152
|
-
<Fragment set:html={media.icon} />
|
|
153
|
-
</a>
|
|
154
|
-
</li>
|
|
155
|
-
))
|
|
156
|
-
}
|
|
157
|
-
</ul>
|
|
158
|
-
</div>
|
package/src/index.ts
CHANGED
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
// import choose_language from 'jeawin-astro/components/choose_language.astro'
|
|
18
18
|
// import comment_form from 'jeawin-astro/components/comment_form.astro'
|
|
19
19
|
// import common_card from 'jeawin-astro/components/common_card.astro'
|
|
20
|
-
// import consent from 'jeawin-astro/components/consent.astro'
|
|
21
20
|
// import default_image from 'jeawin-astro/components/default_image.astro'
|
|
22
21
|
// import detail_images from 'jeawin-astro/components/detail_images.astro'
|
|
23
22
|
// import detail_images_splide from 'jeawin-astro/components/detail_images_splide.astro'
|
|
@@ -96,6 +96,12 @@ export default defineIntegration({
|
|
|
96
96
|
prerender: true
|
|
97
97
|
});
|
|
98
98
|
|
|
99
|
+
injectRoute({
|
|
100
|
+
pattern: `${viteBase ? `${viteBase}/` : '/'}consent.js`,
|
|
101
|
+
entrypoint: resolve('./routes/consent.js.ts'),
|
|
102
|
+
prerender: true
|
|
103
|
+
});
|
|
104
|
+
|
|
99
105
|
if(options?.amp){
|
|
100
106
|
// AMP需要的文件
|
|
101
107
|
injectRoute({
|