module Views
module Why
class OtherBenefits < Views::Shared::Base
def content
container {
jumbotron {
h2 "Other Benefits of Fortitude"
}
row {
columns(:small => 3) { }
columns(:small => 7) {
p {
text %{Next to }
a("the power Fortitude gives you to factor your views", :href => '/why')
text %{, its other
benefits pale by comparison. It’s not that these advantages are even all that small,
it’s that being able to factor your views well is so important that it’s by far the biggest
reason to use Fortitude. Even so, it’s worth listing these other benefits of Fortitude:}
}
ul {
li {
strong "Speed"
text %{: Fortitude is currently the fastest general-purpose templating engine
for Ruby — 20-40% faster than ERb, 4-5x faster than HAML, and 30-40x faster than Erector.}
}
li {
strong "Syntax"
text %{: Fortitude makes it impossible to make an HTML syntax error, like
forgetting to close a tag or mismatching tags. If your view parses as Ruby, you’re guaranteed
to produce syntactically-valid HTML.}
}
li {
strong "Semantics"
text %{: Fortitude can automatically enforce many of the rules
of HTML, like which elements can nest within which others (}
em "e.g."
text %{, you can’t put a }
code "
"
text " inside a "
code "
"
text "), which attributes an element can have (for example, "
code "