| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506 |
- <!DOCTYPE html>
- <html lang="zh-CN">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>TrendRadar 配置文件编辑器</title>
- <!-- Tailwind CSS -->
- <script src="https://cdn.tailwindcss.com"></script>
- <!-- FontAwesome -->
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
- <!-- js-yaml -->
- <script src="https://cdnjs.cloudflare.com/ajax/libs/js-yaml/4.1.0/js-yaml.min.js"></script>
- <!-- SortableJS (拖拽排序库) -->
- <script src="https://cdnjs.cloudflare.com/ajax/libs/Sortable/1.15.0/Sortable.min.js"></script>
- <!-- 自定义样式 -->
- <link rel="stylesheet" href="./assets/style.css">
- </head>
- <body class="bg-gray-100 text-gray-800 font-sans h-screen flex flex-col overflow-hidden">
- <!-- 顶部导航 -->
- <nav class="bg-white shadow-sm border-b border-gray-200 flex-shrink-0 z-20">
- <div class="max-w-full mx-auto px-4 sm:px-6 lg:px-8 h-14 flex items-center justify-between">
- <a href="https://github.com/sansan0/TrendRadar" target="_blank" class="flex items-center gap-3 hover:opacity-80 transition-opacity">
- <i class="fa-solid fa-sliders text-blue-600 text-lg"></i>
- <span class="font-bold text-lg tracking-tight text-gray-900">TrendRadar <span class="text-gray-500 text-xs font-normal ml-2">可视化配置编辑器 </span></span>
- </a>
- <!-- 隐私安全提示 -->
- <div class="hidden lg:flex items-center text-xs text-gray-500 bg-gray-50 px-3 py-1.5 rounded-full border border-gray-100 select-none">
- <i class="fa-solid fa-shield-halved mr-1.5 text-green-500"></i>
- <span>纯静态页面,数据仅保存在你的本地浏览器,请放心使用</span>
- </div>
- <div class="flex gap-3">
- <button onclick="openLoadConfigModal()" class="text-xs text-blue-600 hover:text-blue-800 underline flex items-center gap-1">
- <i class="fa-solid fa-cloud-arrow-down"></i>加载官网最新配置
- </button>
- <button onclick="copyResult()" class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-1.5 rounded text-sm font-medium transition-colors shadow-sm">
- <i class="fa-regular fa-copy mr-1.5"></i>复制配置
- </button>
- <button onclick="openSupportModal()" class="bg-gradient-to-r from-orange-400 to-pink-500 hover:from-orange-500 hover:to-pink-600 text-white px-4 py-1.5 rounded text-sm font-medium transition-all shadow-md hover:shadow-lg flex items-center gap-1.5">
- <i class="fa-solid fa-heart-pulse"></i>支持一下
- </button>
- </div>
- </div>
- </nav>
- <!-- 主界面:左右分栏 -->
- <main class="flex-grow flex overflow-hidden">
- <!-- 左侧:源代码编辑器 (Source) -->
- <div class="w-1/2 flex flex-col border-r border-gray-200 bg-[#1e1e1e]">
- <!-- Tab 切换 -->
- <div class="flex items-center bg-[#252526] border-b border-[#333]">
- <button id="tab-config" onclick="switchTab('config')" class="tab-button active px-4 py-2 text-xs font-bold text-gray-300 hover:bg-[#2d2d30] transition-colors border-b-2 border-blue-500">
- <i class="fa-solid fa-code mr-2"></i>config.yaml
- </button>
- <button id="tab-frequency" onclick="switchTab('frequency')" class="tab-button px-4 py-2 text-xs font-bold text-gray-500 hover:bg-[#2d2d30] transition-colors border-b-2 border-transparent">
- <i class="fa-solid fa-filter mr-2"></i>frequency_words.txt
- </button>
- <button id="tab-timeline" onclick="switchTab('timeline')" class="tab-button px-4 py-2 text-xs font-bold text-gray-500 hover:bg-[#2d2d30] transition-colors border-b-2 border-transparent">
- <i class="fa-solid fa-calendar-week mr-2"></i>timeline.yaml
- </button>
- <div class="flex-grow"></div>
- <!-- 保存时间显示 -->
- <div id="save-time-config" class="save-time-badge px-3 text-[10px] text-gray-500 flex items-center gap-1">
- <i class="fa-regular fa-clock"></i>
- <span id="config-save-label" class="hidden">已保存: </span>
- <span id="config-save-time" class="text-gray-400" title="未保存">未保存</span>
- </div>
- <div id="save-time-frequency" class="save-time-badge hidden px-3 text-[10px] text-gray-500 flex items-center gap-1">
- <i class="fa-regular fa-clock"></i>
- <span id="frequency-save-label" class="hidden">已保存: </span>
- <span id="frequency-save-time" class="text-gray-400" title="未保存">未保存</span>
- </div>
- <div id="save-time-timeline" class="save-time-badge hidden px-3 text-[10px] text-gray-500 flex items-center gap-1">
- <i class="fa-regular fa-clock"></i>
- <span id="timeline-save-label" class="hidden">已保存: </span>
- <span id="timeline-save-time" class="text-gray-400" title="未保存">未保存</span>
- </div>
- </div>
- <!-- Config 编辑器 -->
- <div id="yaml-editor-wrap" class="tab-content highlight-editor-wrap flex-grow w-full h-full bg-[#1e1e1e]">
- <div id="yaml-backdrop" class="highlight-backdrop"></div>
- <textarea id="yaml-editor" class="highlight-textarea" spellcheck="false"></textarea>
- </div>
- <!-- Frequency 编辑器 -->
- <div id="frequency-editor-wrap" class="tab-content hidden highlight-editor-wrap flex-grow w-full h-full bg-[#1e1e1e]">
- <div id="frequency-backdrop" class="highlight-backdrop"></div>
- <textarea id="frequency-editor" class="highlight-textarea" spellcheck="false"></textarea>
- </div>
- <!-- Timeline 编辑器 -->
- <div id="timeline-editor-wrap" class="tab-content hidden highlight-editor-wrap flex-grow w-full h-full bg-[#1e1e1e]">
- <div id="timeline-backdrop" class="highlight-backdrop"></div>
- <textarea id="timeline-editor" class="highlight-textarea" spellcheck="false"></textarea>
- </div>
- </div>
- <!-- 右侧:可视化配置 (Visual) -->
- <div class="w-1/2 flex flex-col bg-gray-50">
- <div class="flex items-center justify-between px-6 py-3 bg-white border-b border-gray-200">
- <div class="flex items-center gap-3">
- <span class="text-sm font-bold text-gray-700"><i class="fa-solid fa-list-check mr-2"></i><span id="right-panel-title">配置模块</span></span>
- <button id="version-check-btn" onclick="checkVersion()" class="text-xs bg-indigo-500 hover:bg-indigo-600 text-white px-3 py-1 rounded shadow-sm transition-all flex items-center gap-1.5" title="检测 config.yaml 版本">
- <i class="fa-solid fa-code-compare"></i>
- <span>版本检测</span>
- </button>
- <button onclick="resetToDefault()" class="text-xs text-gray-400 hover:text-red-500 transition-colors px-2 py-1" title="重置当前内容为默认状态">
- <i class="fa-solid fa-rotate-left"></i>
- </button>
- </div>
- </div>
- <!-- 模块导航栏 -->
- <div id="module-nav" class="tab-content bg-white border-b border-gray-200 px-4 py-2 flex flex-wrap gap-1">
- </div>
- <!-- Config 可视化面板 -->
- <div id="config-panel" class="tab-content flex-grow overflow-y-auto p-6 space-y-6">
- </div>
- <!-- Frequency 可视化面板 -->
- <div id="frequency-panel" class="tab-content hidden flex-grow overflow-y-auto p-6 space-y-6">
- </div>
- <!-- Timeline 可视化面板 -->
- <div id="timeline-panel" class="tab-content hidden flex-grow overflow-y-auto p-6 space-y-6">
- </div>
- </div>
- </main>
- <!-- RSS 添加弹窗 -->
- <div id="rss-modal" class="modal-overlay hidden">
- <div class="modal-content">
- <div class="flex items-center justify-between mb-4">
- <h3 class="text-lg font-bold text-gray-800"><i class="fa-solid fa-rss mr-2 text-orange-500"></i>添加 RSS 源</h3>
- <button onclick="closeRssModal()" class="text-gray-400 hover:text-gray-600"><i class="fa-solid fa-times text-xl"></i></button>
- </div>
- <div class="space-y-4">
- <div>
- <label class="block text-xs font-bold text-gray-600 mb-1">源 ID(唯一标识,英文)</label>
- <input type="text" id="rss-id" placeholder="例如: my-blog" class="w-full px-3 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
- </div>
- <div>
- <label class="block text-xs font-bold text-gray-600 mb-1">显示名称</label>
- <input type="text" id="rss-name" placeholder="例如: 我的博客" class="w-full px-3 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
- </div>
- <div>
- <label class="block text-xs font-bold text-gray-600 mb-1">RSS URL</label>
- <input type="text" id="rss-url" placeholder="https://example.com/feed.xml" class="w-full px-3 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
- </div>
- <div>
- <label class="block text-xs font-bold text-gray-600 mb-1">最大文章年龄(天,可选)</label>
- <input type="number" id="rss-max-age" placeholder="留空使用全局设置" class="w-full px-3 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
- </div>
- </div>
- <!-- RSS 灵感折叠区 -->
- <div class="mt-5 border-t border-gray-100 pt-4">
- <button type="button" onclick="toggleRssTips()" class="w-full flex items-center justify-between text-xs text-orange-600 hover:text-orange-700 bg-orange-50 hover:bg-orange-100 px-3 py-2 rounded-lg transition-all group">
- <span class="font-bold flex items-center gap-1.5">
- <i class="fa-regular fa-lightbulb"></i> RSS 订阅灵感 & 参考库 <span class="font-normal opacity-70 ml-1">(内附常用源)</span>
- </span>
- <i id="rss-tips-icon" class="fa-solid fa-chevron-down transition-transform duration-200 text-orange-400 group-hover:text-orange-600" style="transform: rotate(180deg);"></i>
- </button>
- <div id="rss-tips-panel" class="mt-2 space-y-3 pl-1">
- <!-- 必应新闻 -->
- <div class="bg-white border border-gray-100 rounded-lg p-3 shadow-sm">
- <div class="flex items-center gap-2 mb-2">
- <i class="fa-brands fa-microsoft text-blue-500"></i>
- <span class="font-bold text-gray-700">Bing 新闻 (支持任意关键词)</span>
- </div>
- <div class="grid grid-cols-2 gap-2 mb-2">
- <button onclick="fillRssUrl('https://www.bing.com/news/search?q=科技+编程&format=RSS')" class="text-left text-[10px] border border-gray-200 hover:border-blue-400 hover:bg-blue-50 hover:text-blue-600 rounded px-2 py-1.5 transition-colors truncate" title="点击填入">
- 🚀 科技/编程
- </button>
- <button onclick="fillRssUrl('https://www.bing.com/news/search?q=全球新闻&format=RSS')" class="text-left text-[10px] border border-gray-200 hover:border-blue-400 hover:bg-blue-50 hover:text-blue-600 rounded px-2 py-1.5 transition-colors truncate" title="点击填入">
- 🌍 全球新闻
- </button>
- <button onclick="fillRssUrl('https://www.bing.com/news/search?q=人工智能&format=RSS')" class="text-left text-[10px] border border-gray-200 hover:border-blue-400 hover:bg-blue-50 hover:text-blue-600 rounded px-2 py-1.5 transition-colors truncate" title="点击填入">
- 🤖 人工智能
- </button>
- <button onclick="fillRssUrl('https://www.bing.com/news/search?q=黄金价格+走势&format=RSS')" class="text-left text-[10px] border border-gray-200 hover:border-blue-400 hover:bg-blue-50 hover:text-blue-600 rounded px-2 py-1.5 transition-colors truncate" title="点击填入">
- 💰 黄金/财经
- </button>
- </div>
- <div class="text-[10px] text-gray-400">
- 💡 小贴士:修改 URL 中的 <code class="bg-gray-100 px-1 rounded text-gray-600">q=</code> 参数即可监控任何你感兴趣的话题。
- </div>
- </div>
- <!-- 更多参考 -->
- <div class="bg-white border border-gray-100 rounded-lg p-3 shadow-sm">
- <div class="flex items-center gap-2 mb-2">
- <i class="fa-solid fa-book-open text-purple-500"></i>
- <span class="font-bold text-gray-700">更多 RSS 源参考</span>
- </div>
- <div class="flex flex-wrap gap-2 text-xs">
- <a href="https://github.com/tuan3w/awesome-tech-rss" target="_blank" class="text-blue-600 hover:underline flex items-center bg-blue-50 px-2 py-1 rounded">
- <i class="fa-brands fa-github mr-1"></i>科技/编程
- </a>
- <a href="https://github.com/plenaryapp/awesome-rss-feeds" target="_blank" class="text-blue-600 hover:underline flex items-center bg-blue-50 px-2 py-1 rounded">
- <i class="fa-brands fa-github mr-1"></i>全球新闻
- </a>
- </div>
- </div>
- <!-- 免责声明 -->
- <div class="text-[10px] text-gray-400 italic leading-relaxed px-1">
- <i class="fa-solid fa-shield-halved mr-1 text-gray-300"></i>免责声明:以上 RSS 示例及第三方工具均源自互联网,开发者未一一验证其长期有效性,请你在使用前自行核实。
- </div>
- </div>
- </div>
- <div class="flex justify-end gap-2 mt-6">
- <button onclick="closeRssModal()" class="px-4 py-2 text-gray-600 hover:bg-gray-100 rounded-lg">取消</button>
- <button onclick="confirmAddRss()" class="px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700">添加</button>
- </div>
- </div>
- </div>
- <!-- 平台添加弹窗 -->
- <div id="platform-modal" class="modal-overlay hidden">
- <div class="modal-content">
- <div class="flex items-center justify-between mb-4">
- <h3 class="text-lg font-bold text-gray-800"><i class="fa-solid fa-layer-group mr-2 text-green-600"></i>添加热榜平台</h3>
- <button onclick="closePlatformModal()" class="text-gray-400 hover:text-gray-600"><i class="fa-solid fa-times text-xl"></i></button>
- </div>
- <!-- 标签页切换 -->
- <div class="flex border-b border-gray-200 mb-4">
- <button onclick="switchPlatformTab('select')" id="tab-platform-select" class="flex-1 py-2 text-sm font-bold text-blue-600 border-b-2 border-blue-600 transition-colors">
- <i class="fa-solid fa-list mr-1"></i>选择预设
- </button>
- <button onclick="switchPlatformTab('custom')" id="tab-platform-custom" class="flex-1 py-2 text-sm font-bold text-gray-500 border-b-2 border-transparent hover:text-gray-700 transition-colors">
- <i class="fa-solid fa-pen-to-square mr-1"></i>手动输入
- </button>
- </div>
- <!-- 1. 选择预设平台 -->
- <div id="platform-select-panel" class="space-y-4">
- <div id="available-platforms-list" class="space-y-2 max-h-60 overflow-y-auto pr-1">
- <!-- 动态生成可用平台 -->
- </div>
- <div id="no-platforms-tip" class="hidden text-center py-6 text-gray-500 text-sm bg-gray-50 rounded">
- <i class="fa-solid fa-check-circle text-green-500 mr-2"></i>所有预设平台已添加
- </div>
- </div>
- <!-- 2. 手动输入平台 -->
- <div id="platform-custom-panel" class="hidden space-y-4">
- <div class="bg-blue-50 border border-blue-100 rounded p-3 mb-3 text-xs text-blue-800">
- <i class="fa-solid fa-info-circle mr-1"></i>自定义平台需要后端爬虫支持,此处仅用于配置占位。
- </div>
- <div>
- <label class="block text-xs font-bold text-gray-600 mb-1">平台 Key(英文)</label>
- <input type="text" id="custom-platform-key" placeholder="例如: sspai" class="w-full px-3 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
- </div>
- <div>
- <label class="block text-xs font-bold text-gray-600 mb-1">显示名称</label>
- <input type="text" id="custom-platform-name" placeholder="例如: 少数派" class="w-full px-3 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
- </div>
- </div>
- <div class="flex justify-end gap-2 mt-6">
- <button onclick="closePlatformModal()" class="px-4 py-2 text-gray-600 hover:bg-gray-100 rounded-lg">取消</button>
- <button onclick="confirmAddPlatform()" class="px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700">添加</button>
- </div>
- </div>
- </div>
- <!-- 词组类型选择弹窗 -->
- <div id="wordgroup-type-modal" class="modal-overlay hidden">
- <div class="modal-content max-w-2xl">
- <div class="flex items-center justify-between mb-4">
- <h3 class="text-lg font-bold text-gray-800"><i class="fa-solid fa-layer-group mr-2 text-blue-500"></i>选择词组类型</h3>
- <button onclick="closeWordGroupTypeModal()" class="text-gray-400 hover:text-gray-600"><i class="fa-solid fa-times text-xl"></i></button>
- </div>
- <div class="space-y-3">
- <!-- 组别名类型 -->
- <div onclick="confirmAddWordGroup('group')" class="cursor-pointer border-2 border-orange-200 bg-orange-50 rounded-lg p-4 hover:border-orange-400 hover:bg-orange-100 transition-all">
- <div class="flex items-center gap-3">
- <span class="text-xs bg-orange-500 text-white px-2 py-1 rounded font-bold">组别名</span>
- <span class="font-bold text-gray-800">多关键词词组(推荐)</span>
- </div>
- <div class="mt-2 text-sm text-gray-600">
- <div class="font-mono bg-white rounded p-2 text-xs border border-orange-200">
- <div class="text-orange-600">[东亚]</div>
- <div>日本</div>
- <div>韩国</div>
- <div>朝鲜</div>
- </div>
- <div class="mt-2 text-xs text-gray-500">
- <i class="fa-solid fa-check-circle text-orange-500 mr-1"></i>适用于:多个关键词归为一组,统一显示为组名
- </div>
- </div>
- </div>
- <!-- 单个别名类型 -->
- <div onclick="confirmAddWordGroup('alias')" class="cursor-pointer border-2 border-teal-200 bg-teal-50 rounded-lg p-4 hover:border-teal-400 hover:bg-teal-100 transition-all">
- <div class="flex items-center gap-3">
- <span class="text-xs bg-teal-500 text-white px-2 py-1 rounded font-bold">单个别名</span>
- <span class="font-bold text-gray-800">正则/关键词 + 别名</span>
- </div>
- <div class="mt-2 text-sm text-gray-600">
- <div class="font-mono bg-white rounded p-2 text-xs border border-teal-200">
- <div>/胖东来|于东来/ <span class="text-teal-600">=></span> 胖东来</div>
- </div>
- <div class="mt-2 text-xs text-gray-500">
- <i class="fa-solid fa-check-circle text-teal-500 mr-1"></i>适用于:用正则匹配多个词,显示为一个别名(前后有空行分隔)
- </div>
- </div>
- </div>
- <!-- 连续别名类型 -->
- <div onclick="confirmAddWordGroup('multi-alias')" class="cursor-pointer border-2 border-purple-200 bg-purple-50 rounded-lg p-4 hover:border-purple-400 hover:bg-purple-100 transition-all">
- <div class="flex items-center gap-3">
- <span class="text-xs bg-purple-500 text-white px-2 py-1 rounded font-bold">连续别名组</span>
- <span class="font-bold text-gray-800">多个相关品牌/词组</span>
- </div>
- <div class="mt-2 text-sm text-gray-600">
- <div class="font-mono bg-white rounded p-2 text-xs border border-purple-200">
- <div>/智元|灵犀|稚晖君/ <span class="text-purple-600">=></span> 智元机器人</div>
- <div>/众擎|EngineAI/ <span class="text-purple-600">=></span> 众擎机器人</div>
- </div>
- <div class="mt-2 text-xs text-gray-500">
- <i class="fa-solid fa-check-circle text-purple-500 mr-1"></i>适用于:多个相关品牌放在一起(<strong>无空行分隔</strong>)
- </div>
- </div>
- </div>
- <!-- 普通词组类型 -->
- <div onclick="confirmAddWordGroup('plain')" class="cursor-pointer border-2 border-gray-200 bg-gray-50 rounded-lg p-4 hover:border-gray-400 hover:bg-gray-100 transition-all">
- <div class="flex items-center gap-3">
- <span class="text-xs bg-gray-500 text-white px-2 py-1 rounded font-bold">普通词组</span>
- <span class="font-bold text-gray-800">简单关键词</span>
- </div>
- <div class="mt-2 text-sm text-gray-600">
- <div class="font-mono bg-white rounded p-2 text-xs border border-gray-200">
- <div>申奥</div>
- </div>
- <div class="mt-2 text-xs text-gray-500">
- <i class="fa-solid fa-check-circle text-gray-500 mr-1"></i>适用于:单个或少量普通关键词
- </div>
- </div>
- </div>
- </div>
- <div class="flex justify-end gap-2 mt-6">
- <button onclick="closeWordGroupTypeModal()" class="px-4 py-2 text-gray-600 hover:bg-gray-100 rounded-lg">取消</button>
- </div>
- </div>
- </div>
- <!-- 支持项目弹窗 -->
- <div id="support-modal" class="modal-overlay hidden">
- <div class="modal-content support-modal-content max-w-5xl w-[95%] max-h-[90vh] overflow-y-auto p-8">
- <div class="flex items-center justify-between mb-8">
- <div class="flex items-center gap-4">
- <div class="w-12 h-12 bg-orange-50 rounded-full flex items-center justify-center text-orange-500 shadow-sm relative overflow-hidden">
- <div class="absolute inset-0 bg-orange-400 opacity-20 animate-ping"></div>
- <i class="fa-solid fa-heart text-2xl animate-pulse relative z-10"></i>
- </div>
- <div>
- <h3 class="text-2xl font-bold text-gray-800 tracking-tight">觉得好用?支持一下 ✨</h3>
- <p class="text-sm text-gray-500 mt-1">若 TrendRadar 曾为你捕捉价值,不妨为它注入动力,助其持续进化</p>
- </div>
- </div>
- <button onclick="closeSupportModal()" class="w-10 h-10 flex items-center justify-center rounded-full hover:bg-gray-100 text-gray-400 transition-colors">
- <i class="fa-solid fa-times text-xl"></i>
- </button>
- </div>
- <div class="grid grid-cols-1 md:grid-cols-4 gap-6">
- <a href="https://github.com/sansan0/TrendRadar" target="_blank" class="support-card group border-orange-200 bg-orange-50/30">
- <div class="support-card-num opacity-50">01</div>
- <div class="support-icon text-orange-500 bg-orange-100 group-hover:bg-orange-200 mb-4 group-hover:scale-110 transition-transform">
- <i class="fa-solid fa-star text-2xl"></i>
- </div>
- <h4 class="text-lg font-bold text-gray-800 mb-2">点亮 Star</h4>
- <p class="text-sm text-gray-500 mb-6 text-center leading-relaxed">只需 1 秒,让更多人发现它</p>
- <span class="support-btn bg-gradient-to-r from-orange-400 to-red-500 shadow-lg shadow-orange-200 group-hover:shadow-xl group-hover:from-orange-500 group-hover:to-red-600">立即前往 GitHub</span>
- </a>
- <div class="support-card group">
- <div class="support-card-num">02</div>
- <div class="support-icon text-green-600 bg-green-50 group-hover:bg-green-100 mb-4">
- <i class="fa-brands fa-weixin text-2xl"></i>
- </div>
- <h4 class="text-lg font-bold text-gray-800 mb-2">不迷路</h4>
- <p class="text-sm text-gray-500 mb-4 text-center">第一时间获取更新通知</p>
- <div class="w-36 h-36 bg-white border border-gray-100 rounded-xl p-2 shadow-sm group-hover:shadow-md transition-shadow">
- <img src="./assets/weixin.webp" alt="微信公众号" class="w-full h-full object-contain">
- </div>
- <p class="text-xs text-gray-400 mt-3">扫码加入社区</p>
- </div>
- <div class="support-card group">
- <div class="support-card-num">03</div>
- <div class="support-icon text-emerald-600 bg-emerald-50 group-hover:bg-emerald-100 mb-4">
- <i class="fa-solid fa-hand-holding-heart text-2xl"></i>
- </div>
- <h4 class="text-lg font-bold text-gray-800 mb-2">随心赞赏</h4>
- <p class="text-sm text-gray-500 mb-4 text-center">金额随意,1 元也是鼓励 (´▽`ʃ♡ƪ)</p>
- <div class="w-36 h-36 bg-white border border-gray-100 rounded-xl p-2 shadow-sm group-hover:shadow-md transition-shadow">
- <img src="https://cdn-1258574687.cos.ap-shanghai.myqcloud.com/img/%2F2026%2F01%2F18ecce7c224ce0ea4c59394c29e408f8-e0d1db45.webp" alt="微信支付" class="w-full h-full object-contain">
- </div>
- <p class="text-xs text-gray-400 mt-3">微信扫码 • 丰俭由人</p>
- </div>
- <a href="https://sansan0.github.io/mao-map/" target="_blank" class="support-card group">
- <div class="support-card-num">04</div>
- <div class="support-icon text-red-500 bg-red-50 group-hover:bg-red-100 mb-4">
- <i class="fa-solid fa-map-location-dot text-2xl"></i>
- </div>
- <h4 class="text-lg font-bold text-gray-800 mb-2">探索更多</h4>
- <p class="text-sm text-gray-500 mb-6 text-center leading-relaxed">另一个用心的作品</p>
- <span class="support-btn bg-red-50 text-red-600 group-hover:bg-red-100 group-hover:text-red-700 border border-red-100">去看看</span>
- </a>
- </div>
- <div class="mt-8 pt-6 border-t border-gray-100 text-center">
- <p class="text-sm text-gray-400 font-serif italic tracking-wide">"开源不易,感谢每一份支持"</p>
- </div>
- </div>
- </div>
- <!-- 新建调度模式弹窗 -->
- <div id="tl-new-preset-modal" class="modal-overlay hidden">
- <div class="modal-content">
- <div class="flex items-center justify-between mb-4">
- <h3 class="text-lg font-bold text-gray-800"><i class="fa-solid fa-calendar-plus mr-2 text-purple-600"></i>新建调度模式</h3>
- <button onclick="closeTlNewPresetModal()" class="text-gray-400 hover:text-gray-600"><i class="fa-solid fa-times text-xl"></i></button>
- </div>
- <div class="space-y-4">
- <div>
- <label class="block text-xs font-bold text-gray-600 mb-1">模式标识 (key)</label>
- <input type="text" id="tl-new-preset-key" placeholder="英文标识,如 my_schedule" class="w-full px-3 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-purple-500 text-sm">
- <p class="text-[10px] text-gray-400 mt-1">仅支持英文、数字和下划线,将作为 YAML 中的 key</p>
- </div>
- <div>
- <label class="block text-xs font-bold text-gray-600 mb-1">显示名称</label>
- <input type="text" id="tl-new-preset-name" placeholder="如:我的调度" class="w-full px-3 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-purple-500 text-sm">
- </div>
- <div>
- <label class="block text-xs font-bold text-gray-600 mb-1">描述(可选)</label>
- <input type="text" id="tl-new-preset-desc" placeholder="简短描述此模式的用途" class="w-full px-3 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-purple-500 text-sm">
- </div>
- <div>
- <label class="block text-xs font-bold text-gray-600 mb-1">基于模板</label>
- <select id="tl-new-preset-template" class="w-full px-3 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-purple-500 text-sm">
- <option value="">空白模板(仅采集,不推送不分析)</option>
- </select>
- <p class="text-[10px] text-gray-400 mt-1">复制已有模式的全部配置作为起点</p>
- </div>
- </div>
- <div class="flex justify-end gap-2 mt-6">
- <button onclick="closeTlNewPresetModal()" class="px-4 py-2 text-gray-600 hover:bg-gray-100 rounded-lg">取消</button>
- <button onclick="confirmTlNewPreset()" class="px-4 py-2 bg-purple-600 text-white rounded-lg hover:bg-purple-700">创建</button>
- </div>
- </div>
- </div>
- <!-- 新增时间段弹窗 -->
- <div id="tl-new-period-modal" class="modal-overlay hidden">
- <div class="modal-content">
- <div class="flex items-center justify-between mb-4">
- <h3 class="text-lg font-bold text-gray-800"><i class="fa-solid fa-clock-rotate-left mr-2 text-blue-600"></i>新增时间段</h3>
- <button onclick="closeTlNewPeriodModal()" class="text-gray-400 hover:text-gray-600"><i class="fa-solid fa-times text-xl"></i></button>
- </div>
- <div class="space-y-4">
- <div>
- <label class="block text-xs font-bold text-gray-600 mb-1">时间段标识 (key)</label>
- <input type="text" id="tl-new-period-key" placeholder="英文标识,如 morning_push" class="w-full px-3 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm">
- <p class="text-[10px] text-gray-400 mt-1">仅支持英文、数字和下划线</p>
- </div>
- <div>
- <label class="block text-xs font-bold text-gray-600 mb-1">显示名称</label>
- <input type="text" id="tl-new-period-name" placeholder="如:晨间推送" class="w-full px-3 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm">
- </div>
- <div class="grid grid-cols-2 gap-4">
- <div>
- <label class="block text-xs font-bold text-gray-600 mb-1">开始时间</label>
- <input type="time" id="tl-new-period-start" value="09:00" class="w-full px-3 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm">
- </div>
- <div>
- <label class="block text-xs font-bold text-gray-600 mb-1">结束时间</label>
- <input type="time" id="tl-new-period-end" value="11:00" class="w-full px-3 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm">
- </div>
- </div>
- <div class="bg-blue-50 border border-blue-100 rounded p-3 text-xs text-blue-700">
- <i class="fa-solid fa-info-circle mr-1"></i>如果开始时间 > 结束时间(如 22:00~01:00),将自动识别为跨午夜时间段。
- </div>
- </div>
- <div class="flex justify-end gap-2 mt-6">
- <button onclick="closeTlNewPeriodModal()" class="px-4 py-2 text-gray-600 hover:bg-gray-100 rounded-lg">取消</button>
- <button onclick="confirmTlNewPeriod()" class="px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700">添加</button>
- </div>
- </div>
- </div>
- <script src="./assets/script.js"></script>
- </body>
- </html>
|