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="flex flex-col gap-6 md:flex-row md:items-center md:justify-between">
|
||||
<div>
|
||||
<div className="font-semibold text-gray-900">Global Decision System</div>
|
||||
<div className="text-sm text-gray-600 mt-1">思想驱动型官网 V1 信息架构骨架</div>
|
||||
<div className="font-semibold text-gray-900">Turingflow</div>
|
||||
<div className="text-sm text-gray-600 mt-1">思想驱动型官网 V1 页面骨架</div>
|
||||
</div>
|
||||
|
||||
<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">
|
||||
Why
|
||||
</Link>
|
||||
|
||||
@@ -2,7 +2,6 @@ import React from 'react'
|
||||
import { Link, NavLink } from 'react-router-dom'
|
||||
|
||||
const navItems = [
|
||||
{ to: '/', label: '首页' },
|
||||
{ to: '/why', label: 'Why' },
|
||||
{ to: '/how', label: 'How' },
|
||||
{ to: '/system', label: 'System' },
|
||||
@@ -17,7 +16,8 @@ export const Header: React.FC = () => {
|
||||
<div className="container mx-auto px-4 py-4">
|
||||
<div className="flex items-center justify-between gap-6">
|
||||
<Link to="/" className="font-semibold text-gray-900 tracking-tight">
|
||||
Global Decision System
|
||||
Turingflow
|
||||
<span className="sr-only">Home</span>
|
||||
</Link>
|
||||
|
||||
<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">
|
||||
<Link
|
||||
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
|
||||
</Link>
|
||||
@@ -65,7 +65,7 @@ export const Header: React.FC = () => {
|
||||
))}
|
||||
<Link
|
||||
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
|
||||
</Link>
|
||||
|
||||
@@ -24,10 +24,14 @@ export const SectionShell: React.FC<SectionShellProps> = ({
|
||||
return (
|
||||
<section aria-labelledby={sectionKey} className="py-12">
|
||||
<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">
|
||||
{title}
|
||||
</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}
|
||||
|
||||
{notes?.length ? (
|
||||
|
||||
@@ -1,9 +1,24 @@
|
||||
import React from 'react'
|
||||
import { Outlet, ScrollRestoration } from 'react-router-dom'
|
||||
import React, { useEffect } from 'react'
|
||||
import { Outlet, useLocation } from 'react-router-dom'
|
||||
import { Header } from './Header'
|
||||
import { Footer } from './Footer'
|
||||
|
||||
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 (
|
||||
<div className="min-h-screen bg-white text-gray-900">
|
||||
<Header />
|
||||
@@ -11,7 +26,6 @@ export const SiteLayout: React.FC = () => {
|
||||
<Outlet />
|
||||
</main>
|
||||
<Footer />
|
||||
<ScrollRestoration />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user