徐州住房和城乡建设局网站安全网站建设与服务的关系

张小明 2026/1/2 11:35:38
徐州住房和城乡建设局网站,安全网站建设与服务的关系,站长工具下载app,wordpress出现不能登录界面场景#xff0c;我们写了很多页面#xff0c;但是一个一个人工智能去匹配不太可能。 功能#xff0c;运行Python脚本#xff0c;自动生成主页面引入的配置.js #xff0c;这样主页面和脚本不用动#xff0c;每次实时生成配置文件。 一共三个文件。主文件#xff0b;配置…场景我们写了很多页面但是一个一个人工智能去匹配不太可能。功能运行Python脚本自动生成主页面引入的配置.js 这样主页面和脚本不用动每次实时生成配置文件。一共三个文件。主文件配置文件脚本#!/data/data/com.termux/files/usr/bin/python3 # -*- coding: utf-8 -*- Termux 专用完全递归目录即分类文件进对应分类描述无空格 300图标库随机分配前300不重复后续可重复 仅扫描HTML文件.html, .htm忽略JS文件 from pathlib import Path import json import random ROOT_DIR Path(/storage/emulated/0/Download/OnePlus Share/05_APP/苏沫V/B..导航逻辑) CONFIG_FILE ROOT_DIR / 1_nav.config.js # 1. 创建300个图标库包含各种主题动物、植物、物品、符号等 ICON_LIBRARY [ # 动物类 (1-50) , , , , , , , , , , , , , , , , , , , , , , , , , , , ️, , , , , , , , , , , , , ️, ️, , , , , , , , , # 植物类 (51-100) , , , , , , ☘️, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ☘️, , , , # 食物类 (101-150) , , , , , , , , , , , , , , , , , , , , , ️, , , , , , , , , , , , , , , , , , , , , , , , , , , , , # 物品类 (151-200) , , , , ⌨️, ️, ️, ️, , ️, , , , , , , ☎️, , , , , ️, ️, , ⏱️, ⏲️, ⏰, ️, ⌚, ⏳, ⌛, , , , , , ️, , ⛏️, ⚒️, ️, ️, ⚔️, , , , , , ⚙️, ️, # 符号类 (201-250) ⭐, , ✨, , ☄️, , , , , , , , , , ❄️, , , , , ✨, , , , , , , , , , , , , ️, ️, , ️, , , , , , ⚽, , , ⚾, , , , , , # 特殊类 (251-300) , , , , , , , , , , , , , , , , , , , , , , , ♟️, , , , , , , , , , , , , ♿, , , , , , , , , , ⚠️, , ⛔, ] def scan(root: Path): 2. 返回 {分类名: 文件对象, ..., ...} 与总文件数 cats {} total 0 icon_index 0 # 用于追踪图标分配 def dfs(base: Path): nonlocal total, icon_index rel str(base.relative_to(root)).replace(\\, /) key if rel . else rel # 根目录文件用空字符串当 key files [] for p in sorted(base.iterdir()): if p.is_file(): # 添加文件扩展名过滤只处理HTML文件 if p.suffix.lower() in [.html, .htm]: # 3. 图标分配逻辑前300个不重复之后可重复 if icon_index len(ICON_LIBRARY): icon ICON_LIBRARY[icon_index] else: icon random.choice(ICON_LIBRARY) files.append({ name: p.stem, file: f/B..导航逻辑/{rel}/{p.name} if rel else f/B..导航逻辑/{p.name}, icon: icon, description: f{p.stem}页面 # ← 无空格 }) total 1 icon_index 1 # 忽略非HTML文件包括JS文件 else: dfs(p) # 递归子目录 if files: cats[key] files dfs(root) return cats, total def generate_js(cats, total): 4. 生成JavaScript配置文件 lines [(function(){] lines.append(console.log(正在加载导航配置...);) lines.append(fwindow.__fileCount {total};) lines.append(window.navConfig {) for cat, arr in cats.items(): k cat or 根目录 # 根目录文件给个中文 key lines.append(f {k}: [) for i, obj in enumerate(arr): comma , if i len(arr) - 1 else lines.append(f {json.dumps(obj, ensure_asciiFalse)}{comma}) lines.append( ],) # 移除最后一个逗号 if lines[-1].endswith(,): lines[-1] lines[-1][:-1] lines.append(};) lines.append(})();) return \n.join(lines) def main(): 5. 主函数扫描目录并生成配置 if not ROOT_DIR.exists(): print(目录不存在, ROOT_DIR) exit(1) cats, total scan(ROOT_DIR) js_content generate_js(cats, total) CONFIG_FILE.write_text(js_content, encodingutf-8) print(✅ 配置已生成, CONFIG_FILE) print( 总HTML文件数, total) print( 图标库大小, len(ICON_LIBRARY)) if total len(ICON_LIBRARY): print(⚠️ 文件数超过图标库部分图标将重复使用) if __name__ __main__: main()!DOCTYPE html html langzh-CN head meta charsetUTF-8 meta nameviewport contentwidthdevice-width, initial-scale1.0 title导航管理系统/title style * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, sans-serif; background: #f5f5f5; min-height: 100vh; color: #333; width: 100vw; overflow-x: hidden; } .container { width: 100vw; min-height: 100vh; padding: 10px; } header { display: flex; justify-content: flex-end; align-items: center; padding: 10px; gap: 10px; } .header-btn { padding: 10px 20px; border-radius: 8px; background: white; border: 1px solid #e0e0e0; font-size: 14px; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); transition: all 0.3s ease; color: #333; font-weight: 500; } .header-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); background: #f8f8f8; } main { padding: 10px 0; } .saved-navs { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); width: 100%; } .saved-navs h2 { color: #333; margin-bottom: 20px; font-size: 20px; font-weight: 600; } .nav-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 10px; margin-top: 15px; width: 100%; } /* 手机竖屏适配 */ media (max-width: 768px) and (orientation: portrait) { .container { padding: 5px; } .nav-grid { grid-template-columns: repeat(5, 1fr); gap: 5px; } .nav-item { padding: 8px 2px !important; border-radius: 6px !important; } .nav-item .icon { font-size: 20px !important; margin-bottom: 2px !important; } .nav-item .name { font-size: 10px !important; line-height: 1.1 !important; } .saved-navs { padding: 15px 10px; border-radius: 8px; } header { padding: 5px; } .header-btn { padding: 8px 15px; font-size: 12px; } } .nav-item { background: #f8f9fa; border: 1px solid #e9ecef; border-radius: 8px; padding: 12px 4px; cursor: pointer; text-align: center; aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: all 0.3s ease; width: 100%; height: 100%; } .nav-item:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); background: #fff; border-color: #007bff; } .nav-item .icon { font-size: 28px; margin-bottom: 6px; flex: 1; display: flex; align-items: center; justify-content: center; width: 100%; color: #007bff; } .nav-item .name { color: #333; font-size: 11px; font-weight: 500; line-height: 1.2; width: 100%; text-align: center; word-break: break-all; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } .empty-state { text-align: center; padding: 60px 20px; color: #999; } .empty-state h3 { font-size: 18px; margin-bottom: 10px; } .modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); } .modal-content { background-color: white; margin: 2% auto; padding: 0; border-radius: 12px; width: 95%; max-width: 1200px; max-height: 96vh; overflow: hidden; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2); } .modal-header { background: white; color: #333; padding: 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #e9ecef; } .modal-header h2 { font-size: 20px; font-weight: 600; } .close { color: #999; font-size: 24px; font-weight: bold; cursor: pointer; transition: all 0.3s ease; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 50%; } .close:hover { background: #f5f5f5; color: #333; } .modal-body { padding: 20px; max-height: calc(96vh - 140px); overflow-y: auto; width: 100%; } .config-page-nav { display: flex; justify-content: center; gap: 10px; margin-bottom: 20px; padding: 15px; background: #f8f9fa; border-radius: 8px; } .config-page-btn { padding: 10px 20px; background: white; color: #333; border: 1px solid #dee2e6; border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 500; transition: all 0.3s ease; } .config-page-btn:hover { background: #007bff; color: white; border-color: #007bff; } .config-page-btn.active { background: #007bff; color: white; border-color: #007bff; } .category-section { margin-bottom: 20px; background: #f8f9fa; border-radius: 8px; padding: 15px; } .category-title { font-size: 16px; font-weight: 600; color: #333; margin-bottom: 15px; display: flex; align-items: center; } .subcategory-section { margin-bottom: 15px; background: white; border-radius: 6px; padding: 12px; } .subcategory-title { font-size: 14px; font-weight: 500; color: #666; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid #e9ecef; } .config-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 10px; width: 100%; } /* 手机竖屏配置网格适配 */ media (max-width: 768px) and (orientation: portrait) { .config-grid { grid-template-columns: repeat(5, 1fr); gap: 5px; } .config-item { padding: 8px 2px !important; border-radius: 6px !important; } .config-item .icon { font-size: 18px !important; margin-bottom: 2px !important; } .config-item .name { font-size: 9px !important; line-height: 1.1 !important; } .config-page-nav { padding: 10px 5px; gap: 5px; } .config-page-btn { padding: 8px 12px; font-size: 12px; } .category-section { padding: 10px 5px; margin-bottom: 10px; } .subcategory-section { padding: 8px 5px; margin-bottom: 8px; } .modal-body { padding: 10px 5px; } } .config-item { background: #f8f9fa; border: 1px solid #e9ecef; border-radius: 8px; padding: 12px 4px; cursor: pointer; text-align: center; aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: all 0.3s ease; width: 100%; height: 100%; position: relative; } .config-item:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); background: #fff; border-color: #28a745; } .config-item .icon { font-size: 24px; margin-bottom: 6px; flex: 1; display: flex; align-items: center; justify-content: center; width: 100%; color: #28a745; } .config-item .name { color: #333; font-size: 10px; font-weight: 500; line-height: 1.2; width: 100%; text-align: center; word-break: break-all; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } .toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); background: #28a745; color: white; padding: 12px 24px; border-radius: 50px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); opacity: 0; transition: opacity 0.3s ease; z-index: 2000; font-size: 14px; font-weight: 500; } .toast.show { opacity: 1; } .toast.warning { background: #ffc107; color: #333; } /style /head body div classcontainer header button classheader-btn idaddBtn添加导航/button button classheader-btn idresetBtn重置/button /header main section classsaved-navs h2 我的导航/h2 div idsavedNavsContainer classnav-grid !-- 动态生成已保存的导航项 -- /div div idemptyState classempty-state styledisplay: none; h3暂无保存的导航/h3 p点击右上角添加导航按钮添加导航/p /div /section /main /div !-- 配置弹窗 -- div idconfigModal classmodal div classmodal-content div classmodal-header h2 导航配置/h2 span classclosetimes;/span /div !-- 控制面板分页导航 -- div classconfig-page-nav idconfigPageNav button classconfig-page-btn active data-page0辅助工具/button button classconfig-page-btn data-page1信息聚合/button button classconfig-page-btn data-page2脚本中心/button /div div classmodal-body idconfigList !-- 动态生成分类配置 -- /div /div /div !-- Toast 提示 -- div idtoast classtoast/div script let navConfig {}; let categorizedConfig {}; let savedNavs []; let currentConfigPage 0; const mainCategories [1.辅助工具, 2.信息聚合, 3.脚本中心]; function loadConfig() { const script document.createElement(script); script.src ./1_nav.config.js; script.onload function() { navConfig window.navConfig; categorizeConfig(); loadSavedNavs(); renderSavedNavs(); renderConfigList(); }; document.head.appendChild(script); } function categorizeConfig() { categorizedConfig {}; for (const key in navConfig) { if (Array.isArray(navConfig[key])) { const pathParts key.split(/); const mainCategory pathParts[0]; const subCategory pathParts[1] || 默认; if (!categorizedConfig[mainCategory]) { categorizedConfig[mainCategory] {}; } if (!categorizedConfig[mainCategory][subCategory]) { categorizedConfig[mainCategory][subCategory] []; } navConfig[key].forEach(item { categorizedConfig[mainCategory][subCategory].push(item); }); } } } function loadSavedNavs() { const saved localStorage.getItem(savedNavs); if (saved) { savedNavs JSON.parse(saved); } } function saveNav(item) { if (savedNavs.some(nav nav.file item.file)) { showToast(该导航已存在, warning); return; } savedNavs.push(item); localStorage.setItem(savedNavs, JSON.stringify(savedNavs)); showToast(已保存${item.name}); renderSavedNavs(); } function resetNavs() { if (confirm(确定要重置所有导航吗此操作不可恢复)) { localStorage.removeItem(savedNavs); savedNavs []; renderSavedNavs(); showToast(导航已重置); } } function renderSavedNavs() { const container document.getElementById(savedNavsContainer); const emptyState document.getElementById(emptyState); if (savedNavs.length 0) { container.style.display none; emptyState.style.display block; return; } container.style.display grid; emptyState.style.display none; container.innerHTML savedNavs.map(item div classnav-item onclickwindow.open(${item.file}, _blank) div classicon${item.icon}/div div classname${item.name}/div /div ).join(); } function renderConfigList() { const configList document.getElementById(configList); const currentCategory mainCategories[currentConfigPage]; let html ; if (categorizedConfig[currentCategory]) { html div classcategory-section div classcategory-title ${currentCategory.substring(2)}/div ; for (const subCategory in categorizedConfig[currentCategory]) { const items categorizedConfig[currentCategory][subCategory]; html div classsubcategory-section div classsubcategory-title ${subCategory}/div div classconfig-grid ; items.forEach(item { html div classconfig-item onclicksaveNav(${JSON.stringify(item).replace(//g, quot;)}) div classicon${item.icon}/div div classname${item.name}/div /div ; }); html /div /div ; } html /div; } configList.innerHTML html; } function switchConfigPage(pageIndex) { currentConfigPage pageIndex; const pageButtons document.querySelectorAll(.config-page-btn); // 更新按钮状态 pageButtons.forEach((btn, index) { if (index pageIndex) { btn.classList.add(active); } else { btn.classList.remove(active); } }); // 重新渲染配置列表 renderConfigList(); } function showToast(message, type success) { const toast document.getElementById(toast); toast.textContent message; toast.className toast show; if (type warning) { toast.classList.add(warning); } setTimeout(() { toast.classList.remove(show); }, 3000); } function initEvents() { // 添加导航按钮事件 - 跳转到控制面板 document.getElementById(addBtn).addEventListener(click, function() { document.getElementById(configModal).style.display block; }); // 重置按钮事件 document.getElementById(resetBtn).addEventListener(click, resetNavs); // 关闭弹窗 document.querySelector(.close).addEventListener(click, function() { document.getElementById(configModal).style.display none; }); // 点击弹窗外部关闭 window.addEventListener(click, function(event) { const modal document.getElementById(configModal); if (event.target modal) { modal.style.display none; } }); // 配置面板分页按钮事件 document.querySelectorAll(.config-page-btn).forEach((btn, index) { btn.addEventListener(click, function() { switchConfigPage(index); }); }); } document.addEventListener(DOMContentLoaded, function() { initEvents(); loadConfig(); }); /script /body /html
版权声明:本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!

网站根目录权限小满crm

提示词工程是优化大模型输出的核心技术,通过精心设计的指令提升模型表现。关键技巧包括:清晰表达需求、结构化指令、参数调整(Temperature和Top_p),以及进阶方法如零样本/少样本提示、链式思考(CoT)、自我一致性和思维树(ToT)。同时&#xff…

张小明 2026/1/2 12:15:26 网站建设

关于做外汇现货的网站吸引人的软文

Linux认证计划与基础知识全解析 1. Linux认证计划概述 Linux认证在当今IT行业中具有重要地位,它为从业者提供了专业认可和职业发展的机会。Linux Essentials计划旨在明确使用Linux操作系统熟练操作桌面或移动设备所需的基本知识。该计划引导和鼓励Linux新手以及开源领域的初…

张小明 2026/1/2 6:48:36 网站建设

临沂建设局网站质量三监督网页打不开但是能上网

LobeChat 技术面试题生成器开发 在现代软件工程实践中,技术面试的准备往往依赖于零散的资料来源——博客文章、GitHub 仓库、LeetCode 题解,甚至临时拼凑的 PDF 文档。这种方式不仅效率低下,而且缺乏互动性与个性化。随着大语言模型&#xff…

张小明 2026/1/2 6:13:41 网站建设

男女做暖暖试看网站生活中花钱请人做网站

Pandas 是一个基于 NumPy、专为高效处理结构化数据而设计的开源 Python 数据分析库,堪称 Python 数据分析领域的核心引擎。它提供了 Series(一维带标签数组)​ 和 DataFrame(二维表格型数据结构)​ 这两种核心工具&…

张小明 2026/1/2 6:16:48 网站建设

自做建材配送网站外贸seo网站开发

ConfigMgr 使用与安全配置全解析 1. 常见环境问题理解 1.1 DNS 相关要点 在大型多区域环境中,可通过右键单击 DNS 服务器而非区域来启用和配置所有区域的清理功能。但需注意,此操作会影响所有区域,若需要按区域进行精细的清理设置,则不宜采用该方法。 在排查 DNS 问题时…

张小明 2026/1/2 15:51:58 网站建设