diff --git a/app/blueprints.py b/app/blueprints.py index af7030c..aae28d7 100644 --- a/app/blueprints.py +++ b/app/blueprints.py @@ -27,7 +27,7 @@ BLOCKS = { 'pricing':{'name':'服务方案','icon':'$','fields':['title','items'],'defaults':{'title':'服务方案','items':[{'name':'标准方案','price':'联系我们','features':['专业咨询','售后服务'],'href':'/contact/'}]}}, 'map':{'name':'位置导航','icon':'⌖','fields':['title','address','url','embed'],'defaults':{'title':'欢迎来访','address':'请填写实际办公地址','url':'','embed':''}}, 'form_link':{'name':'询盘表单入口','icon':'✉','fields':['title','description','button','href'],'defaults':{'title':'提交询盘','description':'欢迎联系我们获取报价和资料','button':'联系销售','href':'/contact/'}}, - 'form':{'name':'询盘表单','icon':'✉','fields':['title','description','button_text','button_href'],'defaults':{'title':'Get a Quote','description':'Send us your requirements and our team will reply within 24 hours.','button_text':'Contact Us','button_href':'/contact-us/'}}, + 'form':{'name':'询盘表单','icon':'✉','fields':['title','description','button_text','button_href','kicker','info_title','info_text','items'],'defaults':{'title':'Get a Quote','description':'Send us your requirements and our team will reply within 24 hours.','button_text':'Contact Us','button_href':'/contact-us/','kicker':'CONTACT US','info_title':'Get in Touch','info_text':'We reply within one business day.','items':[{'icon':'✉','title':'Email','text':'sales@hesupipe.com'},{'icon':'◉','title':'Phone / WhatsApp','text':'+86 371 5555 0000'},{'icon':'⌖','title':'Address','text':'Zhengzhou, Henan, China'},{'icon':'◷','title':'Working Hours','text':'Mon-Fri 8:00-18:00 (GMT+8)'}]}}, 'trust_bar':{'name':'信任条','icon':'✓','fields':['title','items'],'defaults':{'title':'','items':[{'icon':'✓','title':'Certified quality','text':'Inspected before every shipment'},{'icon':'◎','title':'Global export','text':'Delivering to worldwide markets'},{'icon':'▤','title':'Full documentation','text':'Specs and export files on hand'},{'icon':'✉','title':'Responsive service','text':'Replies within one business day'}]}}, 'applications_band':{'name':'应用展示带','icon':'⊞','fields':['title','subtitle','items'],'defaults':{'title':'Built for real-world projects','subtitle':'APPLICATIONS','items':[{'icon':'◉','title':'Water supply','text':'Municipal piping and treatment networks.'},{'icon':'◍','title':'Drainage','text':'Gravity and pressure sewer systems.'},{'icon':'✦','title':'Gas','text':'PE pipelines for fuel gas distribution.'},{'icon':'◆','title':'Mining','text':'Abrasion-resistant slurry and vent lines.'}]}}, } @@ -424,18 +424,31 @@ def render_blocks(blocks, site, page, entries): if form_endpoint and str(form_endpoint).startswith('https://'): action=escape(str(form_endpoint),quote=True);method='POST' elif email: - action=f'mailto:{escape(email)}?subject=Inquiry from website';method='POST' + action=f'mailto:{escape(email)}?subject=Inquiry';method='POST' else: action=href;method='GET' + kicker=escape(resolve('kicker','CONTACT US')) + info_title=escape(resolve('info_title','Get in Touch')) + info_text=escape(resolve('info_text','We reply within one business day.')) + info_items='' + for item in (block.get('items') or []): + icon=escape(str(item.get('icon','')).strip() or '✦') + it=escape(str(item.get('title','')).strip()) + tx=escape(str(item.get('text','')).strip()) + if it or tx: + info_items+=f'
{tx}
{info_text}
{desc}
' f'