diff options
-rw-r--r-- | app/views/layouts/_theme.html.haml | 5 | ||||
-rwxr-xr-x | app/views/layouts/application.html.haml | 2 | ||||
-rw-r--r-- | app/views/layouts/embedded.html.haml | 2 | ||||
-rw-r--r-- | app/views/media/player.html.haml | 2 | ||||
-rw-r--r-- | app/views/settings/flavours/show.html.haml | 4 |
5 files changed, 7 insertions, 8 deletions
diff --git a/app/views/layouts/_theme.html.haml b/app/views/layouts/_theme.html.haml index 5dba77621..71e661de6 100644 --- a/app/views/layouts/_theme.html.haml +++ b/app/views/layouts/_theme.html.haml @@ -9,6 +9,5 @@ = stylesheet_pack_tag pack_path, media: 'all', crossorigin: 'anonymous' - else = stylesheet_pack_tag "skins/#{theme[:flavour]}/#{theme[:skin]}/#{theme[:pack]}", media: 'all', crossorigin: 'anonymous' - - if theme[:preload] - - theme[:preload].each do |link| - %link{ href: asset_pack_path("#{link}.js"), crossorigin: 'anonymous', rel: 'preload', as: 'script' }/ + - theme[:preload]&.each do |link| + %link{ href: asset_pack_path("#{link}.js"), crossorigin: 'anonymous', rel: 'preload', as: 'script' }/ diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index d19ea1390..f4f8744e9 100755 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -39,7 +39,7 @@ = yield :header_tags - -# These must come after :header_tags to ensure our initial state has been defined. + -# These must come after :header_tags to ensure our initial state has been defined. = render partial: 'layouts/theme', object: @core = render partial: 'layouts/theme', object: @theme diff --git a/app/views/layouts/embedded.html.haml b/app/views/layouts/embedded.html.haml index b8817d566..210ac101d 100644 --- a/app/views/layouts/embedded.html.haml +++ b/app/views/layouts/embedded.html.haml @@ -12,7 +12,7 @@ %link{ rel: 'dns-prefetch', href: storage_host }/ = render_initial_state - = javascript_pack_tag "locales", crossorigin: 'anonymous' + = javascript_pack_tag 'locales', crossorigin: 'anonymous' - if @theme - if @theme[:supported_locales].include? I18n.locale.to_s = javascript_pack_tag "locales/#{@theme[:flavour]}/#{I18n.locale}", crossorigin: 'anonymous' diff --git a/app/views/media/player.html.haml b/app/views/media/player.html.haml index c1d630a63..c907d5c60 100644 --- a/app/views/media/player.html.haml +++ b/app/views/media/player.html.haml @@ -1,6 +1,6 @@ - content_for :header_tags do = render_initial_state - = javascript_pack_tag "locales", crossorigin: 'anonymous' + = javascript_pack_tag 'locales', crossorigin: 'anonymous' - if @theme - if @theme[:supported_locales].include? I18n.locale.to_s = javascript_pack_tag "locales/#{@theme[:flavour]}/#{I18n.locale}", crossorigin: 'anonymous' diff --git a/app/views/settings/flavours/show.html.haml b/app/views/settings/flavours/show.html.haml index c3f785aa0..ea2540858 100644 --- a/app/views/settings/flavours/show.html.haml +++ b/app/views/settings/flavours/show.html.haml @@ -5,7 +5,7 @@ = render 'shared/error_messages', object: current_user - Themes.instance.flavour(@selected)['screenshot'].each do |screen| - %img.flavour-screen{ src: full_pack_url("media/#{screen}") } + %img.flavour-screen{ src: full_pack_url("media/#{screen}"), alt: '' } .flavour-description = t "flavours.#{@selected}.description", default: '' @@ -14,7 +14,7 @@ - if Themes.instance.skins_for(@selected).length > 1 .fields-group - = f.input :setting_skin, collection: Themes.instance.skins_for(@selected), label_method: lambda { |skin| I18n.t("skins.#{@selected}.#{skin}", default: skin) }, wrapper: :with_label, include_blank: false + = f.input :setting_skin, collection: Themes.instance.skins_for(@selected), label_method: ->(skin) { I18n.t("skins.#{@selected}.#{skin}", default: skin) }, wrapper: :with_label, include_blank: false .actions = f.button :button, t('generic.use_this'), type: :submit |