Skip to content
This repository was archived by the owner on Aug 27, 2022. It is now read-only.

Commit f2ab21a

Browse files
committed
[WIP] sass(chromakeying): move chroma related button styles to button partial
Change-Id: I8054b6cdbfe18e690f67be6dd5c8bdd66e48cb22
1 parent 30bda9a commit f2ab21a

File tree

8 files changed

+103
-128
lines changed

8 files changed

+103
-128
lines changed

livechroma.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@
6666
<div class="rotarygroup" id="start">
6767
<div class="top-bar">
6868
<?php if (!$config['live_keying']['enabled']): ?>
69-
<a href="index.php" class="<?php echo $btnClass; ?> closebtn rotaryfocus"><i class="fa fa-times"></i></a>
69+
<a href="index.php" class="<?php echo $btnClass; ?> livechroma-close-btn rotaryfocus"><i class="fa fa-times"></i></a>
7070
<?php endif; ?>
7171

7272
<?php if ($config['gallery']['enabled']): ?>
73-
<a href="#" class="<?php echo $btnClass ?> gallerybtn rotaryfocus"><i class="fa fa-th"></i> <span data-i18n="gallery"></span></a>
73+
<a href="#" class="<?php echo $btnClass ?> livechroma-gallery-btn rotaryfocus"><i class="fa fa-th"></i> <span data-i18n="gallery"></span></a>
7474
<?php endif; ?>
7575

7676
</div>
@@ -117,11 +117,11 @@
117117
</div>
118118

119119
<div class="chroma-control-bar">
120-
<a href="#" class="<?php echo $btnClass; ?> takeChroma rotaryfocus"><i class="fa fa-camera"></i> <span data-i18n="takePhoto"></span></a>
120+
<a href="#" class="<?php echo $btnClass; ?> takeChroma livechroma rotaryfocus"><i class="fa fa-camera"></i> <span data-i18n="takePhoto"></span></a>
121121
<?php if ($config['picture']['allow_delete']): ?>
122-
<a href="#" class="<?php echo $btnClass; ?> deletebtn"><i class="fa fa-trash"></i> <span data-i18n="delete"></span></a>
122+
<a href="#" class="<?php echo $btnClass; ?> deletebtn livechroma"><i class="fa fa-trash"></i> <span data-i18n="delete"></span></a>
123123
<?php endif; ?>
124-
<a href="#" class="reloadPage <?php echo $btnClass; ?> rotaryfocus"><i class="fa fa-refresh"></i> <span data-i18n="reload"></span></a>
124+
<a href="#" class="reloadPage <?php echo $btnClass; ?> livechroma rotaryfocus"><i class="fa fa-refresh"></i> <span data-i18n="reload"></span></a>
125125
</div>
126126
</div>
127127
<div class="rotarygroup">

src/js/livechroma.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,14 +323,14 @@ $('.reloadPage').on('click', function (e) {
323323
});
324324

325325
// Open Gallery Button
326-
$('.gallerybtn').on('click', function (e) {
326+
$('.livechroma-gallery-btn').on('click', function (e) {
327327
e.preventDefault();
328328

329329
photoBooth.openGallery($(this));
330330
});
331331

332332
// Close Button
333-
$('.closebtn').on('click', function () {
333+
$('.livechroma-close-btn').on('click', function () {
334334
location.assign('./index.php');
335335
});
336336

src/sass/classic_live_chromakeying.scss

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,6 @@
88
@import 'partials/shutter_animation';
99
@import 'vendor/photoswipe';
1010

11-
.home {
12-
position: fixed;
13-
top: 1em;
14-
right: 0;
15-
z-index: 10;
16-
}
17-
18-
.deletebtn {
19-
display: inline-block;
20-
visibility: hidden;
21-
}
22-
23-
.gallerybtn {
24-
position: fixed;
25-
top: 1em;
26-
left: 0;
27-
z-index: 10;
28-
}
29-
30-
.closebtn {
31-
position: fixed;
32-
top: 1em;
33-
right: 0;
34-
z-index: 10;
35-
}
36-
3711
.top-bar {
3812
display: inline-block;
3913
width: 100%;
@@ -104,21 +78,6 @@
10478
}
10579
}
10680

107-
.takeChroma,
108-
.reloadPage,
109-
.deletebtn {
110-
margin: 0.5em;
111-
display: block;
112-
}
113-
114-
.home,
115-
.gallerybtn,
116-
.closebtn {
117-
position: relative;
118-
top: 0;
119-
max-width: 150px;
120-
}
121-
12281
.top-bar {
12382
display: block;
12483
position: relative;

src/sass/modern_live_chromakeying.scss

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,44 +4,6 @@
44
border-radius: 4%;
55
}
66

7-
.round-btn {
8-
width: 4em;
9-
height: 4em;
10-
}
11-
12-
.gallerybtn {
13-
position: fixed;
14-
top: 1em;
15-
left: 0;
16-
z-index: 10;
17-
margin: 10px;
18-
}
19-
20-
.closebtn {
21-
position: fixed;
22-
top: 1em;
23-
right: 0;
24-
z-index: 10;
25-
margin: 10px;
26-
}
27-
28-
@media (max-width: 1280px) and (orientation: landscape) {
29-
.takeChroma,
30-
.reloadPage,
31-
.deletebtn {
32-
margin: auto;
33-
display: inline-block;
34-
}
35-
36-
.home,
37-
.gallerybtn,
38-
.closebtn {
39-
position: relative;
40-
top: 0;
41-
max-width: 150px;
42-
}
43-
}
44-
457
@media (max-height: 740px) and (orientation: landscape) {
468
.backgrounds {
479
&.shrinked {
Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,2 @@
11
@import 'modern_live_chromakeying';
22
@import 'partials/squared_gallery';
3-
4-
.round-btn {
5-
border: none;
6-
border-radius: 15%;
7-
margin: unset;
8-
flex: none;
9-
span {
10-
display: block;
11-
position: absolute;
12-
bottom: 10%;
13-
left: 0;
14-
right: 0;
15-
margin-left: auto;
16-
margin-right: auto;
17-
}
18-
.fa {
19-
top: 35%;
20-
}
21-
}
22-
23-
.closebtn {
24-
margin: auto;
25-
text-align: center;
26-
span {
27-
display: none;
28-
bottom: unset;
29-
}
30-
.fa {
31-
font-size: 2em;
32-
margin: 0;
33-
position: absolute;
34-
top: 50%;
35-
left: 50%;
36-
-ms-transform: translate(-50%, -50%);
37-
transform: translate(-50%, -50%);
38-
}
39-
}

src/sass/partials/_button.scss

Lines changed: 92 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,97 @@
164164
}
165165
}
166166

167+
.livechroma-gallery-btn {
168+
position: fixed;
169+
top: 1em;
170+
left: 0;
171+
172+
&.btn--classic {
173+
width: auto;
174+
padding: 12px 40px;
175+
}
176+
177+
&.btn--modern,
178+
&.btn--modern_squared {
179+
margin: 10px;
180+
}
181+
@media (max-width: 1280px) and (orientation: landscape) {
182+
position: relative;
183+
top: 0;
184+
max-width: 150px;
185+
}
186+
}
187+
188+
.livechroma-close-btn {
189+
position: fixed;
190+
top: 1em;
191+
right: 0;
192+
193+
&.btn--classic {
194+
width: auto;
195+
padding: 12px 40px;
196+
}
197+
198+
&.btn--modern {
199+
margin: 10px;
200+
}
201+
202+
&.btn--modern_squared {
203+
margin: auto;
204+
text-align: center;
205+
span {
206+
display: none;
207+
bottom: unset;
208+
}
209+
.fa {
210+
font-size: 2em;
211+
margin: 0;
212+
position: absolute;
213+
top: 50%;
214+
left: 50%;
215+
-ms-transform: translate(-50%, -50%);
216+
transform: translate(-50%, -50%);
217+
}
218+
}
219+
}
220+
221+
.livechroma {
222+
&.deletebtn {
223+
display: inline-block;
224+
visibility: hidden;
225+
}
226+
227+
@media (max-width: 1280px) and (orientation: landscape) {
228+
&.btn--classic {
229+
&.takeChroma,
230+
&.reloadPage,
231+
&.deletebtn {
232+
margin: 0.5em;
233+
display: block;
234+
}
235+
}
236+
&.btn--modern,
237+
&.btn--modern_squared {
238+
&.takeChroma,
239+
&.reloadPage,
240+
&.deletebtn {
241+
margin: auto;
242+
display: inline-block;
243+
}
244+
}
245+
}
246+
}
247+
248+
.chroma-control-bar {
249+
.btn--classic {
250+
&#save-chroma-btn,
251+
&#print-btn,
252+
&#close-btn {
253+
width: auto;
254+
}
255+
}
256+
}
257+
167258
.homebtn {
168259
&.btn--modern,
169260
&.btn--modern_squared {
@@ -272,7 +363,7 @@
272363
width: 4em;
273364
height: 4em;
274365
}
275-
.btn--modrn_squared {
366+
.btn--modern_squared {
276367
span {
277368
font-size: 1em;
278369
}

src/sass/partials/_modern_gallery.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ a.gallery__close {
4040
border-radius: 50%;
4141
}
4242

43-
.gallerybtn {
43+
.livechroma-gallery-btn {
4444
border-radius: 50%;
4545
left: 1em;
4646
margin: auto;
4747
}
4848

49-
.closebtn {
49+
.livechroma-close-btn {
5050
border-radius: 50%;
5151
right: 1em;
5252
margin: auto;

src/sass/partials/_squared_gallery.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@
3333
border-radius: 15%;
3434
}
3535

36-
.gallerybtn {
36+
.livechroma-gallery-btn {
3737
left: 1em;
3838
margin: auto;
3939
}
4040

41-
.closebtn {
41+
.livechroma-close-btn {
4242
right: 1em;
4343
margin: auto;
4444
}

0 commit comments

Comments
 (0)