From: root Date: Wed, 19 Aug 2026 02:43:04 +0000 (+0800) Subject: feat: 页面底部展示 ICP 备案号(陕ICP备2026022239号-1), 链接工信部备案查询 X-Git-Url: http://acesimba.cloud/gitweb/?a=commitdiff_plain;h=254c8f31057070d0a20bf28e24bc65b977ab726e;p=words.git feat: 页面底部展示 ICP 备案号(陕ICP备2026022239号-1), 链接工信部备案查询 --- diff --git a/frontend/src/App.js b/frontend/src/App.js index eac1cdc..d17f71d 100644 --- a/frontend/src/App.js +++ b/frontend/src/App.js @@ -7,25 +7,30 @@ import GroupView from './components/GroupView'; import StudyCalendar from './components/StudyCalendar'; import SyncNotifications from './components/SyncNotifications'; import Login from './components/Login'; +import Footer from './components/Footer'; import { isLoggedIn } from './auth'; function App() { const [loggedIn, setLoggedIn] = useState(isLoggedIn()); - // 未登录:只显示登录页,应用其余部分完全不加载 - if (!loggedIn) { - return setLoggedIn(true)} />; - } return ( - - - - } /> - } /> - } /> - } /> - } /> - - +
+ {loggedIn ? ( + + + + } /> + } /> + } /> + } /> + } /> + + + ) : ( + // 未登录:只显示登录页,应用其余部分完全不加载 + setLoggedIn(true)} /> + )} +
+
); } diff --git a/frontend/src/components/Footer.css b/frontend/src/components/Footer.css new file mode 100644 index 0000000..478346c --- /dev/null +++ b/frontend/src/components/Footer.css @@ -0,0 +1,18 @@ +.site-footer { + margin-top: auto; + padding: 14px 15px; + text-align: center; + font-size: 12px; + color: #8a94a6; + border-top: 1px solid #e6ebf2; + background: #f7f9fc; +} + +.site-footer a { + color: #6b7785; + text-decoration: none; +} + +.site-footer a:hover { + text-decoration: underline; +} diff --git a/frontend/src/components/Footer.js b/frontend/src/components/Footer.js new file mode 100644 index 0000000..25f2154 --- /dev/null +++ b/frontend/src/components/Footer.js @@ -0,0 +1,13 @@ +import React from 'react'; +import './Footer.css'; + +// 页面底部 ICP 备案号(合规要求:中国大陆网站须公开展示备案号并链接到工信部备案查询) +export default function Footer() { + return ( + + ); +} diff --git a/frontend/src/components/Login.css b/frontend/src/components/Login.css index d215673..a7b52cb 100644 --- a/frontend/src/components/Login.css +++ b/frontend/src/components/Login.css @@ -1,5 +1,5 @@ .login-wrap { - min-height: 100vh; + flex: 1 0 auto; display: flex; align-items: center; justify-content: center; diff --git a/frontend/src/index.css b/frontend/src/index.css index ec2585e..19f30f7 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -11,3 +11,10 @@ code { font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace; } + +/* 全站外壳:纵向 flex,min-height 撑满视口,使页脚自然贴底 */ +.app-shell { + display: flex; + flex-direction: column; + min-height: 100vh; +}