aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAlex Legler <alex@a3li.li>2016-08-10 13:26:37 +0200
committerAlex Legler <alex@a3li.li>2016-08-10 13:26:37 +0200
commit8a3d5d2adc3157d7fab786ed2825450ac96f8b08 (patch)
treee8b57e9a122c7948221a0ed09e204651439b393d /app
parentManually expire changelog cache (diff)
downloadpackages-8a3d5d2adc3157d7fab786ed2825450ac96f8b08.tar.gz
packages-8a3d5d2adc3157d7fab786ed2825450ac96f8b08.tar.bz2
packages-8a3d5d2adc3157d7fab786ed2825450ac96f8b08.zip
Begin transition to inline SVG octicons
Diffstat (limited to 'app')
-rw-r--r--app/assets/stylesheets/misc.scss6
-rw-r--r--app/helpers/keywords_helper.rb4
-rw-r--r--app/views/packages/_package_header.html.erb4
3 files changed, 9 insertions, 5 deletions
diff --git a/app/assets/stylesheets/misc.scss b/app/assets/stylesheets/misc.scss
index 7e1539f..f051415 100644
--- a/app/assets/stylesheets/misc.scss
+++ b/app/assets/stylesheets/misc.scss
@@ -23,6 +23,12 @@ h1 {
}
}
+.octicon {
+ display: inline-block;
+ vertical-align: middle;
+ fill: currentColor;
+}
+
.black {
color: #333;
}
diff --git a/app/helpers/keywords_helper.rb b/app/helpers/keywords_helper.rb
index 2444a6b..ea8048d 100644
--- a/app/helpers/keywords_helper.rb
+++ b/app/helpers/keywords_helper.rb
@@ -5,9 +5,7 @@ module KeywordsHelper
css_class = KK_KEYWORD_ICON[keyword]
if css_class
- content_tag :span,
- '',
- class: ['octicon', css_class]
+ octicon css_class, height: 16
else
''
end
diff --git a/app/views/packages/_package_header.html.erb b/app/views/packages/_package_header.html.erb
index 3dcf7a2..1b7876b 100644
--- a/app/views/packages/_package_header.html.erb
+++ b/app/views/packages/_package_header.html.erb
@@ -15,7 +15,7 @@
<h1 class="stick-top kk-package-title" id="package-title" data-atom="<%= package.atom %>" data-category="<%= package.category %>" data-name="<%= package.name %>">
<small class="kk-package-cat"><%= package.category_model.name %>/</small>
<div>
- <span class="mega-octicon octicon-package kk-package-icon"></span>
+ <%= octicon 'package', :height => 32, :class => 'right left kk-package-icon', :'aria-label' => 'Package icon' %>
<div class="kk-package-name"><%= package.name %></div>
</div>
</h1>
@@ -27,7 +27,7 @@
<% unless package.homepage.empty? || package.homepage.first.nil? || package.homepage.first.empty? %>
<p class="kk-package-homepage">
- <span class="fa fa-fw fa-home"></span> <%= content_tag :a, package.homepage.first, href: package.homepage.first, rel: 'nofollow' %>
+ <%= content_tag :a, package.homepage.first, href: package.homepage.first, rel: 'nofollow' %>
</p>
<% end %>
</div>