From 41ff4724b886d482ae31ce45a812dd62372cfd21 Mon Sep 17 00:00:00 2001 From: Jacques Distler Date: Thu, 1 Mar 2007 03:05:35 -0600 Subject: [PATCH] Converging on S5 support. --- app/controllers/wiki_controller.rb | 3 ++- app/views/wiki/page.rhtml | 4 +++ public/s5/ui/default/framing.css | 4 +-- public/s5/ui/default/notes.css | 4 +-- public/s5/ui/default/pretty.css | 26 +++++++++---------- public/s5/ui/default/slides.js | 2 +- public/s5/ui/s5-notes.html | 4 +-- .../maruku/lib/maruku/output/s5/fancy.rb | 10 +++---- .../maruku/lib/maruku/output/s5/to_s5.rb | 16 +++++++----- 9 files changed, 41 insertions(+), 32 deletions(-) diff --git a/app/controllers/wiki_controller.rb b/app/controllers/wiki_controller.rb index 8b7acb99..8a43a656 100644 --- a/app/controllers/wiki_controller.rb +++ b/app/controllers/wiki_controller.rb @@ -292,7 +292,8 @@ class WikiController < ApplicationController if @web.markup == :markdownMML or @web.markup == :markdown # @s5_content = sanitize_html(Maruku.new(@page.content.delete("\r\x01-\x08\x0B\x0C\x0E-\x1F"), {:raw => true}).to_s5) @s5_content = sanitize_html(Maruku.new(@page.content.delete("\r\x01-\x08\x0B\x0C\x0E-\x1F"), - {:math_enabled => true, :math_numbered => ['\\[','\\begin{equation}'], :content_only => true}).to_s5) + {:math_enabled => true, :math_numbered => ['\\[','\\begin{equation}'], :content_only => true, + :author => @page.author, :title => @page.plain_name}).to_s5) end end diff --git a/app/views/wiki/page.rhtml b/app/views/wiki/page.rhtml index d627b06b..40c84a0a 100644 --- a/app/views/wiki/page.rhtml +++ b/app/views/wiki/page.rhtml @@ -44,6 +44,10 @@ <%= link_to 'PDF', {:web => @web.address, :action => 'pdf', :id => @page.name}, {:id => 'view_pdf'} %> <% end %> + <% if #{@params['category']} == 'S5-slideshow' %> + | + <%= link_to 'S5', {:web => @web.address, :action => 's5', :id => @page.name} %> + <% end %> <% end %> diff --git a/public/s5/ui/default/framing.css b/public/s5/ui/default/framing.css index 2a27dafb..beeabafb 100644 --- a/public/s5/ui/default/framing.css +++ b/public/s5/ui/default/framing.css @@ -6,9 +6,9 @@ /* target = 1024x768 */ div#header, div#footer, .slide {width: 100%; top: 0; left: 0;} -div#header {top: 0; height: 3em; z-index: 1;} +div#header {top: 0; height: 2em; z-index: 1;} div#footer {top: auto; bottom: 0; height: 2.5em; z-index: 5;} -.slide {top: 0; width: 92%; padding: 3.5em 4% 4%; z-index: 2; list-style: none;} +.slide {top: 0; width: 92%; padding: 2.5em 4% 4% 1em; z-index: 2; list-style: none;} div#controls {left: 50%; bottom: 0; width: 50%; z-index: 100;} div#controls form {text-align: right; width: 100%; margin: 0;} #currentSlide {position: absolute; width: 10%; left: 45%; bottom: 1em; z-index: 10;} diff --git a/public/s5/ui/default/notes.css b/public/s5/ui/default/notes.css index 5858cf2b..832a03c2 100644 --- a/public/s5/ui/default/notes.css +++ b/public/s5/ui/default/notes.css @@ -14,7 +14,7 @@ div.timers { border: 0.08em solid #222; border-top-width: 1px; border-left-width: 1px; - float: left; + float: right; padding: 0.2em; margin: 0 0 0.5em; position: relative; @@ -93,7 +93,7 @@ div.timers li {float: left; width: 5em; margin: 0; padding: 0 0.5em; text-align: center;} div#elapsed {width: 12.1em;} -div#remaining {clear: left; width: 12.1em;} +div#remaining {clear: right; width: 12.1em;} div#remaining p {text-align: center;} #slide, diff --git a/public/s5/ui/default/pretty.css b/public/s5/ui/default/pretty.css index 838a7cf8..9c74c6b8 100644 --- a/public/s5/ui/default/pretty.css +++ b/public/s5/ui/default/pretty.css @@ -1,9 +1,9 @@ /* Following are the presentation styles -- edit away! */ -body {background: #FFF url(bodybg.gif) -16px 0 no-repeat; color: #000; font-size: 2.25em;} +body {background: #FFF; color: #000; font-size: 2.25em;} :link, :visited {text-decoration: none; color: #00C;} -#controls :active {color: #88A !important;} -#controls :focus {outline: 1px dotted #227;} +#controls :active {color: #8A8 !important;} +#controls :focus {outline: 1px dotted #272;} h1, h2, h3, h4 {font-size: 100%; margin: 0; padding: 0; font-weight: inherit;} ul, pre {margin: 0; line-height: 1em;} html, body {margin: 0; padding: 0;} @@ -29,19 +29,19 @@ sup {font-size: smaller; line-height: 1px;} .slide ul ul li {margin: .2em; font-size: 85%; list-style: square;} .slide img.leader {display: block; margin: 0 auto;} -div#header, div#footer {background: #005; color: #AAB; +.incremental code {visibility: hidden} + +div#header, div#footer {background: #050; color: #ABA; font-family: Verdana, Helvetica, sans-serif;} -div#header {background: #005 url(bodybg.gif) -16px 0 no-repeat; - line-height: 1px;} div#footer {font-size: 0.5em; font-weight: bold; padding: 1em 0;} #footer h1, #footer h2 {display: block; padding: 0 1em;} #footer h2 {font-style: italic;} div.long {font-size: 0.75em;} -.slide h1 {position: absolute; top: 0.7em; left: 87px; z-index: 1; - margin: 0; padding: 0.3em 0 0 50px; white-space: nowrap; +.slide h1 {position: absolute; top: 0em; left:5em; z-index: 1; + margin: auto; padding: 0.3em 0 0 50px; white-space: nowrap; font: bold 150%/1em Helvetica, sans-serif; text-transform: capitalize; - color: #DDE; background: #005;} + color: #DFD; background: #050;} .slide h3 {font-size: 130%;} h1 abbr {font-variant: small-caps;} @@ -50,11 +50,11 @@ div#controls {position: absolute; left: 60%; bottom: 0; text-align: right; font: bold 0.9em Verdana, Helvetica, sans-serif;} html>body div#controls {position: fixed; padding: 0; top: auto;} #controls #navLinks a {padding: 0; margin: 0 0.5em; - background: #005; border: none; color: #779; + background: #050; border: none; color: #797; cursor: pointer;} -#controls #navList #jumplist {background: #DDD; color: #227;} +#controls #navList #jumplist {background: #DDD; color: #272;} -#currentSlide {text-align: center; font-size: 0.5em; color: #449;} +#currentSlide {text-align: center; font-size: 0.5em; color: #494;} #slide0 {padding-top: 3.5em; font-size: 90%;} #slide0 h1 {position: static; margin: 1em 0 0; padding: 0; @@ -79,4 +79,4 @@ img.incremental {visibility: hidden;} /* diagnostics li:after {content: " [" attr(class) "]"; color: #F88;} - */ \ No newline at end of file + */ diff --git a/public/s5/ui/default/slides.js b/public/s5/ui/default/slides.js index 3ff8535f..7f248e01 100644 --- a/public/s5/ui/default/slides.js +++ b/public/s5/ui/default/slides.js @@ -622,7 +622,7 @@ function createNotesWindow() { // creates a window for our notes if (!s5NotesWindow || s5NotesWindow.closed) { // Create the window if it doesn't exist s5NotesWindowLoaded = false; // Note: Safari has a tendency to ignore window options preferring to default to the settings of the parent window, grr. - s5NotesWindow = window.open('/s5/ui/s5-notes.html', 's5NotesWindow', 'top=0,left=0'); + s5NotesWindow = window.open('/s5/ui/s5-notes.html', 's5NotesWindow', 'top=0,left=0,resizable=yes,scrollbars=auto'); } if (s5NotesWindowLoaded) { // Load the current note if the Note HTML has loaded loadNote(); diff --git a/public/s5/ui/s5-notes.html b/public/s5/ui/s5-notes.html index 5c6c4cad..3d8cc136 100644 --- a/public/s5/ui/s5-notes.html +++ b/public/s5/ui/s5-notes.html @@ -1,5 +1,5 @@ - + + diff --git a/vendor/plugins/maruku/lib/maruku/output/s5/fancy.rb b/vendor/plugins/maruku/lib/maruku/output/s5/fancy.rb index fbbdbe22..977bb532 100644 --- a/vendor/plugins/maruku/lib/maruku/output/s5/fancy.rb +++ b/vendor/plugins/maruku/lib/maruku/output/s5/fancy.rb @@ -3,11 +3,11 @@ module MaRuKu - - - - - + + + + + EOF diff --git a/vendor/plugins/maruku/lib/maruku/output/s5/to_s5.rb b/vendor/plugins/maruku/lib/maruku/output/s5/to_s5.rb index 22f2aac7..1ccd254b 100644 --- a/vendor/plugins/maruku/lib/maruku/output/s5/to_s5.rb +++ b/vendor/plugins/maruku/lib/maruku/output/s5/to_s5.rb @@ -7,7 +7,7 @@ module MaRuKu def to_s5(context={}) indent = context[:indent] || -1 ie_hack = context[:ie_hack] ||true - content_only = true #context[:content_only] + content_only = context[:content_only] ||true doc = Document.new(nil,{:respect_whitespace =>:all}) if (content_only) @@ -34,6 +34,7 @@ module MaRuKu slide_header = self.attributes[:slide_header] slide_footer = self.attributes[:slide_footer] + slide_subfooter = self.attributes[:slide_subfooter] slide_topleft = self.attributes[:slide_topleft] slide_topright = self.attributes[:slide_topright] slide_bottomleft = self.attributes[:slide_bottomleft] @@ -45,7 +46,10 @@ module MaRuKu
- +
#{slide_topleft}
#{slide_topright}
#{slide_bottomleft}
@@ -59,10 +63,10 @@ module MaRuKu first_slide="
-

#{self.attributes[:title]}

-

#{self.attributes[:subtitle]}

-

#{self.attributes[:author]}

-

#{self.attributes[:company]}

+

#{self.attributes[:title] ||context[:title]}

+

#{self.attributes[:subtitle] ||context[:subtitle]}

+

#{self.attributes[:author] ||context[:author]}

+

#{self.attributes[:company] ||context[:company]}

" presentation.add_element Document.new(first_slide).root