slideshow 0.8.1 → 0.8.2
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.
- data/History.txt +5 -0
- data/Manifest.txt +2 -0
- data/lib/slideshow.rb +1 -1
- data/templates/s6.txt +7 -1
- data/templates/s6/footer.pdf.html.erb +3 -0
- data/templates/s6/header.pdf.html.erb +53 -0
- data/templates/s6/slides.core.js +7 -3
- data/templates/s6/slides.js +20 -2
- metadata +6 -4
data/History.txt
CHANGED
data/Manifest.txt
CHANGED
@@ -32,7 +32,9 @@ templates/s6.txt
|
|
32
32
|
templates/s6.txt.gen
|
33
33
|
templates/s6.txt.sample
|
34
34
|
templates/s6/footer.html.erb
|
35
|
+
templates/s6/footer.pdf.html.erb
|
35
36
|
templates/s6/header.html.erb
|
37
|
+
templates/s6/header.pdf.html.erb
|
36
38
|
templates/s6/jquery.js
|
37
39
|
templates/s6/outline.css
|
38
40
|
templates/s6/print.css
|
data/lib/slideshow.rb
CHANGED
data/templates/s6.txt
CHANGED
@@ -8,4 +8,10 @@ s6/print.css
|
|
8
8
|
s6/slides.css
|
9
9
|
s6/jquery.js
|
10
10
|
s6/slides.js
|
11
|
-
s6/slides.core.js
|
11
|
+
s6/slides.core.js
|
12
|
+
|
13
|
+
# template for pdf generation
|
14
|
+
# -- use html-to-pdf tool (such as wkhtmltopdf, prince, etc) to generate pdf
|
15
|
+
# -- from javascript free web page
|
16
|
+
|
17
|
+
__file__.pdf.html s6/header.pdf.html.erb + s6/footer.pdf.html.erb
|
@@ -0,0 +1,53 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
5
|
+
<title><%= @headers['title'] %></title>
|
6
|
+
|
7
|
+
<%= content_for :head %>
|
8
|
+
|
9
|
+
<style>
|
10
|
+
html, body { margin: 0; padding: 0; }
|
11
|
+
|
12
|
+
body { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; }
|
13
|
+
|
14
|
+
a:link, a:visited { color: black; }
|
15
|
+
|
16
|
+
h1 { font-size: 30pt; }
|
17
|
+
h2 { font-size: 28pt; }
|
18
|
+
h3 { font-size: 25pt; }
|
19
|
+
p, li, td, th { font-size: 18pt; }
|
20
|
+
|
21
|
+
pre { font-size: 14pt; }
|
22
|
+
|
23
|
+
pre.code {
|
24
|
+
background-color: azure;
|
25
|
+
padding: 5px;
|
26
|
+
}
|
27
|
+
|
28
|
+
ul { list-style-type: square; }
|
29
|
+
|
30
|
+
.slide { page-break-after: always;
|
31
|
+
min-height: 100mm;
|
32
|
+
padding: 40px;
|
33
|
+
|
34
|
+
border: 1px dotted black;
|
35
|
+
|
36
|
+
/*
|
37
|
+
background: -moz-linear-gradient( top, maroon, red);
|
38
|
+
*/
|
39
|
+
}
|
40
|
+
|
41
|
+
<%= content_for :css %>
|
42
|
+
|
43
|
+
/*
|
44
|
+
for princexml (CSS3 paged media support)
|
45
|
+
@page { size: A4 landscape }
|
46
|
+
*/
|
47
|
+
</style>
|
48
|
+
|
49
|
+
</head>
|
50
|
+
<body>
|
51
|
+
|
52
|
+
<div class="presentation">
|
53
|
+
|
data/templates/s6/slides.core.js
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
var snum = 1; /* current slide # (non-zero based index e.g. starting with 1) */
|
2
2
|
var smax = 1; /* max number of slides */
|
3
|
-
|
3
|
+
var incpos = 0; /* current step in slide */
|
4
4
|
var s6mode = true; /* are we in slide mode (in contrast to outline mode)? */
|
5
5
|
var defaultView = 'slideshow'; /* slideshow | outline */
|
6
6
|
|
7
7
|
|
8
8
|
function debug( msg )
|
9
9
|
{
|
10
|
-
|
11
|
-
|
10
|
+
if( window.console )
|
11
|
+
console.log( '[debug] ' + msg );
|
12
12
|
}
|
13
13
|
|
14
14
|
function showHide(action)
|
@@ -37,6 +37,9 @@
|
|
37
37
|
|
38
38
|
function updatePermaLink() {
|
39
39
|
$('#plink').get(0).href = window.location.pathname + '#slide' + snum;
|
40
|
+
|
41
|
+
/* todo: unify hash marks??; use #1 for div ids instead of #slide1? */
|
42
|
+
window.location.hash = '#'+snum;
|
40
43
|
}
|
41
44
|
|
42
45
|
function goTo( target ) {
|
@@ -165,6 +168,7 @@ function toggle() {
|
|
165
168
|
|
166
169
|
populateJumpList();
|
167
170
|
updateCurrentSlideCounter();
|
171
|
+
updatePermaLink();
|
168
172
|
}
|
169
173
|
|
170
174
|
function addSlideIds() {
|
data/templates/s6/slides.js
CHANGED
@@ -23,6 +23,14 @@ $(document).ready(function(){
|
|
23
23
|
}
|
24
24
|
else
|
25
25
|
{
|
26
|
+
|
27
|
+
/* store possible slidenumber from hash */
|
28
|
+
/* todo: use regex to extract number
|
29
|
+
might be #slide1 or just #1
|
30
|
+
*/
|
31
|
+
var gotoSlideNum = parseInt( window.location.hash.substring(1) );
|
32
|
+
debug( "gotoSlideNum=" + gotoSlideNum );
|
33
|
+
|
26
34
|
defaultCheck();
|
27
35
|
addSlideIds();
|
28
36
|
createControls();
|
@@ -31,11 +39,21 @@ $(document).ready(function(){
|
|
31
39
|
/* if( !$.browser.opera ) */
|
32
40
|
notOperaFix();
|
33
41
|
|
34
|
-
|
42
|
+
steps = collectSteps();
|
35
43
|
|
44
|
+
if( !isNaN( gotoSlideNum ))
|
45
|
+
{
|
46
|
+
debug( "restoring slide on (re)load #: " + gotoSlideNum );
|
47
|
+
goTo( gotoSlideNum );
|
48
|
+
}
|
49
|
+
|
50
|
+
|
36
51
|
if( defaultView == 'outline' )
|
37
52
|
toggle();
|
38
|
-
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
|
39
57
|
document.onkeyup = keys;
|
40
58
|
}
|
41
59
|
});
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slideshow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 59
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 8
|
9
|
-
-
|
10
|
-
version: 0.8.
|
9
|
+
- 2
|
10
|
+
version: 0.8.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Gerald Bauer
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-06-
|
18
|
+
date: 2010-06-19 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -134,7 +134,9 @@ files:
|
|
134
134
|
- templates/s6.txt.gen
|
135
135
|
- templates/s6.txt.sample
|
136
136
|
- templates/s6/footer.html.erb
|
137
|
+
- templates/s6/footer.pdf.html.erb
|
137
138
|
- templates/s6/header.html.erb
|
139
|
+
- templates/s6/header.pdf.html.erb
|
138
140
|
- templates/s6/jquery.js
|
139
141
|
- templates/s6/outline.css
|
140
142
|
- templates/s6/print.css
|