Skip to content

Commit c643afc

Browse files
committed
make start btn column sticky
1 parent 3bc20cb commit c643afc

File tree

1 file changed

+75
-41
lines changed

1 file changed

+75
-41
lines changed

packages/platform-ui/src/components/Study/SessionConfiguration.vue

Lines changed: 75 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,47 @@
11
<template>
22
<div v-if="hasRegistrations">
3-
<div data-cy="select-quilts-header" class="text-h4 mb-12">Study Session Setup</div>
3+
<div data-cy="select-quilts-header" class="text-h4 mb-4">Study Session Setup</div>
44

5-
<v-row>
5+
<div class="session-layout">
66
<!-- Left Column: Time Configuration and Start Button -->
7-
<v-col cols="12" md="4" lg="3" class="time-config-column">
8-
<div class="text-h6 mb-3">Session Settings</div>
9-
10-
<div class="mb-5">
11-
<v-text-field
12-
ref="numberField"
13-
v-model="timeLimit"
14-
class="time-limit-field"
15-
variant="outlined"
16-
label="Study Session Timelimit"
17-
prepend-inner-icon="mdi-clock-outline"
18-
prepend-icon="mdi-minus"
19-
append-icon="mdi-plus"
20-
:suffix="timeLimit > 1 ? 'minutes' : 'minute'"
21-
mask="##"
22-
type="number"
23-
@click:prepend="dec"
24-
@click:append="inc"
25-
/>
7+
<div class="fixed-controls-container">
8+
<div class="fixed-controls">
9+
<div class="text-h6 mb-3">Session Settings</div>
10+
11+
<div class="mb-5">
12+
<v-text-field
13+
ref="numberField"
14+
v-model="timeLimit"
15+
class="time-limit-field"
16+
variant="outlined"
17+
label="Study Session Timelimit"
18+
prepend-inner-icon="mdi-clock-outline"
19+
prepend-icon="mdi-minus"
20+
append-icon="mdi-plus"
21+
:suffix="timeLimit > 1 ? 'minutes' : 'minute'"
22+
mask="##"
23+
type="number"
24+
@click:prepend="dec"
25+
@click:append="inc"
26+
/>
27+
</div>
28+
29+
<v-btn
30+
data-cy="start-studying-button"
31+
color="success"
32+
size="large"
33+
block
34+
class="start-btn"
35+
@click="startSession"
36+
>
37+
<v-icon start>mdi-play</v-icon>
38+
Start!
39+
</v-btn>
2640
</div>
27-
28-
<v-btn
29-
data-cy="start-studying-button"
30-
color="success"
31-
size="large"
32-
block
33-
class="start-btn"
34-
@click="startSession"
35-
>
36-
<v-icon start>mdi-play</v-icon>
37-
Start!
38-
</v-btn>
39-
</v-col>
41+
</div>
4042

4143
<!-- Right Column: Course Selection -->
42-
<v-col cols="12" md="8" lg="9" class="course-selection-column">
44+
<div class="course-selection-container">
4345
<div class="text-h6 mb-3">Select Quilts to Study</div>
4446
<table width="100%">
4547
<thead>
@@ -81,8 +83,8 @@
8183
</tr>
8284
</tbody>
8385
</table>
84-
</v-col>
85-
</v-row>
86+
</div>
87+
</div>
8688
</div>
8789
<div v-else class="text-h4">
8890
<p>You don't have anything to study!</p>
@@ -283,7 +285,19 @@ td {
283285
text-align: center !important;
284286
}
285287
286-
.time-config-column {
288+
/* Layout for session configuration */
289+
.session-layout {
290+
display: flex;
291+
flex-direction: column;
292+
}
293+
294+
/* Fixed controls container */
295+
.fixed-controls-container {
296+
width: 100%;
297+
margin-bottom: 20px;
298+
}
299+
300+
.fixed-controls {
287301
display: flex;
288302
flex-direction: column;
289303
}
@@ -298,13 +312,33 @@ td {
298312
max-height: 150px;
299313
}
300314
301-
.course-selection-column {
302-
/* Only add border on medium screens and larger */
315+
/* Course selection styles */
316+
.course-selection-container {
317+
width: 100%;
303318
}
304319
320+
/* Media queries for desktop layout */
305321
@media (min-width: 960px) {
306-
.course-selection-column {
322+
.session-layout {
323+
flex-direction: row;
324+
gap: 40px;
325+
}
326+
327+
.fixed-controls-container {
328+
width: 300px;
329+
flex-shrink: 0;
330+
}
331+
332+
.fixed-controls {
333+
position: sticky;
334+
top: 20px;
335+
padding-right: 20px;
336+
}
337+
338+
.course-selection-container {
339+
flex-grow: 1;
307340
border-left: 1px solid rgba(0, 0, 0, 0.12);
341+
padding-left: 20px;
308342
}
309343
}
310344
</style>

0 commit comments

Comments
 (0)