js+css实现可视化多时间线事件节点小说创作提示词导出工具代码

代码语言:html

所属分类:其他

代码描述:js+css实现可视化多时间线事件节点小说创作提示词导出工具代码,可视化思维导图式创建多个时间线分支线支线,一键导出ai写小说提示词。

代码标签: js css 可视化 多 时间线 事件 节点 小说 创作 提示词 导出 工具 代码

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>多线叙事工坊 · 小说分支创作器</title>
<style>
  * { box-sizing: border-box; margin: 0; padding: 0; }
  :root {
    --bg: #0b0e14;
    --panel: #12161f;
    --panel-2: #1a1f2e;
    --border: #232a3d;
    --text: #e5e7eb;
    --muted: #8b98ad;
    --accent: #6366f1;
    --accent-2: #8b5cf6;
    --danger: #ef4444;
  }
  html, body {
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
  }

  /* ===================== 顶栏 ===================== */
  .topbar {
    height: 58px;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 20px;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    z-index: 20;
    position: relative;
  }
  .logo {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: linear-gradient(90deg, #818cf8, #f472b6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    user-select: none;
    white-space: nowrap;
  }
  .topbar .actions { margin-left: auto; display: flex; gap: 10px; }

  /* 项目选择器 */
  .project-bar { position: relative; }
  .proj-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 9px;
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    max-width: 320px;
  }
  .proj-btn:hover { background: #232a3d; border-color: #333d55; }
  .proj-btn .caret { color: var(--muted); font-size: 10px; }
  .proj-btn #proj-name {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
  }

  .dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 6px;
    min-width: 280px;
    max-height: 420px;
    overflow-y: auto;
    box-shadow: 0 16px 50px rgba(0,0,0,0.6);
    z-index: 200;
    display: none;
    animation: popIn 0.15s ease;
  }
  .dropdown.show { display: block; }

  .dropdown .menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.12s;
    font-size: 13px;
  }
  .dropdown .menu-item:hover { background: #2a3147; }
  .dropdown .menu-item.active {
    background: linear-gradient(90deg, #4f46e522, #8b5cf622);
    border: 1px solid #4f46e544;
  }
  .dropdown .menu-item .p-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dropdown .menu-item .p-meta { font-size: 11px; color: var(--muted); }
  .dropdown .menu-item .menu-actions {
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.15s;
  }
  .dropdown .menu-item:hover .menu-actions { opacity: 1; }
  .dropdown .menu-item .menu-actions button {
    padding: 3px 7px;
    font-size: 12px;
    background: transparent;
    border: none;
    color: var(--muted);
    cursor: pointer;
    border-radius: 5px;
    line-height: 1;
  }
  .dropdown .menu-item .menu-actions button:hover { background: #374151; color: var(--text); }
  .dropdown .menu-item .menu-actions button.danger:hover { color: #fca5a5; background: #7f1d1d44; }
  .dropdown .divider { height: 1px; background: var(--border); margin: 6px 4px; }
  .dropdown .new-project-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #a5b4fc;
    font-weight: 600;
  }
  .dropdown .new-project-btn:hover { background: #2a3147; }

  /* 按钮 */
  button {
    font-family: inherit;
    font-size: 13px;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--panel-2);
    color: var(--text);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
  }
  button:hover { background: #232a3d; border-color: #333d55; }
  button.primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border: none;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 14px #6366f144;
  }
  button.primary:hover { filter: brightness(1.12); }
  button.danger { color: #fca5a5; border-color: #7f1d1d55; }
  button.danger:hover { background: #7f1d1d33; border-color: #7f1d1d; }
  button.ghost { background: transparent; }
  button.ghost:hover { background: var(--panel-2); }

  /* ===================== 三栏布局 ===================== */
  .app {
    display: grid;
    grid-template-columns: 320px 1fr 340px;
    height: calc(100vh - 58px);
  }

  .sidebar-left, .sidebar-right {
    background: var(--panel);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
  }
  .sidebar-left { border-right: 1px solid var(--border); }
  .sidebar-right { border-left: 1px solid var(--border); padding: 18px; }

  .panel { padding: 16px 18px; border-bottom: 1px solid var(--border); }
  .panel h3 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.3px;
    color: var(--muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    gap: 8px;
  }
  .panel h3 button {
    padding: 2px 10px;
    font-size: 16px;
    line-height: 1.2;
    border-radius: 6px;
    font-weight: 500;
  }
  .panel h3 .wc {
    font-size: 10px;
    color: var(--muted);
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    opacity: 0.75;
  }

  .field { margin-bottom: 11px; }
  .field:last-child { margin-bottom: 0; }
  .field label {
    display: block;
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 5px;
    font-weight: 600;
  }
  input, textarea, select {
    width: 100%;
    padding: 8px 11px;
    background: #0e121b;
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s;
    resize: vertical;
  }
  input:focus, textarea:focus, select:focus { border-color: var(--accent); }

  /* 世界观设定面板 */
  #meta-worldview {
    font-size: 12.5px;
    line-height: 1.75;
    min-height: 160px;
    max-height: 340px;
    background: #0e121b;
    border.........完整代码请登录后点击上方下载按钮下载查看

网友评论0