Add tables of contents to the references and FAQ.
This commit is contained in:
parent
6629968351
commit
05f3e00b27
|
@ -1,5 +1,8 @@
|
||||||
# Frequently Asked Questions
|
# Frequently Asked Questions
|
||||||
|
|
||||||
|
* Table of contents
|
||||||
|
{:toc}
|
||||||
|
|
||||||
## Haml
|
## Haml
|
||||||
|
|
||||||
### How do I put a punctuation mark after an element, like "`I like <strong>cake</strong>!`"?
|
### How do I put a punctuation mark after an element, like "`I like <strong>cake</strong>!`"?
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
# Haml (XHTML Abstraction Markup Language)
|
# Haml (XHTML Abstraction Markup Language)
|
||||||
|
|
||||||
|
* Table of contents
|
||||||
|
{:toc}
|
||||||
|
|
||||||
Haml is a markup language
|
Haml is a markup language
|
||||||
that's used to cleanly and simply describe the XHTML of any web document,
|
that's used to cleanly and simply describe the XHTML of any web document,
|
||||||
without the use of inline code.
|
without the use of inline code.
|
||||||
|
@ -117,7 +120,7 @@ is compiled to:
|
||||||
Any string is a valid element name;
|
Any string is a valid element name;
|
||||||
Haml will automatically generate opening and closing tags for any element.
|
Haml will automatically generate opening and closing tags for any element.
|
||||||
|
|
||||||
#### {}
|
#### `{}`
|
||||||
|
|
||||||
Brackets represent a Ruby hash
|
Brackets represent a Ruby hash
|
||||||
that is used for specifying the attributes of an element.
|
that is used for specifying the attributes of an element.
|
||||||
|
@ -905,7 +908,7 @@ is compiled to:
|
||||||
2?
|
2?
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
#### -#
|
#### `-#`
|
||||||
|
|
||||||
The hyphen followed immediately by the pound sign
|
The hyphen followed immediately by the pound sign
|
||||||
signifies a silent comment.
|
signifies a silent comment.
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
# Sass (Syntactically Awesome StyleSheets)
|
# Sass (Syntactically Awesome StyleSheets)
|
||||||
|
|
||||||
|
* Table of contents
|
||||||
|
{:toc}
|
||||||
|
|
||||||
Sass is a meta-language on top of CSS
|
Sass is a meta-language on top of CSS
|
||||||
that's used to describe the style of a document
|
that's used to describe the style of a document
|
||||||
cleanly and structurally,
|
cleanly and structurally,
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
class YARD::Generators::FullDocGenerator
|
||||||
|
protected
|
||||||
|
|
||||||
|
def generate_assets_with_haml
|
||||||
|
generate_assets_without_haml
|
||||||
|
|
||||||
|
if format == :html && serializer
|
||||||
|
template_file = find_template template_path(css_file)
|
||||||
|
serializer.serialize(css_file,
|
||||||
|
File.read(template_file) + File.read(File.dirname(__FILE__) + "/haml-style.css"))
|
||||||
|
end
|
||||||
|
|
||||||
|
true
|
||||||
|
end
|
||||||
|
alias_method :generate_assets_without_haml, :generate_assets
|
||||||
|
alias_method :generate_assets, :generate_assets_with_haml
|
||||||
|
end
|
|
@ -0,0 +1,15 @@
|
||||||
|
.maruku_toc {
|
||||||
|
background: #ddd;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
margin-right: 2em;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.maruku_toc ul {
|
||||||
|
padding: 0 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#frequently_asked_questions + .maruku_toc {
|
||||||
|
float: none;
|
||||||
|
margin: 0 2em;
|
||||||
|
}
|
Loading…
Reference in New Issue