mirror of
https://github.com/labring/FastGPT.git
synced 2026-04-24 02:01:51 +08:00
docs: switch to docs layout and apply black theme (#6533)
* feat: add Gemini 3.1 models - Add gemini-3.1-pro-preview (released February 19, 2026) - Add gemini-3.1-flash-lite-preview (released March 3, 2026) Both models support: - 1M context window - 64k max response - Vision - Tool choice * docs: switch to docs layout and apply black theme - Change layout from notebook to docs - Update logo to icon + text format - Apply fumadocs black theme - Simplify global.css (keep only navbar and TOC styles) - Fix icon components to properly accept className props - Add mobile text overflow handling - Update Node engine requirement to >=20.x * doc * doc * lock * fix: ts * doc * doc --------- Co-authored-by: archer <archer@archerdeMac-mini.local> Co-authored-by: archer <545436317@qq.com>
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
|
||||
import React from 'react';
|
||||
|
||||
const feishuLogoDark: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (
|
||||
<svg width="24" height="24" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
const feishuLogoDark: React.FC<React.SVGProps<SVGSVGElement>> = ({ className, ...props }) => (
|
||||
<svg {...props} className={className} viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
d="M17 29C21 29 25 26.9339 28 23.4065C36 14 41.4242 16.8166 44 17.9998C38.5 20.9998 40.5 29.6233 33 35.9998C28.382 39.9259 23.4945 41.014 19 41C12.5231 40.9799 6.86226 37.7637 4 35.4063V16.9998"
|
||||
stroke="#8b9dc1"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
import React from 'react';
|
||||
|
||||
const feishuLogoLight: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (
|
||||
<svg width="24" height="24" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
const feishuLogoLight: React.FC<React.SVGProps<SVGSVGElement>> = ({ className, ...props }) => (
|
||||
<svg {...props} className={className} viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
d="M17 29C21 29 25 26.9339 28 23.4065C36 14 41.4242 16.8166 44 17.9998C38.5 20.9998 40.5 29.6233 33 35.9998C28.382 39.9259 23.4945 41.014 19 41C12.5231 40.9799 6.86226 37.7637 4 35.4063V16.9998"
|
||||
stroke="#8a8a8a"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
import React from 'react';
|
||||
|
||||
const githubLogoLight: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (
|
||||
<svg width="98" height="98" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 98 98">
|
||||
const githubLogoLight: React.FC<React.SVGProps<SVGSVGElement>> = ({ className, ...props }) => (
|
||||
<svg {...props} className={className} xmlns="http://www.w3.org/2000/svg" viewBox="0 0 98 98">
|
||||
<path
|
||||
fillRule="evenodd"
|
||||
clipRule="evenodd"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
import React from 'react';
|
||||
|
||||
const githubLogoLight: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (
|
||||
<svg width="98" height="98" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 98 98">
|
||||
const githubLogoLight: React.FC<React.SVGProps<SVGSVGElement>> = ({ className, ...props }) => (
|
||||
<svg {...props} className={className} xmlns="http://www.w3.org/2000/svg" viewBox="0 0 98 98">
|
||||
<path
|
||||
fillRule="evenodd"
|
||||
clipRule="evenodd"
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
'use client';
|
||||
|
||||
import { useEffect } from 'react';
|
||||
|
||||
/**
|
||||
* 修复侧边栏滚动焦点问题
|
||||
* 当鼠标从内容区移动到侧边栏时,确保滚动事件作用于侧边栏而不是内容区
|
||||
*/
|
||||
export function SidebarScrollFix() {
|
||||
useEffect(() => {
|
||||
const handleMouseEnter = (e: MouseEvent) => {
|
||||
const target = e.currentTarget as HTMLElement;
|
||||
// 鼠标进入侧边栏时,聚焦到侧边栏的滚动容器
|
||||
if (target) {
|
||||
target.focus({ preventScroll: true });
|
||||
}
|
||||
};
|
||||
|
||||
// 桌面端侧边栏
|
||||
const sidebar = document.querySelector('#nd-sidebar');
|
||||
// 移动端侧边栏
|
||||
const sidebarMobile = document.querySelector('#nd-sidebar-mobile');
|
||||
|
||||
if (sidebar) {
|
||||
sidebar.addEventListener('mouseenter', handleMouseEnter as EventListener);
|
||||
// 确保侧边栏可以接收焦点
|
||||
(sidebar as HTMLElement).setAttribute('tabindex', '-1');
|
||||
}
|
||||
|
||||
if (sidebarMobile) {
|
||||
sidebarMobile.addEventListener('mouseenter', handleMouseEnter as EventListener);
|
||||
(sidebarMobile as HTMLElement).setAttribute('tabindex', '-1');
|
||||
}
|
||||
|
||||
return () => {
|
||||
if (sidebar) {
|
||||
sidebar.removeEventListener('mouseenter', handleMouseEnter as EventListener);
|
||||
}
|
||||
if (sidebarMobile) {
|
||||
sidebarMobile.removeEventListener('mouseenter', handleMouseEnter as EventListener);
|
||||
}
|
||||
};
|
||||
}, []);
|
||||
|
||||
return null;
|
||||
}
|
||||
Reference in New Issue
Block a user