Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added letters to the preview template to provide better context for the icons #107

Merged
merged 1 commit into from
Sep 16, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions lib/fontcustom/templates/fontcustom-preview.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@
width: 10%;
}

<% scale.each do |n| %>
<% scale.each_with_index do |n,index| %>
.size-<%= n %> { font-size: <%= n %>px; }
.step-<%= index+1 %> { width: <%= 1.5+((index.to_f+1)/0.70) %>%;}
<% end %>

.usage { margin-top: 10px; }
Expand Down Expand Up @@ -99,10 +100,10 @@ <h1><%= @opts[:font_name] %> contains <%= @data[:glyphs].length %> glyphs:</h1>
<% @data[:glyphs].each_with_index do |name, index| %>
<div class="glyph">
<div class="preview-glyphs">
<% scale.each do |n| %><i class="step <%= @opts[:css_prefix] + name %> size-<%= n %>"></i><% end %>
<% scale.each_with_index do |n,index| %><span class="step step-<%= index+1 %> size-<%= n %>">Aa <i class="<%= @opts[:css_prefix] + name %>"></i></span><% end %>
</div>
<div class="preview-scale">
<% scale.each do |n| %><span class="step"><%= n %></span><% end %>
<% scale.each_with_index do |n,index| %><span class="step step-<%= index+1 %>"><%= n %></span><% end %>
</div>
<div class="usage">
<input class="class" type="text" readonly="readonly" onClick="this.select();" value=".<%= @opts[:css_prefix] + name %>" />
Expand Down