网站设计和网站建设地推是什么意思

张小明 2026/1/13 1:33:43
网站设计和网站建设,地推是什么意思,江西省建设厅网站首页,网站建设公司株洲场景#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进行投诉反馈,一经查实,立即删除!

net网站开发技术方案谷歌网页截图快捷键

中国开源年会 COSCon 是业界最具影响力的开源盛会之一,由开源社在 2015 年首次发起,2016 年正式得以命名。九年来,中国开源年会以其独特的中立社区定位及日益增加的影响力,吸引了越来越多国内外企业、高校、开源组织和社区的大力支…

张小明 2026/1/10 6:13:22 网站建设

做网站建设销售辛苦吗平凉哪家做企业网站

EmotiVoice技术架构剖析:解密高表现力语音生成机制 在虚拟主播直播带货、AI配音一键生成有声书、游戏角色实时喊话的今天,用户早已不再满足于“能说话”的机器语音。冰冷、单调的合成音不仅破坏沉浸感,更难以传递情绪与个性。真正打动人的&am…

张小明 2026/1/10 19:06:59 网站建设

郑州直播网站建设个人网站建设素材

Taskflow终极指南:现代C并行任务编程的完整解决方案 【免费下载链接】taskflow 项目地址: https://gitcode.com/gh_mirrors/taskfl/taskflow Taskflow是一个使用现代C编写的通用任务并行编程框架,它通过简化复杂的并行任务调度,让开发…

张小明 2026/1/10 6:13:26 网站建设

网站建设的意义与价值哈尔滨网站建设信息

GPT-SoVITS为何在GitHub上迅速破万星标? 在AI语音技术飞速演进的今天,一个开源项目能在短短几个月内收获超万颗GitHub星标,背后往往不只是代码写得漂亮那么简单。GPT-SoVITS正是这样一个现象级项目——它没有大厂背书,却凭借“几分…

张小明 2026/1/10 6:13:26 网站建设

用dw制作个人网站网站分享设计

EmotiVoice助力乡村振兴:方言播报农业信息 在云南红河的清晨,村口广播响起:“明天要降温咯,大家快把辣椒苗盖好!”——声音熟悉得像是隔壁李支书在喊话。可实际上,这是一段由AI生成的彝汉双语语音&#xff…

张小明 2026/1/10 6:13:27 网站建设

河间专业做网站电话上海建工一建集团有限公司

http是无状态的,没有记忆能力,前一条数据和后一条数据不保存连接请求协议:Http响应协议:3开头的状态码为重定向:浏览器现象A服务器发送请求,A响应内容不在他这在B里面,返回Location为B让浏览器指…

张小明 2026/1/10 6:13:27 网站建设