Skip to content

Commit

Permalink
fix version numbers + help message + open notess
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Ollinger committed Oct 24, 2020
1 parent 8e8bfa8 commit d9cb5c9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 9 deletions.
22 changes: 18 additions & 4 deletions classic/rise/static/main.js
Expand Up @@ -728,7 +728,10 @@ define([
'colorNext': () => RevealChalkboard.colorNext(), // next color
'colorPrev': () => RevealChalkboard.colorPrev(), // previous color
'download': () => RevealChalkboard.download() // download recorded chalkboard drawing
}
},
'notes': { // API calls for RevealNotes plug-in
'openNotes' : () => RevealNotes.open(), // open speaker notes window
},
}

let reveal_helpstr = {
Expand All @@ -748,7 +751,10 @@ define([
'colorNext': 'cycle to next pen color',
'colorPrev': 'cycle to previous pen color',
'download': 'download recorded chalkboard drawing'
}
},
'notes': { // API calls for RevealNotes plug-in
'openNotes' : 'open speaker notes windows'
},
}

// need to check, if we can fetch the default bindings from rise.yaml (nbconfig)
Expand All @@ -769,7 +775,10 @@ define([
'colorPrev': 'q', // keycode 81
'colorNext': 's', // kecode 83
'download': '\\' // keycode 220
}
},
'notes': { // API calls for RevealNotes plug-in
'openNotes' : 't' // keycode 84
},
}

// update reveal bindings with custom key codes
Expand Down Expand Up @@ -874,6 +883,7 @@ define([
let jupyter_keys;
let reveal_keys;
let cb_keys;
let no_keys;

//check if custom bindings for registered jupyter calls are defined
if (typeof complete_config.shortcuts !== 'undefined'){
Expand All @@ -889,8 +899,10 @@ define([

reveal_keys = updated_keybindings['main'];
cb_keys = updated_keybindings['chalkboard'];
no_keys = updated_keybindings['notes'];
let reveal_help = reveal_helpstr['main'];
let cb_help = reveal_helpstr['chalkboard'];
let no_help= reveal_helpstr['notes'];

let message = $('<div/>').append(
$("<p/></p>").addClass('dialog').html(
Expand All @@ -903,7 +915,7 @@ define([
helpListItem(reveal_keys.firstSlide, reveal_help.firstSlide) +
helpListItem(reveal_keys.lastSlide, reveal_help.lastSlide) +
helpListItem(reveal_keys.toggleOverview, reveal_help.toggleOverview) +
helpListItem('t', 'toggle notes') +
helpListItem(no_keys.openNotes, no_help.openNotes) +
`<li><kbd>,</kbd>: ${reveal_help.toggleAllRiseButtons}</li>` +
"<li><kbd>/</kbd>: black screen</li>" +
"<li><strong>less useful:</strong>" +
Expand All @@ -917,6 +929,8 @@ define([
"<ul>" +
helpListItem(cb_keys.toggleChalkboard, cb_help.toggleChalkboard) +
helpListItem(cb_keys.toggleNotesCanvas, cb_help.toggleNotesCanvaas) +
helpListItem(cb_keys.colorNext, cb_help.colorNext) +
helpListItem(cb_keys.colorPrev, cb_help.colorPrev) +
helpListItem(cb_keys.download, cb_help.download) +
helpListItem(cb_keys.reset, cb_help.reset) +
helpListItem(cb_keys.clear, cb_help.clear) +
Expand Down
10 changes: 5 additions & 5 deletions rise-reveal/package.json
Expand Up @@ -28,12 +28,12 @@
"url": "https://github.com/damianavila/RISE/issues"
},
"files": [
"export/reveal.js",
"export/reveal.js-chalkboard"
"export/reveal.js",
"export/reveal.js-chalkboard"
],
"scripts": {
"build": "for target in copy patch; do npm run $target; done",
"copy": "mkdir -p export; for dep in reveal.js; do cp -r ./node_modules/$dep/ ./export/$dep/; done; cp -r ./node_modules/reveal.js-plugins/chalkboard ./export/reveal.js-chalkboard/",
"copy": "mkdir -p export; cp -r ./node_modules/reveal.js/ ./export/reveal.js/; cp -r ./node_modules/reveal.js-plugins/chalkboard ./export/reveal.js-chalkboard/",
"patch": "for target in patch-reveal-css patch-notes patch-themes patch-chalkboard ; do npm run $target; done",
"patch-reveal-css": "sed -i.upstream '11 s_^_/*_' export/reveal.js/css/reveal.css",
"patch-notes": "bash patch-notes-plugin.sh",
Expand All @@ -42,8 +42,8 @@
"clean": "rm -rf node_modules export"
},
"dependencies": {
"reveal.js": "~3.9.0",
"reveal.js": "~3.9.2",
"reveal.js-plugins": "rajgoel/reveal.js-plugins#3.9.0"
},
"version": "380.0.2"
"version": "390.0.1"
}

0 comments on commit d9cb5c9

Please sign in to comment.