Skip to content
Snippets Groups Projects
Commit e4163b05 authored by Stefan Dierauf's avatar Stefan Dierauf
Browse files

started presentation

parent e0345be5
No related branches found
No related tags found
No related merge requests found
{
"directory": "bower_components"
}
# http://editorconfig.org
root = true
[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
node_modules
bower_components
dist
*.log
.sass-cache
index.html
{
"esnext": true,
"bitwise": true,
"camelcase": true,
"curly": true,
"eqeqeq": true,
"immed": true,
"indent": 4,
"latedef": true,
"newcap": true,
"noarg": true,
"quotmark": "single",
"undef": true,
"unused": true,
"strict": true,
"trailing": true,
"smarttabs": true,
"white": true
}
{
"generator-reveal": {
"presentationTitle": "NodeJS",
"packageVersion": "0.0.0",
"revealTheme": "solarized",
"useSass": false,
"deployToGithubPages": false
}
}
\ No newline at end of file
# Generated on 2015-01-22 using generator-reveal 0.4.0
module.exports = (grunt) ->
grunt.initConfig
watch:
livereload:
options:
livereload: true
files: [
'index.html'
'slides/{,*/}*.{md,html}'
'js/*.js'
]
index:
files: [
'templates/_index.html'
'templates/_section.html'
'slides/list.json'
]
tasks: ['buildIndex']
coffeelint:
files: ['Gruntfile.coffee']
tasks: ['coffeelint']
jshint:
files: ['js/*.js']
tasks: ['jshint']
connect:
livereload:
options:
port: 9000
# Change hostname to '0.0.0.0' to access
# the server from outside.
hostname: 'localhost'
base: '.'
open: true
livereload: true
coffeelint:
options:
indentation:
value: 4
max_line_length:
level: 'ignore'
all: ['Gruntfile.coffee']
jshint:
options:
jshintrc: '.jshintrc'
all: ['js/*.js']
copy:
dist:
files: [{
expand: true
src: [
'slides/**'
'bower_components/**'
'js/**'
]
dest: 'dist/'
},{
expand: true
src: ['index.html']
dest: 'dist/'
filter: 'isFile'
}]
# Load all grunt tasks.
require('load-grunt-tasks')(grunt)
grunt.registerTask 'buildIndex',
'Build index.html from templates/_index.html and slides/list.json.',
->
indexTemplate = grunt.file.read 'templates/_index.html'
sectionTemplate = grunt.file.read 'templates/_section.html'
slides = grunt.file.readJSON 'slides/list.json'
html = grunt.template.process indexTemplate, data:
slides:
slides
section: (slide) ->
grunt.template.process sectionTemplate, data:
slide:
slide
grunt.file.write 'index.html', html
grunt.registerTask 'test',
'*Lint* javascript and coffee files.', [
'coffeelint'
'jshint'
]
grunt.registerTask 'serve',
'Run presentation locally and start watch process (living document).', [
'buildIndex'
'connect:livereload'
'watch'
]
grunt.registerTask 'dist',
'Save presentation files to *dist* directory.', [
'test'
'buildIndex'
'copy'
]
# Define default task.
grunt.registerTask 'default', [
'test'
'serve'
]
{
"name": "nodejs",
"version": "0.0.0",
"dependencies": {
"reveal.js": "~2.6.1",
"reveal-highlight-themes": "~8.3.0"
}
}
// Modified from markdown.js from Hakim to handle external html files
(function () {
/*jslint loopfunc: true, browser: true*/
/*globals alert*/
'use strict';
var querySlidingHtml = function () {
var sections = document.querySelectorAll('[data-html]'),
section, j, jlen;
for (j = 0, jlen = sections.length; j < jlen; j++) {
section = sections[j];
if (section.getAttribute('data-html').length) {
var xhr = new XMLHttpRequest(),
url = section.getAttribute('data-html'),
cb = function () {
if (xhr.readyState === 4) {
if (
(xhr.status >= 200 && xhr.status < 300) ||
xhr.status === 0 // file protocol yields status code 0 (useful for local debug, mobile applications etc.)
) {
section.innerHTML = xhr.responseText;
} else {
section.outerHTML = '<section data-state="alert">ERROR: The attempt to fetch ' + url + ' failed with the HTTP status ' + xhr.status + '. Check your browser\'s JavaScript console for more details.</p></section>';
}
}
};
xhr.onreadystatechange = cb;
xhr.open('GET', url, false);
try {
xhr.send();
} catch (e) {
alert('Failed to get file' + url + '.' + e);
}
}
}
};
querySlidingHtml();
})();
{
"name": "nodejs",
"version": "0.0.0",
"private": true,
"devDependencies": {
"grunt": "^0.4.5",
"grunt-contrib-connect": "^0.9.0",
"grunt-contrib-watch": "^0.6.1",
"grunt-contrib-copy": "^0.7.0",
"grunt-contrib-jshint": "^0.10.0",
"load-grunt-tasks": "^1.0.0",
"grunt-coffeelint": "0.0.13"
},
"engines": {
"node": ">=0.10.0",
"npm": ">=1.3.7"
},
"scripts": {
"test": "grunt test"
}
}
# NodeJS
From the terminal, pop in:
```yo reveal:slide "Slide Title"```
Available options:
```--markdown --attributes --notes```
[
"nodejs.md",
"who-is-this-kid.md"
]
\ No newline at end of file
## Intro To NodeJS
## Who is this kid?
* Hi, I'm Stefan, I go here
* Junior
* Started working for CSE two years ago as helpdesk, now in a (very) part time developer role
* You should totally use gitlab.cs btw
* Wrote a lot of JS/node this summer for my internship
* I am ***not*** a node wizard
\ No newline at end of file
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>NodeJS</title>
<meta name="apple-mobile-web-app-capable" content="yes" />
<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="bower_components/reveal.js/css/reveal.min.css">
<link rel="stylesheet" href="bower_components/reveal.js/css/theme/solarized.css" id="theme">
<!-- For syntax highlighting -->
<link rel="stylesheet" href="bower_components/reveal-highlight-themes/styles/zenburn.css" id="highlight-theme">
<!-- If the query includes 'print-pdf', use the PDF print sheet -->
<script>
if( window.location.search.match( /print-pdf/gi ) ) {
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = 'bower_components/reveal.js/css/print/pdf.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
}
</script>
<!--[if lt IE 9]>
<script src="lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="reveal">
<div class="slides">
<% _.forEach(slides, function(slide) { %>
<% if (!_.isArray(slide)) { %>
<%= section(slide) %>
<% } %>
<% if (_.isArray(slide)) { %>
<section>
<% _.forEach(slide, function(verticalslide) { %>
<%= section(verticalslide) %>
<% }); %>
</section>
<% } %>
<% }); %>
</div>
</div>
<script src="bower_components/reveal.js/lib/js/head.min.js"></script>
<script src="bower_components/reveal.js/js/reveal.min.js"></script>
<script>
// Configure Reveal
// Full list of configuration options available here:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
center: true,
theme: Reveal.getQueryHash().theme, // available themes are in /css/theme
transition: Reveal.getQueryHash().transition || 'default', // default/cube/page/concave/zoom/linear/fade/none
// Optional libraries used to extend on reveal.js
dependencies: [
{ src: 'bower_components/reveal.js/lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: 'bower_components/reveal.js/plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'bower_components/reveal.js/plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'bower_components/reveal.js/plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: 'bower_components/reveal.js/plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } },
{ src: 'bower_components/reveal.js/plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } },
// { src: 'bower_components/reveal.js/plugin/search/search.js', async: true, condition: function() { return !!document.body.classList; } }
//{ src: 'bower_components/reveal.js/plugin/remotes/remotes.js', async: true, condition: function() { return !!document.body.classList; } }
{ src: 'js/loadhtmlslides.js', condition: function() { return !!document.querySelector( '[data-html]' ); } }
]
});
</script>
</body>
</html>
<% if (!_.isString(slide) && !_.isArray(slide) && _.isObject(slide)) { %>
<section <%= _.map(slide.attr, function (val, attr) {return attr + '="' + val + '"'}).join(' ')%> <% if (_.isString(slide.filename)) { %>data-<% if (slide.filename.indexOf('.html') !== -1) { %>html<% } else { %>markdown<% }%>="slides/<%= slide.filename %>"<% } %>></section>
<% } %><% if (_.isString(slide)) { %>
<section data-<% if (slide.indexOf('.html') !== -1) { %>html<% } else { %>markdown<% }%>="slides/<%= slide %>"></section>
<% } %>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment