jeawin-astro 3.0.80 → 3.0.82
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
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
import JeawinApi from "../../scripts/cms.js";
|
|
12
12
|
import { render_lang, render_value } from "../../scripts/util.js";
|
|
13
13
|
const { field } = Astro.props;
|
|
14
|
-
const { all_langs, jeawin_apikey, jeawin_api_domain, jeawin_api_path, sticky_top_height, is_preview } =
|
|
14
|
+
const { all_langs, jeawin_apikey, jeawin_api_domain, jeawin_api_path, sticky_top_height, is_preview, siteinfo } =
|
|
15
15
|
Astro.locals;
|
|
16
16
|
const jeawinapi = new JeawinApi({
|
|
17
17
|
apikey: jeawin_apikey,
|
|
@@ -27,13 +27,34 @@ const countrylist = await jeawinapi.get_country();
|
|
|
27
27
|
<span class="text-gray-700">
|
|
28
28
|
{field.field_label}
|
|
29
29
|
</span>
|
|
30
|
-
|
|
31
|
-
<
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
30
|
+
{siteinfo.language_id.indexOf('zh')=== 0 ? (
|
|
31
|
+
<select class="mt-1 block w-full" autocomplete="off">
|
|
32
|
+
<option value="">{render_lang(all_langs, "Chooce One")}</option>
|
|
33
|
+
{
|
|
34
|
+
countrylist.map((country: any) => (
|
|
35
|
+
<option value={country.cn}>{country.cn}</option>
|
|
36
|
+
))
|
|
37
|
+
}
|
|
38
|
+
</select>
|
|
39
|
+
) : siteinfo.language_id.indexOf('fr') === 0 ?(
|
|
40
|
+
<select class="mt-1 block w-full" autocomplete="off">
|
|
41
|
+
<option value="">{render_lang(all_langs, "Chooce One")}</option>
|
|
42
|
+
{
|
|
43
|
+
countrylist.map((country: any) => (
|
|
44
|
+
<option value={country.fr}>{country.fr}</option>
|
|
45
|
+
))
|
|
46
|
+
}
|
|
47
|
+
</select>
|
|
48
|
+
) : (
|
|
49
|
+
<select class="mt-1 block w-full" autocomplete="off">
|
|
50
|
+
<option value="">{render_lang(all_langs, "Chooce One")}</option>
|
|
51
|
+
{
|
|
52
|
+
countrylist.map((country: any) => (
|
|
53
|
+
<option value={country.en}>{country.en}</option>
|
|
54
|
+
))
|
|
55
|
+
}
|
|
56
|
+
</select>
|
|
57
|
+
)}
|
|
58
|
+
|
|
38
59
|
{render_value(field, "field_help") ? <p>{field.field_help}</p> : null}
|
|
39
60
|
</label>
|
|
@@ -21,9 +21,9 @@ const HTagName = h_tag_name;
|
|
|
21
21
|
|
|
22
22
|
<div class="mb-8 lg:mb-16 relative z-[2]">
|
|
23
23
|
<div
|
|
24
|
-
class="text-
|
|
24
|
+
class="text-center mb-4 flex flex-col gap-4 after:mx-auto after:w-1/12 after:border after:border-[var(--themeColor)]"
|
|
25
25
|
>
|
|
26
|
-
<HTagName>
|
|
26
|
+
<HTagName class="text-4xl tracking-tight font-extrabold text-gray-900 ">
|
|
27
27
|
<Fragment set:html={block_title} />
|
|
28
28
|
</HTagName>
|
|
29
29
|
</div>
|