This repository has been archived on 2026-10-02. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
NeteaseUrl/_csscheck.py
T
snowy-yang d209af847a chore: 基线快照 —— 纳入 git 版本控制(站点 v2.4.0 / Flask 单体)
在框架迁移与模块拆分前保存当前可运行状态:
- 后端:main.py/auth_routes.py/auth_system.py/music_api.py/music_downloader.py/podcast_api.py/qr_login.py
- 前端:templates/index.html + static/site_auth.js
- 部署:Dockerfile/docker-compose.yml/entrypoint.sh/requirements.txt
敏感数据(data/、cookie.txt)与内部文档(交接文档/新会话引导)按 .gitignore 排除。
2026-09-26 00:13:05 +08:00

11 lines
626 B
Python

# -*- coding: utf-8 -*-
"""CSS 完整性检查:花括号平衡 + 关键美化标记存活"""
import sys
src = open('templates/index.html', encoding='utf-8').read()
style = src.split('<style>')[1].split('</style>')[0]
ok = style.count('{') == style.count('}')
marks = sum(1 for m in ['font-family: inherit', 'kw.on { text-shadow', 'uc-card:hover', 'theme-fading', 'textarea.input', 'prefers-reduced-motion', '美化层 v4', '美化层 v5', 'safe-area-inset'] if m in style)
with open('_css_ok.txt', 'w', encoding='utf-8') as f:
f.write(f'braces={style.count("{")}=={style.count("}")} {ok} | marks {marks}/9')
print('ok')