diff --git a/doc-src/.compass/config.rb b/doc-src/.compass/config.rb index 437a68dc..676ed43f 100644 --- a/doc-src/.compass/config.rb +++ b/doc-src/.compass/config.rb @@ -7,9 +7,11 @@ project_path = File.expand_path(File.join(File.dirname(__FILE__), '..')) css_dir = "../docs/stylesheets" sass_dir = "content/stylesheets" images_dir = "assets/images" -javascripts_dir = "content/javascripts" +javascripts_dir = "assets/javascripts" +fonts_dir = "assets/fonts" http_javascripts_dir = "javascripts" http_stylesheets_dir = "stylesheets" http_images_dir = "images" +http_fonts_dir = "fonts" # To enable relative paths to assets via compass helper functions. Uncomment: # relative_assets = true diff --git a/doc-src/Rules b/doc-src/Rules index 825a7061..d6b5c623 100644 --- a/doc-src/Rules +++ b/doc-src/Rules @@ -56,6 +56,10 @@ route '/assets/javascripts/*/' do SITE_ROOT+item.identifier.chop[7..-1]+"."+item[:extension] end +route '/assets/fonts/*/' do + SITE_ROOT+item.identifier.chop[7..-1]+"."+item[:extension] +end + route '/stylesheets/*/' do # don't generate a directory like we do for HTML files SITE_ROOT+item.identifier.chop + '.css' diff --git a/doc-src/assets/fonts/examples/angelina.ttf b/doc-src/assets/fonts/examples/angelina.ttf new file mode 100644 index 00000000..fe880ab9 Binary files /dev/null and b/doc-src/assets/fonts/examples/angelina.ttf differ diff --git a/doc-src/content/examples/compass/css3/font-face.haml b/doc-src/content/examples/compass/css3/font-face.haml new file mode 100644 index 00000000..83af367b --- /dev/null +++ b/doc-src/content/examples/compass/css3/font-face.haml @@ -0,0 +1,8 @@ +--- +title: Compass Font Face Example +description: How to use the @font-face mixin +framework: compass +stylesheet: compass/css3/_font_face.sass +example: true +--- += render "partials/example" diff --git a/doc-src/content/examples/compass/css3/font-face/markup.haml b/doc-src/content/examples/compass/css3/font-face/markup.haml new file mode 100644 index 00000000..d62c9796 --- /dev/null +++ b/doc-src/content/examples/compass/css3/font-face/markup.haml @@ -0,0 +1,3 @@ +.example + %h1 The Quick Brown Fox + %p Jumped over the log. diff --git a/doc-src/content/examples/compass/css3/font-face/stylesheet.sass b/doc-src/content/examples/compass/css3/font-face/stylesheet.sass new file mode 100644 index 00000000..fe25cef1 --- /dev/null +++ b/doc-src/content/examples/compass/css3/font-face/stylesheet.sass @@ -0,0 +1,6 @@ +@import compass/css3 + ++font-face("Angelina", font_files("examples/angelina.ttf", "truetype")) +.example + font-family: "Angelina" + padding: 1em