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
|
@ -2,6 +2,17 @@
|
|||
module MaRuKu
|
||||
|
||||
class MDDocument
|
||||
|
||||
def s5_theme
|
||||
html_escape(self.attributes[:slide_theme] || "default")
|
||||
end
|
||||
|
||||
def html_escape(string)
|
||||
string.gsub( /&/, "&" ).
|
||||
gsub( /</, "<" ).
|
||||
gsub( />/, ">" ).
|
||||
gsub( /"/, """ )
|
||||
end
|
||||
|
||||
# Render as an HTML fragment (no head, just the content of BODY). (returns a string)
|
||||
def to_s5(context={})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue