Commit 097dc726 authored by haseeb's avatar haseeb

use sprite for icons

parent 3cd80c37
app/assets/images/ext_snippet_icons/logo.png

736 Bytes | W: | H:

app/assets/images/ext_snippet_icons/logo.png

494 Bytes | W: | H:

app/assets/images/ext_snippet_icons/logo.png
app/assets/images/ext_snippet_icons/logo.png
app/assets/images/ext_snippet_icons/logo.png
app/assets/images/ext_snippet_icons/logo.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -481,7 +481,8 @@ ...@@ -481,7 +481,8 @@
.dropdown-menu-selectable { .dropdown-menu-selectable {
li { li {
a, button { a,
button {
padding: 8px 40px; padding: 8px 40px;
position: relative; position: relative;
......
...@@ -13,6 +13,21 @@ ...@@ -13,6 +13,21 @@
margin: 20px; margin: 20px;
font-weight: 200; font-weight: 200;
.gl-snippet-icon {
display: inline-block;
background: url(asset_path('ext_snippet_icons/ext_snippet_icons.png')) no-repeat;
overflow: hidden;
text-indent: -9999px;
text-align: left;
width: 16px;
height: 16px;
background-size: cover;
&.gl-snippet-icon-doc_code { background-position: -0 -0; }
&.gl-snippet-icon-doc_text { background-position: -0 -16px; }
&.gl-snippet-icon-download { background-position: -0 -32px; }
}
.blob-viewer { .blob-viewer {
background-color: $white-light; background-color: $white-light;
text-align: left; text-align: left;
...@@ -108,7 +123,8 @@ ...@@ -108,7 +123,8 @@
} }
} }
img { img,
.gl-snippet-icon {
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
} }
......
...@@ -44,7 +44,7 @@ module IconsHelper ...@@ -44,7 +44,7 @@ module IconsHelper
end end
def external_snippet_icon(name) def external_snippet_icon(name)
content_tag(:img, "", src: "#{image_url('/assets/ext_snippet_icons')}/#{name}.png", width: '16px', height: '16px') content_tag(:span, "", class: "gl-snippet-icon gl-snippet-icon-#{name}")
end end
def audit_icon(names, options = {}) def audit_icon(names, options = {})
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment