Skip to content
This repository
Browse code

sidebar menu and source section

  • Loading branch information...
commit 1d75ee04a0d4d59a2cb693807085e61a042f0d2b 1 parent 337f9f8
Scott Chacon authored September 11, 2011
22  TODO.txt
... ...
@@ -1,12 +1,32 @@
1 1
 TODO
2 2
 =================
3 3
 
  4
+==
  5
+
  6
+- test suite
  7
+- static, heroku, github, pdf, presenter, normal all working
  8
+- pdf with notes
  9
+- clean up js
  10
+- clean up ruby
  11
+- presenter view
  12
+  - timer (time left, percent done, percent time done)
  13
+  - menu / goto
  14
+  - settings (footer, debug?)
  15
+  - madden? 
  16
+- track file each slide is from
  17
+- editing slides
  18
+- webpage
  19
+- message on startup
  20
+- fix heroku gem shit
  21
+
  22
+
  23
+==
  24
+
4 25
 - can have showoff.json in each subdir
5 26
 - showoff add
6 27
   - add slides of images directory (refactor script/import_images.rb)
7 28
 - simple highlighting (highlight region of slide / click to highlight)
8 29
 - presenter tools
9  
-  - notes view (quick polling)
10 30
   - preview column
11 31
   - preview
12 32
 - audience interface
14  bin/showoff
@@ -77,6 +77,20 @@ command :serve do |c|
77 77
   c.flag [:f, :pres_file]
78 78
 
79 79
   c.action do |global_options,options,args|
  80
+
  81
+    url = "http://#{options[:h]}:#{options[:p].to_i}"
  82
+    puts "
  83
+-------------------------
  84
+
  85
+Your ShowOff presentation is now starting up.
  86
+
  87
+To view it plainly, visit [ #{url} ]
  88
+
  89
+To run it from presenter view, go to: [ #{url}/presenter ]
  90
+
  91
+-------------------------
  92
+
  93
+"
80 94
     ShowOff.run! :host => options[:h], :port => options[:p].to_i, :pres_file => options[:f], :pres_dir => args[0], :verbose => options[:verbose]
81 95
   end
82 96
 end
26  public/css/presenter.css
@@ -10,7 +10,13 @@ div.zoomed {
10 10
   font-size: 1.5em;
11 11
 }
12 12
 
13  
-#progress { padding: 5px; }
  13
+#progress {
  14
+  padding: 10px;
  15
+}
  16
+#slideSource {
  17
+  padding: 10px;
  18
+  background: #9d9;
  19
+}
14 20
 
15 21
 #preview {
16 22
   min-height: 430px;
@@ -40,3 +46,21 @@ div.zoomed {
40 46
   min-height: 150px;
41 47
   padding: 20px;
42 48
 }
  49
+
  50
+.menu {
  51
+  height: 350px;
  52
+  max-height: 350px;
  53
+  overflow:auto;
  54
+}
  55
+
  56
+.menu a {
  57
+  display: block;
  58
+  color: #000;
  59
+}
  60
+.menu > ul > li > ul {
  61
+  padding-left: 20px;
  62
+}
  63
+.menu > ul > li > a {
  64
+  padding: 10px;
  65
+  background: #eee;
  66
+}
28  public/js/presenter.js
@@ -3,26 +3,44 @@ var w = null;
3 3
 
4 4
 $(function(){
5 5
 	w = window.open('/');
  6
+  // side menu accordian crap
  7
+	$("#preso").bind("showoff:loaded", function (event) {
  8
+		$(".menu > ul ul").hide()
  9
+		$(".menu > ul a").click(function() {
  10
+			if ($(this).next().is('ul')) {
  11
+				$(this).next().toggle()
  12
+			} else {
  13
+				gotoSlide($(this).attr('rel'))
  14
+				w.gotoSlide($(this).attr('rel'))
  15
+				postSlide()
  16
+			}
  17
+			return false
  18
+		}).next().hide()
  19
+	})
6 20
 });
7 21
 
8 22
 function presPrevStep()
9 23
 {
10 24
 	prevStep()
11 25
 	w.prevStep()
12  
-	showNotes()
  26
+	postSlide()
13 27
 }
14 28
 
15 29
 function presNextStep()
16 30
 {
17 31
 	nextStep()
18 32
 	w.nextStep()
19  
-	showNotes()
  33
+	postSlide()
20 34
 }
21 35
 
22  
-function showNotes()
  36
+function postSlide()
23 37
 {
24  
-	var notes = w.getCurrentNotes()
25  
-	$('#notes').text(notes)
  38
+	if(currentSlide) {
  39
+		var notes = w.getCurrentNotes()
  40
+		var fileName = currentSlide.children().first().attr('ref')
  41
+		$('#notes').text(notes)
  42
+		$('#slideFile').text(fileName)
  43
+	}
26 44
 }
27 45
 
28 46
 //  See e.g. http://www.quirksmode.org/js/keys.html for keycodes
12  views/presenter.erb
@@ -12,7 +12,6 @@
12 12
 <body>
13 13
 
14 14
 <a tabindex="0" href="#search-engines" class="fg-button fg-button-icon-right ui-widget ui-state-default ui-corner-all" id="navmenu"><span class="ui-icon ui-icon-triangle-1-s"></span>slides</a>
15  
-<div id="navigation" class="hidden"></div>
16 15
 
17 16
 <div id="help">
18 17
   <table>
@@ -22,9 +21,7 @@
22 21
     <tr><td class="key">d</td><td>toggle debug mode</td></tr>
23 22
     <tr><td class="key">## &lt;ret&gt;</td><td>go to slide #</td></tr>
24 23
     <tr><td class="key">c, t</td><td>table of contents (vi)</td></tr>
25  
-    <tr><td class="key">f</td><td>toggle footer</td></tr>
26 24
     <tr><td class="key">r</td><td>reload slides</td></tr>
27  
-    <tr><td class="key">n</td><td>toggle notes</td></tr>
28 25
     <tr><td class="key">p</td><td>run preshow</td></tr>
29 26
   </table>
30 27
 </div>
@@ -42,13 +39,12 @@
42 39
     <div id="progress">
43 40
       Slide: <span id="slideInfo"></span>
44 41
     </div>
  42
+    <div id="slideSource">
  43
+      Source: <span id="slideFile"></span>
  44
+    </div>
45 45
     <div id="debugInfo"></div>
46 46
     <div id="slidemenu">
47  
-      <h2>Slides</h2>
48  
-      <ul>
49  
-        <li>Section 1</li>
50  
-        <li>Section 2</li>
51  
-      </ul>
  47
+      <div id="navigation" class="menu"></div>
52 48
     </div>
53 49
   </div>
54 50
   <div id="preview" class="grid_8">

0 notes on commit 1d75ee0

Please sign in to comment.
Something went wrong with that request. Please try again.