Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
JUNCA24 RevealJS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PGI15-Teaching
JUNCA24 RevealJS
Commits
1ca8306e
Commit
1ca8306e
authored
12 years ago
by
hakimel
Browse files
Options
Downloads
Patches
Plain Diff
rename padding config option to margin, better mobile support for scaled presentations (#310)
parent
a20d3b68
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
index.html
+2
-0
2 additions, 0 deletions
index.html
js/reveal.js
+17
-12
17 additions, 12 deletions
js/reveal.js
js/reveal.min.js
+2
-2
2 additions, 2 deletions
js/reveal.min.js
with
21 additions
and
14 deletions
index.html
+
2
−
0
View file @
1ca8306e
...
...
@@ -12,6 +12,8 @@
<meta
name=
"apple-mobile-web-app-capable"
content=
"yes"
/>
<meta
name=
"apple-mobile-web-app-status-bar-style"
content=
"black-translucent"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
>
<link
rel=
"stylesheet"
href=
"css/reveal.min.css"
>
<link
rel=
"stylesheet"
href=
"css/theme/default.css"
id=
"theme"
>
...
...
This diff is collapsed.
Click to expand it.
js/reveal.js
+
17
−
12
View file @
1ca8306e
...
...
@@ -22,7 +22,7 @@ var Reveal = (function(){
width
:
1024
,
height
:
768
,
padd
in
g
:
0.1
,
marg
in
:
0.1
,
// Display controls in the bottom right corner
controls
:
true
,
...
...
@@ -227,10 +227,6 @@ var Reveal = (function(){
function
hideAddressBar
()
{
if
(
navigator
.
userAgent
.
match
(
/
(
iphone|ipod
)
/i
)
)
{
// Give the page some scrollable overflow
document
.
documentElement
.
style
.
overflow
=
'
scroll
'
;
document
.
body
.
style
.
height
=
'
120%
'
;
// Events that should trigger the address bar to hide
window
.
addEventListener
(
'
load
'
,
removeAddressBar
,
false
);
window
.
addEventListener
(
'
orientationchange
'
,
removeAddressBar
,
false
);
...
...
@@ -505,9 +501,18 @@ var Reveal = (function(){
*/
function
removeAddressBar
()
{
if
(
window
.
orientation
===
0
)
{
document
.
documentElement
.
style
.
overflow
=
'
scroll
'
;
document
.
body
.
style
.
height
=
'
120%
'
;
}
else
{
document
.
documentElement
.
style
.
overflow
=
''
;
document
.
body
.
style
.
height
=
'
100%
'
;
}
setTimeout
(
function
()
{
window
.
scrollTo
(
0
,
1
);
},
0
);
},
1
0
);
}
...
...
@@ -559,6 +564,10 @@ var Reveal = (function(){
var
availableWidth
=
dom
.
wrapper
.
offsetWidth
,
availableHeight
=
dom
.
wrapper
.
offsetHeight
;
// Reduce availabe space by margin
availableWidth
-=
(
availableHeight
*
config
.
margin
);
availableHeight
-=
(
availableHeight
*
config
.
margin
);
// Dimensions of the content
var
slideWidth
=
config
.
width
,
slideHeight
=
config
.
height
;
...
...
@@ -576,16 +585,12 @@ var Reveal = (function(){
dom
.
slides
.
style
.
width
=
slideWidth
+
'
px
'
;
dom
.
slides
.
style
.
height
=
slideHeight
+
'
px
'
;
// Reduce availabe space by padding
availableWidth
=
availableWidth
-
(
availableHeight
*
config
.
padding
*
2
);
availableHeight
=
availableHeight
-
(
availableHeight
*
config
.
padding
*
2
);
// Determine scale of content to fit within available space
var
scale
=
Math
.
min
(
availableWidth
/
slideWidth
,
availableHeight
/
slideHeight
);
// Prefer applying scale via zoom since Chrome blurs scaled content
// Prefer applying scale via zoom since Chrome blurs scaled content
// with nested transforms
if
(
typeof
dom
.
slides
.
style
.
zoom
!==
'
undefined
'
)
{
if
(
typeof
dom
.
slides
.
style
.
zoom
!==
'
undefined
'
&&
!
navigator
.
userAgent
.
match
(
/
(
iphone|ipod|android
)
/gi
)
)
{
dom
.
slides
.
style
.
zoom
=
scale
;
}
// Apply scale transform as a fallback
...
...
This diff is collapsed.
Click to expand it.
js/reveal.min.js
+
2
−
2
View file @
1ca8306e
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment