・ Ruby: 2.5.7 Rails: 5.2.4 ・ Vagrant: 2.2.7 -VirtualBox: 6.1 ・ OS: macOS Catalina
Access the link below. Font Awesome Start screen
Enter your email address and click "Send Kit Code".
When you receive a confirmation email, access the link "Click to Confirm Your Email Address + Set Things Up".
The following screen will be displayed. Enter the password and click "Set Password & Continue".
The screen will change to the profile information input screen, but since there is no need to make any settings now, Click "All set. Let's Go!" Without entering anything.
The following screen will be displayed. Click "Copy Kit Code" to copy the code.
Paste the code you copied earlier and convert it to Slim format.
slim:application.html.slim
doctype html
html
head
title
|Font Awesome test
= csrf_meta_tags
= csp_meta_tag
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload'
= javascript_include_tag 'application', 'data-turbolinks-track': 'reload'
/Postscript
script src='https://kit.fontawesome.com/c51513dd6c.js' crossorigin='anonymous'
① Access the following site and click the icon you want to use. Font Awesome Icon List
(2) The screen will change to the one shown below, so copy the class name.
③ If you write in HTML as shown below, the icon will be displayed.
~html.slim
i.far.fa-heart
Recommended Posts