Commit c8b6c29c authored by Kristof Korwisi's avatar Kristof Korwisi
Browse files

Merge branch '17-add-the-reveal-js-chalkboard-plugin' into 'master'

Resolve "Add the Reveal.js Chalkboard plugin"

Closes #17

See merge request decker/decker!36
parents 722c824b f8a8f1d4
......@@ -10,12 +10,19 @@ else
decker-name := $(base-name)-$(version)-$(branch)
endif
ifdef DECKER_DEV
yarn-mode := development
else
yarn-mode := production
endif
build:
stack build -j 8 --fast
yarn:
yarn install && yarn run webpack --mode production
yarn install && yarn run webpack --mode $(yarn-mode)
cp -r node_modules/reveal.js-menu resource/support/
cp -r src-support/img resource/support/
dist: yarn build
rm -rf dist
......
......@@ -7,6 +7,7 @@ subtitle: Tutorial and Examples
title: Decker Slide Tool
transition: linear
ümläüte: Ümläüte
chalkboard: example-deck.json
---
# Overview
......@@ -315,4 +316,3 @@ Your total score is 42.
- [Haskell](http://haskell.org)
- [Pandoc](), [Shake](), [Mustache](), [reveal.js]()
- [LaTeX](), [decktape.sh]()
......@@ -21,6 +21,7 @@ $endif$
<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="$revealjs-url$/css/reveal.css">
<link rel="stylesheet" href="$decker-support-dir$/reveal.js-menu/font-awesome/css/all.css">
$if(math)$
$math$
......@@ -50,7 +51,7 @@ $endif$
<!-- Decker's standard default CSS -->
<!--<link rel="stylesheet" href="$decker-support-dir$/decker.css">-->
<!-- The last word on CSS for the power user -->
$for(css)$
<link rel="stylesheet" href="$css$"/>
......@@ -264,11 +265,22 @@ $endif$
$if(maxScale)$
maxScale: $maxScale$,
$endif$
$if(chalkboard)$
// Display chalkboard controls
chalkboard: {
readOnly: undefined,
theme: "chalkboard",
src: '$chalkboard$',
},
$endif$
// Optional reveal.js plugins
dependencies: [
{ src: '$decker-support-dir$/classlist.js', condition: function() { return !document.body.classList; } },
{ src: '$decker-support-dir$/plugins.js', async: true },
$if(chalkboard)$
{ src: '$decker-support-dir$/chalkboard.js'},
$endif$
$if(notes-server)$
{ src: '$decker-support-dir$/notes.js', async: true },
$endif$
......@@ -278,7 +290,17 @@ $endif$
$if(menu)$
{ src: '$decker-support-dir$/reveal.js-menu/menu.js', async: true },
$endif$
]
],
keyboard: {
40: function() { Reveal.next(); }, // up: next slide
38: function() { Reveal.prev(); }, // down: prev slide
67: function() { window.RevealChalkboard.toggleNotesCanvas() }, // c: draw on slides
84: function() { window.RevealChalkboard.toggleChalkboard() }, // t: draw on blackboard
8: function() { window.RevealChalkboard.clear() }, // BACKSPACE: clear chalkboard
46: function() { window.RevealChalkboard.resetSlide() }, // DELETE: reset chalkboard
68: function() { window.RevealChalkboard.downloadData() }, // d: downlad chalkboard drawing
90: function() { window.RevealChalkboard.drawUndo() } , // z: undo last stroke
},
});
</script>
$for(include-after)$
......
This diff is collapsed.
---
chalkboard: chalkboard-deck.json
---
# Slide 1
# Slide 2
\ No newline at end of file
......@@ -10,15 +10,16 @@ module.exports = {
notes: './src-support/notes.js',
page: './src-support/page.js',
three: './src-support/three.js',
d3: './src-support/d3.js'
d3: './src-support/d3.js',
chalkboard: './src-support/chalkboard.js'
},
output: {
path: path.resolve(__dirname, 'resource', 'support'),
filename: '[name].js'
},
devtool: 'cheap-module-eval-source-map',
module: {
rules: [
{
rules: [{
test: /\.js$/,
exclude: /node_modules/,
use: {
......@@ -46,6 +47,16 @@ module.exports = {
outputPath: 'fonts/'
}
}]
},
{
test: /\.(png|jp(e*)g|svg)$/,
use: [{
loader: 'url-loader',
options: {
limit: 8000, // Convert images < 8kb to base64 strings
name: 'images/[hash]-[name].[ext]'
}
}]
}
]
}
......
......@@ -3237,6 +3237,11 @@ mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.19:
dependencies:
mime-db "~1.36.0"
mime@^2.0.3:
version "2.3.1"
resolved "https://registry.yarnpkg.com/mime/-/mime-2.3.1.tgz#b1621c54d63b97c47d3cfe7f7215f7d64517c369"
integrity sha512-OEUllcVoydBHGN1z84yfQDimn58pZNNNXgZlHXSboxMlFvgI6MXSWpWKpFRra7H1HxpVhHTkrghfRW49k6yjeg==
mimic-fn@^1.0.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022"
......@@ -4970,6 +4975,15 @@ urix@^0.1.0:
resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72"
integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=
url-loader@^1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/url-loader/-/url-loader-1.1.2.tgz#b971d191b83af693c5e3fea4064be9e1f2d7f8d8"
integrity sha512-dXHkKmw8FhPqu8asTc1puBfe3TehOCo2+RmOOev5suNCIYBcT626kxiWg1NBVkwc4rO8BGa7gP70W7VXuqHrjg==
dependencies:
loader-utils "^1.1.0"
mime "^2.0.3"
schema-utils "^1.0.0"
url@^0.11.0:
version "0.11.0"
resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment