feat: 全站改版为科技首页风格,重构导航与产品页面
- 品牌更名 Easy Data Collection - 导航重构:前沿技术研究 / 工具开发 / 资源中心 / License / 博客(含下拉菜单) - 新增前沿技术研究聚合页、工具开发产品页与 6 个产品独立介绍页 - License 申请 / 查询下载 / 资源包合并为 License 中心,旧路径保留兼容 - 首页与全站样式升级为科技产品风(Apple/Wise 式) - 博客构建脚本同步更新(新导航 + 新首页)
This commit is contained in:
+256
-52
@@ -10,7 +10,6 @@ tags: 工业软件, ResLib
|
||||
---
|
||||
"""
|
||||
import re
|
||||
import sys
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
|
||||
@@ -22,26 +21,84 @@ OUT_BLOG = BASE.parent / "website" / "static" / "blog"
|
||||
OUT_HOME = BASE.parent / "website" / "static" / "home.html"
|
||||
OUT_ABOUT = BASE.parent / "website" / "static" / "about.html"
|
||||
|
||||
SITE_NAME = "Easy Data Collector"
|
||||
SITE_NAME = "Easy Data Collection"
|
||||
SEO_NAME = "江北的渔夫的空间"
|
||||
|
||||
NAV = [
|
||||
("/", "博客"),
|
||||
("/reslib/", "ResLib"),
|
||||
("/reslib/apply", "申请 License"),
|
||||
("/reslib/status", "查询 / 下载"),
|
||||
("/reslib/package", "资源包获取"),
|
||||
("/neural/", "Neural Research"),
|
||||
("http://124.220.63.9:25000", "Research Digest"),
|
||||
NAV_ITEMS = [
|
||||
{
|
||||
"key": "research",
|
||||
"href": "/research/",
|
||||
"label": "前沿技术研究",
|
||||
"children": [
|
||||
("http://124.220.63.9:25000", "Research Digest"),
|
||||
("/research/neural/", "Neural Research"),
|
||||
("/research/reslib/", "ResLib"),
|
||||
],
|
||||
},
|
||||
{
|
||||
"key": "tools",
|
||||
"href": "/tools/",
|
||||
"label": "工具开发",
|
||||
"children": [
|
||||
("/tools/sequence-diagram/", "Sequence-Diagram"),
|
||||
("/tools/uni-viewer/", "Uni-Viewer"),
|
||||
("/tools/engineer-craft/", "Engineer Craft"),
|
||||
("/tools/five-phases-observer/", "The Five Phases Observer"),
|
||||
("/tools/unitouch/", "UniTouch Interface"),
|
||||
("/tools/edc-lite-erp/", "EDC Lite ERP"),
|
||||
],
|
||||
},
|
||||
{
|
||||
"key": "resources",
|
||||
"href": "/resources/",
|
||||
"label": "资源中心",
|
||||
"children": [],
|
||||
},
|
||||
{
|
||||
"key": "license",
|
||||
"href": "/license/",
|
||||
"label": "License",
|
||||
"children": [
|
||||
("/license/apply", "申请 License"),
|
||||
("/license/status", "查询 / 下载"),
|
||||
("/license/package", "资源包获取"),
|
||||
],
|
||||
},
|
||||
{
|
||||
"key": "blog",
|
||||
"href": "/blog/",
|
||||
"label": "博客",
|
||||
"children": [],
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
def page_header(active: str, title: str = "") -> str:
|
||||
def nav_html(active: str = "") -> str:
|
||||
parts = []
|
||||
for item in NAV_ITEMS:
|
||||
if not item["children"]:
|
||||
cls = "nav-link active" if item["key"] == active else "nav-link"
|
||||
parts.append(f' <a class="{cls}" href="{item["href"]}">{item["label"]}</a>')
|
||||
continue
|
||||
parent_cls = "nav-link active" if item["key"] == active else "nav-link"
|
||||
links = "\n".join(
|
||||
f' <a href="{href}">{label}</a>'
|
||||
for href, label in item["children"]
|
||||
)
|
||||
parts.append(
|
||||
f""" <div class="nav-item has-dropdown">
|
||||
<a class="{parent_cls}" href="{item['href']}">{item['label']}</a>
|
||||
<button class="nav-caret" type="button" aria-label="展开{item['label']}">▾</button>
|
||||
<div class="dropdown">
|
||||
{links}
|
||||
</div>
|
||||
</div>"""
|
||||
)
|
||||
return "\n".join(parts)
|
||||
|
||||
|
||||
def page_header(active: str = "", title: str = "") -> str:
|
||||
seo_title = f"{title} - {SEO_NAME}" if title else SEO_NAME
|
||||
links = "\n".join(
|
||||
f' <a href="{href}"{" class=active" if href == active else ""}>{label}</a>'
|
||||
for href, label in NAV
|
||||
)
|
||||
return f"""<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
@@ -49,9 +106,10 @@ def page_header(active: str, title: str = "") -> str:
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{seo_title}</title>
|
||||
<meta name="description" content="{SEO_NAME} —— 工业软件、标准件库与数字化实践分享">
|
||||
<meta name="keywords" content="{SEO_NAME}, Easy Data Collector, ResLib, 资源中心管理器, Creo, 标准零部件库, 数字孪生">
|
||||
<meta name="keywords" content="{SEO_NAME}, {SITE_NAME}, ResLib, 资源中心管理器, Creo, 标准零部件库, 数字孪生, 深度学习">
|
||||
<link rel="stylesheet" href="/static/css/style.css">
|
||||
<link rel="icon" href="/static/img/logo.svg" type="image/svg+xml">
|
||||
<script src="/static/js/nav.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -62,7 +120,7 @@ def page_header(active: str, title: str = "") -> str:
|
||||
<span class="brand-name">{SITE_NAME}</span>
|
||||
</a>
|
||||
<nav class="main-nav" id="mainNav">
|
||||
{links}
|
||||
{nav_html(active)}
|
||||
</nav>
|
||||
<button class="nav-toggle" id="navToggle" aria-label="菜单">☰</button>
|
||||
</div>
|
||||
@@ -76,12 +134,20 @@ def page_footer() -> str:
|
||||
|
||||
<footer class="site-footer">
|
||||
<div class="container footer-inner">
|
||||
<div class="footer-brand">
|
||||
<img src="/static/img/logo.svg" alt="">
|
||||
<span>{SITE_NAME}</span>
|
||||
</div>
|
||||
<span>Copyright © 2026 {SITE_NAME}. All rights reserved.</span>
|
||||
<span><a href="/links.html">内部资源</a> · <a href="/admin">管理页面</a> · <a href="https://beian.miit.gov.cn/" target="_blank" rel="noopener">苏ICP备2026056863号</a></span>
|
||||
<span class="footer-links">
|
||||
<a href="/resources/">资源中心</a><span class="sep">·</span>
|
||||
<a href="/license/">License</a><span class="sep">·</span>
|
||||
<a href="/admin">管理页面</a><span class="sep">·</span>
|
||||
<a href="https://beian.miit.gov.cn/" target="_blank" rel="noopener">苏ICP备2026056863号</a>
|
||||
</span>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="/static/js/nav.js"></script>
|
||||
</body>
|
||||
</html>"""
|
||||
|
||||
@@ -125,6 +191,51 @@ def fmt_date(s: str) -> str:
|
||||
return s
|
||||
|
||||
|
||||
PRODUCT_CARDS = """
|
||||
<a class="product-card" href="/tools/sequence-diagram/">
|
||||
<div class="product-icon" style="--v1:#7a3df5;--v2:#22c8ff">◷</div>
|
||||
<span class="product-meta">Flutter Desktop</span>
|
||||
<h3>Sequence-Diagram</h3>
|
||||
<p>面向 PLC 流程节拍与相位角设计的时序图设计器,条形 / 圆周双视图。</p>
|
||||
<span class="product-link">了解详情 →</span>
|
||||
</a>
|
||||
<a class="product-card" href="/tools/uni-viewer/">
|
||||
<div class="product-icon" style="--v1:#0a6cff;--v2:#46d1ff">◉</div>
|
||||
<span class="product-meta">Web Component</span>
|
||||
<h3>Uni-Viewer</h3>
|
||||
<p>纯前端、不出网的文件预览组件,271 个扩展名、47 条预览链路。</p>
|
||||
<span class="product-link">了解详情 →</span>
|
||||
</a>
|
||||
<a class="product-card" href="/tools/engineer-craft/">
|
||||
<div class="product-icon" style="--v1:#0a9e6e;--v2:#7ad9a8">⚙</div>
|
||||
<span class="product-meta">Vue 3 · Vite</span>
|
||||
<h3>Engineer Craft</h3>
|
||||
<p>流程工业智能设计平台:31 个工程计算模块、URS 与 AI 审查。</p>
|
||||
<span class="product-link">了解详情 →</span>
|
||||
</a>
|
||||
<a class="product-card" href="/tools/five-phases-observer/">
|
||||
<div class="product-icon" style="--v1:#b8860b;--v2:#ffd166">✦</div>
|
||||
<span class="product-meta">GAP 公理协议</span>
|
||||
<h3>The Five Phases Observer</h3>
|
||||
<p>90 域观测协议与 720 个可证伪锚点,让决策可编译、可证伪。</p>
|
||||
<span class="product-link">了解详情 →</span>
|
||||
</a>
|
||||
<a class="product-card" href="/tools/unitouch/">
|
||||
<div class="product-icon" style="--v1:#e05252;--v2:#ff9a62">▦</div>
|
||||
<span class="product-meta">Flutter · MQTT</span>
|
||||
<h3>UniTouch Interface</h3>
|
||||
<p>嵌入式工控机的设备控制软件,替代传统 HMI 的统一工控平台。</p>
|
||||
<span class="product-link">了解详情 →</span>
|
||||
</a>
|
||||
<a class="product-card" href="/tools/edc-lite-erp/">
|
||||
<div class="product-icon" style="--v1:#0f2f6b;--v2:#2a6df5">▣</div>
|
||||
<span class="product-meta">Electron · MySQL</span>
|
||||
<h3>EDC Lite ERP</h3>
|
||||
<p>轻量资源计划与制造管理系统:物料编码、进销存、扫码称配全链路。</p>
|
||||
<span class="product-link">了解详情 →</span>
|
||||
</a>"""
|
||||
|
||||
|
||||
def build():
|
||||
posts = [parse_post(p) for p in sorted(POSTS_DIR.glob("*.md"), reverse=True)]
|
||||
posts.sort(key=lambda p: p["date"], reverse=True)
|
||||
@@ -144,11 +255,16 @@ def build():
|
||||
if not cards:
|
||||
cards.append('<p class="section-desc">暂无文章,敬请期待。</p>')
|
||||
|
||||
blog_list = f"""{page_header("/blog/")}
|
||||
blog_list = f"""{page_header("blog")}
|
||||
<section class="page-hero">
|
||||
<div class="container">
|
||||
<p class="hero-eyebrow">BLOG · 博客</p>
|
||||
<h1>工程实践与研究记录</h1>
|
||||
<p class="page-hero-sub">工业软件、标准件库、深度学习与工具开发的过程记录。</p>
|
||||
</div>
|
||||
</section>
|
||||
<section class="section">
|
||||
<div class="container">
|
||||
<h2 class="section-title">博客</h2>
|
||||
<p class="section-desc">工业软件、标准件库与数字化实践记录。</p>
|
||||
<div class="post-list">
|
||||
{''.join(cards)}
|
||||
</div>
|
||||
@@ -160,10 +276,10 @@ def build():
|
||||
# ---------- 文章详情页 ----------
|
||||
for p in posts:
|
||||
tags = "".join(f'<span class="tag">{t}</span>' for t in p["tags"])
|
||||
html = f"""{page_header(p['slug'], p['title'])}
|
||||
html = f"""{page_header("blog", p['title'])}
|
||||
<section class="section">
|
||||
<div class="container narrow">
|
||||
<nav class="breadcrumb"><a href="/">博客</a> / <a href="/blog/">文章列表</a></nav>
|
||||
<nav class="breadcrumb"><a href="/">首页</a> / <a href="/blog/">博客</a></nav>
|
||||
<h2 class="section-title">{p['title']}</h2>
|
||||
<div class="post-meta"><span class="post-date">{fmt_date(p['date'])}</span>{tags}</div>
|
||||
<article class="article">
|
||||
@@ -175,7 +291,7 @@ def build():
|
||||
(OUT_BLOG / p["slug"]).mkdir(parents=True, exist_ok=True)
|
||||
(OUT_BLOG / p["slug"] / "index.html").write_text(html, encoding="utf-8")
|
||||
|
||||
# ---------- 首页(博客首页) ----------
|
||||
# ---------- 首页 ----------
|
||||
recent = "".join(f"""
|
||||
<a class="post-card" href="/blog/{p['slug']}/">
|
||||
<div class="post-meta"><span class="post-date">{fmt_date(p['date'])}</span></div>
|
||||
@@ -185,45 +301,128 @@ def build():
|
||||
if not recent:
|
||||
recent = '<p class="section-desc">暂无文章,敬请期待。</p>'
|
||||
|
||||
home = f"""{page_header("/")}
|
||||
home = f"""{page_header("")}
|
||||
<section class="hero">
|
||||
<div class="hero-euler" aria-hidden="true">e<sup>iπ</sup> + 1 = 0</div>
|
||||
<div class="container">
|
||||
<p class="hero-eyebrow">INDUSTRIAL SOFTWARE INTEGRATION · STANDARDIZED MANAGEMENT · SKU REDUCTION · NEURAL NETWORK PRACTICE</p>
|
||||
<h1>数字化和人工智能</h1>
|
||||
<p class="hero-sub">工业软件集成 · 标准化管理 · SKU 降低 · 神经网络实践等 —— 基于 LLM 的流程工业技术研究和探索</p>
|
||||
<p class="hero-eyebrow">EASY DATA COLLECTION · SINCOS.CC</p>
|
||||
<h1>让工程与数据,<br>更简单</h1>
|
||||
<p class="hero-sub">工业软件集成 · 标准化管理 · 深度学习实践 —— 从标准件库、科研热榜到自研工具集,把想法持续做成可用的产品。</p>
|
||||
<div class="hero-actions">
|
||||
<a href="/blog/" class="btn btn-light">全部文章</a>
|
||||
<a href="/reslib/" class="btn btn-outline-light">ResLib 产品</a>
|
||||
<a href="/tools/" class="btn btn-light">探索工具开发</a>
|
||||
<a href="/research/" class="btn btn-outline-light">前沿技术研究</a>
|
||||
</div>
|
||||
<div class="hero-stats">
|
||||
<div class="hero-stat"><b>3</b><span>研究平台</span></div>
|
||||
<div class="hero-stat"><b>6</b><span>自研工具</span></div>
|
||||
<div class="hero-stat"><b>100%</b><span>私有化部署</span></div>
|
||||
<div class="hero-stat"><b>Creo · Web · Edge</b><span>多端形态</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<div class="container">
|
||||
<h2 class="section-title">平台</h2>
|
||||
<div class="grid">
|
||||
<a class="card card-link" href="/reslib/">
|
||||
<div class="icon">▤</div><h3>ResLib</h3><p>资源中心管理器 —— Creo 7.0+ 企业级标准零部件管理库,含 LIC 授权体系与在线申请。</p>
|
||||
</a>
|
||||
<a class="card card-link" href="/neural/">
|
||||
<div class="icon">◈</div><h3>Neural Research</h3><p>NeuralMix AI —— 工业混合机智能终点判定引擎,1D-CNN 深度学习评估混合均匀度。</p>
|
||||
</a>
|
||||
<a class="card card-link" href="http://124.220.63.9:25000">
|
||||
<div class="icon">⌕</div><h3>Research Digest</h3><p>国际顶尖科研热榜 —— 顶刊核心成果聚合与 AI 热度 / 突破度分析,每日自动检索。</p>
|
||||
</a>
|
||||
<div class="feature" style="padding-top: 0;">
|
||||
<div class="feature-copy">
|
||||
<span class="feature-tag">RESEARCH DIGEST</span>
|
||||
<h2>国际顶尖科研热榜</h2>
|
||||
<p>自动检索国际顶尖期刊与权威机构的最新成果,AI 输出中文摘要、技术突破总结与 0-5 突破度评分。</p>
|
||||
<ul class="feature-list">
|
||||
<li>31 个信源、21 个关注领域,每日 06:00 自动检索</li>
|
||||
<li>顶刊、上市公司公告、专利动态一屏掌握</li>
|
||||
</ul>
|
||||
<div class="feature-actions">
|
||||
<a href="http://124.220.63.9:25000" class="btn btn-primary">访问热榜</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="feature-visual" style="--v1:#0a6cff;--v2:#22c8ff">
|
||||
<span class="visual-glyph">⌕</span>
|
||||
<span class="visual-chip chip-a">21 个领域</span>
|
||||
<span class="visual-chip chip-b">每日更新</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="feature reverse">
|
||||
<div class="feature-copy">
|
||||
<span class="feature-tag">RESLIB</span>
|
||||
<h2>资源中心管理器 ResLib</h2>
|
||||
<p>面向 Creo 7.0+ 的企业级标准零部件管理库:标准件浏览、3D 预览、搜索过滤、快速装配与 LIC 授权体系。</p>
|
||||
<ul class="feature-list">
|
||||
<li>OpenGL 实时预览,装配体递归解析</li>
|
||||
<li>一键装配与参数定位,MAC 绑定授权</li>
|
||||
</ul>
|
||||
<div class="feature-actions">
|
||||
<a href="/research/reslib/" class="btn btn-primary">了解 ResLib</a>
|
||||
<a href="/license/" class="btn btn-ghost">License 申请</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="feature-visual" style="--v1:#007a5e;--v2:#22c8ff">
|
||||
<span class="visual-glyph">▤</span>
|
||||
<span class="visual-chip chip-a">Creo 7.0 - 10.0</span>
|
||||
<span class="visual-chip chip-b">3D 实时预览</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="feature">
|
||||
<div class="feature-copy">
|
||||
<span class="feature-tag">NEURAL RESEARCH</span>
|
||||
<h2>NeuralMix AI 混合终点判断</h2>
|
||||
<p>ModbusRTU 高速采集 → Redis 缓冲 → TimescaleDB 存储 → 1D-CNN 实时评估混合均匀度,参数稳定即判定完成。</p>
|
||||
<ul class="feature-list">
|
||||
<li>实时 + 静态工艺参数融合建模</li>
|
||||
<li>支持 Windows / Ubuntu / NVIDIA Jetson</li>
|
||||
</ul>
|
||||
<div class="feature-actions">
|
||||
<a href="/research/neural/" class="btn btn-primary">了解 NeuralMix</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="feature-visual" style="--v1:#5b3df5;--v2:#22c8ff">
|
||||
<span class="visual-glyph">◈</span>
|
||||
<span class="visual-chip chip-a">1D-CNN</span>
|
||||
<span class="visual-chip chip-b">0.15s 采样</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section section-alt">
|
||||
<div class="container">
|
||||
<div class="section-head center">
|
||||
<h2 class="section-title">工具开发</h2>
|
||||
<p class="section-desc">每一款工具都来自真实项目 —— 独立研发、私有部署、持续迭代。</p>
|
||||
</div>
|
||||
<div class="product-grid">{PRODUCT_CARDS}
|
||||
</div>
|
||||
<div class="text-center mt-32">
|
||||
<a href="/tools/" class="btn btn-primary">查看全部工具</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<div class="container">
|
||||
<h2 class="section-title">最新文章</h2>
|
||||
<div class="post-list">
|
||||
{recent}
|
||||
</div>
|
||||
<div style="text-align:center; margin-top: 30px;">
|
||||
<a href="/blog/" class="btn btn-primary">查看全部文章</a>
|
||||
<div class="text-center mt-32">
|
||||
<a href="/blog/" class="btn btn-ghost">查看全部文章</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section section-alt">
|
||||
<div class="container">
|
||||
<div class="cta-band">
|
||||
<div>
|
||||
<h2>License 与资源中心</h2>
|
||||
<p>ResLib 授权申请、查询下载与标准件资源包统一入口;私有服务与代码托管在资源中心。</p>
|
||||
</div>
|
||||
<div class="hero-actions">
|
||||
<a href="/license/" class="btn btn-light">License 中心</a>
|
||||
<a href="/resources/" class="btn btn-outline-light">资源中心</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -231,25 +430,30 @@ def build():
|
||||
OUT_HOME.write_text(home, encoding="utf-8")
|
||||
|
||||
# ---------- 关于页 ----------
|
||||
about = f"""{page_header("/about/")}
|
||||
about = f"""{page_header("")}
|
||||
<section class="page-hero">
|
||||
<div class="container">
|
||||
<p class="hero-eyebrow">ABOUT</p>
|
||||
<h1>关于</h1>
|
||||
<p class="page-hero-sub">Easy Data Collection —— 工业软件与数据产品的独立开发实践。</p>
|
||||
</div>
|
||||
</section>
|
||||
<section class="section">
|
||||
<div class="container narrow">
|
||||
<h2 class="section-title">关于</h2>
|
||||
<div class="article">
|
||||
<h3>SinCos</h3>
|
||||
<p>工业软件方向开发者。</p>
|
||||
<p>工业软件方向开发者,专注流程工业的数字化与智能化实践。</p>
|
||||
<h3>正在做</h3>
|
||||
<ul>
|
||||
<li><b>ResLib</b>:资源中心管理器 —— Creo 7.0+ 标准零部件管理库(Pro/TOOLKIT DLL 插件),支持 License 在线申请与审批</li>
|
||||
<li><b>Engineer Craft</b>:工程实践与工艺设计平台</li>
|
||||
<li><b>Digital Twin</b>:数字孪生平台(three.js + Python + MQTT/EMQX)</li>
|
||||
<li><b>Neural Research</b>:神经网络与算法研究</li>
|
||||
<li><b>Gitea Project</b>:代码托管与版本管理</li>
|
||||
<li><b>Neural Research</b>:NeuralMix AI 混合终点判断与算法研究</li>
|
||||
<li><b>工具开发</b>:Sequence-Diagram、Uni-Viewer、Engineer Craft、UniTouch、EDC Lite ERP 等自研产品</li>
|
||||
<li><b>Research Digest</b>:国际顶尖科研热榜与 AI 突破度分析</li>
|
||||
</ul>
|
||||
<h3>联系方式</h3>
|
||||
<ul>
|
||||
<li>博客:<a href="/">sincos.cc</a></li>
|
||||
<li>License 申请:<a href="/reslib/apply">/reslib/apply</a></li>
|
||||
<li>License 申请:<a href="/license/apply">/license/apply</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user