Unified · Split
| @@ -13,5 +13,6 @@ app.config = · 12 unmodified lines | |||
| 13 | version: <%= Time.now.to_i %> | 13 | version: <%= Time.now.to_i %> |
| 14 | release: <%= Time.now.utc.httpdate.to_json %> | 14 | release: <%= Time.now.utc.httpdate.to_json %> |
| 15 | mathml_stylesheet: '<%= App.cdn_origin %>/mathml.css' | 15 | mathml_stylesheet: '<%= App.cdn_origin %>/mathml.css' |
| 16 | favicon_spritesheet: '<%= image_path('sprites/docs.png') %>' | ||
| 16 | service_worker_path: '/service-worker.js' | 17 | service_worker_path: '/service-worker.js' |
| 17 | service_worker_enabled: <%= App.environment == :production || ENV['ENABLE_SERVICE_WORKER'] == 'true' %> | 18 | service_worker_enabled: <%= App.environment == :production || ENV['ENABLE_SERVICE_WORKER'] == 'true' %> |
| @@ -30,8 +30,8 @@ withImage = (url, action) -> · 29 unmodified lines | |||
| 30 | 30 | ||
| 31 | styles = window.getComputedStyle($("._icon-#{doc.slug.split('~')[0]}"), ':before') | 31 | styles = window.getComputedStyle($("._icon-#{doc.slug.split('~')[0]}"), ':before') |
| 32 | 32 | ||
| 33 | bgUrl = styles['background-image'].slice(5, -2) | 33 | bgUrl = app.config.favicon_spritesheet |
| 34 | sourceSize = if bgUrl.includes('@2x') then 32 else 16 | 34 | sourceSize = 16 |
| 35 | sourceX = Math.abs(parseInt(styles['background-position-x'].slice(0, -2))) | 35 | sourceX = Math.abs(parseInt(styles['background-position-x'].slice(0, -2))) |
| 36 | sourceY = Math.abs(parseInt(styles['background-position-y'].slice(0, -2))) | 36 | sourceY = Math.abs(parseInt(styles['background-position-y'].slice(0, -2))) |
| 37 | 37 | ||