Converging on S5 support.
This commit is contained in:
parent
02c6ed2fa0
commit
41ff4724b8
|
@ -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
|
||||
|
||||
|
|
|
@ -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 %>
|
||||
</span>
|
||||
|
||||
|
|
|
@ -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;}
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd" >
|
||||
|
||||
<!-- Do not edit this document! The system will likely break if you do. -->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
|
|
|
@ -3,11 +3,11 @@ module MaRuKu
|
|||
|
||||
<meta name="defaultView" content="slideshow" />
|
||||
<meta name="controlVis" content="hidden" />
|
||||
<link rel="stylesheet" href="s5/ui/default/slides.css" type="text/css" media="projection" id="slideProj" />
|
||||
<link rel="stylesheet" href="s5/ui/default/outline.css" type="text/css" media="screen" id="outlineStyle" />
|
||||
<link rel="stylesheet" href="s5/ui/default/print.css" type="text/css" media="print" id="slidePrint" />
|
||||
<link rel="stylesheet" href="s5/ui/default/opera.css" type="text/css" media="projection" id="operaFix" />
|
||||
<script src="s5/ui/default/slides.js" type="text/javascript"> </script>
|
||||
<link rel="stylesheet" href="ui/default/slides.css" type="text/css" media="projection" id="slideProj" />
|
||||
<link rel="stylesheet" href="ui/default/outline.css" type="text/css" media="screen" id="outlineStyle" />
|
||||
<link rel="stylesheet" href="ui/default/print.css" type="text/css" media="print" id="slidePrint" />
|
||||
<link rel="stylesheet" href="ui/default/opera.css" type="text/css" media="projection" id="operaFix" />
|
||||
<script src="ui/default/slides.js" type="text/javascript"> </script>
|
||||
EOF
|
||||
|
||||
|
||||
|
|
|
@ -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
|
|||
<div id='controls'></div>
|
||||
<div id='currentSlide'></div>
|
||||
<div id='header'> #{slide_header}</div>
|
||||
<div id='footer'> #{slide_footer}</div>
|
||||
<div id='footer'>
|
||||
<h1>#{slide_footer}</h1>
|
||||
<h2>#{slide_subfooter}</h2>
|
||||
</div>
|
||||
<div class='topleft'> #{slide_topleft}</div>
|
||||
<div class='topright'> #{slide_topright}</div>
|
||||
<div class='bottomleft'> #{slide_bottomleft}</div>
|
||||
|
@ -59,10 +63,10 @@ module MaRuKu
|
|||
|
||||
first_slide="
|
||||
<div class='slide'>
|
||||
<h1> #{self.attributes[:title]}</h1>
|
||||
<h2> #{self.attributes[:subtitle]}</h2>
|
||||
<h3> #{self.attributes[:author]}</h3>
|
||||
<h4> #{self.attributes[:company]}</h4>
|
||||
<h1> #{self.attributes[:title] ||context[:title]}</h1>
|
||||
<h2> #{self.attributes[:subtitle] ||context[:subtitle]}</h2>
|
||||
<h3> #{self.attributes[:author] ||context[:author]}</h3>
|
||||
<h4> #{self.attributes[:company] ||context[:company]}</h4>
|
||||
</div>
|
||||
"
|
||||
presentation.add_element Document.new(first_slide).root
|
||||
|
|
Loading…
Reference in a new issue