manual save(2026-01-23 10:58)
This commit is contained in:
@@ -7,11 +7,14 @@ export const Footer: React.FC = () => {
|
|||||||
<div className="container mx-auto px-4">
|
<div className="container mx-auto px-4">
|
||||||
<div className="flex flex-col gap-6 md:flex-row md:items-center md:justify-between">
|
<div className="flex flex-col gap-6 md:flex-row md:items-center md:justify-between">
|
||||||
<div>
|
<div>
|
||||||
<div className="font-semibold text-gray-900">Global Decision System</div>
|
<div className="font-semibold text-gray-900">Turingflow</div>
|
||||||
<div className="text-sm text-gray-600 mt-1">思想驱动型官网 V1 信息架构骨架</div>
|
<div className="text-sm text-gray-600 mt-1">思想驱动型官网 V1 页面骨架</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nav aria-label="页脚导航" className="flex flex-wrap gap-x-4 gap-y-2 text-sm">
|
<nav aria-label="页脚导航" className="flex flex-wrap gap-x-4 gap-y-2 text-sm">
|
||||||
|
<Link className="text-gray-600 hover:text-gray-900" to="/">
|
||||||
|
Home
|
||||||
|
</Link>
|
||||||
<Link className="text-gray-600 hover:text-gray-900" to="/why">
|
<Link className="text-gray-600 hover:text-gray-900" to="/why">
|
||||||
Why
|
Why
|
||||||
</Link>
|
</Link>
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import React from 'react'
|
|||||||
import { Link, NavLink } from 'react-router-dom'
|
import { Link, NavLink } from 'react-router-dom'
|
||||||
|
|
||||||
const navItems = [
|
const navItems = [
|
||||||
{ to: '/', label: '首页' },
|
|
||||||
{ to: '/why', label: 'Why' },
|
{ to: '/why', label: 'Why' },
|
||||||
{ to: '/how', label: 'How' },
|
{ to: '/how', label: 'How' },
|
||||||
{ to: '/system', label: 'System' },
|
{ to: '/system', label: 'System' },
|
||||||
@@ -17,7 +16,8 @@ export const Header: React.FC = () => {
|
|||||||
<div className="container mx-auto px-4 py-4">
|
<div className="container mx-auto px-4 py-4">
|
||||||
<div className="flex items-center justify-between gap-6">
|
<div className="flex items-center justify-between gap-6">
|
||||||
<Link to="/" className="font-semibold text-gray-900 tracking-tight">
|
<Link to="/" className="font-semibold text-gray-900 tracking-tight">
|
||||||
Global Decision System
|
Turingflow
|
||||||
|
<span className="sr-only">Home</span>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<nav aria-label="主导航" className="hidden md:flex items-center gap-1">
|
<nav aria-label="主导航" className="hidden md:flex items-center gap-1">
|
||||||
@@ -40,7 +40,7 @@ export const Header: React.FC = () => {
|
|||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<Link
|
<Link
|
||||||
to="/contact"
|
to="/contact"
|
||||||
className="inline-flex items-center justify-center px-3 py-2 rounded-md text-sm font-medium border border-gray-300 text-gray-700 hover:bg-gray-50"
|
className="inline-flex items-center justify-center px-3 py-2 rounded-md text-sm font-medium border border-gray-300 text-gray-700 hover:bg-gray-50 opacity-90"
|
||||||
>
|
>
|
||||||
Contact
|
Contact
|
||||||
</Link>
|
</Link>
|
||||||
@@ -65,7 +65,7 @@ export const Header: React.FC = () => {
|
|||||||
))}
|
))}
|
||||||
<Link
|
<Link
|
||||||
to="/contact"
|
to="/contact"
|
||||||
className="px-3 py-2 rounded-md text-sm whitespace-nowrap border border-gray-300 text-gray-700 hover:bg-gray-50"
|
className="px-3 py-2 rounded-md text-sm whitespace-nowrap border border-gray-300 text-gray-700 hover:bg-gray-50 opacity-90"
|
||||||
>
|
>
|
||||||
Contact
|
Contact
|
||||||
</Link>
|
</Link>
|
||||||
|
|||||||
@@ -24,10 +24,14 @@ export const SectionShell: React.FC<SectionShellProps> = ({
|
|||||||
return (
|
return (
|
||||||
<section aria-labelledby={sectionKey} className="py-12">
|
<section aria-labelledby={sectionKey} className="py-12">
|
||||||
<div className="container mx-auto px-4">
|
<div className="container mx-auto px-4">
|
||||||
<div className="max-w-3xl">
|
<div className="max-w-3xl rounded-2xl border border-gray-200 bg-white p-6 shadow-sm">
|
||||||
|
<div className="flex items-baseline justify-between gap-4">
|
||||||
<Heading id={sectionKey} className="text-2xl font-semibold text-gray-900 tracking-tight">
|
<Heading id={sectionKey} className="text-2xl font-semibold text-gray-900 tracking-tight">
|
||||||
{title}
|
{title}
|
||||||
</Heading>
|
</Heading>
|
||||||
|
<span className="text-xs font-mono text-gray-400">#{sectionKey}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
{lead ? <p className="mt-3 text-gray-600 leading-relaxed">{lead}</p> : null}
|
{lead ? <p className="mt-3 text-gray-600 leading-relaxed">{lead}</p> : null}
|
||||||
|
|
||||||
{notes?.length ? (
|
{notes?.length ? (
|
||||||
|
|||||||
@@ -1,9 +1,24 @@
|
|||||||
import React from 'react'
|
import React, { useEffect } from 'react'
|
||||||
import { Outlet, ScrollRestoration } from 'react-router-dom'
|
import { Outlet, useLocation } from 'react-router-dom'
|
||||||
import { Header } from './Header'
|
import { Header } from './Header'
|
||||||
import { Footer } from './Footer'
|
import { Footer } from './Footer'
|
||||||
|
|
||||||
export const SiteLayout: React.FC = () => {
|
export const SiteLayout: React.FC = () => {
|
||||||
|
const location = useLocation()
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (location.hash) {
|
||||||
|
const id = decodeURIComponent(location.hash.replace('#', ''))
|
||||||
|
const target = document.getElementById(id)
|
||||||
|
if (target) {
|
||||||
|
target.scrollIntoView({ behavior: 'smooth', block: 'start' })
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
window.scrollTo({ top: 0, left: 0, behavior: 'auto' })
|
||||||
|
}, [location.pathname, location.hash])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="min-h-screen bg-white text-gray-900">
|
<div className="min-h-screen bg-white text-gray-900">
|
||||||
<Header />
|
<Header />
|
||||||
@@ -11,7 +26,6 @@ export const SiteLayout: React.FC = () => {
|
|||||||
<Outlet />
|
<Outlet />
|
||||||
</main>
|
</main>
|
||||||
<Footer />
|
<Footer />
|
||||||
<ScrollRestoration />
|
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user