-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
410 lines (393 loc) · 22.6 KB
/
Copy pathscript.js
File metadata and controls
410 lines (393 loc) · 22.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
const translations = {
zh: {
"language.label": "Language",
"nav.services": "服务",
"nav.integration": "整合优势",
"nav.capabilities": "能力",
"nav.solutions": "解决方案",
"nav.process": "流程",
"nav.contact": "联系",
"nav.cta": "发送询盘",
"hero.overline": "HAIYUE-TECH PCB SUPPLIER",
"hero.title": "专业做2-26L高端多层、HDI与特殊工艺PCB",
"hero.lead": "海悦科技(惠州)有限公司面向高精密双面、多层、HDI、FPC、透明PCB等项目,提供样品、小批量快速交付与一站式PCB服务。",
"hero.primaryCta": "发送RFQ资料",
"hero.secondaryCta": "电话沟通",
"hero.proof1.value": "2-26L",
"hero.proof1.label": "高端双面/多层PCB",
"hero.proof2.value": "HDI + FPC",
"hero.proof2.label": "高密度与柔性方案",
"hero.proof3.value": "24H样品",
"hero.proof3.label": "样品与小批量快交付",
"signals.precision": "High Precision / 高精密",
"signals.hdi": "HDI + Multi-layer / HDI多层",
"signals.special": "Special Process / 特殊工艺",
"signals.fast": "Fast Delivery / 快速交付",
"signals.global": "Global Service / 全球服务",
"services.overline": "ONE-STOP PCB SOLUTION",
"services.title": "从样品到量产,为高端PCB项目提供一站式解决方案。",
"services.lead": "覆盖PCB制造、元件配套、PCB装配、测试与物流,适合高精密、高可靠和快速交付项目。",
"integration.overline": "SUPPLY CHAIN INTEGRATION",
"integration.title": "在众多 PCB 制造商中严选合适工厂,让您只需专注产品。",
"integration.lead": "海悦科技整合多年 PCB 到 PCBA 项目经验与稳定供应商资源,按您的工艺、品质、价格、交期和批量要求优中选优,匹配最合适的制造与装配供应链。",
"integration.cta": "联系海悦匹配供应链",
"integration.card1.title": "省去供应商开发",
"integration.card1.body": "不需要您逐家寻找、沟通、比价、价格谈判和试错,我们从合作供应商中筛选符合项目要求的制造资源。",
"integration.card2.title": "降低审厂与品质压力",
"integration.card2.body": "从资料导入、工艺评估、生产节点到检测放行,帮助您把控质量风险和交付稳定性。",
"integration.card3.title": "优选可靠性价比",
"integration.card3.body": "根据产品难度、数量、交期和预算,综合评估质量、价格与服务,不单纯追求低价。",
"integration.card4.title": "覆盖 PCB 到 PCBA",
"integration.card4.body": "无论需求大小、工艺简单或复杂,我们协同 PCB 制造、元件配套、SMT、检测、包装和售后。",
"capabilities.overline": "ADVANCED TECHNOLOGY",
"capabilities.title": "聚焦高端多层、HDI、精细线路、阻抗控制与特殊表面处理。",
"capabilities.lead": "面向GPU/AI、工业控制、医疗、通信、消费电子等领域,提供稳定工艺与严格质量控制。",
"capabilities.card1.title": "2-26L多层板制造",
"capabilities.card1.body": "覆盖高端双面、多层、HDI与复杂叠层项目,适合高密度和高可靠应用。",
"capabilities.card2.title": "特殊工艺PCB",
"capabilities.card2.body": "支持精细线路、金手指、特殊表面处理、微盲埋孔和客户定义工艺要求。",
"capabilities.card3.title": "叠层与阻抗评审",
"capabilities.card3.body": "围绕材料、叠层、铜厚、阻抗和可制造性进行工程评估,降低试产风险。",
"solutions.overline": "VALUE-ADDED SERVICE",
"solutions.title": "从售前评估到售后跟进,围绕价格、交期、品质和供应链做一站式整合。",
"solutions.lead": "帮助客户把PCB项目从“能不能做”推进到“怎样更稳、更快、更可控地交付”。",
"process.overline": "CLEAR PROCESS",
"process.title": "清晰流程,稳定交付。",
"process.lead": "从资料评审、报价、生产、检测到物流交付,帮助客户降低沟通成本和试产风险。",
"quality.overline": "QUALITY & SERVICE",
"quality.title": "品质为基,客户至上,连接每一条线路,成就每一份创新。",
"quality.body": "主营高精密双面、多层、HDI、FPC、透明PCB等,承接各类PCB一站式服务,支持样品与小批量快速交付。",
"contact.overline": "CONTACT",
"contact.title": "发送项目资料,获取制造评估与报价。",
"contact.body": "建议提供Gerber/ODB++、层数、板厚、材料、表面处理、数量、交期、特殊工艺和测试要求。",
"contact.person": "刘锋 / Liu Feng",
"contact.role": "市场总监 / Marketing Director",
"contact.company": "海悦科技(惠州)有限公司",
"footer.note": "High-end PCB supplier for global customers.",
},
en: {
"language.label": "Language",
"nav.services": "Services",
"nav.integration": "Why Us",
"nav.capabilities": "Capabilities",
"nav.solutions": "Solutions",
"nav.process": "Process",
"nav.contact": "Contact",
"nav.cta": "Send RFQ",
"hero.overline": "HAIYUE-TECH PCB SUPPLIER",
"hero.title": "2-26L high-end multilayer, HDI and special-process PCB manufacturer",
"hero.lead": "Haiyue Technology (Huizhou) Co., Ltd. provides high-precision double-sided, multilayer, HDI, FPC and transparent PCB solutions, with fast sample and small-batch delivery.",
"hero.primaryCta": "Send RFQ files",
"hero.secondaryCta": "Call now",
"hero.proof1.value": "2-26L",
"hero.proof1.label": "High-end double-sided and multilayer PCB",
"hero.proof2.value": "HDI + FPC",
"hero.proof2.label": "High-density and flexible PCB capability",
"hero.proof3.value": "24H samples",
"hero.proof3.label": "Sample and small-batch fast delivery",
"signals.precision": "High Precision",
"signals.hdi": "HDI + Multilayer",
"signals.special": "Special Process",
"signals.fast": "Fast Delivery",
"signals.global": "Global Service",
"services.overline": "ONE-STOP PCB SOLUTION",
"services.title": "One-stop PCB solutions from prototype to mass production.",
"services.lead": "PCB manufacturing, components sourcing, PCB assembly, testing and logistics for high-precision, reliable and fast-turn projects.",
"integration.overline": "SUPPLY CHAIN INTEGRATION",
"integration.title": "We qualify the right PCB factories for your project, so your team can stay focused on the product.",
"integration.lead": "Haiyue Technology combines years of PCB-to-PCBA experience with a broad supplier network. We match each project by process difficulty, quality requirement, price target, lead time and volume, then select the most suitable manufacturing and assembly supply chain.",
"integration.cta": "Ask Haiyue to match suppliers",
"integration.card1.title": "Less supplier development",
"integration.card1.body": "You do not need to search, compare pricing, negotiate and trial factories one by one. We screen manufacturing resources from our cooperating supplier base.",
"integration.card2.title": "Lower audit and quality workload",
"integration.card2.body": "From file import and process review to production checkpoints and release inspection, we help control quality risk and delivery stability.",
"integration.card3.title": "Reliable value, not just low price",
"integration.card3.body": "We evaluate quality, price and service together based on product complexity, quantity, schedule and budget.",
"integration.card4.title": "PCB through PCBA coverage",
"integration.card4.body": "Whether the demand is small, large, simple or complex, we coordinate PCB fabrication, component support, SMT, inspection, packaging and after-sales follow-up.",
"capabilities.overline": "ADVANCED TECHNOLOGY",
"capabilities.title": "Focused on multilayer, HDI, fine line, impedance control and special surface finishes.",
"capabilities.lead": "Serving GPU/AI, industrial control, medical, telecom and consumer electronics projects with stable process capability and strict quality control.",
"capabilities.card1.title": "2-26L multilayer PCB manufacturing",
"capabilities.card1.body": "High-end double-sided, multilayer, HDI and complex stackup projects for dense and high-reliability applications.",
"capabilities.card2.title": "Special-process PCB",
"capabilities.card2.body": "Fine line, gold fingers, special surface finishes, microvia, blind/buried via and customer-defined process requirements.",
"capabilities.card3.title": "Stackup and impedance review",
"capabilities.card3.body": "Engineering review around material, stackup, copper weight, impedance and manufacturability to reduce prototype risk.",
"solutions.overline": "VALUE-ADDED SERVICE",
"solutions.title": "From pre-sales review to after-sales follow-up, we integrate price, lead time, quality and supply chain.",
"solutions.lead": "We help customers move PCB projects from feasibility to stable, fast and controllable delivery.",
"process.overline": "CLEAR PROCESS",
"process.title": "A clear process for consistent delivery.",
"process.lead": "From file review and quotation to production, inspection and logistics, we help reduce communication cost and prototype risk.",
"quality.overline": "QUALITY & SERVICE",
"quality.title": "Quality first, customer first, connecting every circuit and enabling every innovation.",
"quality.body": "Main services include high-precision double-sided, multilayer, HDI, FPC and transparent PCB, with one-stop service and fast sample/small-batch delivery.",
"contact.overline": "CONTACT",
"contact.title": "Send project files for manufacturing review and quotation.",
"contact.body": "Recommended RFQ details: Gerber/ODB++, layer count, thickness, material, surface finish, quantity, lead time, special process and testing requirements.",
"contact.person": "Liu Feng",
"contact.role": "Marketing Director",
"contact.company": "Haiyue Technology (Huizhou) Co., Ltd.",
"footer.note": "High-end PCB supplier for global customers.",
}
};
const fallbackMap = {
es: {
"nav.services": "Servicios",
"nav.capabilities": "Capacidades",
"nav.solutions": "Soluciones",
"nav.process": "Proceso",
"nav.contact": "Contacto",
"nav.cta": "Enviar RFQ",
"hero.title": "Fabricante de PCB multicapa 2-26L, HDI y procesos especiales",
"hero.lead": "Haiyue Technology ofrece PCB de alta precisión, HDI, FPC y entrega rápida para muestras y lotes pequeños.",
"hero.primaryCta": "Enviar archivos RFQ",
"hero.secondaryCta": "Llamar",
},
de: {
"nav.services": "Services",
"nav.capabilities": "Fähigkeiten",
"nav.solutions": "Lösungen",
"nav.process": "Prozess",
"nav.contact": "Kontakt",
"nav.cta": "RFQ senden",
"hero.title": "Hersteller für 2-26L High-End Multilayer-, HDI- und Spezialprozess-PCB",
"hero.lead": "Haiyue Technology bietet hochpräzise PCB, HDI, FPC sowie schnelle Muster- und Kleinserienlieferung.",
"hero.primaryCta": "RFQ-Dateien senden",
"hero.secondaryCta": "Anrufen",
},
fr: {
"nav.services": "Services",
"nav.capabilities": "Capacités",
"nav.solutions": "Solutions",
"nav.process": "Processus",
"nav.contact": "Contact",
"nav.cta": "Envoyer RFQ",
"hero.title": "Fabricant PCB multicouche 2-26L, HDI et procédés spéciaux",
"hero.lead": "Haiyue Technology fournit des PCB haute précision, HDI, FPC et une livraison rapide pour prototypes et petites séries.",
"hero.primaryCta": "Envoyer le dossier RFQ",
"hero.secondaryCta": "Appeler",
},
it: {
"nav.services": "Servizi",
"nav.capabilities": "Capacità",
"nav.solutions": "Soluzioni",
"nav.process": "Processo",
"nav.contact": "Contatto",
"nav.cta": "Invia RFQ",
"hero.title": "Produttore PCB 2-26L multistrato, HDI e processi speciali",
"hero.lead": "Haiyue Technology fornisce PCB ad alta precisione, HDI, FPC e consegna rapida per campioni e piccoli lotti.",
"hero.primaryCta": "Invia file RFQ",
"hero.secondaryCta": "Chiama",
},
ja: {
"nav.services": "サービス",
"nav.capabilities": "能力",
"nav.solutions": "ソリューション",
"nav.process": "プロセス",
"nav.contact": "連絡先",
"nav.cta": "RFQ送信",
"hero.title": "2-26L高級多層、HDI、特殊工程PCBメーカー",
"hero.lead": "海悦科技は高精度PCB、HDI、FPC、サンプルと小ロットの短納期対応を提供します。",
"hero.primaryCta": "RFQ資料を送る",
"hero.secondaryCta": "電話する",
},
th: {
"nav.services": "บริการ",
"nav.capabilities": "ศักยภาพ",
"nav.solutions": "โซลูชัน",
"nav.process": "กระบวนการ",
"nav.contact": "ติดต่อ",
"nav.cta": "ส่ง RFQ",
"hero.title": "ผู้ผลิต PCB 2-26L Multilayer, HDI และกระบวนการพิเศษ",
"hero.lead": "Haiyue Technology ให้บริการ PCB ความแม่นยำสูง HDI FPC พร้อมส่งตัวอย่างและล็อตเล็กอย่างรวดเร็ว",
"hero.primaryCta": "ส่งไฟล์ RFQ",
"hero.secondaryCta": "โทร",
},
ms: {
"nav.services": "Servis",
"nav.capabilities": "Keupayaan",
"nav.solutions": "Penyelesaian",
"nav.process": "Proses",
"nav.contact": "Hubungi",
"nav.cta": "Hantar RFQ",
"hero.title": "Pengeluar PCB 2-26L multilayer, HDI dan proses khas",
"hero.lead": "Haiyue Technology menyediakan PCB berketepatan tinggi, HDI, FPC serta penghantaran pantas untuk sampel dan kelompok kecil.",
"hero.primaryCta": "Hantar fail RFQ",
"hero.secondaryCta": "Telefon",
}
};
const services = {
zh: [
["PCB制造", "高精密双面、多层、HDI、特殊材料和特殊表面处理PCB制造。"],
["元件配套", "协助客户整理BOM、元件配套和小批量项目生产准备。"],
["PCB装配", "支持SMT、样品、小批量与PCBA一站式协同。"],
["测试物流", "配合测试要求、包装、国内外物流和交付节奏。"],
],
en: [
["PCB Manufacturing", "High-precision double-sided, multilayer, HDI, special material and special finish PCB fabrication."],
["Components Sourcing", "BOM organization, component support and small-batch production preparation."],
["PCB Assembly", "SMT, samples, small batches and PCBA one-stop coordination."],
["Testing & Logistics", "Testing support, packaging, domestic and overseas delivery coordination."],
]
};
const solutions = {
zh: [
["assets/presales-aftersales.png", "售前售后服务", "售前协助评估资料完整性、工艺可行性和报价边界;售后跟进交付问题、复购需求和工程反馈。"],
["assets/price-delivery.png", "价格与交付周期", "根据层数、材料、表面处理、特殊工艺、数量和交期拆解报价,让客户更清楚成本与交付取舍。"],
["assets/quality-management.png", "全程品质管理", "从来料、制程、AOI/X-ray、电测到出货检查建立质量节点,降低样品和小批量风险。"],
["assets/supply-chain.png", "供应链整合一站式解决", "整合PCB制造、元件配套、SMT协同、测试包装和物流交付,减少客户多方协调成本。"],
],
en: [
["assets/presales-aftersales.png", "Pre-sales and after-sales service", "Pre-sales review for file completeness, process feasibility and quotation scope; after-sales follow-up for delivery issues, repeat needs and engineering feedback."],
["assets/price-delivery.png", "Price and delivery cycle", "Quote breakdown by layer count, material, surface finish, special process, quantity and lead time so customers can see cost and schedule tradeoffs."],
["assets/quality-management.png", "Full-process quality management", "Quality checkpoints from incoming material, process control, AOI/X-ray and electrical test to final outgoing inspection."],
["assets/supply-chain.png", "One-stop supply chain integration", "Integrated PCB fabrication, component support, SMT coordination, testing, packaging and logistics to reduce multi-party coordination cost."],
],
};
const processSteps = {
zh: [
["01", "资料评审", "确认Gerber/ODB++、层数、材料、板厚、铜厚、表面处理和特殊工艺。"],
["02", "工程报价", "根据工艺难度、数量、交期和测试要求拆分报价。"],
["03", "生产制造", "进入PCB制程、HDI工艺、阻抗控制、表面处理和质量节点。"],
["04", "检测确认", "依据项目要求进行外观、尺寸、电测及必要的专项检查。"],
["05", "包装交付", "按客户交期安排包装、发货、物流和复购项目跟进。"],
],
en: [
["01", "File Review", "Confirm Gerber/ODB++, layers, material, thickness, copper, finish and special process."],
["02", "Engineering Quote", "Quote by process difficulty, quantity, lead time and testing requirements."],
["03", "Manufacturing", "PCB fabrication, HDI process, impedance control, surface finish and quality gates."],
["04", "Inspection", "Visual, dimensional, electrical and project-specific checks as required."],
["05", "Delivery", "Packaging, shipment, logistics and follow-up for repeat projects."],
]
};
const carouselSlides = {
zh: [
["assets/hdi-marketing.png", "HDI PCB", "高密度互连与多层板制造", "面向BGA、精细线路、微盲埋孔和高端电子项目,提供2-26L PCB制造能力。"],
["assets/ai-pcb-marketing.png", "High-End PCB", "高端AI/GPU板卡PCB", "适合高密度、高功耗、高可靠项目,关注层数、材料、阻抗和交付周期。"],
["assets/inspection-equipment.png", "Inspection", "AOI与X-ray检测能力", "面向高密度焊盘、BGA区域和关键工艺节点,强化出货前质量控制。"],
["assets/electrical-test.png", "Electrical Test", "飞针与电测设备支持", "通过电测、导通检查和客户定义测试要求,提升样品与小批量交付可靠性。"],
],
en: [
["assets/hdi-marketing.png", "HDI PCB", "High-density interconnect and multilayer PCB", "2-26L PCB manufacturing for BGA, fine line, microvia, blind/buried via and advanced electronics projects."],
["assets/ai-pcb-marketing.png", "High-End PCB", "High-end AI/GPU board PCB", "For high-density, high-power and high-reliability projects with focus on layers, materials, impedance and lead time."],
["assets/inspection-equipment.png", "Inspection", "AOI and X-ray inspection capability", "Quality control for dense pad arrays, BGA areas and critical process checkpoints before shipment."],
["assets/electrical-test.png", "Electrical Test", "Flying probe and electrical test support", "Electrical test, continuity checks and customer-defined test requirements for reliable sample and small-batch delivery."],
]
};
let currentLang = localStorage.getItem("haiyueLang") || "zh";
let slideIndex = 0;
let timer;
function textFor(key) {
return (translations[currentLang] && translations[currentLang][key])
|| (fallbackMap[currentLang] && fallbackMap[currentLang][key])
|| translations.en[key]
|| translations.zh[key]
|| "";
}
function applyLanguage() {
document.documentElement.lang = currentLang === "zh" ? "zh-CN" : currentLang;
document.documentElement.dataset.lang = currentLang;
document.querySelector("[data-language-select]").value = currentLang;
document.querySelectorAll("[data-i18n]").forEach((el) => {
el.textContent = textFor(el.dataset.i18n);
});
renderServices();
renderSolutions();
renderTimeline();
renderCarousel();
}
function renderServices() {
const grid = document.querySelector("[data-service-grid]");
const data = services[currentLang] || services.en;
grid.innerHTML = data.map(([title, body], index) => `
<article class="service-card">
<span>${String(index + 1).padStart(2, "0")}</span>
<h3>${title}</h3>
<p>${body}</p>
</article>
`).join("");
}
function renderSolutions() {
const grid = document.querySelector("[data-solution-grid]");
if (!grid) {
return;
}
const data = solutions[currentLang] || solutions.en;
grid.innerHTML = data.map(([src, title, body]) => `
<article class="solution-card">
<img src="${src}" alt="${title}">
<div>
<h3>${title}</h3>
<p>${body}</p>
</div>
</article>
`).join("");
}
function renderTimeline() {
const list = document.querySelector("[data-timeline]");
const data = processSteps[currentLang] || processSteps.en;
list.innerHTML = data.map(([num, title, body]) => `
<li>
<strong>${num}</strong>
<h3>${title}</h3>
<p>${body}</p>
</li>
`).join("");
}
function renderCarousel() {
const track = document.querySelector("[data-carousel-track]");
const dots = document.querySelector("[data-carousel-dots]");
const slides = carouselSlides[currentLang] || carouselSlides.en;
slideIndex %= slides.length;
track.innerHTML = slides.map(([src, overline, title, body], index) => `
<article class="carousel-slide${index === slideIndex ? " is-active" : ""}">
<img src="${src}" alt="${title}">
<div class="carousel-copy">
<p class="overline">${overline}</p>
<h2>${title}</h2>
<p>${body}</p>
</div>
</article>
`).join("");
dots.innerHTML = slides.map((_, index) => `
<button class="carousel-dot${index === slideIndex ? " is-active" : ""}" type="button" data-slide="${index}" aria-label="Slide ${index + 1}"></button>
`).join("");
dots.querySelectorAll("[data-slide]").forEach((button) => {
button.addEventListener("click", () => {
slideIndex = Number(button.dataset.slide);
renderCarousel();
restartTimer();
});
});
}
function restartTimer() {
clearInterval(timer);
timer = setInterval(() => {
const slides = carouselSlides[currentLang] || carouselSlides.en;
slideIndex = (slideIndex + 1) % slides.length;
renderCarousel();
}, 6000);
}
document.querySelector("[data-language-select]").addEventListener("change", (event) => {
currentLang = event.target.value;
localStorage.setItem("haiyueLang", currentLang);
slideIndex = 0;
applyLanguage();
restartTimer();
});
document.querySelector("[data-carousel-prev]").addEventListener("click", () => {
const slides = carouselSlides[currentLang] || carouselSlides.en;
slideIndex = (slideIndex - 1 + slides.length) % slides.length;
renderCarousel();
restartTimer();
});
document.querySelector("[data-carousel-next]").addEventListener("click", () => {
const slides = carouselSlides[currentLang] || carouselSlides.en;
slideIndex = (slideIndex + 1) % slides.length;
renderCarousel();
restartTimer();
});
applyLanguage();
restartTimer();