Skip to content

Commit

Permalink
Fix HAML linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire committed Oct 24, 2023
1 parent 8123e86 commit b19d4eb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/views/admin/settings/appearance/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
%p.lead= t('admin.settings.appearance.preamble')

.fields-group
= f.input :flavour_and_skin, collection: Themes.instance.flavours_and_skins, group_label_method: -> (flavour_and_skin) { I18n.t("flavours.#{flavour_and_skin}.name", default: flavour_and_skin) }, wrapper: :with_label, label: t('admin.settings.flavour_and_skin.title'), include_blank: false, as: :grouped_select, label_method: :last, value_method: lambda { |value| value.join('/') }, group_method: :last
= f.input :flavour_and_skin, collection: Themes.instance.flavours_and_skins, group_label_method: ->(flavour_and_skin) { I18n.t("flavours.#{flavour_and_skin}.name", default: flavour_and_skin) }, wrapper: :with_label, label: t('admin.settings.flavour_and_skin.title'), include_blank: false, as: :grouped_select, label_method: :last, value_method: ->(value) { value.join('/') }, group_method: :last

.fields-group
= f.input :custom_css, wrapper: :with_block_label, as: :text, input_html: { rows: 8 }
Expand Down
3 changes: 1 addition & 2 deletions app/views/layouts/_theme.html.haml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
- if theme
- if theme[:pack] != 'common' && theme[:common]
= render partial: 'layouts/theme', object: theme[:common]
= render partial: 'layouts/theme', object: theme[:common] if theme[:pack] != 'common' && theme[:common]
- if theme[:pack]
- pack_path = theme[:flavour] ? "flavours/#{theme[:flavour]}/#{theme[:pack]}" : "core/#{theme[:pack]}"
= javascript_pack_tag pack_path, crossorigin: 'anonymous'
Expand Down
2 changes: 1 addition & 1 deletion app/views/settings/preferences/other/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
= ff.input :default_sensitive, wrapper: :with_label, label: I18n.t('simple_form.labels.defaults.setting_default_sensitive'), hint: I18n.t('simple_form.hints.defaults.setting_default_sensitive')

.fields-group
= ff.input :default_content_type, collection: ['text/plain', 'text/markdown', 'text/html'], wrapper: :with_label, label: I18n.t('simple_form.labels.defaults.setting_default_content_type'), include_blank: false, label_method: lambda { |item| safe_join([t("simple_form.labels.defaults.setting_default_content_type_#{item.split('/')[1]}"), content_tag(:span, t("simple_form.hints.defaults.setting_default_content_type_#{item.split('/')[1]}"), class: 'hint')]) }, required: false, as: :radio_buttons, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li', glitch_only: true
= ff.input :default_content_type, collection: ['text/plain', 'text/markdown', 'text/html'], wrapper: :with_label, label: I18n.t('simple_form.labels.defaults.setting_default_content_type'), include_blank: false, label_method: ->(item) { safe_join([t("simple_form.labels.defaults.setting_default_content_type_#{item.split('/')[1]}"), content_tag(:span, t("simple_form.hints.defaults.setting_default_content_type_#{item.split('/')[1]}"), class: 'hint')]) }, required: false, as: :radio_buttons, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li', glitch_only: true

%h4= t 'preferences.public_timelines'

Expand Down

0 comments on commit b19d4eb

Please sign in to comment.