upgrade: adopt V8.33.1 — final merge, our patches upstreamed natively
V8.33.0 absorbed our entire platform patch set as native features (discovery/env_for macro override/blocks.css priority/type-mapping fix/ frontend entries/locale override) and synced trade-pro from our remote; V8.33.1 adds HESU PIPE industrial-theme home fixes (1.3.1). Zero patch re-application this round — all verified native. Theme suites 35/35; full run 428 passed + same 10 known Windows env fails (FAILED set unchanged). Live: container 8.33.1-dev.1 healthy, hesupipe 192 entries intact, trade-pro build 203 pages 0 errors. Patch registry retired to archive — future upgrades are plain overlay. Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
+11
-1
@@ -269,6 +269,16 @@ def theme_preview_css(theme_id:str,version:str=''):
|
||||
except ValueError as exc:raise HTTPException(404,str(exc))
|
||||
return Response((dir/'theme.css').read_text(encoding='utf-8'),media_type='text/css')
|
||||
|
||||
@router.get('/themes/{theme_id}/preview.blocks.css')
|
||||
def theme_preview_blocks_css(theme_id:str,version:str=''):
|
||||
"""Serve the identical block stylesheet used by a static theme build."""
|
||||
from fastapi.responses import Response
|
||||
try:folder=theme_store.resolve(theme_id,version or None)
|
||||
except ValueError as exc:raise HTTPException(404,str(exc))
|
||||
chosen=folder/'blocks.css'
|
||||
if not chosen.is_file():chosen=theme_store.BASE.parent/'app'/'static'/'blocks.css'
|
||||
return Response(chosen.read_text(encoding='utf-8'),media_type='text/css',headers={'Cache-Control':'no-store'})
|
||||
|
||||
@router.get('/themes/{theme_id}/preview.pro.css')
|
||||
def theme_preview_pro_css(theme_id:str,version:str=''):
|
||||
from fastapi.responses import Response
|
||||
@@ -367,6 +377,6 @@ def theme_preview(theme_id:str,version:str='',page_type:str='home'):
|
||||
seo_description='SiteForge 主题模板预览')
|
||||
html=static_site.shell(html,site,page,records,[])
|
||||
html=html.replace('assets/theme.css',f'/api/factory/themes/{theme_id}/preview.css?version={version or theme_store.latest(theme_id)}')
|
||||
html=html.replace('assets/blocks.css','/ui/blocks.css').replace('assets/factory.css','/ui/factory.css')
|
||||
html=html.replace('assets/blocks.css',f'/api/factory/themes/{theme_id}/preview.blocks.css?version={version or theme_store.latest(theme_id)}').replace('assets/factory.css','/ui/factory.css')
|
||||
html=html.replace('assets/custom.css','/ui/factory.css').replace('assets/site-runtime.js','/ui/site-runtime.js')
|
||||
return HTMLResponse(html)
|
||||
|
||||
Reference in New Issue
Block a user