Commit d56f630b authored by Legagneur Matthieu's avatar Legagneur Matthieu

DWF : MAJ Reveal 3.7.0 -> 3.9.2

parent 2b932458
......@@ -480,11 +480,11 @@ body.compensate-for-scrollbar {
z-index: 99996;
}
@supports (padding: max(0px)) {
/*@supports (padding: max(0px)) {
.fancybox-caption {
padding: 75px max(44px, env(safe-area-inset-right)) max(25px, env(safe-area-inset-bottom)) max(44px, env(safe-area-inset-left));
}
}
}*/
.fancybox-caption--separate {
margin-top: -50px;
......@@ -667,12 +667,12 @@ body.compensate-for-scrollbar {
padding-right: 12px;
}
@supports (padding: max(0px)) {
/* @supports (padding: max(0px)) {
.fancybox-caption {
padding-left: max(12px, env(safe-area-inset-left));
padding-right: max(12px, env(safe-area-inset-right));
}
}
}*/
}
/* Share */
......
Copyright (C) 2018 Hakim El Hattab, http://hakim.se, and reveal.js contributors
Copyright (C) 2020 Hakim El Hattab, http://hakim.se, and reveal.js contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
......
/* http://meyerweb.com/eric/tools/css/reset/
v4.0 | 20180602
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
main, menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, main, menu, nav, section {
display: block;
}
\ No newline at end of file
This diff is collapsed.
......@@ -4,7 +4,7 @@ Themes are written using Sass to keep things modular and reduce the need for rep
## Creating a Theme
To create your own theme, start by duplicating a ```.scss``` file in [/css/theme/source](https://github.com/hakimel/reveal.js/blob/master/css/theme/source). It will be automatically compiled by Grunt from Sass to CSS (see the [Gruntfile](https://github.com/hakimel/reveal.js/blob/master/Gruntfile.js)) when you run `npm run build -- css-themes`.
To create your own theme, start by duplicating a ```.scss``` file in [/css/theme/source](https://github.com/hakimel/reveal.js/blob/master/css/theme/source). It will be automatically compiled by Grunt from Sass to CSS (see the [Gruntfile](https://github.com/hakimel/reveal.js/blob/master/gruntfile.js)) when you run `npm run build -- css-themes`.
Each theme file does four things in the following order:
......
......@@ -153,7 +153,7 @@ body {
font-family: monospace;
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
.reveal code {
font-family: monospace;
......
......@@ -11,8 +11,8 @@ section.has-light-background, section.has-light-background h1, section.has-light
* GLOBAL STYLES
*********************************************/
body {
background: #222;
background-color: #222; }
background: #191919;
background-color: #191919; }
.reveal {
font-family: "Source Sans Pro", Helvetica, sans-serif;
......@@ -149,7 +149,7 @@ body {
font-family: monospace;
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
.reveal code {
font-family: monospace;
......@@ -270,4 +270,4 @@ body {
*********************************************/
@media print {
.backgrounds {
background-color: #222; } }
background-color: #191919; } }
......@@ -152,7 +152,7 @@ body {
font-family: monospace;
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
.reveal code {
font-family: monospace;
......
......@@ -155,7 +155,7 @@ body {
font-family: monospace;
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
.reveal code {
font-family: monospace;
......
......@@ -153,7 +153,7 @@ body {
font-family: monospace;
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
.reveal code {
font-family: monospace;
......
......@@ -147,7 +147,7 @@ body {
font-family: monospace;
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
.reveal code {
font-family: monospace;
......
......@@ -149,7 +149,7 @@ body {
font-family: monospace;
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
.reveal code {
font-family: monospace;
......
......@@ -152,7 +152,7 @@ body {
font-family: monospace;
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
.reveal code {
font-family: monospace;
......
......@@ -156,7 +156,7 @@ body {
font-family: monospace;
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
.reveal code {
font-family: monospace;
......
......@@ -153,7 +153,7 @@ body {
font-family: monospace;
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
.reveal code {
font-family: monospace;
......
......@@ -16,7 +16,7 @@
// Override theme settings (see ../template/settings.scss)
$backgroundColor: #222;
$backgroundColor: #191919;
$mainColor: #fff;
$headingColor: #fff;
......
......@@ -28,6 +28,8 @@ $heading2Size: 2.11em;
$heading3Size: 1.55em;
$heading4Size: 1.00em;
$codeFont: monospace;
// Links and actions
$linkColor: #13DAEC;
$linkColorHover: lighten( $linkColor, 20% );
......@@ -40,4 +42,4 @@ $selectionColor: #fff;
// to return a background image or gradient
@mixin bodyBackground() {
background: $backgroundColor;
}
\ No newline at end of file
}
......@@ -162,16 +162,16 @@ body {
text-align: left;
font-size: 0.55em;
font-family: monospace;
font-family: $codeFont;
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 0px 6px rgba(0,0,0,0.3);
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
}
.reveal code {
font-family: monospace;
font-family: $codeFont;
text-transform: none;
}
......
......@@ -149,7 +149,7 @@ body {
font-family: monospace;
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
.reveal code {
font-family: monospace;
......
This diff is collapsed.
/*
Monokai style - ported by Luigi Maselli - http://grigio.org
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #272822;
color: #ddd;
}
.hljs-tag,
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-strong,
.hljs-name {
color: #f92672;
}
.hljs-code {
color: #66d9ef;
}
.hljs-class .hljs-title {
color: white;
}
.hljs-attribute,
.hljs-symbol,
.hljs-regexp,
.hljs-link {
color: #bf79db;
}
.hljs-string,
.hljs-bullet,
.hljs-subst,
.hljs-title,
.hljs-section,
.hljs-emphasis,
.hljs-type,
.hljs-built_in,
.hljs-builtin-name,
.hljs-selector-attr,
.hljs-selector-pseudo,
.hljs-addition,
.hljs-variable,
.hljs-template-tag,
.hljs-template-variable {
color: #a6e22e;
}
.hljs-comment,
.hljs-quote,
.hljs-deletion,
.hljs-meta {
color: #75715e;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-doctag,
.hljs-title,
.hljs-section,
.hljs-type,
.hljs-selector-id {
font-weight: bold;
}
/* MIT | https://github.com/taylorhakes/promise-polyfill */
!function(e, n){"object" == typeof exports && "undefined" != typeof module?n():"function" == typeof define && define.amd?define(n):n()}(0, function(){"use strict"; function e(e){var n = this.constructor; return this.then(function(t){return n.resolve(e()).then(function(){return t})}, function(t){return n.resolve(e()).then(function(){return n.reject(t)})})}function n(){}function t(e){if (!(this instanceof t))throw new TypeError("Promises must be constructed via new"); if ("function" != typeof e)throw new TypeError("not a function"); this._state = 0, this._handled = !1, this._value = undefined, this._deferreds = [], u(e, this)}function o(e, n){for (; 3 === e._state; )e = e._value; 0 !== e._state?(e._handled = !0, t._immediateFn(function(){var t = 1 === e._state?n.onFulfilled:n.onRejected; if (null !== t){var o; try{o = t(e._value)} catch (f){return void i(n.promise, f)}r(n.promise, o)} else(1 === e._state?r:i)(n.promise, e._value)})):e._deferreds.push(n)}function r(e, n){try{if (n === e)throw new TypeError("A promise cannot be resolved with itself."); if (n && ("object" == typeof n || "function" == typeof n)){var o = n.then; if (n instanceof t)return e._state = 3, e._value = n, void f(e); if ("function" == typeof o)return void u(function(e, n){return function(){e.apply(n, arguments)}}(o, n), e)}e._state = 1, e._value = n, f(e)} catch (r){i(e, r)}}function i(e, n){e._state = 2, e._value = n, f(e)}function f(e){2 === e._state && 0 === e._deferreds.length && t._immediateFn(function(){e._handled || t._unhandledRejectionFn(e._value)}); for (var n = 0, r = e._deferreds.length; r > n; n++)o(e, e._deferreds[n]); e._deferreds = null}function u(e, n){var t = !1; try{e(function(e){t || (t = !0, r(n, e))}, function(e){t || (t = !0, i(n, e))})} catch (o){if (t)return; t = !0, i(n, o)}}var c = setTimeout; t.prototype["catch"] = function(e){return this.then(null, e)}, t.prototype.then = function(e, t){var r = new this.constructor(n); return o(this, new function(e, n, t){this.onFulfilled = "function" == typeof e?e:null, this.onRejected = "function" == typeof n?n:null, this.promise = t}(e, t, r)), r}, t.prototype["finally"] = e, t.all = function(e){return new t(function(n, t){function o(e, f){try{if (f && ("object" == typeof f || "function" == typeof f)){var u = f.then; if ("function" == typeof u)return void u.call(f, function(n){o(e, n)}, t)}r[e] = f, 0 == --i && n(r)} catch (c){t(c)}}if (!e || "undefined" == typeof e.length)throw new TypeError("Promise.all accepts an array"); var r = Array.prototype.slice.call(e); if (0 === r.length)return n([]); for (var i = r.length, f = 0; r.length > f; f++)o(f, r[f])})}, t.resolve = function(e){return e && "object" == typeof e && e.constructor === t?e:new t(function(n){n(e)})}, t.reject = function(e){return new t(function(n, t){t(e)})}, t.race = function(e){return new t(function(n, t){for (var o = 0, r = e.length; r > o; o++)e[o].then(n, t)})}, t._immediateFn = "function" == typeof setImmediate && function(e){setImmediate(e)} || function(e){c(e, 0)}, t._unhandledRejectionFn = function(e){void 0 !== console && console && console.warn("Possible Unhandled Promise Rejection:", e)}; var l = function(){if ("undefined" != typeof self)return self; if ("undefined" != typeof window)return window; if ("undefined" != typeof global)return global; throw Error("unable to locate global object")}(); "Promise"in l?l.Promise.prototype["finally"] || (l.Promise.prototype["finally"] = e):l.Promise = t});
\ No newline at end of file
......@@ -9,7 +9,7 @@
<link rel="stylesheet" href="../../css/reveal.css">
<link rel="stylesheet" href="../../css/theme/white.css" id="theme">
<link rel="stylesheet" href="../../lib/css/zenburn.css">
<link rel="stylesheet" href="../../lib/css/monokai.css">
</head>
<body>
......@@ -109,7 +109,6 @@
</div>
</div>
<script src="../../lib/js/head.min.js"></script>
<script src="../../js/reveal.js"></script>
<script>
......@@ -122,9 +121,6 @@ Reveal.initialize({
// Optional libraries used to extend on reveal.js
dependencies: [
{src: '../../lib/js/classList.js', condition: function () {
return !document.body.classList;
}},
{src: 'marked.js', condition: function () {
return !!document.querySelector('[data-markdown]');
}},
......
......@@ -7,33 +7,28 @@
var RevealMath = window.RevealMath || (function () {
var options = Reveal.getConfig().math || {};
options.mathjax = options.mathjax || 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js';
options.config = options.config || 'TeX-AMS_HTML-full';
options.tex2jax = options.tex2jax || {
inlineMath: [['$', '$'], ['\\(', '\\)']],
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre']};
loadScript(options.mathjax + '?config=' + options.config, function () {
MathJax.Hub.Config({
messageStyle: 'none',
tex2jax: options.tex2jax,
skipStartupTypeset: true
});
// Typeset followed by an immediate reveal.js layout since
// the typesetting process could affect slide height
MathJax.Hub.Queue(['Typeset', MathJax.Hub]);
MathJax.Hub.Queue(Reveal.layout);
// Reprocess equations in slides when they turn visible
Reveal.addEventListener('slidechanged', function (event) {
MathJax.Hub.Queue(['Typeset', MathJax.Hub, event.currentSlide]);
});
var mathjax = options.mathjax || 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js';
var config = options.config || 'TeX-AMS_HTML-full';
var url = mathjax + '?config=' + config;
var defaultOptions = {
messageStyle: 'none',
tex2jax: {
inlineMath: [['$', '$'], ['\\(', '\\)']],
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre']
},
skipStartupTypeset: true
};
function defaults(options, defaultOptions) {
for (var i in defaultOptions) {
if (!options.hasOwnProperty(i)) {
options[i] = defaultOptions[i];
}
}
});
}
function loadScript(url, callback) {
......@@ -64,4 +59,34 @@ var RevealMath = window.RevealMath || (function () {
}
return {
init: function () {
defaults(options, defaultOptions);
defaults(options.tex2jax, defaultOptions.tex2jax);
options.mathjax = options.config = null;
loadScript(url, function () {
MathJax.Hub.Config(options);
// Typeset followed by an immediate reveal.js layout since
// the typesetting process could affect slide height
MathJax.Hub.Queue(['Typeset', MathJax.Hub]);
MathJax.Hub.Queue(Reveal.layout);
// Reprocess equations in slides when they turn visible
Reveal.addEventListener('slidechanged', function (event) {
MathJax.Hub.Queue(['Typeset', MathJax.Hub, event.currentSlide]);
});
});
}
}
})();
Reveal.registerPlugin('math', RevealMath);
{
"name": "reveal-js-multiplex", "version": "1.0.0", "description": "reveal.js multiplex server", "homepage": "http://revealjs.com", "scripts": {
"start": "node index.js"
}, "engines": {
"node": "~4.1.1"
}, "dependencies": {
"express": "~4.13.3", "grunt-cli": "~0.1.13", "mustache": "~2.2.1", "socket.io": "~1.3.7"
}, "license": "MIT"
"name": "reveal-js-multiplex",
"version": "1.0.0",
"description": "reveal.js multiplex server",
"homepage": "http://revealjs.com",
"scripts": {
"start": "node index.js"
},
"engines": {
"node": "~4.1.1"
},
"dependencies": {
"express": "~4.13.3",
"grunt-cli": "~0.1.13",
"mustache": "~2.2.1",
"socket.io": "~1.3.7"
},
"license": "MIT"
}
......@@ -11,24 +11,28 @@
*/
var RevealNotes = (function () {
var notesPopup = null;
function openNotes(notesFilePath) {
if (notesPopup && !notesPopup.closed) {
notesPopup.focus();
return;
}
if (!notesFilePath) {
var jsFileLocation = document.querySelector('script[src$="notes.js"]').src; // this js file path
jsFileLocation = jsFileLocation.replace(/notes\.js(\?.*)?$/, ''); // the js folder path
notesFilePath = jsFileLocation + 'notes.html';
}
var notesPopup = window.open(notesFilePath, 'reveal.js - Notes', 'width=1100,height=700');
notesPopup = window.open(notesFilePath, 'reveal.js - Notes', 'width=1100,height=700');
if (!notesPopup) {
alert('Speaker view popup failed to open. Please make sure popups are allowed and reopen the speaker view.');
return;
}
// Allow popup window access to Reveal API
notesPopup.Reveal = window.Reveal;
/**
* Connect to the notes window through a postmessage handshake.
* Using postmessage enables us to work in situations where the
......@@ -52,9 +56,28 @@ var RevealNotes = (function () {
clearInterval(connectInterval);
onConnected();
}
if (data && data.namespace === 'reveal-notes' && data.type === 'call') {
callRevealApi(data.methodName, data.arguments, data.callId);
}
});
}
/**
* Calls the specified Reveal.js method with the provided argument
* and then pushes the result to the notes frame.
*/
function callRevealApi(methodName, methodArguments, callId) {
var result = Reveal[methodName].apply(Reveal, methodArguments);
notesPopup.postMessage(JSON.stringify({
namespace: 'reveal-notes',
type: 'return',
result: result,
callId: callId
}), '*');
}
/**
* Posts the current slide data to the notes window
*/
......@@ -127,20 +150,28 @@ var RevealNotes = (function () {
}
if (!/receiver/i.test(window.location.search)) {
return {
init: function () {
// If the there's a 'notes' query set, open directly
if (window.location.search.match(/(\?|\&)notes/gi) !== null) {
openNotes();
}
if (!/receiver/i.test(window.location.search)) {
// If the there's a 'notes' query set, open directly
if (window.location.search.match(/(\?|\&)notes/gi) !== null) {
openNotes();
}
// Open the notes when the 's' key is hit
Reveal.addKeyBinding({keyCode: 83, key: 'S', description: 'Speaker notes view'}, function () {
openNotes();
});
// Open the notes when the 's' key is hit
Reveal.addKeyBinding({keyCode: 83, key: 'S', description: 'Speaker notes view'}, function () {
openNotes();
});
}
}
return {open: openNotes};
},
open: openNotes
};
})();
Reveal.registerPlugin('notes', RevealNotes);
......@@ -205,7 +205,7 @@ var RevealSearch = (function () {
}
}, false);
if (window.Reveal)
Reveal.registerKeyboardShortcut('Ctrl-Shift-F', 'Search');
Reveal.registerKeyboardShortcut('CTRL + Shift + F', 'Search');
closeSearch();
return {open: openSearch};
})();
// Custom reveal.js integration
(function () {
var revealElement = document.querySelector('.reveal');
if (revealElement) {
var RevealZoom = (function () {
revealElement.addEventListener('mousedown', function (event) {
var defaultModifier = /Linux/.test(window.navigator.platform) ? 'ctrl' : 'alt';
return {
init: function () {
var modifier = (Reveal.getConfig().zoomKey ? Reveal.getConfig().zoomKey : defaultModifier) + 'Key';
var zoomLevel = (Reveal.getConfig().zoomLevel ? Reveal.getConfig().zoomLevel : 2);
Reveal.getRevealElement().addEventListener('mousedown', function (event) {
var defaultModifier = /Linux/.test(window.navigator.platform) ? 'ctrl' : 'alt';
if (event[ modifier ] && !Reveal.isOverview()) {
event.preventDefault();
var modifier = (Reveal.getConfig().zoomKey ? Reveal.getConfig().zoomKey : defaultModifier) + 'Key';
var zoomLevel = (Reveal.getConfig().zoomLevel ? Reveal.getConfig().zoomLevel : 2);
zoom.to({
x: event.clientX,
y: event.clientY,
scale: zoomLevel,
pan: false
});
}
});
if (event[ modifier ] && !Reveal.isOverview()) {
event.preventDefault();
zoom.to({