Center vertically slides in present mode and checkbox to disable transitions
This commit is contained in:
parent
cf81b02096
commit
5d0535966c
@ -107,6 +107,7 @@ define(function () {
|
|||||||
out.printDate = "Afficher la date";
|
out.printDate = "Afficher la date";
|
||||||
out.printTitle = "Afficher le titre du pad";
|
out.printTitle = "Afficher le titre du pad";
|
||||||
out.printCSS = "Personnaliser l'apparence (CSS):";
|
out.printCSS = "Personnaliser l'apparence (CSS):";
|
||||||
|
out.printTransition = "Activer les animations de transition";
|
||||||
|
|
||||||
out.slideOptionsTitle = "Personnaliser la présentation";
|
out.slideOptionsTitle = "Personnaliser la présentation";
|
||||||
out.slideOptionsButton = "Enregistrer (Entrée)";
|
out.slideOptionsButton = "Enregistrer (Entrée)";
|
||||||
|
|||||||
@ -109,6 +109,7 @@ define(function () {
|
|||||||
out.printDate = "Display the date";
|
out.printDate = "Display the date";
|
||||||
out.printTitle = "Display the pad title";
|
out.printTitle = "Display the pad title";
|
||||||
out.printCSS = "Custom style rules (CSS):";
|
out.printCSS = "Custom style rules (CSS):";
|
||||||
|
out.printTransition = "Enable transition animations";
|
||||||
|
|
||||||
out.slideOptionsTitle = "Customize your slides";
|
out.slideOptionsTitle = "Customize your slides";
|
||||||
out.slideOptionsButton = "Save (enter)";
|
out.slideOptionsButton = "Save (enter)";
|
||||||
|
|||||||
@ -188,6 +188,7 @@ define([
|
|||||||
title: false,
|
title: false,
|
||||||
slide: false,
|
slide: false,
|
||||||
date: false,
|
date: false,
|
||||||
|
transition: true,
|
||||||
style: ''
|
style: ''
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -220,6 +221,13 @@ define([
|
|||||||
}).appendTo($p).css('width', 'auto');
|
}).appendTo($p).css('width', 'auto');
|
||||||
$('<label>', {'for': 'checkTitle'}).text(Messages.printTitle).appendTo($p);
|
$('<label>', {'for': 'checkTitle'}).text(Messages.printTitle).appendTo($p);
|
||||||
$p.append($('<br>'));
|
$p.append($('<br>'));
|
||||||
|
// Transition
|
||||||
|
$('<input>', {type: 'checkbox', id: 'checkTransition', checked: slideOptionsTmp.transition}).on('change', function () {
|
||||||
|
var c = this.checked;
|
||||||
|
slideOptionsTmp.transition = c;
|
||||||
|
}).appendTo($p).css('width', 'auto');
|
||||||
|
$('<label>', {'for': 'checkTransition'}).text(Messages.printTransition).appendTo($p);
|
||||||
|
$p.append($('<br>'));
|
||||||
// CSS
|
// CSS
|
||||||
$('<label>', {'for': 'cssPrint'}).text(Messages.printCSS).appendTo($p);
|
$('<label>', {'for': 'cssPrint'}).text(Messages.printCSS).appendTo($p);
|
||||||
$p.append($('<br>'));
|
$p.append($('<br>'));
|
||||||
|
|||||||
@ -168,13 +168,16 @@ body .CodeMirror-focused .cm-matchhighlight {
|
|||||||
}
|
}
|
||||||
.cp div.modal #content,
|
.cp div.modal #content,
|
||||||
.cp div#modal #content {
|
.cp div#modal #content {
|
||||||
transition: margin-left 1s;
|
|
||||||
font-size: 20vh;
|
font-size: 20vh;
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
.cp div.modal #content.transition,
|
||||||
|
.cp div#modal #content.transition {
|
||||||
|
transition: margin-left 1s;
|
||||||
|
}
|
||||||
.cp div.modal #content .slide-frame,
|
.cp div.modal #content .slide-frame,
|
||||||
.cp div#modal #content .slide-frame {
|
.cp div#modal #content .slide-frame {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@ -198,10 +201,11 @@ body .CodeMirror-focused .cm-matchhighlight {
|
|||||||
}
|
}
|
||||||
.cp div.modal #content .slide-container,
|
.cp div.modal #content .slide-container,
|
||||||
.cp div#modal #content .slide-container {
|
.cp div#modal #content .slide-container {
|
||||||
display: inline-block;
|
display: inline-flex;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
vertical-align: top;
|
||||||
}
|
}
|
||||||
.cp div.modal .center,
|
.cp div.modal .center,
|
||||||
.cp div#modal .center {
|
.cp div#modal .center {
|
||||||
|
|||||||
@ -184,6 +184,10 @@ define([
|
|||||||
$('<div>', {'class': 'slideTitle'}).text(APP.title).appendTo($(el));
|
$('<div>', {'class': 'slideTitle'}).text(APP.title).appendTo($(el));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
$content.removeClass('transition');
|
||||||
|
if (options.transition) {
|
||||||
|
$content.addClass('transition');
|
||||||
|
}
|
||||||
//$content.find('.' + slideClass).hide();
|
//$content.find('.' + slideClass).hide();
|
||||||
//$content.find('.' + slideClass + ':eq( ' + i + ' )').show();
|
//$content.find('.' + slideClass + ':eq( ' + i + ' )').show();
|
||||||
$content.css('margin-left', -(i*100)+'vw');
|
$content.css('margin-left', -(i*100)+'vw');
|
||||||
|
|||||||
@ -161,7 +161,9 @@ div.modal, div#modal {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
#content {
|
#content {
|
||||||
|
&.transition {
|
||||||
transition: margin-left 1s;
|
transition: margin-left 1s;
|
||||||
|
}
|
||||||
font-size: 20vh;
|
font-size: 20vh;
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@ -191,9 +193,10 @@ div.modal, div#modal {
|
|||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
.slide-container {
|
.slide-container {
|
||||||
display: inline-block;
|
display: inline-flex;
|
||||||
height: 100%; width: 100vw;
|
height: 100%; width: 100vw;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
vertical-align: top;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user