mirror of
https://github.com/acid-info/free.technology.git
synced 2025-02-23 06:58:16 +00:00
style: mobile responsive design
This commit is contained in:
parent
47108ef0cf
commit
272dc12d07
5
public/icons/show-more.svg
Normal file
5
public/icons/show-more.svg
Normal file
@ -0,0 +1,5 @@
|
||||
<svg width="12" height="4" viewBox="0 0 12 4" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="0" y="2" width="2" height="2" fill="black" />
|
||||
<rect x="5" y="2" width="2" height="2" fill="black" />
|
||||
<rect x="10" y="2" width="2" height="2" fill="black" />
|
||||
</svg>
|
After Width: | Height: | Size: 278 B |
@ -1,4 +1,6 @@
|
||||
import { breakpoints } from '@/configs/ui.configs'
|
||||
import styled from '@emotion/styled'
|
||||
import { useState } from 'react'
|
||||
import BUSection from '../BUSection'
|
||||
|
||||
type Props = {
|
||||
@ -6,13 +8,22 @@ type Props = {
|
||||
}
|
||||
|
||||
const BUAbout = ({ data }: Props) => {
|
||||
const [showMore, setShowMore] = useState(false)
|
||||
|
||||
const handleShowMore = () => {
|
||||
setShowMore(!showMore)
|
||||
}
|
||||
|
||||
return (
|
||||
<Container>
|
||||
<BUSection
|
||||
title={'About'}
|
||||
description={
|
||||
<>
|
||||
<p>{data?.description}</p>
|
||||
<Paragraph showMore={showMore}>{data?.description}</Paragraph>
|
||||
<ShowMore onClick={handleShowMore}>
|
||||
<img src={'/icons/show-more.svg'} alt={'show-more'} />
|
||||
</ShowMore>
|
||||
</>
|
||||
}
|
||||
/>
|
||||
@ -25,8 +36,35 @@ const Container = styled.div`
|
||||
flex-direction: column;
|
||||
padding: 0 16px;
|
||||
|
||||
p {
|
||||
@media (max-width: ${breakpoints.md}px) {
|
||||
padding: 0 8px;
|
||||
}
|
||||
`
|
||||
|
||||
const Paragraph = styled.p<{ showMore: boolean }>`
|
||||
@media (max-width: ${breakpoints.md}px) {
|
||||
padding-top: 24px;
|
||||
display: ${({ showMore }) => (showMore ? 'block' : '-webkit-box')};
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 7;
|
||||
overflow: hidden;
|
||||
}
|
||||
`
|
||||
|
||||
const ShowMore = styled.button`
|
||||
background: transparent;
|
||||
margin-top: 12px;
|
||||
display: flex;
|
||||
padding: 9px 12px;
|
||||
box-sizing: border-box;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 999px;
|
||||
background: #f2f2f2;
|
||||
border: none;
|
||||
|
||||
@media (min-width: ${breakpoints.md}px) {
|
||||
display: none;
|
||||
}
|
||||
`
|
||||
|
||||
|
@ -38,6 +38,7 @@ export const BUHero = ({ data }: Props) => {
|
||||
</Title>
|
||||
</Header>
|
||||
<Content>
|
||||
<div>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
@ -91,6 +92,7 @@ export const BUHero = ({ data }: Props) => {
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<Buttons>
|
||||
{data?.website && (
|
||||
<Link href={data?.website} target="_blank">
|
||||
@ -287,6 +289,10 @@ const Content = styled.div`
|
||||
}
|
||||
|
||||
table {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
table:last-of-type {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
@ -295,9 +301,10 @@ const Content = styled.div`
|
||||
font-size: 14px;
|
||||
padding: 16px 0 8px 0;
|
||||
}
|
||||
|
||||
tbody {
|
||||
}
|
||||
|
||||
@media (max-width: ${breakpoints.md}px) {
|
||||
padding-bottom: 80px;
|
||||
|
||||
button {
|
||||
|
@ -65,6 +65,8 @@ const Container = styled.div`
|
||||
padding: 0 16px;
|
||||
|
||||
@media (max-width: ${breakpoints.md}px) {
|
||||
padding: 0 8px;
|
||||
|
||||
& > div > div {
|
||||
border-bottom: 0;
|
||||
margin-bottom: 8px;
|
||||
|
@ -38,6 +38,10 @@ const Container = styled.div`
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 0 16px;
|
||||
|
||||
@media (max-width: ${breakpoints.md}px) {
|
||||
padding: 0 8px;
|
||||
}
|
||||
`
|
||||
|
||||
const ScrollableContainer = styled.div`
|
||||
@ -54,8 +58,9 @@ const ScrollableContainer = styled.div`
|
||||
}
|
||||
|
||||
@media (max-width: ${breakpoints.md}px) {
|
||||
width: 100vw;
|
||||
width: calc(100vw - 8px);
|
||||
margin-top: 8px;
|
||||
margin-left: -8px;
|
||||
}
|
||||
`
|
||||
|
||||
|
@ -76,6 +76,8 @@ const Container = styled.div`
|
||||
padding: 0 16px;
|
||||
|
||||
@media (max-width: ${breakpoints.md}px) {
|
||||
padding: 0 8px;
|
||||
|
||||
& > div > div {
|
||||
border-bottom: 0;
|
||||
}
|
||||
@ -85,7 +87,7 @@ const Container = styled.div`
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin-top: 8px;
|
||||
margin-bottom: 8px;
|
||||
font-size: 22px;
|
||||
line-height: 122%;
|
||||
}
|
||||
|
@ -108,15 +108,10 @@ const NoChallenges = styled.p`
|
||||
text-decoration: none;
|
||||
`
|
||||
|
||||
// const Mark = styled(Image)`
|
||||
// @media (max-width: ${breakpoints.md}px) {
|
||||
// display: none;
|
||||
// }
|
||||
// `
|
||||
|
||||
const CustomBox = styled(Box)`
|
||||
@media (max-width: ${breakpoints.md}px) {
|
||||
margin-bottom: 80px;
|
||||
padding: 0 8px;
|
||||
}
|
||||
`
|
||||
|
||||
|
@ -27,7 +27,7 @@ const JobList = ({
|
||||
}
|
||||
|
||||
return (
|
||||
<Box marginTop={marginTop} marginBottom={marginBottom}>
|
||||
<CustomBox marginTop={marginTop} marginBottom={marginBottom}>
|
||||
{Object.entries(jobs)
|
||||
.filter(([businessUnit, _]) =>
|
||||
!activeBUs?.length ? true : activeBUs.includes(businessUnit),
|
||||
@ -46,7 +46,7 @@ const JobList = ({
|
||||
</Jobs>
|
||||
</Container>
|
||||
))}
|
||||
</Box>
|
||||
</CustomBox>
|
||||
)
|
||||
}
|
||||
|
||||
@ -100,4 +100,10 @@ const NoJobs = styled.p`
|
||||
text-decoration: none;
|
||||
`
|
||||
|
||||
const CustomBox = styled(Box)`
|
||||
@media (max-width: ${breakpoints.md}px) {
|
||||
padding: 0 8px;
|
||||
}
|
||||
`
|
||||
|
||||
export default JobList
|
||||
|
Loading…
x
Reference in New Issue
Block a user