-
Notifications
You must be signed in to change notification settings - Fork 79
Templates, layouts, and partials
hlb edited this page Apr 5, 2012
·
8 revisions
Fire.app provides HTML template languages like ERB, Haml and Markdown. If you do not want to use them, you can ignore this section.
-
You can use layout and partial.
You can use layout and partial to control basic modules like header, footer, and navigation. Once you change the layout file, it applies across your whole site instantly.
-
You can use template helpers.
-
You can use Ruby code.
You can use ruby code to make prototype faster. For example, if you want a
<ul>
list with 10li
s:-
<% 10.times do |x| %>
- <%= x+1 %>: Loren Ipsum <% end %>
If you name a file PATH/TO/FILENAME.html.erb
, and open http://127.0.0.1:24681/PATH/TO/FILENAME.html
, you will get compiled ERB output. If you name it FILENAME.haml.erb
, it will use Haml.
There are two ways to use layout:
- put _layout.html.erb or _layout.haml.erb in the folder (or parent folder)
- use specific layout file
- ERB
- Haml
- Markdown
- Home
- Getting Started
- Preferences
- Use Compass Extensions
- Templates, Layouts, and Partials
- Template Helpers
- CoffeeScript
- Custom Handlers
- Build Project
- Deploy To Heroku
- Fire.app can't be opened because it is from an unindentified developer on Mac OSX 10.8
- FAQ
- CHANGELOG
- Fire.app-使用說明
- Template Helpers (zh tw)
- Templates, Layouts & Partials (zh tw)
- Sublime Text 2 的 Autocomplete 設定方式
- Mac OS X 10.8 (Mountain Lion) 開啟 Fire.app 問題