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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue