slideshow 0.5 → 0.5.1

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.
@@ -0,0 +1,27 @@
1
+ /* don't change this unless you want the layout stuff to show up in the outline view! */
2
+
3
+ .layout *, #footer *, #navLinks * { display: none; }
4
+
5
+ #controls, #navLinks, #toggle {
6
+ display: block; visibility: visible; margin: 0; padding: 0;}
7
+
8
+ #toggle { position: fixed; top: 0; right: 0; padding: 0.5em; }
9
+ #toggle {border: 1px solid; border-width: 0 0 1px 1px; background: #FFF;}
10
+
11
+
12
+ /* making the outline look pretty-ish */
13
+
14
+ #slide1, #slide1 h1, #slide1 h2, #slide1 h3, #slide1 h4 {border: none; margin: 0;}
15
+ #slide1 h1 {padding-top: 1.5em;}
16
+
17
+ .slide { margin: 1.5em 0 0; border-top: 1px solid #888; }
18
+ .slide h1 { border-bottom: 1px solid #AAA; }
19
+
20
+ #microsoft {
21
+ display: none;
22
+ border: red solid thick;
23
+ padding: 1em;
24
+ font-family: sans-serif;
25
+ font-weight: bold;
26
+ margin-bottom: 2em;
27
+ }
@@ -0,0 +1 @@
1
+ /* The following rule is necessary to have all slides appear in print! DO NOT REMOVE IT! */
@@ -0,0 +1,76 @@
1
+ .slide { display: none; }
2
+ #slide1 { display: block; }
3
+ #microsoft { display: none; }
4
+
5
+ .slide { position: absolute; }
6
+ #header, #footer { position: fixed; }
7
+
8
+ .layout { display: block; }
9
+ .notes { display: none; } /* handout notes/note (use note? handout? notes? */
10
+
11
+ #header, #footer, .slide { width: 100%; top: 0; left: 0; }
12
+ #header { top: 0; height: 0.5em; z-index: 1;}
13
+
14
+ #footer { top: auto; bottom: 0; height: 1em; z-index: 5;}
15
+ #footer { font-size: 100%; font-weight: bold; padding: 1em 0;}
16
+ #footer h1 { display: block; margin: 0; padding: 0 1em; font-size: 0.5em; }
17
+ #footer h2 { display: block; margin: 0; padding: 0 1em; font-size: 0.5em; font-style: italic; }
18
+
19
+
20
+
21
+ #controls { position: fixed; left: 60%; bottom: 0; width: 40%; z-index: 100;
22
+ text-align: right;
23
+ font: bold 1.2em Verdana, Helvetica, sans-serif; }
24
+
25
+ #controls :focus { outline: 1px dotted white;}
26
+
27
+ #controls #navLinks { text-align: right; margin: 0; visibility: hidden; }
28
+
29
+ #controls #navLinks a { padding: 0; margin: 0 0.5em; cursor: pointer; border: none; }
30
+
31
+ #controls #navLinks :link,
32
+ #controls #navLinks :visited {text-decoration: none; }
33
+
34
+ #controls #navList #jumplist { background: white; color: black; }
35
+
36
+
37
+ #currentSlide { position: fixed; width: 10%; left: 45%; bottom: 1em; z-index: 10;}
38
+ #currentSlide { text-align: center; font-size: 0.8em; }
39
+ #currentSlide :link,
40
+ #currentSlide :visited {text-decoration: none; }
41
+
42
+ .presentation { margin: 0; padding: 0; }
43
+ .slide { margin: 0 0 0 0; height: 96%; }
44
+ .slide { overflow-x: hidden; overflow-y: auto; }
45
+ .slide { top: 0; width: 92%; padding: 2% 4% 0 4%; z-index: 2; list-style: none;}
46
+
47
+ /* .step { visibility: hidden; } */
48
+
49
+ /* enable svg backgrounds for gradient themes */
50
+ div.background { position: fixed; left: 0px; right: 0px; top: 0px; bottom: 0px; z-index: -1; }
51
+ body { opacity: .99; }
52
+
53
+ html, body { margin: 0; padding: 0; }
54
+
55
+
56
+
57
+
58
+ /*
59
+ div#header {background: #FCC;}
60
+ div#footer {background: #CCF;}
61
+ div#controls {background: #BBD;}
62
+ div#currentSlide {background: #FFC;}
63
+ */
64
+
65
+
66
+
67
+
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
@@ -0,0 +1,201 @@
1
+ var snum = 1; /* current slide # (non-zero based index e.g. starting with 1) */
2
+ var smax = 1; /* max number of slides */
3
+ var s6mode = true; /* are we in slide mode (in contrast to outline mode)? */
4
+ var defaultView = 'slideshow'; /* slideshow | outline */
5
+
6
+ function showHide(action)
7
+ {
8
+ switch( action ) {
9
+ case 's': $( '#navLinks' ).css( 'visibility', 'visible' ); break;
10
+ case 'h': $( '#navLinks' ).css( 'visibility', 'hidden' ); break;
11
+ case 'c': /* toggle control panel */
12
+ if( $( '#navLinks' ).css( 'visibility' ) != 'visible' )
13
+ $( '#navLinks' ).css( 'visibility', 'visible' );
14
+ else
15
+ $( '#navLinks' ).css( 'visibility', 'hidden' );
16
+ break;
17
+ }
18
+ }
19
+
20
+ function currentSlide() {
21
+
22
+ $( '#currentSlide' ).html( '<a id="plink" href="">' +
23
+ '<span id="csHere">' + snum + '<\/span> ' +
24
+ '<span id="csSep">\/<\/span> ' +
25
+ '<span id="csTotal">' + smax + '<\/span>' +
26
+ '<\/a>' );
27
+ }
28
+
29
+
30
+ function permaLink() {
31
+ $('#plink').get(0).href = window.location.pathname + '#slide' + snum;
32
+ }
33
+
34
+ function goTo( target ) {
35
+ if( target > smax || target == snum ) return;
36
+ go( target - snum );
37
+ }
38
+
39
+ function go( step ) {
40
+
41
+ var cid = '#slide' + snum;
42
+
43
+ if (step != 'j') {
44
+ snum += step;
45
+ if( snum > smax ) snum = smax;
46
+ if (snum < 1) snum = 1;
47
+ } else
48
+ snum = parseInt( $( '#jumplist' ).val() );
49
+
50
+ var nid = '#slide' + snum;
51
+
52
+ $( cid ).hide();
53
+ $( nid ).show();
54
+
55
+ $('#jumplist').get(0).selectedIndex = (snum-1);
56
+ currentSlide();
57
+ permaLink();
58
+ }
59
+
60
+
61
+ function toggle() {
62
+
63
+ /* get stylesheets */
64
+ var slides = $('#slideProj').get(0);
65
+ var outline = $('#outlineStyle').get(0);
66
+
67
+ if( !slides.disabled ) {
68
+ slides.disabled = true;
69
+ outline.disabled = false;
70
+ s6mode = false;
71
+ $('.slide').each( function() { $(this).show(); } );
72
+ } else {
73
+ slides.disabled = false;
74
+ outline.disabled = true;
75
+ s6mode = true;
76
+ $('.slide').each( function(i) {
77
+ if( i == (snum-1) )
78
+ $(this).show();
79
+ else
80
+ $(this).hide();
81
+ });
82
+ }
83
+ }
84
+
85
+
86
+ function populateJumpList() {
87
+
88
+ var list = $('#jumplist').get(0);
89
+
90
+ $( '.slide' ).each( function(i) {
91
+ list.options[list.length] = new Option( (i+1)+' : '+ $(this).find('h1').text(), (i+1) );
92
+ });
93
+ }
94
+
95
+ function createControls() {
96
+
97
+ $('#controls').html( '<div id="navLinks">' +
98
+ '<a accesskey="t" id="toggle" href="#">&#216;<\/a>' +
99
+ '<a accesskey="z" id="prev" href="#">&laquo;<\/a>' +
100
+ '<a accesskey="x" id="next" href="#">&raquo;<\/a>' +
101
+ '<div id="navList"><select id="jumplist" /><\/div>' +
102
+ '<\/div>' );
103
+
104
+ $('#controls').mouseover( function() { showHide('s'); } );
105
+ $('#controls').mouseout( function() { showHide('h'); } );
106
+ $('#toggle').click( function() { toggle(); } );
107
+ $('#prev').click( function() { go(-1); } );
108
+ $('#next').click( function() { go(1); } );
109
+
110
+ $('#jumplist').change( function() { go('j'); } );
111
+
112
+ populateJumpList();
113
+ currentSlide();
114
+ }
115
+
116
+ function addSlideIds() {
117
+ $( '.slide' ).each( function(i) {
118
+ $(this).attr( 'id', 'slide'+(i+1) );
119
+ });
120
+
121
+ smax = $( '.slide' ).length;
122
+ }
123
+
124
+ function notOperaFix() {
125
+
126
+ $('#slideProj').attr( 'media','screen' );
127
+
128
+ var outline = $('#outlineStyle').get(0);
129
+ outline.disabled = true;
130
+ }
131
+
132
+
133
+ function defaultCheck() {
134
+ $( 'meta' ).each( function() {
135
+ if( $(this).attr( 'name' ) == 'defaultView' )
136
+ defaultView = $(this).attr( 'content' );
137
+ } );
138
+ }
139
+
140
+ function keys(key) {
141
+ if (!key) {
142
+ key = event;
143
+ key.which = key.keyCode;
144
+ }
145
+ if (key.which == 84) {
146
+ toggle();
147
+ return;
148
+ }
149
+ if (s6mode) {
150
+ switch (key.which) {
151
+ case 32: // spacebar
152
+ case 34: // page down
153
+ case 39: // rightkey
154
+ case 40: // downkey
155
+ go(1);
156
+ break;
157
+ case 33: // page up
158
+ case 37: // leftkey
159
+ case 38: // upkey
160
+ go(-1);
161
+ break;
162
+ case 36: // home
163
+ goTo(1);
164
+ break;
165
+ case 35: // end
166
+ goTo(smax);
167
+ break;
168
+ case 67: // c
169
+ showHide('c');
170
+ break;
171
+ }
172
+ }
173
+ return false;
174
+ }
175
+
176
+
177
+ $(document).ready(function(){
178
+
179
+ if( $.browser.msie )
180
+ {
181
+ $( '.layout *').hide();
182
+ $( '.presentation').hide();
183
+
184
+ $( '#microsoft' ).show();
185
+ }
186
+ else
187
+ {
188
+ defaultCheck();
189
+ addSlideIds();
190
+ createControls();
191
+
192
+ /* opera is the only browser currently supporting css projection mode */
193
+ /* if( !$.browser.opera ) */
194
+ notOperaFix();
195
+
196
+ if( defaultView == 'outline' )
197
+ toggle();
198
+
199
+ document.onkeyup = keys;
200
+ }
201
+ });
@@ -0,0 +1,27 @@
1
+ @import url(s6/slides.css); /* required to make the slide show run at all */
2
+
3
+ html, body { color: white;
4
+ font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; }
5
+
6
+ a:link, a:visited { color: white; }
7
+
8
+ h1 { font-size: 30pt; }
9
+ h2 { font-size: 28pt; }
10
+ h3 { font-size: 25pt; }
11
+ p, li, td, th { font-size: 18pt; }
12
+
13
+ pre { font-size: 16pt; }
14
+
15
+ pre.code {
16
+ background-color: black;
17
+ padding: 5px;
18
+ border: silver thick groove;
19
+ -moz-border-radius: 11px;
20
+ }
21
+
22
+
23
+ div#header, div#footer { color: silver; }
24
+
25
+ #currentSlide { color: silver;}
26
+
27
+ #controls #navLinks a { color: silver; }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slideshow
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.5"
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gerald Bauer
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-07-02 00:00:00 -07:00
12
+ date: 2008-07-08 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -75,6 +75,15 @@ files:
75
75
  - lib/templates/s5/s5-core.css
76
76
  - lib/templates/s5/slides.js
77
77
  - lib/templates/s5/style.css.erb
78
+ - lib/templates/s6
79
+ - lib/templates/s6/footer.html.erb
80
+ - lib/templates/s6/header.html.erb
81
+ - lib/templates/s6/jquery.js
82
+ - lib/templates/s6/outline.css
83
+ - lib/templates/s6/print.css
84
+ - lib/templates/s6/slides.css
85
+ - lib/templates/s6/slides.js
86
+ - lib/templates/s6/style.css.erb
78
87
  - lib/templates/style.css.erb
79
88
  - bin/slideshow
80
89
  has_rdoc: false