[v] [整理中] HTML / CSS / Bootstrap

http://getbootstrap.com/css/
http://pjchender.blogspot.tw/2015/04/bootstraptabsnavigation-bar.html

Containers

http://getbootstrap.com/css/#overview-container

Bootstrap requires a containing element to wrap site contents and house our grid system. You may choose one of two containers to use in your projects. Note that, due to padding and more, neither container is nestable. Use .container for a responsive fixed width container.

<div class="container">
  ...
</div>

Use .container-fluid for a full width container, spanning the entire width of your viewport.

<div class="container-fluid">
  ...
</div>

render

http://guides.rubyonrails.org/layouts_and_rendering.html

misc.

  • %> 和 -%> 的差別

"Omit blank lines ending in -%>"
http://ruby-doc.org/stdlib-2.3.0/libdoc/erb/rdoc/ERB.html
http://stackoverflow.com/questions/998979/difference-between-and-in-rails

  • <%= image_tag(product.photo.image.thumb.url, class: "thumbnail") %> 的 image_tag

http://apidock.com/rails/ActionView/Helpers/AssetTagHelper/image_tag