Commit 261f212b3b99debd49805ff068a615e47d9aa762

Authored by Dmitriy Zaporozhets
1 parent 4c132ed4

Use rails helper image-url for reference images in css

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
app/assets/stylesheets/generic/forms.scss
1 1 input[type='search'].search-text-input {
2   - background-image: url("icon-search.png");
  2 + background-image: image-url("icon-search.png");
3 3 background-repeat: no-repeat;
4 4 background-position: 10px;
5 5 padding-left: 25px;
... ...
app/assets/stylesheets/generic/typography.scss
... ... @@ -105,7 +105,7 @@ a:focus {
105 105 display: inline-block;
106 106 width: $size;
107 107 height: $size;
108   - background-image: url("icon-link.png");
  108 + background-image: image-url("icon-link.png");
109 109 background-size: contain;
110 110 background-repeat: no-repeat;
111 111 }
... ...
app/assets/stylesheets/sections/commits.scss
... ... @@ -73,7 +73,7 @@
73 73  
74 74  
75 75 .commits-compare-switch{
76   - background: url("switch_icon.png") no-repeat center center;
  76 + background: image-url("switch_icon.png") no-repeat center center;
77 77 width: 32px;
78 78 height: 32px;
79 79 text-indent: -9999px;
... ...
app/assets/stylesheets/sections/diff.scss
... ... @@ -144,7 +144,7 @@
144 144 line-height: 0;
145 145 img{
146 146 border: 1px solid #FFF;
147   - background: url('trans_bg.gif');
  147 + background: image-url('trans_bg.gif');
148 148 max-width: 100%;
149 149 }
150 150 &.deleted {
... ... @@ -209,7 +209,7 @@
209 209 width: 15px;
210 210 position: absolute;
211 211 top: 0px;
212   - background: url('swipemode_sprites.gif') 0 3px no-repeat;
  212 + background: image-url('swipemode_sprites.gif') 0 3px no-repeat;
213 213 }
214 214 .bottom-handle{
215 215 display: block;
... ... @@ -217,7 +217,7 @@
217 217 width: 15px;
218 218 position: absolute;
219 219 bottom: 0px;
220   - background: url('swipemode_sprites.gif') 0 -11px no-repeat;
  220 + background: image-url('swipemode_sprites.gif') 0 -11px no-repeat;
221 221 }
222 222 }
223 223 } //.view.swipe
... ... @@ -249,7 +249,7 @@
249 249 left: 12px;
250 250 height: 10px;
251 251 width: 276px;
252   - background: url('onion_skin_sprites.gif') -4px -20px repeat-x;
  252 + background: image-url('onion_skin_sprites.gif') -4px -20px repeat-x;
253 253 }
254 254  
255 255 .dragger {
... ... @@ -259,7 +259,7 @@
259 259 top: 0px;
260 260 height: 14px;
261 261 width: 14px;
262   - background: url('onion_skin_sprites.gif') 0px -34px repeat-x;
  262 + background: image-url('onion_skin_sprites.gif') 0px -34px repeat-x;
263 263 cursor: pointer;
264 264 }
265 265  
... ... @@ -270,7 +270,7 @@
270 270 right: 0px;
271 271 height: 10px;
272 272 width: 10px;
273   - background: url('onion_skin_sprites.gif') -2px 0px no-repeat;
  273 + background: image-url('onion_skin_sprites.gif') -2px 0px no-repeat;
274 274 }
275 275  
276 276 .opaque {
... ... @@ -280,7 +280,7 @@
280 280 left: 0px;
281 281 height: 10px;
282 282 width: 10px;
283   - background: url('onion_skin_sprites.gif') -2px -10px no-repeat;
  283 + background: image-url('onion_skin_sprites.gif') -2px -10px no-repeat;
284 284 }
285 285 }
286 286 } //.view.onion-skin
... ...
app/assets/stylesheets/sections/header.scss
... ... @@ -161,7 +161,7 @@ header {
161 161 }
162 162  
163 163 .search-input {
164   - background-image: url("icon-search.png");
  164 + background-image: image-url("icon-search.png");
165 165 background-repeat: no-repeat;
166 166 background-position: 10px;
167 167 height: inherit;
... ...
app/assets/stylesheets/sections/notes.scss
... ... @@ -196,7 +196,7 @@ ul.notes {
196 196  
197 197 .diff-file tr.line_holder {
198 198 .add-diff-note {
199   - background: url("diff_note_add.png") no-repeat left 0;
  199 + background: image-url("diff_note_add.png") no-repeat left 0;
200 200 height: 22px;
201 201 margin-left: -65px;
202 202 position: absolute;
... ...
app/helpers/application_helper.rb
... ... @@ -54,7 +54,7 @@ module ApplicationHelper
54 54 if group && group.avatar.present?
55 55 group.avatar.url
56 56 else
57   - '/assets/no_group_avatar.png'
  57 + image_path('no_group_avatar.png')
58 58 end
59 59 end
60 60  
... ...