Font face example.
This commit is contained in:
parent
f7841f7507
commit
128a551960
@ -7,9 +7,11 @@ project_path = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
|||||||
css_dir = "../docs/stylesheets"
|
css_dir = "../docs/stylesheets"
|
||||||
sass_dir = "content/stylesheets"
|
sass_dir = "content/stylesheets"
|
||||||
images_dir = "assets/images"
|
images_dir = "assets/images"
|
||||||
javascripts_dir = "content/javascripts"
|
javascripts_dir = "assets/javascripts"
|
||||||
|
fonts_dir = "assets/fonts"
|
||||||
http_javascripts_dir = "javascripts"
|
http_javascripts_dir = "javascripts"
|
||||||
http_stylesheets_dir = "stylesheets"
|
http_stylesheets_dir = "stylesheets"
|
||||||
http_images_dir = "images"
|
http_images_dir = "images"
|
||||||
|
http_fonts_dir = "fonts"
|
||||||
# To enable relative paths to assets via compass helper functions. Uncomment:
|
# To enable relative paths to assets via compass helper functions. Uncomment:
|
||||||
# relative_assets = true
|
# relative_assets = true
|
||||||
|
@ -56,6 +56,10 @@ route '/assets/javascripts/*/' do
|
|||||||
SITE_ROOT+item.identifier.chop[7..-1]+"."+item[:extension]
|
SITE_ROOT+item.identifier.chop[7..-1]+"."+item[:extension]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
route '/assets/fonts/*/' do
|
||||||
|
SITE_ROOT+item.identifier.chop[7..-1]+"."+item[:extension]
|
||||||
|
end
|
||||||
|
|
||||||
route '/stylesheets/*/' do
|
route '/stylesheets/*/' do
|
||||||
# don't generate a directory like we do for HTML files
|
# don't generate a directory like we do for HTML files
|
||||||
SITE_ROOT+item.identifier.chop + '.css'
|
SITE_ROOT+item.identifier.chop + '.css'
|
||||||
|
BIN
doc-src/assets/fonts/examples/angelina.ttf
Normal file
BIN
doc-src/assets/fonts/examples/angelina.ttf
Normal file
Binary file not shown.
8
doc-src/content/examples/compass/css3/font-face.haml
Normal file
8
doc-src/content/examples/compass/css3/font-face.haml
Normal file
@ -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"
|
@ -0,0 +1,3 @@
|
|||||||
|
.example
|
||||||
|
%h1 The Quick Brown Fox
|
||||||
|
%p Jumped over the log.
|
@ -0,0 +1,6 @@
|
|||||||
|
@import compass/css3
|
||||||
|
|
||||||
|
+font-face("Angelina", font_files("examples/angelina.ttf", "truetype"))
|
||||||
|
.example
|
||||||
|
font-family: "Angelina"
|
||||||
|
padding: 1em
|
Loading…
Reference in New Issue
Block a user