您的位置:首页 > 编程语言 > Ruby

[slim] Slim - Faster, lightweight, a enginer for Ruby

2014-03-14 16:21 337 查看
URL: http://slim-lang.com/
Example:

doctype html
html
head
title Slim Examples
meta name="keywords" content="template language"
meta name="author" content=author
javascript:
alert('Slim supports embedded javascript!')

body
h1 Markup examples

#content
p This example shows you how a basic Slim file looks like.

== yield

- unless items.empty?
table
- for item in items do
tr
td.name = item.name
td.price = item.price
- else
p
| No items found.  Please add some inventory.
Thank you!

div id="footer"
= render 'footer'
| Copyright © #{year} #{author}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: