Skip to content

Commit 4b9f102

Browse files
authored
Merge pull request #37 from pythonkr/feature/logo-resize
Update: 로고 표시 스타일 변경
2 parents e2809ce + c650be9 commit 4b9f102

File tree

2 files changed

+54
-16
lines changed

2 files changed

+54
-16
lines changed

src/components/Footer/SponsorTable.tsx

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,44 @@ type Props = React.HTMLAttributes<HTMLDivElement> & {
1212
function SponsorTable({ max, levelName, sponsors, ...rest }: Props) {
1313
return (
1414
<SponsorCard>
15-
<h3>{levelName}</h3>
15+
<H3>{levelName}</H3>
1616
<div style={{ gridTemplateColumns: `repeat(${max}, 1fr)` }}>
1717
{sponsors.map((sponsor) => (
1818
<Link to={`/sponsoring/sponsor/${sponsor.id}`} relative="path">
19-
<LogoImage src={sponsor.logo_image} alt={sponsor.name} />
19+
<LogoImage image={sponsor.logo_image} />
2020
</Link>
2121
))}
2222
</div>
2323
</SponsorCard>
2424
);
2525
}
2626

27-
const LogoImage = styled.img`
28-
background: white;
29-
color: black;
30-
min-width: 15vw;
31-
max-height: 100%;
27+
interface Image {
28+
image: string;
29+
}
30+
31+
const H3 = styled.h3`
32+
color: #141414 !important;
33+
`;
34+
35+
const LogoImage = styled.div<Image>`
36+
display: inline-flex;
37+
justify-content: center;
38+
align-itmes: center;
39+
color: #141414;
40+
width: 320px;
41+
height: 200px;
42+
background-image: url(${(props) => props.image});
43+
background-size: 200px;
44+
background-position: center;
45+
46+
& > img {
47+
height: 50%;
48+
}
49+
50+
@media only screen and (max-width: 810px) {
51+
width: 100%;
52+
}
3253
`;
3354

3455
const SponsorCard = styled.div`
@@ -37,6 +58,7 @@ const SponsorCard = styled.div`
3758
display: flex;
3859
padding: 1rem 1.5rem;
3960
align-items: center;
61+
background-color: #c2c7d0;
4062
4163
& > h3 {
4264
color: #b0a8fe;
@@ -56,11 +78,19 @@ const SponsorCard = styled.div`
5678
}
5779
5880
@media only screen and (max-width: 810px) {
81+
flex-direction: column;
5982
margin: 1rem;
6083
84+
& > h3 {
85+
color: #b0a8fe;
86+
margin: 0;
87+
flex: auto;
88+
}
89+
6190
& > div {
6291
display: flex;
6392
flex-wrap: wrap;
93+
flex-direction: column;
6494
}
6595
}
6696
`;

src/pages/Sponsor/SponsorDetail.tsx

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ const SponsorDetailPage = () => {
5252
export default SponsorDetailPage;
5353

5454
const LogoImage = styled.img`
55-
background: white;
56-
color: black;
55+
color: #141414;
5756
max-width: 50%;
5857
`;
5958

@@ -75,14 +74,24 @@ const Vertical = styled.div`
7574
justify-content: center;
7675
align-items: center;
7776
text-align: center;
78-
margin-bottom: 2rem;
7977
width: 100%;
78+
height: max-content;
79+
border-radius: 16px;
80+
min-height: 700px;
81+
background-color: #c2c7d0;
82+
margin: 0 2rem 2rem 2rem;
83+
84+
@media only screen and (max-width: 810px) {
85+
height: max-content;
86+
min-height: 300px;
87+
justify-content: start;
88+
}
8089
`;
8190

8291
const H1 = styled.h1`
8392
margin-top: 3rem;
8493
font-size: 40px;
85-
color: #b0a8fe;
94+
color: #141414;
8695
8796
@media only screen and (max-width: 810px) {
8897
padding: 0 1rem;
@@ -93,18 +102,17 @@ const H1 = styled.h1`
93102
const H3 = styled.h3`
94103
margin-top: 1.5rem;
95104
font-size: 24px;
96-
color: #c2c7d0;
105+
color: #141414;
97106
98-
& > p,
99-
span {
107+
& > * {
100108
font-size: 24px !important;
101-
color: #c2c7d0 !important;
109+
color: #141414 !important;
102110
text-align: left;
103111
104112
& > p,
105113
span {
106114
font-size: 24px !important;
107-
color: #c2c7d0 !important;
115+
color: #141414 !important;
108116
}
109117
}
110118

0 commit comments

Comments
 (0)