Skip to content

Commit

Permalink
Revert "fix: fix defects"
Browse files Browse the repository at this point in the history
This reverts commit c38e4e0.
  • Loading branch information
duidae committed Jan 4, 2023
1 parent bdca1f4 commit 9b5f28c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const Container = styled.div`
width: ${mockup.tablet.cardWidth}px;
`}
${mq.mobileOnly`
width: ${mockup.mobile.cardWidth}px;
width: ${(mockup.mobile.cardWidth / mockup.mobile.maxWidth) * 100}%;
`}
a {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class List extends PureComponent {
/>
)
})
const headerTitle = catName || (tagName ? `#${tagName}` : '')
const headerTitle = catName || tagName
const headerJSX = headerTitle ? (
<TitleBar title={headerTitle ?? ''} />
) : null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ const NoData = styled.div`
text-align: center;
`

const topicTitleText = '深度專題'

class Topics extends Component {
_buildRelatedPosts(posts) {
const _buildPostJSX = post => {
Expand Down Expand Up @@ -100,7 +102,7 @@ class Topics extends Component {
topSectionJSX = [
<TitleBar
key="top-title"
title={'深度專題'}
title={topicTitleText}
subtitle={TEXT.SECTION_TITLE_FEATURED}
/>,
<TopSectionContent
Expand All @@ -126,7 +128,10 @@ class Topics extends Component {
<PageContent>
{topSectionJSX}
{isFetching && isFirstPage ? null : (
<TitleBar subtitle={TEXT.SECTION_TITLE_OTHERS} />
<TitleBar
title={topicTitleText}
subtitle={TEXT.SECTION_TITLE_OTHERS}
/>
)}
<WrappedListSectionContent
isFetching={isFetching}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const marginBetweenItems = 20
export default {
marginBetweenItems,
mobile: {
maxWidth: 325 * 2 + marginBetweenItems,
maxWidth: 375,
cardWidth: 325,
tagsWidth: 240,
imgHeight: 205,
Expand Down
4 changes: 2 additions & 2 deletions packages/react-components/src/title-bar/components/bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ const BarContainer = styled.div`

const TitleBar = ({ title = '', subtitle = '' }) => (
<BarContainer>
{title ? <H1 text={title} /> : null}
{subtitle ? <P1 text={subtitle} weight="bold" /> : null}
<H1 text={title} />
<P1 text={subtitle} weight="bold" />
<Divider direction="horizontal" />
</BarContainer>
)
Expand Down

0 comments on commit 9b5f28c

Please sign in to comment.