S5 Themes Support
Added support for S5 Themes. Themes are stored in the public/s5/themes/ directory. 6 themes are included: default, nautilus, blue, flower, i18n, pixel.
This commit is contained in:
parent
5ff1b7f6da
commit
f482036683
37 changed files with 541 additions and 14 deletions
|
@ -294,15 +294,20 @@ class WikiController < ApplicationController
|
|||
|
||||
def s5
|
||||
if @web.markup == :markdownMML
|
||||
@s5_content = sanitize_xhtml(Maruku.new(@page.content.delete("\r\x01-\x08\x0B\x0C\x0E-\x1F"),
|
||||
my_content = Maruku.new(@page.content.delete("\r\x01-\x08\x0B\x0C\x0E-\x1F"),
|
||||
{:math_enabled => true, :math_numbered => ['\\[','\\begin{equation}'], :content_only => true,
|
||||
:author => @page.author, :title => @page.plain_name}).to_s5.to_ncr)
|
||||
:author => @page.author, :title => @page.plain_name})
|
||||
@s5_content = sanitize_xhtml(my_content.to_s5.to_ncr)
|
||||
@s5_theme = my_content.s5_theme
|
||||
elsif @web.markup == :markdown
|
||||
@s5_content = sanitize_xhtml(Maruku.new(@page.content.delete("\r\x01-\x08\x0B\x0C\x0E-\x1F"),
|
||||
my_content = Maruku.new(@page.content.delete("\r\x01-\x08\x0B\x0C\x0E-\x1F"),
|
||||
{:math_enabled => false, :content_only => true,
|
||||
:author => @page.author, :title => @page.plain_name}).to_s5.to_ncr)
|
||||
:author => @page.author, :title => @page.plain_name})
|
||||
@s5_content = sanitize_xhtml(my_content.to_s5.to_ncr)
|
||||
@s5_theme = my_content.s5_theme
|
||||
else
|
||||
@s5_content = "S5 not supported with this text filter"
|
||||
@s5_theme = "default"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -13,15 +13,14 @@
|
|||
<meta name="defaultView" content="slideshow" />
|
||||
<meta name="controlVis" content="hidden" />
|
||||
<!-- style sheet links -->
|
||||
<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" />
|
||||
<link rel="stylesheet" href="/s5/ui/default/math.css" type="text/css" media="all" id="mathStyle" />
|
||||
<link rel="stylesheet" href="/s5/themes/<%=@s5_theme%>/slides.css" type="text/css" media="projection" id="slideProj" />
|
||||
<link rel="stylesheet" href="/s5/ui/core/outline.css" type="text/css" media="screen" id="outlineStyle" />
|
||||
<link rel="stylesheet" href="/s5/ui/core/print.css" type="text/css" media="print" id="slidePrint" />
|
||||
<link rel="stylesheet" href="/s5/ui/core/opera.css" type="text/css" media="projection" id="operaFix" />
|
||||
<link rel="stylesheet" href="/s5/ui/core/math.css" type="text/css" media="all" id="mathStyle" />
|
||||
|
||||
<!-- S5 JS -->
|
||||
<script src="/s5/ui/default/slides.js" type="text/javascript"></script>
|
||||
<script src="/s5/ui/core/slides.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue