Skip to content

Commit d4582c2

Browse files
committed
Added mobile breakpoints
1 parent e1c6ff0 commit d4582c2

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

frontend/src/App.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function App() {
3232

3333
return (
3434
<>
35-
<header className='h-28 2xl:h-32 pl-12 p-4 flex gap-10'>
35+
<header className='h-20 md:h-28 2xl:h-32 pl-12 p-4 flex gap-10'>
3636
<a href='https://hpi.de/'>
3737
<img src={hpiLogo} className='h-full hover:scale-105 duration-200' />
3838
</a>
@@ -41,7 +41,7 @@ function App() {
4141
<img src={desLogo} className='h-full hover:scale-105 duration-200' />
4242
</a>
4343
</header>
44-
<main className='w-full px-10 max-w-[2000px] mx-auto relative flex flex-col gap-8'>
44+
<main className='w-full px-3 sm:px-10 max-w-[2000px] mx-auto relative flex flex-col gap-8'>
4545
<section className='flex flex-col justify-center py-4 gap-2'>
4646
<h1 className='text-3xl text-center font-medium'>TCO<sub>2</sub>: Total CO<sub>2</sub> Cost of Ownership</h1>
4747
<h2 className='text-lg text-center font-light text-slate-600'>Analyzing the Carbon Footprint of Database Server Replacements</h2>
@@ -60,7 +60,7 @@ function App() {
6060
</p>
6161
</div>
6262
</section>
63-
<section className='grid grid-cols-1 lg:grid-cols-2 gap-10'>
63+
<section className='grid grid-cols-1 xl:grid-cols-2 gap-10'>
6464
<div className='col-span-1 flex flex-col gap-8'>
6565
<Sections title='Server Configurations' markup={<Compare />} />
6666
<Sections title='Benchmark Settings' markup={<BenchmarkSettings />} />

frontend/src/partials/BenchmarkSettings.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ function BenchmarkSettings() {
138138

139139
return (
140140
<div className="flex z-30 flex-col text-medium font-medium flex-wrap px-4 py-2 gap-4">
141-
<div className="grid grid-cols-7 space-x-4">
141+
<div className="flex flex-col gap-4 md:grid grid-cols-7 space-x-4">
142142
<div className="flex flex-col col-span-5 gap-5">
143143
<ToggleSelection<WorkloadType>
144144
label="Workload:"
@@ -177,7 +177,7 @@ return (
177177
/>
178178
}
179179
</div>
180-
<div className="flex font-normal gap-2 flex-col col-span-2">
180+
<div className="flex font-normal gap-2 flex-col sm:flex-row md:flex-col col-span-2">
181181
<ListItemWithSearch
182182
label="Location"
183183
value={country}

frontend/src/partials/Compare.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,11 @@ const Dropdown: React.FC<DropdownProps> = ({ label, thisServer, otherServer, sho
190190
<p className="text-6xl text-slate-500 group-hover:text-slate-400 duration-150">+</p>
191191
</div>
192192
<div className="flex justify-between">
193-
<p className="text-medium font-medium">{label}</p>
193+
<p className="text-medium text-center md:text-left w-full font-medium">{label}</p>
194194
<button
195195
hidden={!canToggle}
196196
onClick={toggleShow}
197-
className="w-fit px-2 cursor-pointer hover:text-red-600 duration-200 scale-110 hover:scale-125"
197+
className="w-fit px-2 absolute right-0 cursor-pointer hover:text-red-600 duration-200 scale-110 hover:scale-125"
198198
>
199199
<img
200200
src={close}
@@ -204,7 +204,7 @@ const Dropdown: React.FC<DropdownProps> = ({ label, thisServer, otherServer, sho
204204
<ServerPresetsComponent {...{ presetValue, updateComponent, setAdvancedOptions, setAdvancedSettings }} />
205205
<div className={`${showDropdown ? 'opacity-100' : 'opacity-0 pointer-events-none'} relative duration-150`}>
206206
<select
207-
className="block appearance-none text-base w-full bg-gray-100 border-2 border-gray-400 py-1 px-2 pr-8 rounded focus:outline-none focus:bg-white focus:border-gray-500"
207+
className="block appearance-none w-full bg-gray-100 border-2 border-gray-400 py-1 px-2 pr-8 rounded focus:outline-none focus:bg-white focus:border-gray-500"
208208
value={thisServer.cpu}
209209
onChange={(e) => updateComponent({cpu: (e.target.value)})}
210210
>
@@ -279,7 +279,7 @@ function Compare() {
279279

280280
return (
281281
<>
282-
<div className="grid grid-cols-2 px-4 py-2 gap-5">
282+
<div className="grid grid-cols-1 md:grid-cols-2 px-4 py-2 gap-5">
283283
<Dropdown
284284
label={OLD_LABEL}
285285
showAdvanced={advancedSettings}

frontend/src/utility/ListItems.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ interface ListItemProps {
77

88
export const ListItem: React.FC<ListItemProps> = ({ label, value, borderColor }) => {
99
return (
10-
<li style={{borderColor: borderColor }} className={`border-2 rounded-lg flex flex-col items-start justify-start px-3 py-2 duration-200 ease-in-out`}>
10+
<li style={{borderColor: borderColor }} className={`grow border-2 rounded-lg flex flex-col items-start justify-start px-3 py-2 duration-200 ease-in-out`}>
1111
<p className="text-base font-semibold flex flex-col text-wrap">
1212
{label}
1313
</p>

0 commit comments

Comments
 (0)