Skip to content

Commit 978b133

Browse files
committed
cool transitions
1 parent 2b34beb commit 978b133

File tree

6 files changed

+24
-25
lines changed

6 files changed

+24
-25
lines changed

public/assets/js/index.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,17 @@ window.addEventListener('resize', () => {
104104

105105
document.querySelectorAll('input[type="radio"][name="creator-radio"]').forEach(radio => {
106106
radio.addEventListener('change', function () {
107-
document.getElementsByClassName('shown-creator-container')[0].classList.remove('shown-creator-container');
107+
document.getElementById('creator-popup').style.opacity = '0';
108+
document.getElementById('creator-popup').style.transform = 'translate(-50%, calc(-50% + 10px))';
109+
110+
setTimeout(() => {
111+
document.getElementsByClassName('shown-creator-container')[0].classList.remove('shown-creator-container');
108112
document.getElementById('add-' + this.value + '-container').classList.add('shown-creator-container');
113+
document.getElementById('creator-popup').style.opacity = '1';
114+
document.getElementById('creator-popup').style.transform = 'translate(-50%, -50%)';
115+
}, 500);
116+
117+
109118
});
110119
});
111120

public/assets/styles/css/index.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/assets/styles/css/schedule.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/assets/styles/scss/index.scss

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,14 @@
138138
left: 50%;
139139
transform: translate(-50%, -50%);
140140
width: 75vw;
141-
min-height: 50vh;
142141
background-color: $background-card;
143142
border-radius: 10px;
144143
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
145144
z-index: 1000;
146145
padding: 20px;
147146
flex-direction: column;
148147
gap: 10px;
148+
transition: all 0.5s ease-in-out;
149149

150150
#creator-popup-buttons {
151151
display: flex;
@@ -190,10 +190,13 @@
190190
width: 100%;
191191
height: 100%;
192192
box-sizing: border-box;
193+
transition-duration: 0.5s;
193194
}
194195

195196
.shown-creator-container {
196197
display: flex;
198+
opacity: 1;
199+
height: auto;
197200
}
198201

199202
#add-homework-container {
@@ -203,6 +206,7 @@
203206
flex-grow: 1;
204207
justify-content: space-between;
205208
align-items: stretch;
209+
gap: 10px;
206210

207211
input {
208212
width: 100%;
@@ -292,6 +296,7 @@
292296
#class-builder {
293297
display: flex;
294298
flex-direction: row;
299+
gap: 10px;
295300

296301
#class-info {
297302
flex: 1;
@@ -321,6 +326,7 @@
321326
align-items: center;
322327
justify-content: center;
323328
flex-direction: column;
329+
gap: 10px;
324330

325331
#class-emoji {
326332
display: flex;
@@ -397,6 +403,7 @@
397403
padding: 0.25rem;
398404
font-size: 14px;
399405
gap: 10px;
406+
transition-duration: 0.5s;
400407
}
401408

402409
.radio-inputs .radio {
@@ -417,7 +424,7 @@
417424
border: none;
418425
padding: 0.5rem 0;
419426
color: $text-primary;
420-
transition: all 0.15s ease-in-out;
427+
transition: all 0.5s ease-in-out;
421428
}
422429

423430
.radio-inputs .radio input:checked + .name {

public/assets/styles/scss/schedule.scss

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,6 @@ body {
33
overflow-x: hidden;
44
}
55

6-
#add-schedule-button {
7-
position: sticky;
8-
width: 100vw;
9-
top: 0;
10-
left: 0;
11-
background-color: #202020;
12-
font-family: "Outfit", sans-serif;
13-
transition-duration: 0.5s;
14-
15-
&:hover {
16-
background-color: #303030;
17-
font-size: 150%;
18-
width: 75vw;
19-
left: 12.5vw;
20-
}
21-
}
22-
236
#schedule-container {
247
padding: 10px;
258
width: 100vw;

0 commit comments

Comments
 (0)