@@ -13,13 +13,13 @@ function SponsorTable({ max, levelName, sponsors, ...rest }: Props) {
1313 return (
1414 < SponsorCard >
1515 < H3 > { levelName } </ H3 >
16- < div style = { { gridTemplateColumns : `repeat( ${ max } , 1fr)` } } >
16+ < SponsorLogoList >
1717 { sponsors . map ( ( sponsor ) => (
1818 < Link to = { `/sponsoring/sponsor/${ sponsor . id } ` } relative = "path" >
1919 < LogoImage image = { sponsor . logo_image } />
2020 </ Link >
2121 ) ) }
22- </ div >
22+ </ SponsorLogoList >
2323 </ SponsorCard >
2424 ) ;
2525}
@@ -30,54 +30,63 @@ interface Image {
3030
3131const H3 = styled . h3 `
3232 color: #141414 !important;
33+ width: 120px;
3334` ;
3435
3536const LogoImage = styled . div < Image > `
3637 display: inline-flex;
3738 justify-content: center;
3839 align-itmes: center;
3940 color: #141414;
40- width: 320px;
4141 height: 200px;
4242 background-image: url(${ ( props ) => props . image } );
4343 background-size: contain;
4444 background-position: center;
4545
46- & > img {
47- height: 50% ;
46+ @media only screen and (max-width: 480px) {
47+ width: 320px ;
4848 }
4949
5050 @media only screen and (max-width: 810px) {
51- width: 100%;
51+ width: 200px;
52+ }
53+
54+ @media only screen and (max-width: 1200px) {
55+ width: 240px;
56+ }
57+
58+ @media only screen and (min-width: 1200px) {
59+ width: 320px;
60+ }
61+
62+ @media only screen and (min-width: 1800px) {
63+ width: 360px;
5264 }
5365` ;
5466
67+ const SponsorLogoList = styled . div `
68+ display: flex;
69+ flex-wrap: wrap;
70+ column-gap: 3vw;
71+ justify-content: center;
72+ width: 100%;
73+ ` ;
74+
5575const SponsorCard = styled . div `
5676 border: 1px solid #b0a8fe;
5777 border-radius: 16px;
5878 display: flex;
5979 padding: 1rem 1.5rem;
6080 align-items: center;
6181 background-color: #c2c7d0;
82+ min-width: 280px;
6283
6384 & > h3 {
6485 color: #b0a8fe;
6586 margin: 0;
66- flex: 200px;
67- }
68-
69- & > div {
70- width: 100%;
71- display: grid;
72- grid-gap: 1.5rem;
73- flex: auto;
74-
75- & > a {
76- max-height: 20rem;
77- }
7887 }
7988
80- @media only screen and (max-width: 810px ) {
89+ @media only screen and (max-width: 480px ) {
8190 flex-direction: column;
8291 margin: 1rem;
8392
@@ -86,12 +95,6 @@ const SponsorCard = styled.div`
8695 margin: 0;
8796 flex: auto;
8897 }
89-
90- & > div {
91- display: flex;
92- flex-wrap: wrap;
93- flex-direction: column;
94- }
9598 }
9699` ;
97100
0 commit comments