| 1234567891011121314151617181920212223242526272829 |
- # -*- coding: utf-8 -*-
- r"""经典页模板(P5,2026-09-28:从 `app_backEnd/.../serve.py` 抽出)。
- 抽出前后**逐字节一致**:本模块只读文件,不做任何替换/改写;占位符(`%CSS%` `%JS%` `%T%` `%SYS%`)
- 仍由调用方(serve.py 的路由)替换。
- * `assets/classic_chart.js` —— 经典页的图表库与页面脚本(CHART_JS)
- * `pages/classic_fleet.html` / `classic_problem.html` / `classic_turbine.html` —— 三张经典页外壳
- """
- from __future__ import annotations
- import pathlib
- _HERE = pathlib.Path(__file__).resolve().parent
- _ASSETS = _HERE.parent / 'assets'
- def _read(p: pathlib.Path) -> str:
- """`newline=''` ⇒ 不做换行翻译(模板按字节保真,与抽出前一致)。"""
- with open(p, encoding='utf-8', newline='') as f:
- return f.read()
- CHART_JS = _read(_ASSETS / 'classic_chart.js')
- PAGE_FLEET = _read(_HERE / 'classic_fleet.html')
- PAGE_PROBLEM = _read(_HERE / 'classic_problem.html')
- PAGE_TURBINE = _read(_HERE / 'classic_turbine.html')
- __all__ = ['CHART_JS', 'PAGE_FLEET', 'PAGE_PROBLEM', 'PAGE_TURBINE']
|