diff --git a/config/index.ts b/config/index.ts index 3b24f00bf..2ffa2fb21 100755 --- a/config/index.ts +++ b/config/index.ts @@ -7,6 +7,9 @@ export { default as SEO } from './next_seo' export const DEFAULT_THEME = CONFIG.DEFAULT_THEME as TThemeName +export const SITE_LOGO = + 'https://cps-oss.oss-cn-shanghai.aliyuncs.com/icons/static/new-logo.jpg' + export const { GRAPHQL_ENDPOINT, SENIOR_AMOUNT_THRESHOLD, diff --git a/src/components/BlinkCursor/index.tsx b/src/components/BlinkCursor/index.tsx new file mode 100755 index 000000000..8a8d23fa2 --- /dev/null +++ b/src/components/BlinkCursor/index.tsx @@ -0,0 +1,45 @@ +/* + * + * BlinkCursor + * + */ + +import { FC, memo } from 'react' + +import { buildLog } from '@/utils' + +import { Wrapper } from './styles' + +/* eslint-disable-next-line */ +const log = buildLog('c:BlinkCursor:index') + +type TProps = { + testid?: string + height?: number + top?: number + left?: number + right?: number + duration?: number +} + +const BlinkCursor: FC = ({ + testid = 'blink-cursor', + height = 12, + top = 2, + left = 10, + right = 10, + duration = 2, +}) => { + return ( + + ) +} + +export default memo(BlinkCursor) diff --git a/src/components/BlinkCursor/styles/index.ts b/src/components/BlinkCursor/styles/index.ts new file mode 100755 index 000000000..b147bb6dc --- /dev/null +++ b/src/components/BlinkCursor/styles/index.ts @@ -0,0 +1,35 @@ +import styled from 'styled-components' + +import type { TTestable } from '@/spec' + +// import Img from '@/Img' +import { animate } from '@/utils' + +export type TWrapper = TTestable & { + height: number + top: number + left: number + right: number + duration: number +} + +export const Wrapper = styled.div.attrs(({ testid }: TTestable) => ({ + 'data-test-id': testid, +}))` + background-color: #139c9e; + + height: ${({ height }) => `${height}px`}; + + margin-top: ${({ top }) => `${top}px`}; + margin-left: ${({ left }) => `${left}px`}; + margin-right: ${({ right }) => `${right}px`}; + + width: 1px; + + opacity: 1; + animation: ${animate.blink} 2s linear infinite alternate; + + animation-duration: ${({ duration }) => `${duration}s`}; +` + +export const Title = styled.div`` diff --git a/src/components/BlinkCursor/tests/index.test.ts b/src/components/BlinkCursor/tests/index.test.ts new file mode 100755 index 000000000..d707791f6 --- /dev/null +++ b/src/components/BlinkCursor/tests/index.test.ts @@ -0,0 +1,10 @@ +// import React from 'react' +// import { shallow } from 'enzyme' + +// import BlinkCursor from '../index' + +describe('TODO ', () => { + it('Expect to have unit tests specified', () => { + expect(true).toEqual(true) + }) +}) diff --git a/src/components/CommunityFaceLogo/index.tsx b/src/components/CommunityFaceLogo/index.tsx index d663bbb6f..f3c17e433 100755 --- a/src/components/CommunityFaceLogo/index.tsx +++ b/src/components/CommunityFaceLogo/index.tsx @@ -7,6 +7,7 @@ import { FC, memo } from 'react' import { isEmpty } from 'ramda' +import { SITE_LOGO } from '@/config' import { HCN } from '@/constant' // import { ICON_BASE } from '@/config' import { buildLog } from '@/utils' @@ -32,13 +33,7 @@ const CommunityFaceLogo: FC = ({ className = 'community-facelogo-class', }) => { if (raw === HCN || isEmpty(src)) { - return ( - - ) + return } return ( diff --git a/src/components/Navigator/DigestView.tsx b/src/components/Navigator/DigestView.tsx index 179c8892b..5aba14e76 100755 --- a/src/components/Navigator/DigestView.tsx +++ b/src/components/Navigator/DigestView.tsx @@ -1,12 +1,14 @@ import { FC, memo } from 'react' import { METRIC } from '@/constant' + +import BlinkCursor from '@/components/BlinkCursor' + import { Breadcrumbs, Logo, LogoLink, LogoMargin, - LineDivider, LogoText, OfflineWrapper, ActionText, @@ -42,7 +44,11 @@ const DigestView: FC = ({ metric, showLogoText, isOnline, layout }) => { {showLogoText && oderPlanets} - {showLogoText ? : } + {showLogoText ? ( + + ) : ( + + )} {isOnline ? ( renderMainEntries(metric) diff --git a/src/components/Navigator/styles/index.ts b/src/components/Navigator/styles/index.ts index 54fad5c7f..3b7c0755f 100755 --- a/src/components/Navigator/styles/index.ts +++ b/src/components/Navigator/styles/index.ts @@ -26,16 +26,6 @@ export const LogoMargin = styled.div<{ layout: TC11NLayout }>` margin-right: ${({ layout }) => layout === C11N.HOLY_GRAIL ? '42px' : '32px'}; ` -export const LineDivider = styled.div` - background-color: #139c9e; - margin-left: 5px; - margin-right: 2px; - width: 1px; - height: 14px; - margin-top: 3px; - opacity: 1; - animation: ${animate.blink} 1.2s linear infinite alternate; -` export const LogoText = styled.a` color: ${theme('header.fg')}; font-weight: bold; diff --git a/src/containers/unit/Footer/SocialList.tsx b/src/containers/unit/Footer/ContactList.tsx similarity index 70% rename from src/containers/unit/Footer/SocialList.tsx rename to src/containers/unit/Footer/ContactList.tsx index 5450527b0..a12fa47ea 100755 --- a/src/containers/unit/Footer/SocialList.tsx +++ b/src/containers/unit/Footer/ContactList.tsx @@ -3,7 +3,7 @@ import { FC, memo } from 'react' import { ICON_CMD, EMAIL_SUPPORT } from '@/config' import { joinUS } from '@/utils' -import { Wrapper, Item, Icon } from './styles/social_list' +import { Wrapper, Item, Icon } from './styles/contact_list' const SocialList: FC = () => ( @@ -26,15 +26,6 @@ const SocialList: FC = () => ( - - - - - ) diff --git a/src/containers/unit/Footer/DesktopView/BriefView.tsx b/src/containers/unit/Footer/DesktopView/ArticleView.tsx similarity index 85% rename from src/containers/unit/Footer/DesktopView/BriefView.tsx rename to src/containers/unit/Footer/DesktopView/ArticleView.tsx index fa1b57271..1695fc83e 100755 --- a/src/containers/unit/Footer/DesktopView/BriefView.tsx +++ b/src/containers/unit/Footer/DesktopView/ArticleView.tsx @@ -1,6 +1,6 @@ import { FC, memo } from 'react' -import type { TArticle } from '@/spec' +import type { TArticle, TC11NLayout } from '@/spec' import { ISSUE_ADDR, API_SERVER_ADDR } from '@/config' import TopInfo from './TopInfo' import BottomInfo from './BottomInfo' @@ -11,20 +11,19 @@ import { MainInfos, BaseInfo, Item, -} from '../styles/desktop_view/brief_view' +} from '../styles/desktop_view/article_view' type TProps = { - curView: string // todo viewingArticle: TArticle metric: string + layout: TC11NLayout } -const BriefView: FC = ({ curView, metric, viewingArticle }) => { +const BriefView: FC = ({ metric, viewingArticle, layout }) => { return ( - + - {/* */} diff --git a/src/containers/unit/Footer/DesktopView/BottomInfo.tsx b/src/containers/unit/Footer/DesktopView/BottomInfo.tsx index 4ae3cabcc..4ff3da836 100755 --- a/src/containers/unit/Footer/DesktopView/BottomInfo.tsx +++ b/src/containers/unit/Footer/DesktopView/BottomInfo.tsx @@ -1,13 +1,11 @@ import { FC, memo } from 'react' import type { TC11NLayout } from '@/spec' -import { ROUTE } from '@/constant' import { Wrapper, InnerWrapper, BeianLink, - CompanyLink, } from '../styles/desktop_view/bottom_info' type TProps = { @@ -19,9 +17,6 @@ const BottomInfo: FC = ({ metric, layout }) => { return ( - - Groupher @ 2021. 保留所有权利。 - 蜀ICP备17043722号-4 diff --git a/src/containers/unit/Footer/DesktopView/CommunityView.tsx b/src/containers/unit/Footer/DesktopView/CommunityView.tsx new file mode 100755 index 000000000..0d8ad764f --- /dev/null +++ b/src/containers/unit/Footer/DesktopView/CommunityView.tsx @@ -0,0 +1,84 @@ +import { FC, memo } from 'react' + +import type { TArticle, TC11NLayout } from '@/spec' +import { ISSUE_ADDR, API_SERVER_ADDR } from '@/config' +import TopInfo from './TopInfo' +import BottomInfo from './BottomInfo' + +import { VIEW } from '../constants' + +import { + Wrapper, + InnerWrapper, + MainInfos, + BaseInfo, + Item, +} from '../styles/desktop_view/community_view' + +type TProps = { + viewingArticle: TArticle + metric: string + layout: TC11NLayout +} + +const CommunityView: FC = ({ metric, layout }) => { + return ( + + + + + + + 关于 + + + 创建社区 + + + 加入我们 + + + OpenSource + + + 特别感谢 + + + 反馈与建议 + + + 开放数据 + + + + + + + ) +} + +export default memo(CommunityView) diff --git a/src/containers/unit/Footer/DesktopView/DigestView/index.tsx b/src/containers/unit/Footer/DesktopView/HomeView.tsx similarity index 94% rename from src/containers/unit/Footer/DesktopView/DigestView/index.tsx rename to src/containers/unit/Footer/DesktopView/HomeView.tsx index 0181bb9da..6b6a55ea9 100644 --- a/src/containers/unit/Footer/DesktopView/DigestView/index.tsx +++ b/src/containers/unit/Footer/DesktopView/HomeView.tsx @@ -5,9 +5,9 @@ import type { TThemeMap, TC11NLayout } 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 SocialList from '../../SocialList' +import TopInfo from './TopInfo' +import BottomInfo from './BottomInfo' +import SocialList from '../ContactList' import { Wrapper, @@ -18,14 +18,14 @@ import { Body, Item, LinkItem, -} from '../../styles/desktop_view/digest_view' +} from '../styles/desktop_view/home_view' type TProps = { metric: string layout: TC11NLayout } -const DigestView: FC = ({ metric, layout }) => { +const HomeView: FC = ({ metric, layout }) => { const theme = useTheme() as TThemeMap const linkColors = { @@ -166,4 +166,4 @@ const DigestView: FC = ({ metric, layout }) => { ) } -export default memo(DigestView) +export default memo(HomeView) diff --git a/src/containers/unit/Footer/DesktopView/HostingCommunityView.tsx b/src/containers/unit/Footer/DesktopView/HostingCommunityView.tsx new file mode 100755 index 000000000..29db81ddc --- /dev/null +++ b/src/containers/unit/Footer/DesktopView/HostingCommunityView.tsx @@ -0,0 +1,36 @@ +import { FC, memo } from 'react' + +import type { TArticle, TC11NLayout } from '@/spec' +import { SITE_LOGO } from '@/config' + +import BlinkCursor from '@/components/BlinkCursor' + +import { + Wrapper, + InnerWrapper, + SupportBadge, + Logo, + LinkText, +} from '../styles/desktop_view/hosting_community_view' + +type TProps = { + viewingArticle: TArticle + metric: string + layout: TC11NLayout +} + +const HostingCommunityView: FC = ({ metric, layout }) => { + return ( + + + + + + 由 coderplanets 提供支持 + + + + ) +} + +export default memo(HostingCommunityView) diff --git a/src/containers/unit/Footer/DesktopView/TopInfo/Community.tsx b/src/containers/unit/Footer/DesktopView/TopInfo/Community.tsx index 9d833d15e..9e20147f9 100644 --- a/src/containers/unit/Footer/DesktopView/TopInfo/Community.tsx +++ b/src/containers/unit/Footer/DesktopView/TopInfo/Community.tsx @@ -1,14 +1,13 @@ import { FC, memo } from 'react' -import { ICON } from '@/config' +import BlinkCursor from '@/components/BlinkCursor' import type { TProps as TTopInfoProps } from './index' import { Wrapper, InfoBar, SiteTitle, - ArrowDividerIcon, - Logo, + ShortName, } from '../../styles/desktop_view/top_info/community' type TProps = Pick @@ -20,9 +19,9 @@ const Community: FC = ({ return ( - + CP - + {title} ) diff --git a/src/containers/unit/Footer/DesktopView/TopInfo/index.tsx b/src/containers/unit/Footer/DesktopView/TopInfo/index.tsx index 211925db4..2ea20e8bb 100644 --- a/src/containers/unit/Footer/DesktopView/TopInfo/index.tsx +++ b/src/containers/unit/Footer/DesktopView/TopInfo/index.tsx @@ -1,24 +1,29 @@ import { FC, memo } from 'react' +import { TFooterView, VIEW } from '../../constants' + import HomeCommunity from './HomeCommunity' import Community from './Community' import Article from './Article' export type TProps = { - type?: string + type?: TFooterView title?: string noBottomBorder?: boolean } const TopInfo: FC = ({ type, ...restProps }) => { switch (type) { - case 'home': { + case VIEW.HOME: { return } - case 'community': { + case VIEW.COMMUNITY: { return } - case 'article': { + // case VIEW.HOSTING_COMMUNITY: { + // return + // } + case VIEW.ARTICLE: { return
} default: diff --git a/src/containers/unit/Footer/DesktopView/index.tsx b/src/containers/unit/Footer/DesktopView/index.tsx index 8fcf3ad19..a753778fb 100644 --- a/src/containers/unit/Footer/DesktopView/index.tsx +++ b/src/containers/unit/Footer/DesktopView/index.tsx @@ -4,19 +4,20 @@ * */ -import React, { FC, useState, useEffect } from 'react' +import { FC } from 'react' import dynamic from 'next/dynamic' -import { contains } from 'ramda' -import { METRIC } from '@/constant' import { pluggedIn, buildLog } from '@/utils' import JoinModal from '@/containers/tool/JoinModal' import type { TStore } from '../store' +import { VIEW } from '../constants' -import BriefView from './BriefView' -import DigestView from './DigestView' +import HomeView from './HomeView' +import ArticleView from './ArticleView' +import CommunityView from './CommunityView' +import HostingCommunityView from './HostingCommunityView' import { Wrapper } from '../styles' import { useInit, toggleSponsorHelper, onLogin, onPay } from '../logic' @@ -36,10 +37,15 @@ export const BuyMeChuanChuan = dynamic( type TProps = { footer?: TStore metric?: string // TODO + testid?: string } -const FooterContainer: FC = ({ footer: store, metric }) => { - useInit(store) +const FooterContainer: FC = ({ + footer: store, + metric, + testid = 'footer', +}) => { + useInit(store, metric) const { showSponsor, accountInfo, @@ -47,30 +53,11 @@ const FooterContainer: FC = ({ footer: store, metric }) => { accountInfo: { customization: { bannerLayout }, }, + type, } = store - const [curView, setCurView] = useState('DIGEST') - - useEffect(() => { - if ( - contains(metric, [ - METRIC.USER, - METRIC.DISCOVERY, - METRIC.ARTICLE, - METRIC.WORKS_EDITOR, - METRIC.COMMUNITY_EDITOR, - ]) - ) { - setCurView('BRIEF') - } else if (contains(metric, [METRIC.SUBSCRIBE])) { - setCurView('BRIEF_LEFT') - } else { - setCurView('DIGEST') - } - }, [metric]) - return ( - + = ({ footer: store, metric }) => { onPay={onPay} /> - {curView === 'DIGEST' ? ( - - ) : ( - } + {/* {type === VIEW.HOME && ( + + )} */} + {/* {type === VIEW.HOME && ( + + )} */} + {type === VIEW.ARTICLE && ( + diff --git a/src/containers/unit/Footer/constants.ts b/src/containers/unit/Footer/constants.ts new file mode 100644 index 000000000..4c12987a9 --- /dev/null +++ b/src/containers/unit/Footer/constants.ts @@ -0,0 +1,13 @@ +export type TFooterView = + | 'home_view' + | 'community' + | 'hosting_community' + | 'article' + +export const VIEW = { + HOME: 'home_view' as TFooterView, // 只有在 home community 的 + // 常规社区, 类似 CP / javascript (+ 反馈与建议) + COMMUNITY: 'community' as TFooterView, + HOSTING_COMMUNITY: 'hosting_community' as TFooterView, + ARTICLE: 'article' as TFooterView, +} diff --git a/src/containers/unit/Footer/logic.ts b/src/containers/unit/Footer/logic.ts index 046789f22..40b357472 100755 --- a/src/containers/unit/Footer/logic.ts +++ b/src/containers/unit/Footer/logic.ts @@ -36,14 +36,14 @@ const ErrSolver = [] // ############################### // init & uninit // ############################### -export const useInit = (_store: TStore) => { +export const useInit = (_store: TStore, metric: string): void => { useEffect(() => { store = _store - // log('effect init') + store.mark({ metric }) sub$ = sr71$.data().subscribe($solver(DataSolver, ErrSolver)) return () => { sub$.unsubscribe() } - }, [_store]) + }, [_store, metric]) } diff --git a/src/containers/unit/Footer/store.ts b/src/containers/unit/Footer/store.ts index 58c660ab2..40b90d089 100755 --- a/src/containers/unit/Footer/store.ts +++ b/src/containers/unit/Footer/store.ts @@ -4,15 +4,20 @@ */ import { types as T, getParent, Instance } from 'mobx-state-tree' +import { contains } from 'ramda' -import type { TRootStore, TAccount, TArticle } from '@/spec' -import { markStates, buildLog } from '@/utils' +import type { TRootStore, TAccount, TArticle, TCommunity } from '@/spec' +import { HCN, METRIC } from '@/constant' +import { markStates, buildLog, stripMobx } from '@/utils' + +import { VIEW, TFooterView } from './constants' /* eslint-disable-next-line */ const log = buildLog('S:FooterStore') const FooterStore = T.model('FooterStore', { showSponsor: T.optional(T.boolean, false), + metric: T.optional(T.string, METRIC.COMMUNITY), }) .views((self) => ({ get isLogin(): boolean { @@ -28,6 +33,31 @@ const FooterStore = T.model('FooterStore', { const root = getParent(self) as TRootStore return root.viewingArticle }, + + get curCommunity(): TCommunity { + const root = getParent(self) as TRootStore + return stripMobx(root.viewing.community) + }, + + get type(): TFooterView { + const root = getParent(self) as TRootStore + if (root.viewing.community.raw === HCN) return VIEW.HOME + // TODO: check if the community is hosting + // if (self.curCommunity.isHosting) return VIEW.COMMUNITY + if (self.metric === METRIC.COMMUNITY) return VIEW.HOSTING_COMMUNITY + + if ( + contains(self.metric, [ + METRIC.USER, + METRIC.DISCOVERY, + METRIC.ARTICLE, + METRIC.WORKS_EDITOR, + METRIC.COMMUNITY_EDITOR, + ]) + ) { + return VIEW.ARTICLE + } + }, })) .actions((self) => ({ authWarning(options?: Record): void { diff --git a/src/containers/unit/Footer/styles/social_list.ts b/src/containers/unit/Footer/styles/contact_list.ts similarity index 100% rename from src/containers/unit/Footer/styles/social_list.ts rename to src/containers/unit/Footer/styles/contact_list.ts diff --git a/src/containers/unit/Footer/styles/desktop_view/brief_view.ts b/src/containers/unit/Footer/styles/desktop_view/article_view.ts similarity index 72% rename from src/containers/unit/Footer/styles/desktop_view/brief_view.ts rename to src/containers/unit/Footer/styles/desktop_view/article_view.ts index 2c5015b01..3a06ce8f6 100755 --- a/src/containers/unit/Footer/styles/desktop_view/brief_view.ts +++ b/src/containers/unit/Footer/styles/desktop_view/article_view.ts @@ -1,12 +1,16 @@ import styled from 'styled-components' +import type { TC11NLayout } from '@/spec' +import { C11N } from '@/constant' import { theme, css } from '@/utils' -export const Wrapper = styled.div<{ metric: string }>` +type TWrapper = { metric: string; layout: TC11NLayout } +export const Wrapper = styled.div` ${css.flexColumn('align-end')}; width: 100%; - margin-top: 15px; ${({ metric }) => css.fitContentWidth(metric)}; + + padding: ${({ layout }) => (layout === C11N.CLASSIC ? '0 14px' : '')}; ` export const InnerWrapper = styled.div` width: 100%; diff --git a/src/containers/unit/Footer/styles/desktop_view/community_view.ts b/src/containers/unit/Footer/styles/desktop_view/community_view.ts new file mode 100755 index 000000000..9b335d847 --- /dev/null +++ b/src/containers/unit/Footer/styles/desktop_view/community_view.ts @@ -0,0 +1,37 @@ +import styled from 'styled-components' + +import type { TC11NLayout } from '@/spec' +import { C11N } from '@/constant' +import { theme, css } from '@/utils' + +type TWrapper = { metric: string; layout: TC11NLayout } +export const Wrapper = styled.div` + ${css.flexColumn('align-end')}; + width: 100%; + ${({ metric }) => css.fitContentWidth(metric)}; + + padding: ${({ layout }) => (layout === C11N.CLASSIC ? '0 14px' : '0 140px')}; +` +export const InnerWrapper = styled.div` + width: 100%; +` +export const MainInfos = styled.footer` + margin-bottom: 20px; + ${css.media.tablet`display: none;`}; +` +const Link = styled.a` + text-decoration: none; + font-weight: bolder; + color: ${theme('footer.text')}; + transition: color 0.3s; + &:hover { + text-decoration: underline; + color: ${theme('footer.hover')}; + } +` +export const BaseInfo = styled.div` + ${css.flex()}; +` +export const Item = styled(Link)` + margin-right: 25px; +` diff --git a/src/containers/unit/Footer/styles/desktop_view/digest_view/index.ts b/src/containers/unit/Footer/styles/desktop_view/home_view.ts similarity index 97% rename from src/containers/unit/Footer/styles/desktop_view/digest_view/index.ts rename to src/containers/unit/Footer/styles/desktop_view/home_view.ts index 512b31121..d6d24f57b 100644 --- a/src/containers/unit/Footer/styles/desktop_view/digest_view/index.ts +++ b/src/containers/unit/Footer/styles/desktop_view/home_view.ts @@ -9,7 +9,8 @@ import { ArrowLink } from '@/components/Buttons' export const Wrapper = styled.footer` ${css.flexColumn('align-center')}; width: 100%; - margin-top: 30px; + padding-top: 30px; + background: #06262f; ` export const InnerWrapper = styled.div<{ metric: string }>` width: 100%; diff --git a/src/containers/unit/Footer/styles/desktop_view/hosting_community_view.ts b/src/containers/unit/Footer/styles/desktop_view/hosting_community_view.ts new file mode 100755 index 000000000..d85f303b9 --- /dev/null +++ b/src/containers/unit/Footer/styles/desktop_view/hosting_community_view.ts @@ -0,0 +1,36 @@ +import styled from 'styled-components' + +import Img from '@/Img' +import type { TC11NLayout } from '@/spec' +import { C11N } from '@/constant' +import { theme, css } from '@/utils' + +type TWrapper = { metric: string; layout: TC11NLayout } +export const Wrapper = styled.div` + ${css.flexColumn('align-end')}; + width: 100%; + ${({ metric }) => css.fitContentWidth(metric)}; + padding-right: ${({ layout }) => + layout === C11N.CLASSIC ? '250px' : '100px'}; +` +export const InnerWrapper = styled.div` + ${css.flex('justify-center')}; + width: 100%; + margin-top: -20px; + margin-bottom: 50px; +` +export const SupportBadge = styled.div` + ${css.flex('align-center')}; +` +export const Logo = styled(Img)` + fill: ${theme('footer.text')}; + ${css.size(15)}; +` +export const LinkText = styled.a` + color: ${theme('footer.text')}; + cursor: pointer; + + &:hover { + color: ${theme('footer.title')}; + } +` diff --git a/src/containers/unit/Footer/styles/desktop_view/top_info/community.ts b/src/containers/unit/Footer/styles/desktop_view/top_info/community.ts index cbcd90a9b..0ca759d61 100644 --- a/src/containers/unit/Footer/styles/desktop_view/top_info/community.ts +++ b/src/containers/unit/Footer/styles/desktop_view/top_info/community.ts @@ -1,7 +1,6 @@ import styled from 'styled-components' import { theme, css } from '@/utils' -import Img from '@/Img' import { Wrapper as DefaultWrapper, @@ -14,20 +13,20 @@ import { export const Wrapper = styled(DefaultWrapper)`` export const InfoBar = styled(DefaultInfoBar)`` export const Logo = styled(DefaultLogo)` - ${css.size(18)}; + ${css.size(16)}; margin-right: 8px; ` +export const ShortName = styled.div` + color: #005364; + font-size: 16px; + font-weight: bolder; + font-style: italic; +` export const SiteTitle = styled(DefaultSiteTitle)` color: #007fa8; - font-size: 18px; + font-size: 16px; font-weight: normal; ` -export const ArrowDividerIcon = styled(Img)` - fill: ${theme('footer.text')}; - ${css.size(20)}; - transform: rotate(180deg); - margin-right: 6px; -` export const Linker = styled.a` color: ${theme('footer.title')}; display: block; diff --git a/utils/scripts/generators/component/stateless.tsx.hbs b/utils/scripts/generators/component/stateless.tsx.hbs index 3472e63e7..c49621030 100755 --- a/utils/scripts/generators/component/stateless.tsx.hbs +++ b/utils/scripts/generators/component/stateless.tsx.hbs @@ -4,7 +4,7 @@ * */ -import { FC } from 'react' +import { FC, memo } from 'react' import { buildLog } from '@/utils' {{#if wantI18n}} @@ -40,4 +40,4 @@ const {{ properCase name }}: FC = ({{preCurly ""}} testid = '{{ dashCase ) } -export default React.memo({{ properCase name }}) +export default memo({{ properCase name }})