Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
server
team-presentation
Commits
58dc6b7c
Commit
58dc6b7c
authored
May 16, 2017
by
Hakim El Hattab
Browse files
adjust controls layout when there are no vertical or horizontal slides in the deck
parent
f8b5813e
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
css/reveal.css
View file @
58dc6b7c
This diff is collapsed.
Click to expand it.
css/reveal.scss
View file @
58dc6b7c
...
...
@@ -236,13 +236,14 @@ body {
*********************************************/
.reveal
.controls
{
$size
:
52px
;
$length
:
floor
(
$size
*
0
.6
);
$spacing
:
8px
;
$size
:
46px
;
$length
:
floor
(
$size
*
0
.7
);
$thickness
:
6px
;
$angle
:
44deg
;
$angleHover
:
40deg
;
$angleActive
:
36deg
;
$spacing
:
12px
;
$innerSpacing
:
18px
;
@mixin
arrowTransform
(
$angle
)
{
&
:before
{
...
...
@@ -256,10 +257,10 @@ body {
display
:
none
;
position
:
absolute
;
top
:
0
;
right
:
0
;
bottom
:
0
;
left
:
0
;
top
:
auto
;
bottom
:
$spacing
;
right
:
$spacing
;
left
:
auto
;
z-index
:
1
;
color
:
#fff
;
pointer-events
:
none
;
...
...
@@ -315,26 +316,26 @@ body {
}
.navigate-left
{
top
:
50%
;
left
:
$s
pacing
;
right
:
$size
+
$innerSpacing
*
2
;
bottom
:
$innerS
pacing
;
transform
:
translateY
(
-50%
);
}
.navigate-right
{
top
:
50%
;
right
:
$s
pacing
;
right
:
0
;
bottom
:
$innerS
pacing
;
transform
:
translateY
(
-50%
)
rotate
(
180deg
);
}
.navigate-up
{
top
:
$s
pacing
;
left
:
50%
;
right
:
$innerS
pacing
;
bottom
:
$size
+
$innerSpacing
*
2
;
transform
:
translateX
(
-50%
)
rotate
(
90deg
);
}
.navigate-down
{
bottom
:
$s
pacing
;
left
:
50%
;
right
:
$innerS
pacing
;
bottom
:
0
;
transform
:
translateX
(
-50%
)
rotate
(
-90deg
);
}
...
...
@@ -376,52 +377,59 @@ body {
opacity
:
1
;
}
@mixin
bottom-right-controls
()
{
$spacing
:
12px
;
$innerSpacing
:
20px
;
@media
screen
and
(
min-width
:
500px
)
{
&
{
top
:
auto
;
bottom
:
$spacing
;
right
:
$spacing
;
left
:
auto
;
transform
:
scale
(
0
.85
);
transform-origin
:
100%
100%
;
}
$spacing
:
8px
;
.navigate-left
,
.navigate-right
,
.navigate-up
,
.navigate-down
{
to
p
:
auto
;
left
:
auto
;
}
&
[
data-controls-layout
=
"edges"
]
{
&
{
top
:
0
;
right
:
0
;
bot
to
m
:
0
;
left
:
0
;
}
.navigate-left
{
right
:
$size
+
$innerSpacing
*
2
;
bottom
:
$innerSpacing
;
}
.navigate-right
{
right
:
0
;
bottom
:
$innerSpacing
;
}
.navigate-up
{
right
:
$innerSpacing
;
bottom
:
$size
+
$innerSpacing
*
2
;
}
.navigate-down
{
right
:
$innerSpacing
;
bottom
:
0
;
.navigate-left
,
.navigate-right
,
.navigate-up
,
.navigate-down
{
bottom
:
auto
;
right
:
auto
;
}
.navigate-left
{
top
:
50%
;
left
:
$spacing
;
}
.navigate-right
{
top
:
50%
;
right
:
$spacing
;
}
.navigate-up
{
top
:
$spacing
;
left
:
50%
;
}
.navigate-down
{
bottom
:
$spacing
;
left
:
50%
;
}
}
}
&
[
data-controls-layout
=
"bottom-right"
]
{
@include
bottom-right-controls
()
}
}
@media
screen
and
(
max-width
:
500px
)
{
@include
bottom-right-controls
()
}
// Adjust the layout when there are no vertical slides
.reveal
:not
(
.has-vertical-slides
)
.controls
.navigate-left
,
.reveal
:not
(
.has-vertical-slides
)
.controls
.navigate-right
{
bottom
:
0
;
}
.reveal
:not
(
.has-horizontal-slides
)
.controls
.navigate-up
,
.reveal
:not
(
.has-horizontal-slides
)
.controls
.navigate-down
{
right
:
0
;
}
.reveal.has-dark-background
.controls
button
:after
,
...
...
js/reveal.js
View file @
58dc6b7c
...
...
@@ -2739,6 +2739,22 @@
}
}
// Flag if there are ANY vertical slides, anywhere in the deck
if
(
dom
.
wrapper
.
querySelectorAll
(
'
.slides>section>section
'
).
length
)
{
dom
.
wrapper
.
classList
.
add
(
'
has-vertical-slides
'
);
}
else
{
dom
.
wrapper
.
classList
.
remove
(
'
has-vertical-slides
'
);
}
// Flag if there are ANY horizontal slides, anywhere in the deck
if
(
dom
.
wrapper
.
querySelectorAll
(
'
.slides>section:not(.stack)
'
).
length
)
{
dom
.
wrapper
.
classList
.
add
(
'
has-horizontal-slides
'
);
}
else
{
dom
.
wrapper
.
classList
.
remove
(
'
has-horizontal-slides
'
);
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment