1
Fork 0

Add base setup

This commit is contained in:
Jake Howard 2017-09-21 21:29:10 +01:00
parent 4072a6b420
commit bf6902ccff
Signed by: jake
GPG key ID: 57AFB45680EDD477
5 changed files with 62 additions and 6 deletions

1
.gitignore vendored
View file

@ -63,3 +63,4 @@ typings/
# End of https://www.gitignore.io/api/node
build/

View file

@ -4,7 +4,11 @@
"description": "Base Presentation Repository for Reveal.js",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"build-js": "browserify src/index.js -o build/index.js && cp -r node_modules/reveal.js/plugin build/ && cp node_modules/reveal.js/lib/js/head.min.js build/head.min.js",
"build-css": "node-sass src/index.scss build/index.css --source-map-embed",
"build-html": "cp src/index.html build/index.html",
"build": "mkdir -p build && npm run build-js && npm run build-css && npm run build-html",
"start": "tstatic build/"
},
"repository": {
"type": "git",
@ -17,12 +21,12 @@
},
"homepage": "https://github.com/RealOrangeOne/presentation-base#readme",
"devDependencies": {
"browserify": "^14.4.0",
"node-sass": "^4.5.3"
"browserify": "14.4.0",
"node-sass": "4.5.3"
},
"dependencies": {
"highlight.js": "^9.12.0",
"reveal.js": "^3.5.0",
"tstatic": "^1.1.0"
"highlight.js": "9.12.0",
"reveal.js": "3.5.0",
"tstatic": "1.1.0"
}
}

19
src/index.html Normal file
View file

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<title>Presentation</title>
<link rel='stylesheet' href='index.css' />
<script src="head.min.js"></script>
</head>
<body>
<div class="reveal">
<div class="slides">
<section>
<h1>Title</h1>
<h4><i>Subtitle</i></h4>
</section>
</div>
</div>
<script src='index.js'></script>
</body>
</html>

22
src/index.js Normal file
View file

@ -0,0 +1,22 @@
var Reveal = require('reveal.js');
window.Reveal = Reveal;
Reveal.initialize({
controls: true,
progress: true,
history: true,
center: true,
width: 1500,
height: 800,
transition: 'slide',
backgroundTransition: 'zoom',
dependencies: [{
src: 'plugin/highlight/highlight.js',
async: true,
callback: function () { hljs.initHighlightingOnLoad() }
}]
});

10
src/index.scss Normal file
View file

@ -0,0 +1,10 @@
@import "node_modules/reveal.js/css/reveal.scss";
@import "node_modules/reveal.js/css/theme/night";
@import "node_modules/highlight.js/styles/monokai-sublime";
@import url(https://fonts.googleapis.com/css?family=Roboto:400,700,500,400italic,300,300italic);
* {
font-family: 'Roboto', sans-serif !important;
}