4 ms·
Markaby is pretty sweet: html do head { title "Boats.com" } body do h1 "Boats.com has great deals" ul do li "$49 for a canoe"
by judofyr 18y ago
Markaby is pretty sweet:
html do
head { title "Boats.com" }
body do
h1 "Boats.com has great deals"
ul do
li "$49 for a canoe"
li "$39 for a raft"
li "$29 for a huge boot that floats and can fit 5 people"
end
end
end
- mechanical_fish 18y agoThanks. I modded up the parent submission, in part, because I was pretty sure I'd seen several of these syntaxes by now and I wanted to precipitate a shootout in the comment section. ;) More examples, please! Here's some haml, from the haml site. (I don't actually know haml, but perhaps I soon will:) #content .left.column %h2 Welcome to our site! %p= print_information .right.column= render :partial => "sidebar" Grading these competitions is hard, since it depends on taste and you can't always tell from a short example how something will perform in the field. haml may be a bit too terse (though I say that without being convinced that it's true; terse is generally good), and on first glance it will confuse the daylights out of an otherwise HTML-savvy person who has never seen it before. But I certainly like it compared to tag soup.
- arohner 18y agoJust because everyone else is doing it. I like Compojure (library for Clojure): (html [:head {:title "Boats.com" }] [:body [:h1 "Boats.com has great deals"] [:ul [:li "$49 for a canoe"]] (sidebar)]) render(:partial, sidebar) is accomplished by just calling another function that generates html.