Skip to content

Commit

Permalink
⚡ feat(custom): 添加重大事项通知
Browse files Browse the repository at this point in the history
  • Loading branch information
master1lan committed Mar 1, 2023
1 parent f943608 commit a949fe4
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/routers/layout/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ export default function Header() {

const ReactiveHeader = memo(() => {
return (
<header className='border-t-2 z-10 max-md:border-b-2 sticky top-0 bg-white'>
<header className='z-10 max-md:border-b-2 sticky top-0 bg-white'>
{/* 手机端 */}
<div className='hidden max-sm:flex px-6 pb-3 pt-4'>
<Search />
</div>
{/* pc端和平板端header部 */}
<Header_content className={`${styles["header"]} h-20 max-sm:hidden`}>
<Header_content className={`${styles["header"]} h-20 max-sm:hidden`}>
<div className='flex-shrink-0 flex-grow basis-40 relative z-10'>
<LOGO />
</div>
Expand Down
18 changes: 18 additions & 0 deletions src/routers/layout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { Outlet, useMatch } from "react-router-dom";
import Header from "./header";
import { useAppSelector } from "@store/hooks";
import { selectNavMoreShowed } from "@store/device/index";
import ArrowOutwardIcon from "@mui/icons-material/ArrowOutward";
import { Link } from "@mui/material";
import styles from "./layout.module.less";
import MidContent from "./midcontent";
export default function Layout() {
Expand All @@ -21,6 +23,9 @@ export default function Layout() {
},
}}
>
<div className='max-sm:hidden h-16 flex justify-center items-center relative z-20 bg-white border-b-2'>
<ImportTantInfo />
</div>
<Header />
<NavContent />
<Flipped flipId={"container"} spring={"veryGentle"}>
Expand All @@ -32,6 +37,19 @@ export default function Layout() {
</>
);
}
export const ImportTantInfo = () => (
<>
<Link
href='https://b23.tv/oi3Rv0B'
target={`_blank`}
color={"inherit"}
underline='none'
>
征集小队长生贺视频
<ArrowOutwardIcon fontSize='small' />
</Link>
</>
);

const NavContent = () => {
const isSearchPage = useMatch(`/search`) !== null;
Expand Down
2 changes: 1 addition & 1 deletion src/routers/layout/logo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default function LOGO() {
<div className={`${styles["logo"]}`}>
<Yituo width={"64px"} height={"30px"} />
<H1 className='max-md:font-medium'>
{!md ? `EOEfans-web端` : `EOEfans`}
{!md ? `eoefans-web端` : `eoefans`}
<Button
onClick={handlerClick}
sx={{
Expand Down
6 changes: 6 additions & 0 deletions src/routers/layout/routernav/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { useState, FC } from "react";
import { Link, useMatch } from "react-router-dom";
import CloseIcon from "@mui/icons-material/Close";
import Header_Nav from "../nav";
import { ImportTantInfo } from "..";
export const RouterList: TabProps[] = [
{
label: "视频",
Expand Down Expand Up @@ -41,6 +42,11 @@ export default function RouterNav() {
onClick={handlerChangeShow}
/>
</div>
<DrawerNavContent title={"视频征集"}>
<div className='flex justify-center items-center'>
<ImportTantInfo />
</div>
</DrawerNavContent>
<DrawerHrefItem
title='页面'
data={RouterList}
Expand Down

0 comments on commit a949fe4

Please sign in to comment.