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:
Jacques Distler 2007-09-05 08:38:54 -05:00
parent 5ff1b7f6da
commit f482036683
37 changed files with 541 additions and 14 deletions

View file

@ -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( /</, "&lt;" ).
gsub( />/, "&gt;" ).
gsub( /"/, "&quot;" )
end
# Render as an HTML fragment (no head, just the content of BODY). (returns a string)
def to_s5(context={})