diff --git a/src/components/Buttons/ArrowLink.tsx b/src/components/Buttons/ArrowLink.tsx index 374d85255..a6d90d9da 100644 --- a/src/components/Buttons/ArrowLink.tsx +++ b/src/components/Buttons/ArrowLink.tsx @@ -17,11 +17,11 @@ import { Wrapper, Text, RightIcon } from './styles/arrow_link' const log = buildLog('c:Buttons:ArrowLink') type TProps = { - className: string + className?: string children?: React.ReactNode size?: TSIZE href: string - target: '_blank' | '' + target?: '_blank' | '' color?: string hoverColor?: string } diff --git a/src/components/CommunityFaceLogo/index.js b/src/components/CommunityFaceLogo/index.js deleted file mode 100755 index 5742dfe7e..000000000 --- a/src/components/CommunityFaceLogo/index.js +++ /dev/null @@ -1,59 +0,0 @@ -/* - * - * CommunityFaceLogo - * - */ - -import React from 'react' -import T from 'prop-types' -import { isEmpty } from 'ramda' - -import { HCN } from '@/constant' -import { ICON_BASE } from '@/config' -import { buildLog } from '@/utils' - -import { Logo } from './styles' - -/* eslint-disable-next-line */ -const log = buildLog('c:CommunityFaceLogo:index') - -const CommunityFaceLogo = ({ noFill, src, raw, loading, className }) => { - if (raw === HCN || isEmpty(src)) { - return ( - - ) - } - - return ( - - ) -} - -CommunityFaceLogo.propTypes = { - noFill: T.bool, - src: T.string, - raw: T.string, - // just for clean styled-component warnings - className: T.string, - loading: T.any, -} - -CommunityFaceLogo.defaultProps = { - src: '', - raw: HCN, - noFill: false, - className: 'community-facelogo-class', - loading: null, -} - -export default React.memo(CommunityFaceLogo) diff --git a/src/components/CommunityFaceLogo/index.tsx b/src/components/CommunityFaceLogo/index.tsx new file mode 100755 index 000000000..c3ea8191a --- /dev/null +++ b/src/components/CommunityFaceLogo/index.tsx @@ -0,0 +1,49 @@ +/* + * + * CommunityFaceLogo + * + */ + +import React from 'react' +import { isEmpty } from 'ramda' + +import { HCN } from '@/constant' +// import { ICON_BASE } from '@/config' +import { buildLog } from '@/utils' + +import { Logo, HomeLogo } from './styles' + +/* eslint-disable-next-line */ +const log = buildLog('c:CommunityFaceLogo:index') + +type TProps = { + noFill?: boolean + src?: string + raw?: string + loading?: boolean | null + className?: string +} + +const CommunityFaceLogo: React.FC = ({ + noFill = false, + src = '', + raw = HCN, + loading, + className = 'community-facelogo-class', +}) => { + if (raw === HCN || isEmpty(src)) { + return ( + + ) + } + + return ( + + ) +} + +export default React.memo(CommunityFaceLogo) diff --git a/src/components/CommunityFaceLogo/styles/index.ts b/src/components/CommunityFaceLogo/styles/index.ts index 6416c7e95..d70948d6c 100755 --- a/src/components/CommunityFaceLogo/styles/index.ts +++ b/src/components/CommunityFaceLogo/styles/index.ts @@ -3,9 +3,11 @@ import styled from 'styled-components' import { theme } from '@/utils' import Img from '@/Img' -export const Logo = styled(Img)<{ nonFill: boolean }>` - fill: ${({ nonFill }) => (nonFill ? '' : theme('banner.desc'))}; +export const Logo = styled(Img)<{ noFill?: boolean }>` + fill: ${({ noFill }) => (noFill ? '' : theme('banner.desc'))}; display: block; ` -export const holder = 1 +export const HomeLogo = styled(Logo)` + transform: rotate(20deg); +` diff --git a/src/containers/unit/Footer/DesktopView/BottomInfo.js b/src/containers/unit/Footer/DesktopView/BottomInfo.js deleted file mode 100755 index 9ac7538d0..000000000 --- a/src/containers/unit/Footer/DesktopView/BottomInfo.js +++ /dev/null @@ -1,55 +0,0 @@ -import React from 'react' -import Link from 'next/link' - -import { ROUTE } from '@/constant' - -import { - Wrapper, - InnerWrapper, - Links, - Site, - MoreText, -} from '../styles/desktop_view/bottom_info' - -const FRIENDS = [ - { - title: 'aab', - link: 'https://cps.fun', - }, - { - title: 'bbb', - link: 'https://cps.fun', - }, - { - title: 'ccc', - link: 'https://cps.fun', - }, - { - title: 'ddd', - link: 'https://cps.fun', - }, - { - title: '暗黑设计', - link: 'https://cps.fun', - }, -] - -const BottomInfo = ({ layout, metric }) => ( - - - - {FRIENDS.map((site, index) => ( - // eslint-disable-next-line react/no-array-index-key - - {site.title} - - ))} - - - 更多赞助商 - - - -) - -export default React.memo(BottomInfo) diff --git a/src/containers/unit/Footer/DesktopView/BottomInfo.tsx b/src/containers/unit/Footer/DesktopView/BottomInfo.tsx new file mode 100755 index 000000000..ede53870a --- /dev/null +++ b/src/containers/unit/Footer/DesktopView/BottomInfo.tsx @@ -0,0 +1,24 @@ +import React from 'react' +import Link from 'next/link' + +import { ROUTE } from '@/constant' + +import { + Wrapper, + InnerWrapper, + BeianLink, + CompanyLink, +} from '../styles/desktop_view/bottom_info' + +const BottomInfo: React.FC = () => ( + + + + Groupher @ 2021. 保留所有权利。 + + 蜀ICP备17043722号-4 + + +) + +export default React.memo(BottomInfo) diff --git a/src/containers/unit/Footer/DesktopView/BriefView.js b/src/containers/unit/Footer/DesktopView/BriefView.tsx similarity index 54% rename from src/containers/unit/Footer/DesktopView/BriefView.js rename to src/containers/unit/Footer/DesktopView/BriefView.tsx index 924660277..d0f78fba3 100755 --- a/src/containers/unit/Footer/DesktopView/BriefView.js +++ b/src/containers/unit/Footer/DesktopView/BriefView.tsx @@ -1,76 +1,72 @@ import React from 'react' -import { ISSUE_ADDR, ICON_CMD, API_SERVER_ADDR } from '@/config' +import { ISSUE_ADDR, API_SERVER_ADDR } from '@/config' + +import TopInfo from './TopInfo' +import BottomInfo from './BottomInfo' import { Wrapper, InnerWrapper, MainInfos, BaseInfo, - Divider, Item, - Support, - CenterLogosWrapper, - SiteLogo, - LogoDivider, - GithubLogo, } from '../styles/desktop_view/brief_view' -import { toggleSponsorHelper, toggleBusBanner } from '../logic' +type TProps = { + curView: string // todo + metric: string +} -const BriefView = ({ curView, metric }) => { +const BriefView: React.FC = ({ curView, metric }) => { return ( - - + + + 关于 - | - 使用指南 + 创建社区 - | - 反馈与建议 + 加入我们 - - - - - - API + OpenSource + + + 特别感谢 - | - 商务合作 - - | - 打赏 - | - 客户端 + 反馈与建议 + ) } diff --git a/src/containers/unit/Footer/DesktopView/BusinessNote.js b/src/containers/unit/Footer/DesktopView/BusinessNote.js deleted file mode 100755 index a99d2bd12..000000000 --- a/src/containers/unit/Footer/DesktopView/BusinessNote.js +++ /dev/null @@ -1,19 +0,0 @@ -import React from 'react' - -import { ICON_CMD, EMAIL_BUSINESS } from '@/config' -import { - Wrapper, - MailIcon, - Title, - MailLink, -} from '../styles/desktop_view/business_note' - -const BusinessNote = () => ( - - - 希望 coderplanets 能与您一起成长 - {`${EMAIL_BUSINESS}`} - -) - -export default React.memo(BusinessNote) diff --git a/src/containers/unit/Footer/DesktopView/DigestView/ContactBar.js b/src/containers/unit/Footer/DesktopView/DigestView/ContactBar.js deleted file mode 100644 index d1b8a3b14..000000000 --- a/src/containers/unit/Footer/DesktopView/DigestView/ContactBar.js +++ /dev/null @@ -1,27 +0,0 @@ -import React from 'react' - -import { useDevice } from '@/hooks' -import EmailSubscriber from '@/components/EmailSubscriber' - -import SocialList from '../../SocialList' -import { - Wrapper, - InnerWrapper, -} from '../../styles/desktop_view/digest_view/contact_bar' - -const ContactBar = ({ layout, metric }) => { - const { isMobile } = useDevice() - - return ( - - - - {!isMobile && ( - - )} - - - ) -} - -export default React.memo(ContactBar) diff --git a/src/containers/unit/Footer/DesktopView/DigestView/index.js b/src/containers/unit/Footer/DesktopView/DigestView/index.tsx similarity index 51% rename from src/containers/unit/Footer/DesktopView/DigestView/index.js rename to src/containers/unit/Footer/DesktopView/DigestView/index.tsx index 6147fe31b..b2f73dbe9 100644 --- a/src/containers/unit/Footer/DesktopView/DigestView/index.js +++ b/src/containers/unit/Footer/DesktopView/DigestView/index.tsx @@ -1,21 +1,18 @@ import React from 'react' import { useTheme } from 'styled-components' +import type { TThemeMap } from '@/spec' import { GITHUB, API_SERVER_ADDR, ISSUE_ADDR, BUILD_VERSION } from '@/config' import { ROUTE } from '@/constant' +import TopInfo from '../TopInfo' import BottomInfo from '../BottomInfo' -import ContactBar from './ContactBar' +import SocialList from '../../SocialList' import { Wrapper, InnerWrapper, MainInfos, - MainColumn, - SiteInfo, - SiteTitle, - SiteDesc, - SiteLogo, Column, Title, Body, @@ -23,10 +20,12 @@ import { LinkItem, } from '../../styles/desktop_view/digest_view' -import { toggleBusBanner } from '../../logic' +type TProps = { + metric: string +} -const DigestView = ({ layout, metric }) => { - const theme = useTheme() +const DigestView: React.FC = ({ metric }) => { + const theme = useTheme() as TThemeMap const linkColors = { color: theme.footer.text, @@ -35,68 +34,76 @@ const DigestView = ({ layout, metric }) => { return ( - + + - - - - -
- coderplanets - - Power By Groupher | 2020 - - - 蜀ICP备17043722号-4 - -
-
- About + 网站地图 - 关于本站 + 子社区 - 反馈与建议 + 作品集市 - 加入我们 + 酷导航 - 使用指南 + 来一杯 - 友情链接 + 活动 + + + 工作 + + + 更多 .. - 增值服务 + 会员 + + 志愿者 + 成为会员 - 打赏支持(todo) + 打赏支持 + +
+ 商务 + + + 投放广告 + + + 赞助商 + + {/* + 友情链接 + */} +
开发者 + + 开发计划 + - 开发者指南 + 文档中心 + + + 技术栈 API @@ -106,35 +113,54 @@ const DigestView = ({ layout, metric }) => { - - 商务合作 - - - 赞助社区 - - - 商务合作 - - - + - 本站状态 + 网站状态 - 构建版本: {BUILD_VERSION} + 部署版本: {BUILD_VERSION} + +
+ 用户 + 注册人数: -- 在线人数: -- + + 小黑屋: -- + + +
+ + + 支持 + + + 违规举报 + + + 反馈与建议 + + + 帮助中心 + + + 内容订阅 + + +
+ 联系 + +
- - +
) } diff --git a/src/containers/unit/Footer/DesktopView/GitSource.js b/src/containers/unit/Footer/DesktopView/GitSource.js deleted file mode 100755 index bf0b28b7a..000000000 --- a/src/containers/unit/Footer/DesktopView/GitSource.js +++ /dev/null @@ -1,22 +0,0 @@ -import React from 'react' - -// import { ICON_CMD } from '@/config' -import { Wrapper, Title, Tag } from '../styles/desktop_view/git_source_tag' - -const GitSourceTag = ({ title, addr }) => ( - - {title} - -