Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Nuri/fix - Academy - fixed tab for mobile #2553

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions src/pages/academy/_recent-featured-posts.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const RecentFeaturedPosts = ({ recent_data, featured_data }) => {
<MainArticle image={getAssetUrl(headline_recent?.main_image?.id)}>
<Description>
<TagParentWrapper>
{headline_recent.tags.map((article) => {
{headline_recent.tags.slice(0, 3).map((article) => {
return (
<TagWrapper key={article?.id}>
<StyledCategories>
Expand Down Expand Up @@ -149,15 +149,17 @@ const RecentFeaturedPosts = ({ recent_data, featured_data }) => {
>
<Description>
<TagParentWrapper>
{headline_featured.tags.map((article) => {
return (
<TagWrapper key={article.id}>
<StyledCategories>
{article.tags_id?.tag_name}
</StyledCategories>
</TagWrapper>
)
})}
{headline_featured.tags
.slice(0, 3)
.map((article) => {
return (
<TagWrapper key={article.id}>
<StyledCategories>
{article.tags_id?.tag_name}
</StyledCategories>
</TagWrapper>
)
})}
</TagParentWrapper>
<Header as="h3" type="heading-3" color="white" mb="5px">
{headline_featured.blog_title}
Expand Down
15 changes: 15 additions & 0 deletions src/pages/academy/components/recent-featured-posts/_style.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ export const StyledContainer = styled(Flex)`
@media ${device.laptopM} {
max-width: 58.8rem;
}

@media ${device.mobileL} {
width: 100%;
}
`

export const StyledTabs = styled(Tabs)`
Expand All @@ -26,10 +30,16 @@ export const ArticleContentWrapper = styled(Container)`
margin-top: 24px;
color: var(--color-white);
width: 100%;

@media ${device.laptopM} {
flex-direction: column;
width: 100%;
}

@media ${device.mobileL} {
margin: 24px auto 0;
padding: 0 16px 0 18px;
}
`

export const LeftContent = styled(Flex)`
Expand Down Expand Up @@ -291,6 +301,11 @@ export const AllArticleButton = styled(LinkButton)`
@media ${device.laptopM} {
width: 100%;
}

@media ${device.mobileL} {
width: 90%;
margin-top: 24px;
}
`

export const RedirectLink = styled(LocalizedLink)`
Expand Down