Files
news-tracker/templates/base.html
T
hz4th_coder e4efd24e1c v1.1.0: 真实网页采集(可读正文全文入库) + 大模型接口多预置一键切换(SiliconFlow默认) + 数据源可编辑
- 新增 crawler.py: requests+bs4 readability风格清洗, 提取候选链接按文章相似度排序, 前5条抓全文存 articles.full_text, 详情页展示; example.com占位源走模拟, 真实源失败标记error不造假
- 大模型: 新增 llm_providers 表(预置 SiliconFlow/DeepSeek官方/Autodl/Local Qwen), 设置页增删改/测试/一键切换, 激活接口失败自动切换备用
- 数据源: 前端补编辑按钮+弹窗(后端 update 已支持), 列表显示URL与采集状态
- 数据库迁移: articles.full_text 列 + llm_providers 表
2026-08-28 16:06:07 +08:00

54 lines
1.7 KiB
HTML

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}新闻智能跟踪系统{% endblock %}</title>
<link rel="stylesheet" href="/static/style.css">
</head>
<body>
<div class="layout">
<aside class="sidebar">
<div class="brand">
<div class="brand-icon">📡</div>
<div>
<div class="brand-name">新闻智能跟踪</div>
<div class="brand-sub">AI News Tracker</div>
</div>
</div>
<nav>
<a href="/dashboard" class="{{ 'active' if active=='dashboard' }}">📊 仪表盘</a>
<a href="/news" class="{{ 'active' if active=='news' }}">📰 资讯列表</a>
<a href="/sources" class="{{ 'active' if active=='sources' }}">📡 数据源</a>
<a href="/profile" class="{{ 'active' if active=='profile' }}">🎯 兴趣画像</a>
<a href="/logs" class="{{ 'active' if active=='logs' }}">✉️ 通知日志</a>
<a href="/settings" class="{{ 'active' if active=='settings' }}">⚙️ 设置</a>
</nav>
<div class="sidebar-foot">由大模型智能分析驱动 · 可一键切换</div>
</aside>
<main class="main">
{% block content %}{% endblock %}
</main>
</div>
<script>
const API = {
json: async (url, body) => {
const r = await fetch(url, {
method: 'POST', headers: {'Content-Type': 'application/json'},
body: JSON.stringify(body)
});
return r.json();
}
};
function toast(msg, ok=true) {
const el = document.createElement('div');
el.className = 'toast ' + (ok ? 'ok' : 'err');
el.textContent = msg;
document.body.appendChild(el);
setTimeout(() => el.remove(), 2600);
}
</script>
{% block script %}{% endblock %}
</body>
</html>