Last active
August 29, 2015 13:55
-
-
Save Senhordim/8736861 to your computer and use it in GitHub Desktop.
Slim-template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment