/* Copyright (C) 2025 QuantumNous This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ import React from 'react'; /** * 统一页面背景层 —— 所有路由级页面 shell 的唯一背景来源。 * * 设计目标(详见 docs/11-前端与体验中心/03-主题色配置化改造方案.md): * 1. 可管理:颜色全部走 bg-glow-* CSS 变量,管理员在 * 系统设置 → 主题设置 → 背景晕染 调一处,全场所有页面同步生效。 * 2. 单层:每个可视页面只有一层背景。父 shell 渲染本组件, * 嵌套子页面用 embedded 开关跳过自身背景,避免双层叠加。 * 3. 一致:from/to 两 stop,强度统一刻度。 * * 两种强度: * subtle(默认)—— 后台 / 管理 / 列表类页面:2 个角落光斑 blur-3xl,克制。 * rich —— 沉浸式页面(对话 / 生成):3 个大光球 blur-[100px],更强。 * * 暗色无需 dark: 前缀切换颜色 —— bg-glow-*-rgb 变量本身随浅/暗级联, * 仅在需要"暗色更克制"时用 dark: 降低 alpha。 * * 用法:放在一个 `relative` 容器内作为第一个子元素,内容用 `relative z-10` 叠其上。 *
* *
{children}
*
*/ export default function PageBackground({ variant = 'subtle', grid = false, animate = false, className = '', }) { const pulse = animate ? 'animate-pulse motion-reduce:animate-none' : ''; return (