jekyll-theme-newtype 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +66 -0
- data/_includes/footer.html +4 -0
- data/_includes/head.html +22 -0
- data/_includes/header.html +31 -0
- data/_includes/navbar.html +9 -0
- data/_includes/post_preview.html +10 -0
- data/_includes/sidebar.html +1 -0
- data/_layouts/category_index.html +11 -0
- data/_layouts/default.html +29 -0
- data/_layouts/home.html +7 -0
- data/_layouts/page.html +5 -0
- data/_layouts/post.html +5 -0
- data/_layouts/slides.html +50 -0
- data/_sass/newtype.scss +32 -0
- data/_sass/skeleton/base/_base-styles.scss +37 -0
- data/_sass/skeleton/base/_functions.scss +17 -0
- data/_sass/skeleton/base/_normalize.scss +428 -0
- data/_sass/skeleton/base/_typography.scss +29 -0
- data/_sass/skeleton/base/_utils.scss +20 -0
- data/_sass/skeleton/base/_variables.scss +32 -0
- data/_sass/skeleton/modules/_buttons.scss +147 -0
- data/_sass/skeleton/modules/_code.scss +18 -0
- data/_sass/skeleton/modules/_forms.scss +88 -0
- data/_sass/skeleton/modules/_grid.scss +116 -0
- data/_sass/skeleton/modules/_lists.scss +32 -0
- data/_sass/skeleton/modules/_media-queries.scss +22 -0
- data/_sass/skeleton/modules/_spacing.scss +26 -0
- data/_sass/skeleton/modules/_tables.scss +19 -0
- data/_sass/skeleton/normalize.scss +427 -0
- data/_sass/skeleton/skeleton.scss +418 -0
- data/_sass/syntax.scss +60 -0
- data/assets/bullet.svg +13 -0
- data/assets/revealjs/.gitignore +13 -0
- data/assets/revealjs/.travis.yml +7 -0
- data/assets/revealjs/CONTRIBUTING.md +23 -0
- data/assets/revealjs/Gruntfile.js +192 -0
- data/assets/revealjs/LICENSE +19 -0
- data/assets/revealjs/README.md +1238 -0
- data/assets/revealjs/bower.json +27 -0
- data/assets/revealjs/css/print/paper.css +203 -0
- data/assets/revealjs/css/print/pdf.css +178 -0
- data/assets/revealjs/css/reveal.css +1555 -0
- data/assets/revealjs/css/reveal.scss +1717 -0
- data/assets/revealjs/css/theme/README.md +21 -0
- data/assets/revealjs/css/theme/beige.css +268 -0
- data/assets/revealjs/css/theme/black.css +264 -0
- data/assets/revealjs/css/theme/blood.css +287 -0
- data/assets/revealjs/css/theme/league.css +270 -0
- data/assets/revealjs/css/theme/moon.css +268 -0
- data/assets/revealjs/css/theme/night.css +262 -0
- data/assets/revealjs/css/theme/serif.css +264 -0
- data/assets/revealjs/css/theme/simple.css +267 -0
- data/assets/revealjs/css/theme/sky.css +271 -0
- data/assets/revealjs/css/theme/solarized.css +268 -0
- data/assets/revealjs/css/theme/source/beige.scss +39 -0
- data/assets/revealjs/css/theme/source/black.scss +49 -0
- data/assets/revealjs/css/theme/source/blood.scss +78 -0
- data/assets/revealjs/css/theme/source/league.scss +34 -0
- data/assets/revealjs/css/theme/source/moon.scss +57 -0
- data/assets/revealjs/css/theme/source/night.scss +34 -0
- data/assets/revealjs/css/theme/source/serif.scss +35 -0
- data/assets/revealjs/css/theme/source/simple.scss +43 -0
- data/assets/revealjs/css/theme/source/sky.scss +46 -0
- data/assets/revealjs/css/theme/source/solarized.scss +63 -0
- data/assets/revealjs/css/theme/source/white.scss +49 -0
- data/assets/revealjs/css/theme/template/mixins.scss +29 -0
- data/assets/revealjs/css/theme/template/settings.scss +43 -0
- data/assets/revealjs/css/theme/template/theme.scss +316 -0
- data/assets/revealjs/css/theme/white.css +264 -0
- data/assets/revealjs/demo.html +410 -0
- data/assets/revealjs/index.html +49 -0
- data/assets/revealjs/js/reveal.js +5239 -0
- data/assets/revealjs/lib/css/zenburn.css +80 -0
- data/assets/revealjs/lib/font/league-gothic/LICENSE +2 -0
- data/assets/revealjs/lib/font/league-gothic/league-gothic.css +10 -0
- data/assets/revealjs/lib/font/league-gothic/league-gothic.eot +0 -0
- data/assets/revealjs/lib/font/league-gothic/league-gothic.ttf +0 -0
- data/assets/revealjs/lib/font/league-gothic/league-gothic.woff +0 -0
- data/assets/revealjs/lib/font/source-sans-pro/LICENSE +45 -0
- data/assets/revealjs/lib/font/source-sans-pro/source-sans-pro-italic.eot +0 -0
- data/assets/revealjs/lib/font/source-sans-pro/source-sans-pro-italic.ttf +0 -0
- data/assets/revealjs/lib/font/source-sans-pro/source-sans-pro-italic.woff +0 -0
- data/assets/revealjs/lib/font/source-sans-pro/source-sans-pro-regular.eot +0 -0
- data/assets/revealjs/lib/font/source-sans-pro/source-sans-pro-regular.ttf +0 -0
- data/assets/revealjs/lib/font/source-sans-pro/source-sans-pro-regular.woff +0 -0
- data/assets/revealjs/lib/font/source-sans-pro/source-sans-pro-semibold.eot +0 -0
- data/assets/revealjs/lib/font/source-sans-pro/source-sans-pro-semibold.ttf +0 -0
- data/assets/revealjs/lib/font/source-sans-pro/source-sans-pro-semibold.woff +0 -0
- data/assets/revealjs/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot +0 -0
- data/assets/revealjs/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf +0 -0
- data/assets/revealjs/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff +0 -0
- data/assets/revealjs/lib/font/source-sans-pro/source-sans-pro.css +39 -0
- data/assets/revealjs/lib/js/classList.js +2 -0
- data/assets/revealjs/lib/js/head.min.js +9 -0
- data/assets/revealjs/lib/js/html5shiv.js +7 -0
- data/assets/revealjs/package.json +43 -0
- data/assets/revealjs/plugin/highlight/highlight.js +77 -0
- data/assets/revealjs/plugin/markdown/markdown.js +412 -0
- data/assets/revealjs/plugin/markdown/marked.js +6 -0
- data/assets/revealjs/plugin/math/math.js +67 -0
- data/assets/revealjs/plugin/multiplex/client.js +13 -0
- data/assets/revealjs/plugin/multiplex/index.js +64 -0
- data/assets/revealjs/plugin/multiplex/master.js +34 -0
- data/assets/revealjs/plugin/multiplex/package.json +19 -0
- data/assets/revealjs/plugin/notes/notes.html +759 -0
- data/assets/revealjs/plugin/notes/notes.js +155 -0
- data/assets/revealjs/plugin/notes-server/client.js +65 -0
- data/assets/revealjs/plugin/notes-server/index.js +69 -0
- data/assets/revealjs/plugin/notes-server/notes.html +585 -0
- data/assets/revealjs/plugin/print-pdf/print-pdf.js +69 -0
- data/assets/revealjs/plugin/search/search.js +206 -0
- data/assets/revealjs/plugin/zoom-js/zoom.js +272 -0
- data/assets/revealjs/test/examples/assets/image1.png +0 -0
- data/assets/revealjs/test/examples/assets/image2.png +0 -0
- data/assets/revealjs/test/examples/barebones.html +41 -0
- data/assets/revealjs/test/examples/embedded-media.html +49 -0
- data/assets/revealjs/test/examples/math.html +185 -0
- data/assets/revealjs/test/examples/slide-backgrounds.html +144 -0
- data/assets/revealjs/test/examples/slide-transitions.html +101 -0
- data/assets/revealjs/test/qunit-1.12.0.css +244 -0
- data/assets/revealjs/test/qunit-1.12.0.js +2212 -0
- data/assets/revealjs/test/test-markdown-element-attributes.html +134 -0
- data/assets/revealjs/test/test-markdown-element-attributes.js +46 -0
- data/assets/revealjs/test/test-markdown-external.html +36 -0
- data/assets/revealjs/test/test-markdown-external.js +24 -0
- data/assets/revealjs/test/test-markdown-options.html +41 -0
- data/assets/revealjs/test/test-markdown-options.js +26 -0
- data/assets/revealjs/test/test-markdown-slide-attributes.html +128 -0
- data/assets/revealjs/test/test-markdown-slide-attributes.js +47 -0
- data/assets/revealjs/test/test-markdown.html +52 -0
- data/assets/revealjs/test/test-markdown.js +15 -0
- data/assets/revealjs/test/test-pdf.html +83 -0
- data/assets/revealjs/test/test-pdf.js +15 -0
- data/assets/revealjs/test/test.html +86 -0
- data/assets/revealjs/test/test.js +597 -0
- data/assets/social-github.svg +14 -0
- data/assets/social-twitter.png +0 -0
- data/assets/social-twitter.svg +12 -0
- data/assets/style.scss +4 -0
- metadata +226 -0
@@ -0,0 +1,155 @@
|
|
1
|
+
/**
|
2
|
+
* Handles opening of and synchronization with the reveal.js
|
3
|
+
* notes window.
|
4
|
+
*
|
5
|
+
* Handshake process:
|
6
|
+
* 1. This window posts 'connect' to notes window
|
7
|
+
* - Includes URL of presentation to show
|
8
|
+
* 2. Notes window responds with 'connected' when it is available
|
9
|
+
* 3. This window proceeds to send the current presentation state
|
10
|
+
* to the notes window
|
11
|
+
*/
|
12
|
+
var RevealNotes = (function() {
|
13
|
+
|
14
|
+
function openNotes( notesFilePath ) {
|
15
|
+
|
16
|
+
if( !notesFilePath ) {
|
17
|
+
var jsFileLocation = document.querySelector('script[src$="notes.js"]').src; // this js file path
|
18
|
+
jsFileLocation = jsFileLocation.replace(/notes\.js(\?.*)?$/, ''); // the js folder path
|
19
|
+
notesFilePath = jsFileLocation + 'notes.html';
|
20
|
+
}
|
21
|
+
|
22
|
+
var notesPopup = window.open( notesFilePath, 'reveal.js - Notes', 'width=1100,height=700' );
|
23
|
+
|
24
|
+
// Allow popup window access to Reveal API
|
25
|
+
notesPopup.Reveal = this.Reveal;
|
26
|
+
|
27
|
+
/**
|
28
|
+
* Connect to the notes window through a postmessage handshake.
|
29
|
+
* Using postmessage enables us to work in situations where the
|
30
|
+
* origins differ, such as a presentation being opened from the
|
31
|
+
* file system.
|
32
|
+
*/
|
33
|
+
function connect() {
|
34
|
+
// Keep trying to connect until we get a 'connected' message back
|
35
|
+
var connectInterval = setInterval( function() {
|
36
|
+
notesPopup.postMessage( JSON.stringify( {
|
37
|
+
namespace: 'reveal-notes',
|
38
|
+
type: 'connect',
|
39
|
+
url: window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search,
|
40
|
+
state: Reveal.getState()
|
41
|
+
} ), '*' );
|
42
|
+
}, 500 );
|
43
|
+
|
44
|
+
window.addEventListener( 'message', function( event ) {
|
45
|
+
var data = JSON.parse( event.data );
|
46
|
+
if( data && data.namespace === 'reveal-notes' && data.type === 'connected' ) {
|
47
|
+
clearInterval( connectInterval );
|
48
|
+
onConnected();
|
49
|
+
}
|
50
|
+
} );
|
51
|
+
}
|
52
|
+
|
53
|
+
/**
|
54
|
+
* Posts the current slide data to the notes window
|
55
|
+
*/
|
56
|
+
function post( event ) {
|
57
|
+
|
58
|
+
var slideElement = Reveal.getCurrentSlide(),
|
59
|
+
notesElement = slideElement.querySelector( 'aside.notes' ),
|
60
|
+
fragmentElement = slideElement.querySelector( '.current-fragment' );
|
61
|
+
|
62
|
+
var messageData = {
|
63
|
+
namespace: 'reveal-notes',
|
64
|
+
type: 'state',
|
65
|
+
notes: '',
|
66
|
+
markdown: false,
|
67
|
+
whitespace: 'normal',
|
68
|
+
state: Reveal.getState()
|
69
|
+
};
|
70
|
+
|
71
|
+
// Look for notes defined in a slide attribute
|
72
|
+
if( slideElement.hasAttribute( 'data-notes' ) ) {
|
73
|
+
messageData.notes = slideElement.getAttribute( 'data-notes' );
|
74
|
+
messageData.whitespace = 'pre-wrap';
|
75
|
+
}
|
76
|
+
|
77
|
+
// Look for notes defined in a fragment
|
78
|
+
if( fragmentElement ) {
|
79
|
+
var fragmentNotes = fragmentElement.querySelector( 'aside.notes' );
|
80
|
+
if( fragmentNotes ) {
|
81
|
+
notesElement = fragmentNotes;
|
82
|
+
}
|
83
|
+
else if( fragmentElement.hasAttribute( 'data-notes' ) ) {
|
84
|
+
messageData.notes = fragmentElement.getAttribute( 'data-notes' );
|
85
|
+
messageData.whitespace = 'pre-wrap';
|
86
|
+
|
87
|
+
// In case there are slide notes
|
88
|
+
notesElement = null;
|
89
|
+
}
|
90
|
+
}
|
91
|
+
|
92
|
+
// Look for notes defined in an aside element
|
93
|
+
if( notesElement ) {
|
94
|
+
messageData.notes = notesElement.innerHTML;
|
95
|
+
messageData.markdown = typeof notesElement.getAttribute( 'data-markdown' ) === 'string';
|
96
|
+
}
|
97
|
+
|
98
|
+
notesPopup.postMessage( JSON.stringify( messageData ), '*' );
|
99
|
+
|
100
|
+
}
|
101
|
+
|
102
|
+
/**
|
103
|
+
* Called once we have established a connection to the notes
|
104
|
+
* window.
|
105
|
+
*/
|
106
|
+
function onConnected() {
|
107
|
+
|
108
|
+
// Monitor events that trigger a change in state
|
109
|
+
Reveal.addEventListener( 'slidechanged', post );
|
110
|
+
Reveal.addEventListener( 'fragmentshown', post );
|
111
|
+
Reveal.addEventListener( 'fragmenthidden', post );
|
112
|
+
Reveal.addEventListener( 'overviewhidden', post );
|
113
|
+
Reveal.addEventListener( 'overviewshown', post );
|
114
|
+
Reveal.addEventListener( 'paused', post );
|
115
|
+
Reveal.addEventListener( 'resumed', post );
|
116
|
+
|
117
|
+
// Post the initial state
|
118
|
+
post();
|
119
|
+
|
120
|
+
}
|
121
|
+
|
122
|
+
connect();
|
123
|
+
|
124
|
+
}
|
125
|
+
|
126
|
+
if( !/receiver/i.test( window.location.search ) ) {
|
127
|
+
|
128
|
+
// If the there's a 'notes' query set, open directly
|
129
|
+
if( window.location.search.match( /(\?|\&)notes/gi ) !== null ) {
|
130
|
+
openNotes();
|
131
|
+
}
|
132
|
+
|
133
|
+
// Open the notes when the 's' key is hit
|
134
|
+
document.addEventListener( 'keydown', function( event ) {
|
135
|
+
// Disregard the event if the target is editable or a
|
136
|
+
// modifier is present
|
137
|
+
if ( document.querySelector( ':focus' ) !== null || event.shiftKey || event.altKey || event.ctrlKey || event.metaKey ) return;
|
138
|
+
|
139
|
+
// Disregard the event if keyboard is disabled
|
140
|
+
if ( Reveal.getConfig().keyboard === false ) return;
|
141
|
+
|
142
|
+
if( event.keyCode === 83 ) {
|
143
|
+
event.preventDefault();
|
144
|
+
openNotes();
|
145
|
+
}
|
146
|
+
}, false );
|
147
|
+
|
148
|
+
// Show our keyboard shortcut in the reveal.js help overlay
|
149
|
+
if( window.Reveal ) Reveal.registerKeyboardShortcut( 'S', 'Speaker notes view' );
|
150
|
+
|
151
|
+
}
|
152
|
+
|
153
|
+
return { open: openNotes };
|
154
|
+
|
155
|
+
})();
|
@@ -0,0 +1,65 @@
|
|
1
|
+
(function() {
|
2
|
+
|
3
|
+
// don't emit events from inside the previews themselves
|
4
|
+
if( window.location.search.match( /receiver/gi ) ) { return; }
|
5
|
+
|
6
|
+
var socket = io.connect( window.location.origin ),
|
7
|
+
socketId = Math.random().toString().slice( 2 );
|
8
|
+
|
9
|
+
console.log( 'View slide notes at ' + window.location.origin + '/notes/' + socketId );
|
10
|
+
|
11
|
+
window.open( window.location.origin + '/notes/' + socketId, 'notes-' + socketId );
|
12
|
+
|
13
|
+
/**
|
14
|
+
* Posts the current slide data to the notes window
|
15
|
+
*/
|
16
|
+
function post() {
|
17
|
+
|
18
|
+
var slideElement = Reveal.getCurrentSlide(),
|
19
|
+
notesElement = slideElement.querySelector( 'aside.notes' );
|
20
|
+
|
21
|
+
var messageData = {
|
22
|
+
notes: '',
|
23
|
+
markdown: false,
|
24
|
+
socketId: socketId,
|
25
|
+
state: Reveal.getState()
|
26
|
+
};
|
27
|
+
|
28
|
+
// Look for notes defined in a slide attribute
|
29
|
+
if( slideElement.hasAttribute( 'data-notes' ) ) {
|
30
|
+
messageData.notes = slideElement.getAttribute( 'data-notes' );
|
31
|
+
}
|
32
|
+
|
33
|
+
// Look for notes defined in an aside element
|
34
|
+
if( notesElement ) {
|
35
|
+
messageData.notes = notesElement.innerHTML;
|
36
|
+
messageData.markdown = typeof notesElement.getAttribute( 'data-markdown' ) === 'string';
|
37
|
+
}
|
38
|
+
|
39
|
+
socket.emit( 'statechanged', messageData );
|
40
|
+
|
41
|
+
}
|
42
|
+
|
43
|
+
// When a new notes window connects, post our current state
|
44
|
+
socket.on( 'new-subscriber', function( data ) {
|
45
|
+
post();
|
46
|
+
} );
|
47
|
+
|
48
|
+
// When the state changes from inside of the speaker view
|
49
|
+
socket.on( 'statechanged-speaker', function( data ) {
|
50
|
+
Reveal.setState( data.state );
|
51
|
+
} );
|
52
|
+
|
53
|
+
// Monitor events that trigger a change in state
|
54
|
+
Reveal.addEventListener( 'slidechanged', post );
|
55
|
+
Reveal.addEventListener( 'fragmentshown', post );
|
56
|
+
Reveal.addEventListener( 'fragmenthidden', post );
|
57
|
+
Reveal.addEventListener( 'overviewhidden', post );
|
58
|
+
Reveal.addEventListener( 'overviewshown', post );
|
59
|
+
Reveal.addEventListener( 'paused', post );
|
60
|
+
Reveal.addEventListener( 'resumed', post );
|
61
|
+
|
62
|
+
// Post the initial state
|
63
|
+
post();
|
64
|
+
|
65
|
+
}());
|
@@ -0,0 +1,69 @@
|
|
1
|
+
var http = require('http');
|
2
|
+
var express = require('express');
|
3
|
+
var fs = require('fs');
|
4
|
+
var io = require('socket.io');
|
5
|
+
var Mustache = require('mustache');
|
6
|
+
|
7
|
+
var app = express();
|
8
|
+
var staticDir = express.static;
|
9
|
+
var server = http.createServer(app);
|
10
|
+
|
11
|
+
io = io(server);
|
12
|
+
|
13
|
+
var opts = {
|
14
|
+
port : 1947,
|
15
|
+
baseDir : __dirname + '/../../'
|
16
|
+
};
|
17
|
+
|
18
|
+
io.on( 'connection', function( socket ) {
|
19
|
+
|
20
|
+
socket.on( 'new-subscriber', function( data ) {
|
21
|
+
socket.broadcast.emit( 'new-subscriber', data );
|
22
|
+
});
|
23
|
+
|
24
|
+
socket.on( 'statechanged', function( data ) {
|
25
|
+
delete data.state.overview;
|
26
|
+
socket.broadcast.emit( 'statechanged', data );
|
27
|
+
});
|
28
|
+
|
29
|
+
socket.on( 'statechanged-speaker', function( data ) {
|
30
|
+
delete data.state.overview;
|
31
|
+
socket.broadcast.emit( 'statechanged-speaker', data );
|
32
|
+
});
|
33
|
+
|
34
|
+
});
|
35
|
+
|
36
|
+
[ 'css', 'js', 'images', 'plugin', 'lib' ].forEach( function( dir ) {
|
37
|
+
app.use( '/' + dir, staticDir( opts.baseDir + dir ) );
|
38
|
+
});
|
39
|
+
|
40
|
+
app.get('/', function( req, res ) {
|
41
|
+
|
42
|
+
res.writeHead( 200, { 'Content-Type': 'text/html' } );
|
43
|
+
fs.createReadStream( opts.baseDir + '/index.html' ).pipe( res );
|
44
|
+
|
45
|
+
});
|
46
|
+
|
47
|
+
app.get( '/notes/:socketId', function( req, res ) {
|
48
|
+
|
49
|
+
fs.readFile( opts.baseDir + 'plugin/notes-server/notes.html', function( err, data ) {
|
50
|
+
res.send( Mustache.to_html( data.toString(), {
|
51
|
+
socketId : req.params.socketId
|
52
|
+
}));
|
53
|
+
});
|
54
|
+
|
55
|
+
});
|
56
|
+
|
57
|
+
// Actually listen
|
58
|
+
server.listen( opts.port || null );
|
59
|
+
|
60
|
+
var brown = '\033[33m',
|
61
|
+
green = '\033[32m',
|
62
|
+
reset = '\033[0m';
|
63
|
+
|
64
|
+
var slidesLocation = 'http://localhost' + ( opts.port ? ( ':' + opts.port ) : '' );
|
65
|
+
|
66
|
+
console.log( brown + 'reveal.js - Speaker Notes' + reset );
|
67
|
+
console.log( '1. Open the slides at ' + green + slidesLocation + reset );
|
68
|
+
console.log( '2. Click on the link in your JS console to go to the notes page' );
|
69
|
+
console.log( '3. Advance through your slides and your notes will advance automatically' );
|