mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-11 23:17:48 +00:00
Merge pull request #5624 from Matt-Yorkley/rails4-image-precompile
v3 image precompile
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
@include fullbg;
|
||||
background-color: black;
|
||||
background-image: url("/assets/home/tagline-bg.jpg");
|
||||
background-image: image-url("home/tagline-bg.jpg");
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
margin-bottom: 2em;
|
||||
|
||||
@@ -62,7 +62,7 @@ ordercycle {
|
||||
}
|
||||
|
||||
select {
|
||||
background-image: url('/assets/white-caret.svg');
|
||||
background-image: image-url('white-caret.svg');
|
||||
background-size: 30px auto;
|
||||
background-position-x: 102%;
|
||||
}
|
||||
@@ -147,7 +147,7 @@ shop ordercycle {
|
||||
|
||||
select {
|
||||
background-color: $white;
|
||||
background-image: url('/assets/black-caret.svg');
|
||||
background-image: image-url('black-caret.svg');
|
||||
color: $grey-500;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
products {
|
||||
product {
|
||||
.taxon-flag {
|
||||
background: transparent url("/assets/flag.svg") top center no-repeat;
|
||||
background: transparent image-url("flag.svg") top center no-repeat;
|
||||
background-size: 34px 39px;
|
||||
min-height: 40px;
|
||||
width: 34px;
|
||||
|
||||
@@ -50,7 +50,7 @@ footer {
|
||||
|
||||
width: 100%;
|
||||
border: 1px solid rgba($dark-grey, 0.35);
|
||||
background-image: url("/assets/tile-wide.png");
|
||||
background-image: image-url("tile-wide.png");
|
||||
background-position: center center;
|
||||
background-color: #bbb;
|
||||
padding: 12px 0 8px 0;
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
}
|
||||
|
||||
#stats.pane {
|
||||
background-image: url("/assets/home/background-blurred-oranges.jpg");
|
||||
background-image: image-url("home/background-blurred-oranges.jpg");
|
||||
background-position: center center;
|
||||
background-color: $ofn-grey;
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
}
|
||||
|
||||
.home-icon-box {
|
||||
background-image: url("/assets/ofn-o.png");
|
||||
background-image: image-url("ofn-o.png");
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: auto 100%;
|
||||
@@ -121,15 +121,15 @@
|
||||
background-size: auto 100%;
|
||||
|
||||
&.search {
|
||||
background-image: url("/assets/icon-mask-magnifier.png");
|
||||
background-image: image-url("icon-mask-magnifier.png");
|
||||
}
|
||||
|
||||
&.shop {
|
||||
background-image: url("/assets/icon-mask-apple.png");
|
||||
background-image: image-url("icon-mask-apple.png");
|
||||
}
|
||||
|
||||
&.pick-up-delivery {
|
||||
background-image: url("/assets/icon-mask-truck.png");
|
||||
background-image: image-url("icon-mask-truck.png");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
@include fullbg;
|
||||
|
||||
background-color: $ofn-grey;
|
||||
background-image: url("/assets/home/home.jpg");
|
||||
background-image: image-url("home/home.jpg");
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
// Generic \\
|
||||
|
||||
@mixin tiledPane {
|
||||
background-image: url("/assets/tile-wide.png");
|
||||
background-image: image-url("tile-wide.png");
|
||||
background-color: $brand-colour;
|
||||
background-position: center center;
|
||||
|
||||
@@ -236,7 +236,7 @@
|
||||
|
||||
@mixin producersbg {
|
||||
background-color: lighten($clr-turquoise, 68%);
|
||||
background-image: url("/assets/producers.svg");
|
||||
background-image: image-url("producers.svg");
|
||||
background-position: center 50px;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 922px 763px;
|
||||
@@ -244,13 +244,13 @@
|
||||
|
||||
@mixin hubsbg {
|
||||
background-color: $brand-colour;
|
||||
background-image: url("/assets/hubs-bg.jpg");
|
||||
background-image: image-url("hubs-bg.jpg");
|
||||
background-position: center center;
|
||||
}
|
||||
|
||||
@mixin groupsbg {
|
||||
background-color: lighten($clr-brick, 56%);
|
||||
background-image: url("/assets/groups.svg");
|
||||
background-image: image-url("groups.svg");
|
||||
background-position: center 50px;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 922px 922px;
|
||||
|
||||
@@ -14,7 +14,7 @@ $page-alert-height: 55px;
|
||||
border-left: none;
|
||||
border-right: none;
|
||||
background-color: #bbb;
|
||||
background-image: url("/assets/tile-wide.png");
|
||||
background-image: image-url("tile-wide.png");
|
||||
background-position: center center;
|
||||
padding: 12px 0 8px 0;
|
||||
margin: 0;
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
padding: 0 2.25em 0 2.75em;
|
||||
width: 100%;
|
||||
min-width: 0;
|
||||
background: $white url("/assets/icn-search-grey.png") 1em center no-repeat;
|
||||
background: $white image-url("icn-search-grey.png") 1em center no-repeat;
|
||||
font-size: 1rem; // avoid zoom on iphone, see issue #4535
|
||||
|
||||
&::placeholder {
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
.row{ 'ng-if' => 'shop_id && RequestMonitor.loading' }
|
||||
.sixteen.columns.alpha#loading
|
||||
%img.spinner{ src: "/assets/spinning-circles.svg" }
|
||||
%img.spinner{ src: image_path("spinning-circles.svg") }
|
||||
%h1
|
||||
=t :loading_customers
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
%columns-dropdown{ action: "#{controller_name}_#{action_name}" }
|
||||
.row{ 'ng-if' => '!loaded' }
|
||||
.sixteen.columns.alpha#loading
|
||||
%img.spinner{ src: "/assets/spinning-circles.svg" }
|
||||
%img.spinner{ src: image_path("spinning-circles.svg") }
|
||||
%h1= t('.loading_enterprises')
|
||||
.row{ :class => "sixteen columns alpha", 'ng-show' => 'loaded && filteredEnterprises.length == 0'}
|
||||
%h1#no_results= t('.no_enterprises_found')
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
.six.columns
|
||||
= f.text_field :permalink, { 'ng-model' => "Enterprise.permalink", placeholder: "eg. your-shop-name", 'ng-model-options' => "{ updateOn: 'default blur', debounce: {'default': 300, 'blur': 0} }" }
|
||||
.two.columns.omega
|
||||
%img.spinner{ src: "/assets/spinning-circles.svg", width: "30px", ng: { show: "checking" } }
|
||||
%img.spinner{ src: image_path("spinning-circles.svg"), width: "30px", ng: { show: "checking" } }
|
||||
%span{ ng: { class: 'availability.toLowerCase()', hide: "checking" } }
|
||||
{{ availability }}
|
||||
%i{ ng: { class: "{'icon-ok-sign': availability == 'Available', 'icon-remove-sign': availability == 'Unavailable'}" } }
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
%div.sixteen.columns.alpha.omega#loading{ ng: { cloak: true, if: 'RequestMonitor.loading' } }
|
||||
%img.spinner{ src: "/assets/spinning-circles.svg" }
|
||||
%img.spinner{ src: image_path("spinning-circles.svg") }
|
||||
%h1{ ng: { hide: 'orderCycles.length > 0' } }
|
||||
=t('.loading_order_cycles')
|
||||
%h1{ ng: { show: 'orderCycles.length > 0' } }
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
%div.sixteen.columns.alpha.omega#loading{ ng: { cloak: true, if: 'shop_id && RequestMonitor.loading' } }
|
||||
%img.spinner{ src: "/assets/spinning-circles.svg" }
|
||||
%img.spinner{ src: image_path("spinning-circles.svg") }
|
||||
%h1= t('.loading')
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
%div.sixteen.columns.alpha.omega#loading{ ng: { cloak: true, if: 'hub_id && products.length == 0 && RequestMonitor.loading' } }
|
||||
%img.spinner{ src: "/assets/spinning-circles.svg" }
|
||||
%img.spinner{ src: image_path("spinning-circles.svg") }
|
||||
%h1= t('.loading_inventory')
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
- if @group.logo.present?
|
||||
%img.group-logo{"src" => @group.logo}
|
||||
- else
|
||||
%img.group-logo{"src" => '/assets/noimage/group.png'}
|
||||
%img.group-logo{"src" => image_path('noimage/group.png') }
|
||||
%h2.group-name= @group.name
|
||||
%p= @group.description
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
.small-12.text-center.columns
|
||||
%h1
|
||||
/ TODO: Rohan - logo asset & width is content manageable:
|
||||
%img{src: "/assets/logo-white-notext.png", title: Spree::Config.site_name}
|
||||
%img{src: image_path("logo-white-notext.png"), title: Spree::Config.site_name}
|
||||
%br/
|
||||
%a.button.transparent{href: "/shops"}
|
||||
= t :home_shop
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
= stylesheet_link_tag "darkswarm/all"
|
||||
= csrf_meta_tags
|
||||
|
||||
%body.off-canvas{"ng-app" => "Darkswarm", style: 'background-image: url("/assets/tile-wide.png")' }
|
||||
%body.off-canvas{"ng-app" => "Darkswarm", style: "background-image: url(#{image_path('tile-wide.png')})" }
|
||||
/ [if lte IE 8]
|
||||
= render partial: "shared/ie_warning"
|
||||
= javascript_include_tag "iehack"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.row.active_table_row{"ng-if" => "open()", "ng-click" => "toggle($event)", "ng-class" => "{'open' : open()}"}
|
||||
.columns.small-12.fat.text-center{"ng-show" => "open() && shopfront_loading"}
|
||||
%p
|
||||
%img.spinner.text-center{ src: "/assets/spinning-circles.svg" }
|
||||
%img.spinner.text-center{ src: image_path("spinning-circles.svg") }
|
||||
|
||||
.columns.small-12.medium-7.large-7.fat{"ng-show" => "open() && !shopfront_loading"}
|
||||
/ Will add in long description available once clean up HTML formatting producer.long_description
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
%h4= t(".message")
|
||||
.row
|
||||
.small-12.medium-3.large-2.columns.text-right.hide-for-small-only
|
||||
%img{:src => "/assets/potatoes.png"}
|
||||
%img{:src => image_path("potatoes.png") }
|
||||
.small-12.medium-9.large-10.columns
|
||||
%p
|
||||
= t(".text")
|
||||
|
||||
@@ -41,6 +41,6 @@
|
||||
.message{ ng: { hide: "imageSrc() || imageUploader.isUploading" } }
|
||||
= t(".logo_placeholder")
|
||||
.loading{ ng: { hide: "!imageUploader.isUploading" } }
|
||||
%img.spinner{ src: "/assets/spinning-circles.svg" }
|
||||
%img.spinner{ src: image_path("spinning-circles.svg") }
|
||||
%br/
|
||||
= t("registration.steps.images.uploading")
|
||||
|
||||
@@ -39,6 +39,6 @@
|
||||
.message{ ng: { hide: "imageSrc() || imageUploader.isUploading" } }
|
||||
= t(".promo_image_placeholder")
|
||||
.loading{ ng: { hide: "!imageUploader.isUploading" } }
|
||||
%img.spinner{ src: "/assets/spinning-circles.svg" }
|
||||
%img.spinner{ src: image_path("spinning-circles.svg") }
|
||||
%br/
|
||||
= t("registration.steps.images.uploading")
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
.row
|
||||
.small-12.columns.text-center
|
||||
.logo
|
||||
%img{src: "/assets/logo-white-notext.png"}
|
||||
%img{src: image_path("logo-white-notext.png") }
|
||||
.row
|
||||
.small-12.medium-8.medium-offset-2.columns.text-center
|
||||
.alert-box
|
||||
|
||||
@@ -10,17 +10,17 @@
|
||||
.row
|
||||
.small-4.columns.browserbtn
|
||||
%a.browserlogo{href: "https://www.google.com/intl/en_au/chrome/browser/", target: "_blank"}
|
||||
%img{src: "assets/browser-logos/chrome.png"}
|
||||
%img{src: image_path("browser-logos/chrome.png") }
|
||||
%a{href: "https://www.google.com/intl/en_au/chrome/browser/", target: "_blank"}
|
||||
= t :ie_warning_chrome
|
||||
.small-4.columns.browserbtn
|
||||
%a.browserlogo{href: "http://www.mozilla.org/en-US/firefox/new/", target: "_blank"}
|
||||
%img{src: "assets/browser-logos/firefox.png"}
|
||||
%img{src: image_path("browser-logos/firefox.png") }
|
||||
%a{href: "http://www.mozilla.org/en-US/firefox/new/", target: "_blank"}
|
||||
= t :ie_warning_firefox
|
||||
.small-4.columns.browserbtn
|
||||
%a.browserlogo{href: "http://windows.microsoft.com/en-AU/internet-explorer/download-ie", target: "_blank"}
|
||||
%img{src: "assets/browser-logos/internet-explorer.png"}
|
||||
%img{src: image_path("browser-logos/internet-explorer.png") }
|
||||
%a{href: "http://windows.microsoft.com/en-AU/internet-explorer/download-ie", target: "_blank"}
|
||||
= t :ie_warning_ie
|
||||
.row.ie-msg
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
%span
|
||||
= t '.cart'
|
||||
%span.count
|
||||
%img{ src: "/assets/menu/icn-cart.svg" }
|
||||
%img{ src: image_path("menu/icn-cart.svg") }
|
||||
%span
|
||||
{{ Cart.total_item_count() }}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
%span
|
||||
= t '.cart'
|
||||
%span.count
|
||||
%img{ src: "/assets/menu/icn-cart.svg" }
|
||||
%img{ src: image_path("menu/icn-cart.svg") }
|
||||
%span
|
||||
{{ Cart.total_item_count() }}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
%li.user-menu.has-dropdown.not-click
|
||||
|
||||
%a{href: "#", class: "top-bar--menu-item-with-icon"}
|
||||
%img{ src: "/assets/menu/icn-profile.svg" }
|
||||
%img{ src: image_path("menu/icn-profile.svg") }
|
||||
%span
|
||||
= t '.profile'
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
%li#login-link
|
||||
%a{"auth" => "login"}
|
||||
%img{ src: "/assets/menu/icn-login.svg" }
|
||||
%img{ src: image_path("menu/icn-login.svg") }
|
||||
%span
|
||||
= t 'label_login'
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
= t :products_loading
|
||||
.row
|
||||
.small-12.columns.text-center
|
||||
%img.spinner{ src: "/assets/spinning-circles.svg" }
|
||||
%img.spinner{ src: image_path("spinning-circles.svg") }
|
||||
|
||||
.hide-for-medium-down.large-2.columns
|
||||
%h5
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"ng-debounce" => "200",
|
||||
"ofn-disable-enter" => true}
|
||||
%a.clear{type: 'button', ng: {show: 'query', click: 'clearQuery()'}, 'focus-search' => true}
|
||||
%img{ src: "/assets/icn-close.png" }
|
||||
= image_tag "icn-close.png"
|
||||
|
||||
.hide-for-large-up
|
||||
%button{type: 'button', ng: {click: 'toggleFilterSidebar()'}}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.row.active_table_row{"ng-show" => "open()", "ng-click" => "toggle($event)", "ng-class" => "{'open' : open()}"}
|
||||
.columns.small-12.fat.text-center{"ng-show" => "open() && shopfront_loading"}
|
||||
%p
|
||||
%img.spinner.text-center{ src: "/assets/spinning-circles.svg" }
|
||||
%img.spinner.text-center{ src: image_path("spinning-circles.svg") }
|
||||
|
||||
.columns.small-12.medium-6.large-5.fat{"ng-show" => "open() && !shopfront_loading"}
|
||||
%div{"ng-if" => "::hub.taxons"}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
%a{href: "", "ng-click" => "showDistanceMatches()"}
|
||||
= t :hubs_distance_filter, location: "{{ nameMatchesFiltered[0].name }}"
|
||||
.more-controls
|
||||
%img.spinner.text-center{ng: {show: "closed_shops_loading"}, src: "/assets/spinning-circles.svg" }
|
||||
%img.spinner.text-center{ng: {show: "closed_shops_loading"}, src: image_path("spinning-circles.svg") }
|
||||
%span{ng: {if: "!show_closed", cloak: true}}
|
||||
%a.button{href: "", ng: {click: "showClosedShops()"}}
|
||||
= t '.show_closed_shops'
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
%columns-dropdown{ action: "#{controller_name}_#{action_name}" }
|
||||
|
||||
%div.sixteen.columns.alpha#loading{ 'ng-if' => 'RequestMonitor.loading' }
|
||||
%img.spinner{ src: "/assets/spinning-circles.svg" }
|
||||
%img.spinner{ src: image_path("spinning-circles.svg") }
|
||||
%h1
|
||||
= t("admin.orders.bulk_management.loading")
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
%span{'ng-bind-html' => 'order.display_total'}
|
||||
%td.actions
|
||||
%div.row-loading-icons
|
||||
%img.spinner{src: "/assets/spinning-circles.svg", ng: {show: 'rowStatus[order.id] == "loading"'} }
|
||||
%img.spinner{src: image_path("spinning-circles.svg"), ng: {show: 'rowStatus[order.id] == "loading"'} }
|
||||
%i.success.icon-ok-sign{ng: {show: 'rowStatus[order.id] == "success"'} }
|
||||
%i.error.icon-remove-sign.with-tip{ng: {show: 'rowStatus[order.id] == "error"'}, 'ofn-with-tip' => t('.order_not_updated')}
|
||||
%a.icon_link.with-tip.icon-edit.no-text{'ng-href' => '{{order.edit_path}}', 'data-action' => 'edit', 'ofn-with-tip' => t('.edit')}
|
||||
@@ -93,7 +93,7 @@
|
||||
.orders-loading{'ng-show' => 'RequestMonitor.loading'}
|
||||
.row
|
||||
.small-12.columns.fullwidth.text-center
|
||||
%img.spinner{ src: "/assets/spinning-circles.svg" }
|
||||
%img.spinner{ src: image_path("spinning-circles.svg") }
|
||||
.row
|
||||
.small-12.columns.fullwidth.text-center
|
||||
%span= t('.loading')
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
%div.sixteen.columns.alpha#loading{ 'ng-if' => 'RequestMonitor.loading' }
|
||||
%br
|
||||
%img.spinner{ src: "/assets/spinning-circles.svg" }
|
||||
%img.spinner{ src: image_path("spinning-circles.svg") }
|
||||
%h1= t('.title')
|
||||
|
||||
%div.sixteen.columns.alpha{ 'ng-show' => '!RequestMonitor.loading && products.length == 0 && query.length==0' }
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
{{#if variant.image }}
|
||||
<img src='{{variant.image}}' />
|
||||
{{ else }}
|
||||
<img src='/assets/noimage/mini.png' />
|
||||
<img src='<%= image_path("noimage/mini.png") %>' />
|
||||
{{/if}}
|
||||
</figure>
|
||||
|
||||
|
||||
@@ -160,6 +160,7 @@ module Openfoodnetwork
|
||||
config.assets.precompile += ['mail/all.css']
|
||||
config.assets.precompile += ['shared/*']
|
||||
config.assets.precompile += ['qz/*']
|
||||
config.assets.precompile += ['*.jpg', '*.jpeg', '*.png', '*.gif' '*.svg']
|
||||
|
||||
config.active_support.escape_html_entities_in_json = true
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user