0
Help us understand the problem. What are the problem?

More than 1 year has passed since last update.

posted at

updated at

反復で復習html(haml)の機能

反復で復習html(haml)の機能

by taku1039
1 / 2

hamlで今日までで学んだこと
以下、

html
haml

の順で書き換えをどんどん書く。

<h1>Messages#index</h1>
%h1 Messages#index
<div class="font-box">
.font-box
<span class="class_value1"></span>
.span.class_value1

fontAwesomeからアイコンを取得したい場合。

<i class="far fa-image"></i>
%i.far.fa-image

link_toメソッド

<a class="yahoo_link_btn" href="http://www.yahoo.co.jp/">Yahoo</a>
= link_to "http://www.yahoo.co.jp/", class: "yahoo_link_btn" do
  Yahoo

hamlはインデントがとても大事。
学んだらこれからも追記する予定。

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Sign upLogin
0
Help us understand the problem. What are the problem?