merge slide numbers, adjust code format
commit
bdb46060b3
|
@ -476,6 +476,22 @@ body {
|
||||||
transition: width 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985);
|
transition: width 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* SLIDE NUMBER
|
||||||
|
*********************************************/
|
||||||
|
|
||||||
|
.reveal .slide-number {
|
||||||
|
position: fixed;
|
||||||
|
display: block;
|
||||||
|
opacity: 0.5;
|
||||||
|
z-index: 31;
|
||||||
|
width: 110px;
|
||||||
|
bottom: 30px;
|
||||||
|
left: 11px;
|
||||||
|
font-size: 12px;
|
||||||
|
text-align: center;
|
||||||
|
letter-spacing: 0px
|
||||||
|
}
|
||||||
|
|
||||||
/*********************************************
|
/*********************************************
|
||||||
* SLIDES
|
* SLIDES
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -127,6 +127,13 @@ body {
|
||||||
.reveal .controls div.navigate-down.enabled:hover {
|
.reveal .controls div.navigate-down.enabled:hover {
|
||||||
border-top-color: #c0a86e; }
|
border-top-color: #c0a86e; }
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* SLIDE NUMBER
|
||||||
|
*********************************************/
|
||||||
|
.reveal .slide-number {
|
||||||
|
color: #8b743d;
|
||||||
|
}
|
||||||
|
|
||||||
/*********************************************
|
/*********************************************
|
||||||
* PROGRESS BAR
|
* PROGRESS BAR
|
||||||
*********************************************/
|
*********************************************/
|
||||||
|
|
|
@ -127,6 +127,13 @@ body {
|
||||||
.reveal .controls div.navigate-down.enabled:hover {
|
.reveal .controls div.navigate-down.enabled:hover {
|
||||||
border-top-color: #71e9f4; }
|
border-top-color: #71e9f4; }
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* SLIDE NUMBER
|
||||||
|
*********************************************/
|
||||||
|
.reveal .slide-number {
|
||||||
|
color: #13daec;
|
||||||
|
}
|
||||||
|
|
||||||
/*********************************************
|
/*********************************************
|
||||||
* PROGRESS BAR
|
* PROGRESS BAR
|
||||||
*********************************************/
|
*********************************************/
|
||||||
|
|
|
@ -127,6 +127,13 @@ body {
|
||||||
.reveal .controls div.navigate-down.enabled:hover {
|
.reveal .controls div.navigate-down.enabled:hover {
|
||||||
border-top-color: #78b9e6; }
|
border-top-color: #78b9e6; }
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* SLIDE NUMBER
|
||||||
|
*********************************************/
|
||||||
|
.reveal .slide-number {
|
||||||
|
color: #268bd2;
|
||||||
|
}
|
||||||
|
|
||||||
/*********************************************
|
/*********************************************
|
||||||
* PROGRESS BAR
|
* PROGRESS BAR
|
||||||
*********************************************/
|
*********************************************/
|
||||||
|
|
|
@ -115,6 +115,13 @@ body {
|
||||||
.reveal .controls div.navigate-down.enabled:hover {
|
.reveal .controls div.navigate-down.enabled:hover {
|
||||||
border-top-color: #f3d7ac; }
|
border-top-color: #f3d7ac; }
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* SLIDE NUMBER
|
||||||
|
*********************************************/
|
||||||
|
.reveal .slide-number {
|
||||||
|
color: #e7ad52;
|
||||||
|
}
|
||||||
|
|
||||||
/*********************************************
|
/*********************************************
|
||||||
* PROGRESS BAR
|
* PROGRESS BAR
|
||||||
*********************************************/
|
*********************************************/
|
||||||
|
|
|
@ -117,6 +117,13 @@ body {
|
||||||
.reveal .controls div.navigate-down.enabled:hover {
|
.reveal .controls div.navigate-down.enabled:hover {
|
||||||
border-top-color: #8b7c69; }
|
border-top-color: #8b7c69; }
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* SLIDE NUMBER
|
||||||
|
*********************************************/
|
||||||
|
.reveal .slide-number {
|
||||||
|
color: #51483d;
|
||||||
|
}
|
||||||
|
|
||||||
/*********************************************
|
/*********************************************
|
||||||
* PROGRESS BAR
|
* PROGRESS BAR
|
||||||
*********************************************/
|
*********************************************/
|
||||||
|
|
|
@ -117,6 +117,13 @@ body {
|
||||||
.reveal .controls div.navigate-down.enabled:hover {
|
.reveal .controls div.navigate-down.enabled:hover {
|
||||||
border-top-color: #0000f1; }
|
border-top-color: #0000f1; }
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* SLIDE NUMBER
|
||||||
|
*********************************************/
|
||||||
|
.reveal .slide-number {
|
||||||
|
color: darkblue;
|
||||||
|
}
|
||||||
|
|
||||||
/*********************************************
|
/*********************************************
|
||||||
* PROGRESS BAR
|
* PROGRESS BAR
|
||||||
*********************************************/
|
*********************************************/
|
||||||
|
|
|
@ -124,6 +124,13 @@ body {
|
||||||
.reveal .controls div.navigate-down.enabled:hover {
|
.reveal .controls div.navigate-down.enabled:hover {
|
||||||
border-top-color: #74a7cb; }
|
border-top-color: #74a7cb; }
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* SLIDE NUMBER
|
||||||
|
*********************************************/
|
||||||
|
.reveal .slide-number {
|
||||||
|
color: #3b759e;
|
||||||
|
}
|
||||||
|
|
||||||
/*********************************************
|
/*********************************************
|
||||||
* PROGRESS BAR
|
* PROGRESS BAR
|
||||||
*********************************************/
|
*********************************************/
|
||||||
|
|
|
@ -127,6 +127,13 @@ body {
|
||||||
.reveal .controls div.navigate-down.enabled:hover {
|
.reveal .controls div.navigate-down.enabled:hover {
|
||||||
border-top-color: #78b9e6; }
|
border-top-color: #78b9e6; }
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* SLIDE NUMBER
|
||||||
|
*********************************************/
|
||||||
|
.reveal .slide-number {
|
||||||
|
color: #268bd2;
|
||||||
|
}
|
||||||
|
|
||||||
/*********************************************
|
/*********************************************
|
||||||
* PROGRESS BAR
|
* PROGRESS BAR
|
||||||
*********************************************/
|
*********************************************/
|
||||||
|
|
30
js/reveal.js
30
js/reveal.js
|
@ -108,7 +108,10 @@ var Reveal = (function(){
|
||||||
viewDistance: 3,
|
viewDistance: 3,
|
||||||
|
|
||||||
// Script dependencies to load
|
// Script dependencies to load
|
||||||
dependencies: []
|
dependencies: [],
|
||||||
|
|
||||||
|
// Indicates whether to show the slides number
|
||||||
|
showSlideNumber: false
|
||||||
},
|
},
|
||||||
|
|
||||||
// Flags if reveal.js is loaded (has dispatched the 'ready' event)
|
// Flags if reveal.js is loaded (has dispatched the 'ready' event)
|
||||||
|
@ -378,6 +381,9 @@ var Reveal = (function(){
|
||||||
'<div class="navigate-up"></div>' +
|
'<div class="navigate-up"></div>' +
|
||||||
'<div class="navigate-down"></div>' );
|
'<div class="navigate-down"></div>' );
|
||||||
|
|
||||||
|
// slide number
|
||||||
|
createSingletonNode( dom.wrapper, 'div', 'slide-number', '' );
|
||||||
|
|
||||||
// State background element [DEPRECATED]
|
// State background element [DEPRECATED]
|
||||||
createSingletonNode( dom.wrapper, 'div', 'state-background', null );
|
createSingletonNode( dom.wrapper, 'div', 'state-background', null );
|
||||||
|
|
||||||
|
@ -395,6 +401,7 @@ var Reveal = (function(){
|
||||||
dom.controlsPrev = toArray( document.querySelectorAll( '.navigate-prev' ) );
|
dom.controlsPrev = toArray( document.querySelectorAll( '.navigate-prev' ) );
|
||||||
dom.controlsNext = toArray( document.querySelectorAll( '.navigate-next' ) );
|
dom.controlsNext = toArray( document.querySelectorAll( '.navigate-next' ) );
|
||||||
|
|
||||||
|
dom.slideNumber = document.querySelector( '.slide-number' );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1613,6 +1620,7 @@ var Reveal = (function(){
|
||||||
updateProgress();
|
updateProgress();
|
||||||
updateBackground();
|
updateBackground();
|
||||||
updateParallax();
|
updateParallax();
|
||||||
|
updateSlideNumber();
|
||||||
|
|
||||||
// Update the URL hash
|
// Update the URL hash
|
||||||
writeURL();
|
writeURL();
|
||||||
|
@ -1647,6 +1655,7 @@ var Reveal = (function(){
|
||||||
updateControls();
|
updateControls();
|
||||||
updateProgress();
|
updateProgress();
|
||||||
updateBackground( true );
|
updateBackground( true );
|
||||||
|
updateSlideNumber();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1851,6 +1860,25 @@ var Reveal = (function(){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates the slide number div to reflect the current slide.
|
||||||
|
*/
|
||||||
|
function updateSlideNumber() {
|
||||||
|
|
||||||
|
// Update slide number if enabled
|
||||||
|
if( config.showSlideNumber && dom.slideNumber) {
|
||||||
|
|
||||||
|
// Display the number of the page using 'indexh - indexv' format
|
||||||
|
var indexString = indexh;
|
||||||
|
if( indexv > 0 ) {
|
||||||
|
indexString += ' - ' + indexv;
|
||||||
|
}
|
||||||
|
|
||||||
|
dom.slideNumber.innerHTML = indexString;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates the state of all control/navigation arrows.
|
* Updates the state of all control/navigation arrows.
|
||||||
*/
|
*/
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue