{{include "header.html"}} {{include "nav.html"}} {{$cur := default (index .ThemesExt "currency_symbol") "$"}} {{/* 首页(index.html) 外贸独立站的转化主线与内销商城不同:买家先核「你是不是真工厂」, 再看货、再谈价。所以区块顺序按「信任先行」推进: 轮播(定位/实力)→ 认证条(合规背书)→ 促销横幅 → 产品推荐(带 MOQ) → 工厂数据 → 工厂实力展示 → 行业资讯(内容活跃度)→ 买家评价(口碑) → 客户市场(背书)→ 报价条(留资) ⚠️ 每个区块都用真实数据或 .ThemesExt 配置,**没有数据就不渲染**: 空数据还渲染出标题和空网格,是「看起来像坏了」最常见的来源。 */}} {{$ext := .ThemesExt}} {{/* ------------------------------------------------------------------ 轮播 */}} {{if index $ext "show_slides"}} {{$slides := HomeSlides}} {{if $slides}}
{{end}} {{end}} {{/* -------------------------------------------------------------- 认证条 */}} {{/* 外贸买家落地后第一件事是找合规背书(CE/RoHS/SAA…), 把认证做成紧跟轮播的横向条 —— 比藏在 About 里早一步建立信任。 没配认证时整条不渲染,不放假徽章。 */}} {{$certs := index $ext "certifications"}} {{if $certs}}
{{range $certs}}
{{index . "name"}}
{{with index . "desc"}}
{{.}}
{{end}}
{{end}}
{{end}} {{/* -------------------------------------------------------------- 促销横幅 */}} {{/* ⚠️ 促销横幅刻意用**扁平的 4 个标量键**而不是一个 promo_banner 对象: 主题数据表单(vvdata_schema.json)只支持 text/url/switch/array 等标量类型, 嵌成对象后台就编辑不了 —— 运营改一句文案得去改模板。 */}} {{$promoTitle := index $ext "promo_title"}} {{if $promoTitle}}
{{/* ⚠️ 渐变第二站用 rgba 而不是 color-mix:旧浏览器不支持 color-mix 时 整条 background 声明会被丢弃 → 深色底上白字直接看不见。 */}}
{{$promoTitle}}
{{with index $ext "promo_desc"}}
{{.}}
{{end}}
{{with index $ext "promo_url"}} {{with index $ext "promo_btn_text"}}{{.}}{{else}}View details{{end}} {{end}}
{{end}} {{/* -------------------------------------------------------------- 产品推荐 */}} {{$products := ColumnContents "products" 8}} {{if $products}}

{{with index $ext "products_title"}}{{.}}{{else}}Featured products{{end}}

{{/* 副标题。⚠️ 默认文案里**不能写死「货到付款」**(2026-10-07 起它可被后台关闭): 运营关掉 COD 后首页还在宣传,用户到结算页才发现付不了。 所以兜底按 .ShopCODEnabled 分两种说法;运营在主题数据 products_sub 里填了就以它为准(上面 with 优先)。 */}}

{{with index $ext "products_sub"}}{{.}} {{else}}{{if .ShopCODEnabled}}Factory-direct supply — order online or request a quotation{{else}}Factory-direct supply, quotation within 24 hours{{end}}{{end}}

View all products →
{{range $products}}
{{if .Img}} {{.Title}} {{else}}
No image
{{end}} {{if .Ext}} {{$badge := index .Ext "badge"}} {{if $badge}} {{$badge}} {{end}} {{end}}

{{.Title}}

{{if .Description}}

{{StrSub .Description 70}}

{{end}} {{/* MOQ 是外贸买家最关心的两个数字之一(另一个是单价), 直接上卡片 —— 不用点进详情页就能判断起订门槛。 */}} {{$moq := ""}} {{if .Ext}}{{$moq = index .Ext "moq"}}{{end}} {{if $moq}}
MOQ: {{$moq}}
{{end}}
{{if .Price}}
{{$cur}}{{printf "%.2f" .Price}}
{{end}} {{if gt .Sales 0}}
{{.Sales}} sold
{{end}}
{{/* 加购按钮:只提交商品 ID,数量固定 1(列表页没有数量选择器)。 🚨 商城关闭时不渲染按钮 —— /cart 此时是 404,按钮在、点下去 404 比不显示更糟。 外贸站常见玩法是「商城开着也只走询盘」:商城关闭时按钮换成 Request a quote。 */}} {{if $.ShopEnabled}} {{if and (ne .StockLimit 2) (le .Stock 0)}} Sold out {{else}} {{end}} {{else}} Request a quote {{end}}
{{end}}
{{end}} {{/* ------------------------------------------------------------ 工厂实力数据 */}} {{$cards := index $ext "stats_cards"}} {{if $cards}}

Factory at a glance

What our production lines actually do, in numbers

{{range $cards}} {{$bg := index . "bg"}}
{{index . "value"}}
{{index . "label"}}
{{end}}
{{end}} {{/* ------------------------------------------------------------ 工厂实力展示 */}} {{/* 「真工厂」是外贸站的核心卖点:图文双栏,左图右文。 三个键都是扁平标量(vvdata_schema 只支持标量 + 数组), 没配图时降级成纯文字卡,不渲染占位图。 */}} {{$factoryImage := index $ext "factory_image"}} {{$factoryTitle := index $ext "factory_title"}} {{$factoryDesc := index $ext "factory_desc"}} {{if or $factoryTitle $factoryDesc}}
{{if $factoryImage}}
{{$factoryTitle}}
{{end}}

{{$factoryTitle}}

{{with $factoryDesc}}

{{.}}

{{end}}
{{end}} {{/* ---------------------------------------------------------------- 行业资讯 */}} {{$news := ColumnContents "insights" 3}} {{if $news}}

Export insights

Certification guides, shipping notes and market updates

Read all insights →
{{range $news}}
{{if .Img}} {{.Title}} {{else}}
No image
{{end}}

{{.Title}}

{{if .Description}}

{{StrSub .Description 80}}

{{end}}
{{ParseTime .CreatedAt "2006-01-02"}} Read more →
{{end}}
{{end}} {{/* ---------------------------------------------------------------- 买家评价 */}} {{$testimonials := index $ext "testimonials"}} {{if $testimonials}}

What buyers say

Distributors, wholesalers and project contractors we ship to

{{range $testimonials}}

{{index . "content"}}

{{StrSub (index . "name") 1}}
{{index . "name"}}
{{with index . "company"}}
{{.}}
{{end}}
{{end}}
{{end}} {{/* ---------------------------------------------------------------- 客户市场 */}} {{$partners := index $ext "partners"}} {{if $partners}}

Clients & markets

Brands, chains and projects we supply

{{range $partners}} {{/* 🚨 没有 logo 时渲染**文字字标**而不是塞一张占位图: 主题默认数据给不出真实 logo,用无关图片冒充客户品牌比空着更糟 (客户看到自己 logo 位置是张风景照会直接质疑)。 运营在后台上传 logo 后自动切回图片,两种形态都能看。 */}}
{{$logo := index . "logo"}} {{if $logo}} {{/* 🚨 合作伙伴 logo 必须 object-contain:object-cover 会把非正方形 logo 裁掉一半。 */}} {{index . {{else}} {{index . "name"}} {{end}}
{{end}}
{{end}} {{/* ------------------------------------------------------------ 底部报价 CTA */}} {{if index $ext "show_cta"}}

{{with index $ext "cta_title"}}{{.}}{{else}}Need a quotation for your market?{{end}}

{{with index $ext "cta_desc"}}{{.}}{{else}}Send us your target models and quantities — full FOB / CIF pricing within 24 hours.{{end}}

{{end}} {{include "footer.html"}} {{include "js.html"}} {{if index $ext "show_slides"}} {{$slides := HomeSlides}} {{if $slides}} {{end}} {{end}}