Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(start): better mobile responsiveness + remove clipping #328

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
19 changes: 9 additions & 10 deletions next/src/components/start/advice/AdviceView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,24 +48,23 @@ const MainContainer = styled.div`
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
width: 100%;
`;

const InfoCardsContainer = styled.div`
display: flex;
flex-direction: column;
overflow-y: auto;

// This is to set the bounds of the container to allow the scrollbar to show up
position:absolute;
left: 0;
right: 0;
top:0;
bottom: 30px;
height: 70vh;


@media ${device.laptop} {
justify-content: space-around;
flex-direction: row;
position: relative;
height: fit-content;
}
`;

Expand All @@ -74,16 +73,16 @@ const MainButtonContainer = styled.div`
align-items: center;
justify-content: space-around;

padding-top: 36px;
padding-top: 12px;

@media ${device.laptop} {
padding-top: 48px;
padding-top: 36px;
}
@media ${device.laptopL} {
padding-top: 56px;
padding-top: 48px;
}
@media ${device.desktop} {
padding-top: 64px;
padding-top: 56px;
}
`;

Expand Down
1 change: 1 addition & 0 deletions next/src/components/start/advice/InfoCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ const Button = styled.button`
font-size: 20px;
height: 40px;


@media ${device.laptop} {
font-size: 16px;
height: 32px;
Expand Down
34 changes: 29 additions & 5 deletions next/src/components/start/connect/ConnectView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import InstagramScreenshot from "../../../../public/assets/csesoc_instagram.png"
import YoutubeScreenshot from "../../../../public/assets/csesoc_youtube.png";
import SpotifyScreenshot from "../../../../public/assets/csesoc_spotify.png";

import { device } from "../../../styles/device";

const MainContainer = styled.div`
display: flex;
flex-direction: column-reverse;
Expand All @@ -40,7 +42,24 @@ const Preview = styled.div`
const SocialIcons = styled.div`
display: flex;
justify-content: center;
gap: 2rem;
gap: 0.5rem;

@media ${device.tablet} {
gap: 2rem;
}


`;

const SocialIconImageContainer = styled.div`
position: relative;
height: 40px;
width: 40px;

@media ${device.tablet} {
height: 60px;
width: 60px;
}
`;

const Button = styled.button<{ active?: boolean }>`
Expand All @@ -50,15 +69,18 @@ const Button = styled.button<{ active?: boolean }>`
background: none;
border: none;
cursor: pointer;
width: 60px;
height: 60px;
border-radius: 100%;
padding: 0.5rem;

${({ active }) =>
active &&
`
box-shadow: 0 0 0 4px var(--primary-purple);
`}

@media ${device.tablet} {
padding: 1rem;
}
`;

const socialIcons = [
Expand All @@ -83,7 +105,7 @@ const socialIcons = [
{
name: "YouTube",
icon: YoutubeLogo,
link: "cseso.cc/youtube",
link: "https://cseso.cc/youtube",
screenshot: YoutubeScreenshot,
},
{
Expand All @@ -102,7 +124,9 @@ export default function ConnectView() {
<SocialIcons>
{socialIcons.map(({ name, icon }) => (
<Button active={name === activeTab} key={name} onClick={() => setActiveTab(name)}>
<Image src={icon.src} alt={name} width={50} height={50} />
<SocialIconImageContainer>
<Image src={icon.src} alt={name} objectFit="contain" layout="fill" />
</SocialIconImageContainer>
</Button>
))}
</SocialIcons>
Expand Down
1 change: 1 addition & 0 deletions next/src/components/start/welcome/WelcomeView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const MainContainer = styled.div`
justify-content: center;
align-items: center;
row-gap: 30px;
width: 100%;
`;

const blink = keyframes`
Expand Down