Skip to content

Commit f972643

Browse files
committed
feat: adjust style when on PC
1 parent d69c623 commit f972643

File tree

5 files changed

+20
-27
lines changed

5 files changed

+20
-27
lines changed

magicscouting/src/routes/dataAnalisys/+layout.svelte

Lines changed: 0 additions & 7 deletions
This file was deleted.

magicscouting/src/routes/dataAnalisys/matchAnalisys/+page.svelte

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,17 +106,17 @@
106106
</script>
107107

108108
<main class="w-full flex flex-col justify-center items-center bg-[#EAEAEC] dark:bg-primary-heavy dark:text-white">
109-
<div class="w-full flex flex-row gap-4 items-center justify-center pt-6 pb-6 bg-transparent sticky top-0 z-10 bg-opacity-50 rounded backdrop-blur-lg drop-shadow-lg">
109+
<div class="sm:w-[600px] w-full flex flex-row gap-4 items-center justify-center pt-6 pb-6 bg-transparent sticky top-0 z-10 bg-opacity-50 rounded backdrop-blur-lg drop-shadow-lg">
110110
<i on:click={()=>{goto("/dataAnalisys")}} class="fi fi-rr-angle-left flex mx-6 btn bg-transparent border-none"></i>
111111
<h1 class="grow flex flex-row items-center text-2xl font-medium tracking-wide">{$_("dataAnalysis.matchAnalysis.title")}</h1>
112112
</div>
113113

114-
<div class="w-full flex gap-4 mb-4 px-6 flex-col items-start">
114+
<div class="w-full flex gap-4 mb-4 px-6 flex-col items-start sm:w-[600px]">
115115
<h2 class="text-xl font-medium tracking-wide">{$_("dataAnalysis.matchAnalysis.searchBar_text")}</h2>
116116
<TeamSearchBar bind:teamSearch={teamSearch} bind:selectedTeam={selectedTeam} bind:analysisData={$matchAnalysisData}/>
117117
</div>
118118

119-
<div class="w-full flex mb-4 px-6 flex-row items-start h-fit">
119+
<div class="w-full flex mb-4 px-6 flex-row items-start h-fit sm:w-[600px]">
120120
<button on:click={()=>{handleDeleteTeamButtonState(1)}} class="indicator grow py-1 basis-1 btn btn-outline rounded-r-none">
121121
{#if showDeleteTeamButton == 1}
122122
<span on:click={()=>{deleteTeam(1)}} class="z-50 indicator-item badge badge-secondary h-5 w-5 p-0">X</span>
@@ -144,8 +144,8 @@
144144
</div>
145145

146146
{#if $teams.length > 0}
147-
<section class="flex flex-col justify-center items-center w-full bg-[#f0f0f0] dark:bg-base-200 px-6 pb-10">
148-
<div class="w-full flex items-center justify-center mt-4">
147+
<section class="flex flex-col sm:flex-row sm:flex-wrap sm:gap-4 sm:pt-6 justify-center items-center w-full bg-[#f0f0f0] dark:bg-base-200 px-6 pb-10">
148+
<div class="w-full max-w-[400px] flex items-center justify-center mt-4">
149149
<div class="w-full relative my-2 mx-6 grow flex items-center flex-col">
150150
<h2 class="text-xl font-medium tracking-wide mb-2">{$_("dataAnalysis.matchAnalysis.points_subtitle")}</h2>
151151
<div class="flex flex-row justify-around items-center flex-wrap">
@@ -197,7 +197,7 @@
197197
theme: $carbonTheme,
198198
title: $_("dataAnalysis.matchAnalysis.gp_points_spots"),
199199
height: "200px",
200-
width: "85%",
200+
width: "300px",
201201
bars: {
202202
width: 10,
203203
},

magicscouting/src/routes/dataAnalisys/teamAnalisys/+page.svelte

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@
5252
<h1 class="grow flex flex-row items-center text-2xl font-medium tracking-wide">{$_("dataAnalysis.teamAnalysis.title")}</h1>
5353
</div>
5454

55-
<div class="w-full flex gap-4 mb-4 px-6 flex-col items-start">
55+
<div class="w-full sm:w-[600px] flex gap-4 mb-4 px-6 flex-col items-start">
5656
<h2 class="text-xl font-medium tracking-wide">{$_("dataAnalysis.teamAnalysis.searchBar_text")}</h2>
5757
<TeamSearchBar {teamSearch} bind:selectedTeam={selectedTeam} bind:analysisData={$teamAnalysisData}/>
5858
</div>
59-
<div class="w-full flex">
59+
<div class="w-full flex sm:w-[600px]">
6060
<div role="tablist" class="tabs tabs-lifted min-w-80:overflow-x-scroll">
6161
{#key $teamAnalysisData}
6262
{#each Object.keys($teamAnalysisData) as teamNumber (Object.keys($teamAnalysisData))}
@@ -76,15 +76,15 @@
7676
</div>
7777

7878
{#if Object.keys($teamAnalysisData).length != 0 && activeTab != ""}
79-
<section class="flex flex-col justify-center items-center w-full bg-[#f0f0f0] dark:bg-base-200 px-6 pb-6 flex-wrap overflow-x-hidden">
80-
<div class="flex flex-row gap-4 items-center justify-center mt-6">
79+
<section class="flex sm:flex-row sm:flex-wrap sm:gap-4 sm:pt-6 flex-col justify-center items-center w-full bg-[#f0f0f0] dark:bg-base-200 px-6 pb-6 flex-wrap overflow-x-hidden">
80+
<div class="flex max-w-[400px] flex-row gap-4 items-center justify-center mt-6">
8181
<img width="50px" src={$teamAnalysisData[activeTab].logo} alt="Team Logo" />
8282
<div class="flex flex-row gap-2">
8383
<div>{$teamAnalysisData[activeTab].team}</div>
8484
<div>{$teamAnalysisData[activeTab].name}</div>
8585
</div>
8686
</div>
87-
<div class="w-full flex">
87+
<div class="w-full flex max-w-[400px]">
8888
<div class=" w-full relative my-2 mx-6 grow">
8989
<div class="flex flex-row justify-around items-center gap-4">
9090
<div class="grow basis-0 p-4 rounded-md flex flex-col items-center justify-center gap-2">
@@ -100,7 +100,7 @@
100100
</div>
101101

102102
{#if $teamAnalysisData[activeTab].rawData.length > 0}
103-
<div class="w-full flex mb-3">
103+
<div class="w-full flex mb-3 max-w-[400px]">
104104
<div class=" w-full relative my-2 mx-6 grow">
105105
<div class="grow basis-0 rounded-md flex flex-col items-center justify-center gap-2">
106106
<h3>{$_("dataAnalysis.teamAnalysis.average_points")}</h3>
@@ -113,10 +113,10 @@
113113
</div>
114114
</div>
115115

116-
<div class="w-full flex grow gap-4 px-6 mb-6 flex-col items-start">
116+
<div class="w-full flex grow gap-4 px-6 mb-6 flex-col items-start sm:items-center">
117117
<h2 class="text-xl font-medium tracking-wide">{$_("dataAnalysis.teamAnalysis.analytics_subtitle")}</h2>
118118

119-
<div class="w-full flex flex-col gap-2 ">
119+
<div class="w-full flex flex-col gap-2 max-w-[400px]">
120120
<button on:click={() => {goto(`/dataAnalisys/teamAnalisys/pitData/${activeTab}`)}} class="btn btn-block flex flex-row justify-start gap-4 bg-primary-opac text-primary-light">
121121
<i class="fi fi-rr-bank"></i>
122122
<span>{$_("dataAnalysis.teamAnalysis.pit_data")}</span>
@@ -148,7 +148,7 @@
148148
</div>
149149
</div>
150150

151-
<div class="carousel carousel-center w-full">
151+
<div class="carousel carousel-center w-full max-w-fit">
152152
<div class="carousel-item">
153153
<svelte:component
154154
this={DonutChart}
@@ -199,8 +199,8 @@
199199
</div>
200200
</div>
201201

202-
<div class="divider w-full"></div>
203-
<div class="carousel carousel-center w-full">
202+
<div class="divider w-full sm:hidden"></div>
203+
<div class="carousel carousel-center w-full max-w-fit">
204204
<div class="carousel-item">
205205
<svelte:component
206206
this={DonutChart}
@@ -299,7 +299,7 @@
299299
}}
300300
/>
301301
{/key}
302-
<div class="divider w-full"></div>
302+
<div class="divider w-full sm:hidden"></div>
303303
<svelte:component
304304
this={ComboChart}
305305
data={setupBarChartDataByMatch(

magicscouting/src/routes/dataAnalisys/teamAnalisys/Autonomous/[selectedTeam]/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
</div>
6363
{/if}
6464

65-
<div class="w-full px-6 mb-20 flex flex-col items-center">
65+
<div class="w-full px-6 mb-20 flex flex-col items-center sm:flex-row sm:flex-wrap sm:gap-10 sm:items-center sm:justify-center sm:pt-6">
6666

6767
{#if $rawData.length > 0}
6868
<div class="w-full flex">

magicscouting/src/routes/dataAnalisys/teamAnalisys/Teleop/[selectedTeam]/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
</div>
4545
{/if}
4646

47-
<div class="w-full px-6 mb-20 flex flex-col items-center">
47+
<div class="w-full px-6 mb-20 flex flex-col items-center sm:flex-row sm:flex-wrap sm:gap-10 sm:items-center sm:justify-center sm:pt-6">
4848

4949
{#if $rawData.length > 0}
5050
<div class="w-full flex">

0 commit comments

Comments
 (0)