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

Commit 1857d5d

Browse files
committed
[WIP] sass(chromakeying): move chroma related button styles to button partial
Change-Id: I8054b6cdbfe18e690f67be6dd5c8bdd66e48cb22
1 parent 7ac82b7 commit 1857d5d

File tree

8 files changed

+81
-128
lines changed

8 files changed

+81
-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: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,75 @@
164164
}
165165
}
166166

167+
.livechroma-gallery-btn {
168+
position: fixed;
169+
top: 1em;
170+
left: 0;
171+
&.btn--modern,
172+
&.btn--modern_squared {
173+
margin: 10px;
174+
}
175+
@media (max-width: 1280px) and (orientation: landscape) {
176+
position: relative;
177+
top: 0;
178+
max-width: 150px;
179+
}
180+
}
181+
182+
.livechroma-close-btn {
183+
position: fixed;
184+
top: 1em;
185+
right: 0;
186+
187+
&.btn--modern {
188+
margin: 10px;
189+
}
190+
191+
&.btn--modern_squared {
192+
margin: auto;
193+
text-align: center;
194+
span {
195+
display: none;
196+
bottom: unset;
197+
}
198+
.fa {
199+
font-size: 2em;
200+
margin: 0;
201+
position: absolute;
202+
top: 50%;
203+
left: 50%;
204+
-ms-transform: translate(-50%, -50%);
205+
transform: translate(-50%, -50%);
206+
}
207+
}
208+
}
209+
210+
.livechroma {
211+
&.deletebtn {
212+
display: inline-block;
213+
visibility: hidden;
214+
}
215+
216+
@media (max-width: 1280px) and (orientation: landscape) {
217+
&.btn--classic {
218+
&.takeChroma,
219+
&.reloadPage,
220+
&.deletebtn {
221+
margin: 0.5em;
222+
display: block;
223+
}
224+
}
225+
&.btn--modern,
226+
&.btn--modern_squared {
227+
&.takeChroma,
228+
&.reloadPage,
229+
&.deletebtn {
230+
margin: auto;
231+
display: inline-block;
232+
}
233+
}
234+
}
235+
}
167236
.homebtn {
168237
&.btn--modern,
169238
&.btn--modern_squared {
@@ -265,7 +334,7 @@
265334
width: 4em;
266335
height: 4em;
267336
}
268-
.btn--modrn_squared {
337+
.btn--modern_squared {
269338
span {
270339
font-size: 1em;
271340
}

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)