From c3a8f6a0a33c264d0c461232ab35034a1210a733 Mon Sep 17 00:00:00 2001 From: Claire Date: Fri, 7 Apr 2023 20:55:28 +0200 Subject: Fix glitch-soc HAML linting issues (#2166) --- app/views/layouts/_theme.html.haml | 5 ++--- app/views/layouts/application.html.haml | 2 +- app/views/layouts/embedded.html.haml | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) (limited to 'app/views/layouts') 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' -- cgit