Skip to content

Commit

Permalink
Merge pull request #65 from KNU-Design-Web/fix#64
Browse files Browse the repository at this point in the history
Fix#64 모바일 반응형 UI 깨지는 현상 수정
  • Loading branch information
toothlessdev authored Oct 28, 2024
2 parents 95e03a0 + f52c8f4 commit 94e6ef8
Show file tree
Hide file tree
Showing 9 changed files with 107 additions and 38 deletions.
6 changes: 3 additions & 3 deletions src/apps/data/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ export const data: DataItem[] = [
},
email: "[email protected]",
instagram: "zooya._.design",
link: "behance.net/64528efd",
link: "https://www.behance.net/64528efd",
},
project: {
thumbnail: "https://images.knud2024.com/project-individual-thumbnail/Heeju-Son_1960x1000.webp",
Expand Down Expand Up @@ -382,7 +382,7 @@ export const data: DataItem[] = [
},
email: "[email protected]",
instagram: "0nemnn",
link: "miryutats",
link: "https://www.behance.net/miryutats",
},
project: {
thumbnail: "https://images.knud2024.com/project-individual-thumbnail/Minju-Won_1960x1000.webp",
Expand Down Expand Up @@ -771,7 +771,7 @@ export const data: DataItem[] = [
},
email: "[email protected]",
instagram: "d_bysjh",
link: "https://be.net/hwangsusu",
link: "https://www.behance.net/hwangsusu",
},
project: {
thumbnail: "https://images.knud2024.com/project-individual-thumbnail/Sujung-Hwang_1960x1000.webp",
Expand Down
2 changes: 1 addition & 1 deletion src/common/components/Footer/Footer.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import styled from "@emotion/styled";

export const Wrapper = styled.footer`
position: relative;
z-index: 100;
z-index: 40;
display: flex;
flex-direction: column;
Expand Down
5 changes: 4 additions & 1 deletion src/common/components/NavBar/NavTop.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const Wrapper = styled.nav`
position: fixed;
top: 0;
left: 0;
z-index: 4;
z-index: 50;
width: 100%;
height: 60px;
Expand All @@ -20,6 +20,9 @@ export const Wrapper = styled.nav`
`;

export const Item = styled.li<{ active: boolean }>`
position: relative;
z-index: 50;
display: flex;
width: 100%;
height: 100%;
Expand Down
3 changes: 3 additions & 0 deletions src/common/components/NavBar/NavTopItem.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import { navItems } from "@/apps/constants/navItems";
import styled from "@emotion/styled";

export const Item = styled.li<{ index: number; active: boolean }>`
position: relative;
z-index: 50;
display: flex;
width: 100%;
height: 100%;
Expand Down
48 changes: 46 additions & 2 deletions src/components/ProfilePage/ProfileDetail/ProfileDetail.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,45 @@ export const Info = styled.div`
}
`;

export const AuthorContainer = styled.div`
display: flex;
flex-direction: column;
justify-content: space-between;
width: 50%;
`;

export const Author = styled.div`
p span {
display: block;
margin: 2px 0px;
}
${BREAKPOINT.MOBILE} {
h1 span {
font-size: 24px;
}
h3 span {
font-size: 16px;
}
p span {
font-size: 12px;
}
}
`;

export const MobileProjectTitle = styled.div`
display: none;
${BREAKPOINT.MOBILE} {
display: block;
width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
span {
}
}
`;

export const Project = styled.div`
Expand Down Expand Up @@ -95,10 +129,19 @@ export const ProjectTitle = styled.div`
margin: 0px 10px;
${BREAKPOINT.TABLET} {
margin: 10px;
margin: 10px 0px;
h2 {
width: 100px;
}
h2 span {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
${BREAKPOINT.MOBILE} {
margin: 10px;
margin: 10px 0px;
display: none;
}
`;
Expand All @@ -112,6 +155,7 @@ export const Profile = styled.img`
height: 500px;
${BREAKPOINT.MOBILE} {
margin-top: 20px;
max-width: 100%;
}
`;
74 changes: 45 additions & 29 deletions src/components/ProfilePage/ProfileDetail/ProfileDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,47 @@ export const ProfileDetail = (props: ProfileDetailProps) => {
return (
<ProfileDetailStyles.Wrapper>
<ProfileDetailStyles.Info>
<ProfileDetailStyles.Author>
<h1>
<Text size="xl">{props.koName}</Text>
</h1>
<h3>
<Text size="s" weight={400}>
{props.enName}
</Text>
</h3>
<p>
<Text size="xs" weight={200} color="purple">
{props.email}
</Text>
<Text size="xs" weight={200} color="purple">
{props.instagram}
</Text>
<Text size="xs" weight={200} color="purple">
{props.link}
<ProfileDetailStyles.AuthorContainer>
<ProfileDetailStyles.Author>
<h1>
<Text size="xl">{props.koName}</Text>
</h1>
<h3>
<Text size="s" weight={400}>
{props.enName}
</Text>
</h3>
<p>
<Text size="xs" weight={200} color="purple">
{props.email}
</Text>
<Text size="xs" weight={200} color="purple">
{props.instagram && (
<a
href={`https://www.instagram.com/${props.instagram}`}
target="_blank"
style={{ color: "var(--color-purple)" }}
>
@{props.instagram}
</a>
)}
</Text>
<Text size="xs" weight={200} color="purple">
{props.link && (
<a href={props.link} target="_blank" style={{ color: "var(--color-purple)" }}>
{props.link?.split("/").at(-1)}
</a>
)}
</Text>
</p>
</ProfileDetailStyles.Author>

<ProfileDetailStyles.MobileProjectTitle>
<Text size="s" weight={600}>
{props.projectThumbnailTitle}
</Text>
</p>
</ProfileDetailStyles.Author>
</ProfileDetailStyles.MobileProjectTitle>
</ProfileDetailStyles.AuthorContainer>

<ProfileDetailStyles.Project>
<ProfileDetailStyles.ProjectImgContianer
Expand All @@ -47,15 +67,11 @@ export const ProfileDetail = (props: ProfileDetailProps) => {
</ProfileDetailStyles.ProjectImgContianer>

<ProfileDetailStyles.ProjectTitle>
{props.projectTitle.map((title) => {
return (
<h2>
<Text size="s" weight={500} color="#000">
{title}
</Text>
</h2>
);
})}
<h2>
<Text size="s" weight={500} color="#000">
{props.projectThumbnailTitle}
</Text>
</h2>
</ProfileDetailStyles.ProjectTitle>
</ProfileDetailStyles.Project>
</ProfileDetailStyles.Info>
Expand Down
2 changes: 1 addition & 1 deletion src/components/ProfilePage/ProfileItem/ProfileItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export interface ProfileItemProps {
profileImg: string;
projectImg: string;

projectTitle: string[];
projectThumbnailTitle: string;
}

export const ProfileItem = (props: ProfileItemProps) => {
Expand Down
3 changes: 3 additions & 0 deletions src/components/ProfilePage/ProfileList/ProfileList.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@ export const Container = styled.ul`
${BREAKPOINT.TABLET} {
margin-top: 60px;
}
${BREAKPOINT.MOBILE} {
margin-top: 60px;
}
`;
2 changes: 1 addition & 1 deletion src/pages/profile/ProfilePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function ProfilePage() {
link={item.author.link}
profileImg={`https://images.knud2024.com/profile-webp-resized/${item.id}_780x1000.webp`}
projectImg={`https://images.knud2024.com/project-card-thumbnail/thumbnail${item.id}_980x980.webp`}
projectTitle={item.project.title}
projectThumbnailTitle={item.project.thumbnailTitle}
/>
);
})}
Expand Down

0 comments on commit 94e6ef8

Please sign in to comment.