Skip to content

Commit 9566fa6

Browse files
committed
reactive to screen size
1 parent c0aeb5e commit 9566fa6

File tree

6 files changed

+69
-23
lines changed

6 files changed

+69
-23
lines changed

mlflow-site/src/app/components/Headline.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const Headline = () => {
44
return (
55
<div className='home' id='headline'>
66
<div className='bigHeadline'>MLOps workflow for Javascript</div>
7-
<div>Harness MLflow&apos;s MLOps functionality for your Javascript application with MLflow.js</div>
7+
<div className='headLineText'>Harness MLflow&apos;s MLOps functionality for your Javascript application with MLflow.js</div>
88
<Button />
99
</div>
1010
);

mlflow-site/src/app/components/NavBar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const NavBar = () => {
4545
href='https://github.com/oslabs-beta/mlflow-js'
4646
className='navBarLinksGithub'
4747
>
48-
<Image src={'/assets/GithubLogo.png'} width={24} height={24} alt='G' />
48+
<Image src={'/assets/GithubLogo.png'} width={24} height={24} alt='G' className='navbarGithub'/>
4949
</a>
5050
</div>
5151
</div>

mlflow-site/src/app/components/Team.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ const Team = () => {
2626
linkedIn: 'https://www.linkedin.com/in/stephanyho/',
2727
pfp: '',
2828
},
29+
{
30+
name: 'Winston Ludlam',
31+
github: 'https://github.com/winjolu/',
32+
linkedIn: 'https://www.linkedin.com/in/wjludlam/',
33+
pfp: '',
34+
},
2935
];
3036

3137
return (
@@ -42,13 +48,6 @@ const Team = () => {
4248
/>
4349
))}
4450
</div>
45-
<TeamCard
46-
key={'soloCard'}
47-
name={'Winston Ludlam'}
48-
github={'https://github.com/winjolu/'}
49-
linkedIn={'https://www.linkedin.com/in/wjludlam/'}
50-
pfp={''}
51-
/>
5251
</div>
5352
);
5453
};

mlflow-site/src/app/components/TeamCard.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@ interface TeamCardProps {
1010
const TeamCard: React.FC<TeamCardProps> = ({ name, github, linkedIn, pfp }) => {
1111
return (
1212
<div className='teamcard'>
13-
<Image src={pfp} width={70} height={70} alt='No Image' />
13+
<Image src={pfp} width={80} height={80} alt='No Image' className='teamCardImg'/>
1414
<div>{name}</div>
1515
<div className='teamcardLinks'>
1616
<a href={github} className='teamCardLink1'>
17-
<Image
17+
<Image className='navbarGithub'
1818
src={'/assets/GithubLogo.png'}
1919
width={20}
2020
height={20}
2121
alt='G'
2222
/>
2323
</a>
2424
<a href={linkedIn} className='teamCardLink2'>
25-
<Image
25+
<Image className='navbarGithub'
2626
src={'/assets/LinkedInLogo.png'}
2727
width={20}
2828
height={20}

mlflow-site/src/app/globals.css

Lines changed: 50 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ body {
77
background: var(--background);
88
font-family: Inter;
99
font-size: 1rem;
10+
/* font-size: 4.43vw; */
1011
color: rgb(0, 0, 0);
1112
}
1213

@@ -30,7 +31,8 @@ body {
3031
width: 100%;
3132
height: 100%;
3233
display: grid;
33-
grid-template-columns: 1fr 360px 1fr;
34+
/* grid-template-columns: 1fr 360px 1fr; */
35+
grid-template-columns: 1fr 100vw 1fr;
3436
grid-template-rows: 1fr;
3537
overflow-y: auto;
3638
}
@@ -74,6 +76,7 @@ body {
7476
display: grid;
7577
grid-template-columns: auto auto;
7678
grid-template-rows: 100%;
79+
font-size: clamp(1rem, 4.43vw, 1.2rem);
7780
}
7881

7982
.navBarLinks {
@@ -103,19 +106,27 @@ body {
103106
grid-column: 5;
104107
}
105108

109+
.navbarGithub {
110+
width: clamp(1.5rem, 6.645vw, 1.8rem);
111+
}
112+
106113
.navBarMlflow {
107114
color: rgb(66, 107, 31);
108-
font-size: 1.2rem;
115+
font-size: clamp(1.2rem, 5.316vw, 1.9rem);
109116
font-family: Newsreader;
110117
display: flex;
111118
align-items: center;
112119
}
113120

114121
.bigHeadline {
115-
font-size: 1.7rem;
122+
font-size: clamp(1.7rem, 6.531vw, 3rem);
116123
font-family: Newsreader;
117124
}
118125

126+
.headLineText {
127+
font-size: clamp(1rem, 4.43vw, 1.76rem);
128+
}
129+
119130
.mobileInnerWrapper {
120131
grid-column: 3;
121132
grid-row: 3;
@@ -142,11 +153,11 @@ body {
142153
}
143154

144155
.homeButton {
145-
padding: 3px;
146-
padding-left: 6px;
147-
padding-right: 6px;
148-
border-radius: 5px;
149-
font-size: 0.8rem;
156+
padding: clamp(0.1875rem, 0.830625vw, 0.328125rem);
157+
padding-left: clamp(0.375rem, 1.66125vw, .65625rem);
158+
padding-right: clamp(0.375rem, 1.66125vw, .65625rem);
159+
border-radius: clamp(0.3125rem, 1.384375vw, 0.546875rem);
160+
font-size: clamp(0.8rem, 3.544vw, 1rem);
150161
margin-right: 8px;
151162
}
152163

@@ -198,27 +209,55 @@ body {
198209
}
199210

200211
.teamHead {
201-
font-size: 1.35rem;
212+
font-size: clamp(1.35rem, 5.9805vw, 2.376rem);
202213
}
203214

204215
.teamCards {
216+
width: 100%;
217+
display: flex;
218+
justify-content: space-evenly;
219+
flex-wrap: wrap;
220+
}
221+
222+
/* .teamCards {
205223
width: 100%;
206224
display: grid;
207225
grid-template-columns: 50% 50%;
208226
grid-template-rows: repeat(calc(100%/3), 3);
209227
}
210228
229+
@media (min-width: 600px) {
230+
.teamCards {
231+
width: 100%;
232+
display: grid;
233+
grid-template-columns: calc(100%/3) calc(100%/3) calc(100%/3);
234+
grid-template-rows: 50% 50%;
235+
}
236+
}
237+
238+
@media (min-width: 900px) {
239+
.teamCards {
240+
width: 100%;
241+
display: grid;
242+
grid-template-columns: 25% 25% 25% 25%;
243+
grid-template-rows: 100%;
244+
background-color: red;
245+
}
246+
} */
247+
211248
.teamcard {
212249
margin-top: 0.5rem;
213250
display: flex;
214251
flex-direction: column;
215252
justify-content: center;
216253
align-items: center;
254+
font-size: clamp(1rem, 4.43vw, 1.3rem);
255+
margin-left: 0.2rem;
256+
margin-right: 0.2rem;
217257
}
218258

219259
.teamCardImg {
220-
width: 50px;
221-
height: 50px;
260+
width: clamp(80px, 22.155vw, 100px)
222261
}
223262

224263
.teamcardLinks {

mlflow-site/src/app/layout.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { Metadata } from "next";
22
import localFont from "next/font/local";
33
import "./globals.css";
4+
import { Viewport } from "next";
45

56
const geistSans = localFont({
67
src: "./fonts/GeistVF.woff",
@@ -18,6 +19,13 @@ export const metadata: Metadata = {
1819
description: "Generated by create next app",
1920
};
2021

22+
export const viewport: Viewport = {
23+
themeColor: "#000000",
24+
initialScale: 1,
25+
width: "device-width",
26+
maximumScale: 1,
27+
};
28+
2129
export default function RootLayout({
2230
children,
2331
}: Readonly<{

0 commit comments

Comments
 (0)