ruby - Google fonts in Rails app is not working -
i trying use google fonts in rails app, it's not working @ all.
application.html.erb:
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %> <%= render 'layouts/fonts' %>
_fonts.html.erb:
<!--google fonts--> <%= stylesheet_link_tag 'application', 'http://fonts.googleapis.com/css?family=yesteryear', media: 'all', 'data-turbolinks-track' => true %> <%= stylesheet_link_tag 'application', 'http://fonts.googleapis.com/css?family=open+sans:400,400italic,600,600italic,700,700italic', media: 'all', 'data-turbolinks-track' => true %>
in scss (app.scss) file have:
#feature-text h2 { font-family: 'yesteryear', cursive; font-size: 46px; color: #000; }
turns out needed add https google fonts links:
<!--google fonts--> <%= stylesheet_link_tag 'application', 'https://fonts.googleapis.com/css?family=yesteryear', media: 'all', 'data-turbolinks-track' => true %> <%= stylesheet_link_tag 'application', 'https://fonts.googleapis.com/css?family=open+sans:400,400italic,600,600italic,700,700italic', media: 'all', 'data-turbolinks-track' => true %>
Comments
Post a Comment