jeawin-astro 3.0.9 → 3.0.11
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/cards/news_grid_card1.astro +1 -1
- package/src/components/children_categories_list.astro +1 -1
- package/src/components/product_card.astro +3 -3
- package/src/components/product_category_list.astro +1 -1
- package/src/components/search_pagefind.astro +2 -0
- package/src/scripts/util.d.ts +4 -0
- package/src/scripts/util.js +14 -0
package/package.json
CHANGED
|
@@ -57,7 +57,7 @@ const final_content = truncate(content, {
|
|
|
57
57
|
<Fragment>
|
|
58
58
|
{!is_default_image(img) ? (
|
|
59
59
|
<div class="flex justify-center">
|
|
60
|
-
{<JeawinImage img_html={img_html} />}
|
|
60
|
+
{<JeawinImage img_html={img_html} add_classes="border border-gray-200" />}
|
|
61
61
|
</div>
|
|
62
62
|
) : null}
|
|
63
63
|
</Fragment>
|
|
@@ -33,7 +33,7 @@ const categories = get_children_categories(
|
|
|
33
33
|
const ProductCountLang = render_value(all_langs, "product");
|
|
34
34
|
---
|
|
35
35
|
|
|
36
|
-
<div class="grid grid-cols-2
|
|
36
|
+
<div class="grid grid-cols-2 xl:grid-cols-6 gap-4">
|
|
37
37
|
{
|
|
38
38
|
categories.map((category: any) => (
|
|
39
39
|
<a
|
|
@@ -51,16 +51,16 @@ const RequestBtnText = render_value(all_langs, "request a quote");
|
|
|
51
51
|
>{title}</a
|
|
52
52
|
>
|
|
53
53
|
</TitleTag>
|
|
54
|
-
<div class="hidden md:block h-
|
|
54
|
+
<div class="hidden md:block h-9 overflow-hidden">
|
|
55
55
|
<div
|
|
56
|
-
class="h-
|
|
56
|
+
class="h-9 text-center -translate-y-full group-hover:translate-y-1 transition-transform duration-300"
|
|
57
57
|
>
|
|
58
58
|
<Button tag_name="a"
|
|
59
59
|
href={`${render_url(`request-a-quote`, base)}?product=${title}`}
|
|
60
60
|
title={RequestBtnText} rel="nofollow">{RequestBtnText}</Button>
|
|
61
61
|
</div>
|
|
62
62
|
<div
|
|
63
|
-
class="h-6 flex items-center justify-center gap-5 text-center -translate-y-full group-hover:translate-y-
|
|
63
|
+
class="h-6 flex items-center justify-center gap-5 text-center -translate-y-full group-hover:translate-y-1 transition-transform duration-300"
|
|
64
64
|
>
|
|
65
65
|
{
|
|
66
66
|
original_price ? (
|
|
@@ -53,6 +53,8 @@ function initPageFind() {
|
|
|
53
53
|
query = params.q;
|
|
54
54
|
}
|
|
55
55
|
if (query) {
|
|
56
|
+
document.querySelectorAll(`input[name="q"]`).forEach((elem: any) => elem.value = query);
|
|
57
|
+
|
|
56
58
|
const input = el.querySelector<HTMLInputElement>(`input[type="text"]`);
|
|
57
59
|
if (input) {
|
|
58
60
|
input.value = query;
|
package/src/scripts/util.d.ts
CHANGED
package/src/scripts/util.js
CHANGED
|
@@ -315,4 +315,18 @@ export function truncate(content, options) {
|
|
|
315
315
|
const striphtml = stripHtml(content).result.replaceAll("\n", " ");
|
|
316
316
|
const final_content = _.truncate(striphtml, options);
|
|
317
317
|
return final_content;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* 判断是否使用pagefind搜索
|
|
322
|
+
*/
|
|
323
|
+
export function is_pagefind(language_id) {
|
|
324
|
+
if (language_id === 'zh' || language_id.indexOf('zh-') === 0) {
|
|
325
|
+
// 是中文,不使用pagefind
|
|
326
|
+
return false;
|
|
327
|
+
}
|
|
328
|
+
if (language_id === 'jp' || language_id.indexOf('jp-') === 0) {
|
|
329
|
+
return false;
|
|
330
|
+
}
|
|
331
|
+
return true;
|
|
318
332
|
}
|