From b98c37ae643d9c9b27d9ae0602c8cf3fd05ca1c3 Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Tue, 9 Aug 2022 14:03:00 +0200 Subject: [PATCH] Rename v4 FontAwesome icons to match v5/v6 name While FontAwesome provides aliases for all icons, we switch to the new names for consistency. See all changes at: https://fontawesome.com/docs/web/setup/upgrade/upgrade-from-v4#icons-renamed-since-version-4 --- app/assets/javascripts/editor/editor.js.erb | 10 ++++---- .../editor/participantsupport.js.erb | 2 +- .../javascripts/exercise_collections.js.erb | 2 +- app/assets/javascripts/exercises.js.erb | 6 ++--- .../pagedown/markdown.editor.js.erb | 24 +++++++++---------- app/assets/stylesheets/base.css.scss | 2 +- app/assets/stylesheets/exercises.css.scss | 4 ++-- app/helpers/application_helper.rb | 6 ++--- app/views/application/_session.html.slim | 4 ++-- app/views/community_solutions/_form.html.slim | 10 ++++---- .../error_template_attributes/index.html.slim | 4 ++-- app/views/error_templates/show.html.slim | 4 ++-- .../execution_environments/index.html.slim | 2 +- .../exercise_collections/_form.html.slim | 2 +- app/views/exercises/_editor.html.slim | 18 +++++++------- app/views/exercises/_editor_button.html.slim | 2 +- .../exercises/_editor_file_tree.html.slim | 18 +++++++------- app/views/exercises/_editor_output.html.slim | 8 +++---- app/views/exercises/_export_actions.html.slim | 6 ++--- app/views/exercises/_file_form.html.slim | 2 +- app/views/exercises/_tips_content.html.slim | 2 +- .../external_users/statistics.html.slim | 6 ++--- app/views/exercises/feedback.html.slim | 2 +- app/views/exercises/implement.html.slim | 2 +- app/views/exercises/show.html.slim | 2 +- .../exercises/study_group_dashboard.html.slim | 6 ++--- app/views/layouts/application.html.slim | 2 +- .../_list_entry.html.slim | 4 ++-- .../request_for_comments/index.html.slim | 8 +++---- app/views/request_for_comments/show.html.slim | 12 +++++----- app/views/shared/_new_button.html.slim | 2 +- app/views/tips/_collapsed_card.html.slim | 2 +- app/views/tips/_sortable_tip.html.slim | 6 ++--- lib/file_tree.rb | 16 ++++++------- spec/helpers/application_helper_spec.rb | 6 ++--- spec/lib/file_tree_spec.rb | 22 +++++++++++------ 36 files changed, 122 insertions(+), 114 deletions(-) diff --git a/app/assets/javascripts/editor/editor.js.erb b/app/assets/javascripts/editor/editor.js.erb index 50035ba4..b07341ae 100644 --- a/app/assets/javascripts/editor/editor.js.erb +++ b/app/assets/javascripts/editor/editor.js.erb @@ -216,7 +216,7 @@ var CodeOceanEditor = { }, hideSpinner: function () { - $('button i.fa, button i.far, button i.fas').show(); + $('button i.fa-solid, button i.fa-regular').show(); $('button i.fa-spin').hide(); }, @@ -697,7 +697,7 @@ var CodeOceanEditor = { }, showSpinner: function (initiator) { - $(initiator).find('i.fa, i.far, i.fas').hide(); + $(initiator).find('i.fa-solid, i.fa-regular').hide(); $(initiator).find('i.fa-spin').show(); }, @@ -743,21 +743,21 @@ var CodeOceanEditor = { showContainerDepletedMessage: function () { $.flash.danger({ - icon: ['fa', 'fa-clock-o'], + icon: ['fa-regular', 'fa-clock'], text: $('#editor').data('message-depleted') }); }, showOutOfMemoryMessage: function () { $.flash.info({ - icon: ['fa', 'fa-clock-o'], + icon: ['fa-regular', 'fa-clock'], text: $('#editor').data('message-out-of-memory') }); }, showTimeoutMessage: function () { $.flash.info({ - icon: ['fa', 'fa-clock-o'], + icon: ['fa-regular', 'fa-clock'], text: $('#editor').data('message-timeout') }); }, diff --git a/app/assets/javascripts/editor/participantsupport.js.erb b/app/assets/javascripts/editor/participantsupport.js.erb index af4cb501..77d2138b 100644 --- a/app/assets/javascripts/editor/participantsupport.js.erb +++ b/app/assets/javascripts/editor/participantsupport.js.erb @@ -6,7 +6,7 @@ CodeOceanEditorFlowr = { '
' + '<%= I18n.t('shared.show') %>' + '<%= I18n.t('shared.destroy') %>'; diff --git a/app/assets/javascripts/exercises.js.erb b/app/assets/javascripts/exercises.js.erb index 8d744b58..00d7f52a 100644 --- a/app/assets/javascripts/exercises.js.erb +++ b/app/assets/javascripts/exercises.js.erb @@ -225,9 +225,9 @@ $(document).on('turbolinks:load', function () { const tip = {id: id, title: title} const template = '
' + - '' + tip.title + - '' + - '' + + '' + tip.title + + '' + + '' + '
' + '
'; const tipList = $('#tip-list').append(template); diff --git a/app/assets/javascripts/pagedown/markdown.editor.js.erb b/app/assets/javascripts/pagedown/markdown.editor.js.erb index c6759007..459d7cfa 100644 --- a/app/assets/javascripts/pagedown/markdown.editor.js.erb +++ b/app/assets/javascripts/pagedown/markdown.editor.js.erb @@ -1381,37 +1381,37 @@ }; var group1 = makeGroup(1); - buttons.bold = makeButton("wmd-bold-button", "<%= I18n.t('components.markdown_editor.bold.button_title', default: 'Bold (Ctrl+B)') %>", "m-1 fa fa-bold", bindCommand("doBold"), group1); - buttons.italic = makeButton("wmd-italic-button", "<%= I18n.t('components.markdown_editor.italic.button_title', default: 'Italic (Ctrl+I)') %>", "m-1 fa fa-italic", bindCommand("doItalic"), group1); + buttons.bold = makeButton("wmd-bold-button", "<%= I18n.t('components.markdown_editor.bold.button_title', default: 'Bold (Ctrl+B)') %>", "m-1 fa-solid fa-bold", bindCommand("doBold"), group1); + buttons.italic = makeButton("wmd-italic-button", "<%= I18n.t('components.markdown_editor.italic.button_title', default: 'Italic (Ctrl+I)') %>", "m-1 fa-solid fa-italic", bindCommand("doItalic"), group1); var group2 = makeGroup(2); - buttons.link = makeButton("wmd-link-button", "<%= I18n.t('components.markdown_editor.insert_link.button_title', default: 'Link (Ctrl+L)') %>", "m-1 fa fa-link", bindCommand(function (chunk, postProcessing) { + buttons.link = makeButton("wmd-link-button", "<%= I18n.t('components.markdown_editor.insert_link.button_title', default: 'Link (Ctrl+L)') %>", "m-1 fa-solid fa-link", bindCommand(function (chunk, postProcessing) { return this.doLinkOrImage(chunk, postProcessing, false); }), group2); - buttons.image = makeButton("wmd-image-button", "<%= I18n.t('components.markdown_editor.insert_image.button_title', default: 'Image (Ctrl+G)') %>", "m-1 fa fa-picture-o", bindCommand(function (chunk, postProcessing) { + buttons.image = makeButton("wmd-image-button", "<%= I18n.t('components.markdown_editor.insert_image.button_title', default: 'Image (Ctrl+G)') %>", "m-1 fa-regular fa-image", bindCommand(function (chunk, postProcessing) { return this.doLinkOrImage(chunk, postProcessing, true); }), group2); - buttons.quote = makeButton("wmd-quote-button", "<%= I18n.t('components.markdown_editor.blockquoute.button_title', default: 'Blockquote (Ctrl+Q)') %>", "m-1 fa fa-quote-left", bindCommand("doBlockquote"), group2); - buttons.code = makeButton("wmd-code-button", "<%= I18n.t('components.markdown_editor.code_sample.button_title', default: 'Code Sample (Ctrl+K)') %>", "m-1 fa fa-code", bindCommand("doCode"), group2); + buttons.quote = makeButton("wmd-quote-button", "<%= I18n.t('components.markdown_editor.blockquoute.button_title', default: 'Blockquote (Ctrl+Q)') %>", "m-1 fa-solid fa-quote-left", bindCommand("doBlockquote"), group2); + buttons.code = makeButton("wmd-code-button", "<%= I18n.t('components.markdown_editor.code_sample.button_title', default: 'Code Sample (Ctrl+K)') %>", "m-1 fa-solid fa-code", bindCommand("doCode"), group2); var group3 = makeGroup(3); - buttons.ulist = makeButton("wmd-ulist-button", "<%= I18n.t('components.markdown_editor.bulleted_list.button_title', default: 'Bulleted List (Ctrl+U)') %>", "m-1 fa fa-list-ul", bindCommand(function (chunk, postProcessing) { + buttons.ulist = makeButton("wmd-ulist-button", "<%= I18n.t('components.markdown_editor.bulleted_list.button_title', default: 'Bulleted List (Ctrl+U)') %>", "m-1 fa-solid fa-list-ul", bindCommand(function (chunk, postProcessing) { this.doList(chunk, postProcessing, false); }), group3); - buttons.olist = makeButton("wmd-olist-button", "<%= I18n.t('components.markdown_editor.numbered_list.button_title', default: 'Numbered List (Ctrl+O)') %>", "m-1 fa fa-list-ol", bindCommand(function (chunk, postProcessing) { + buttons.olist = makeButton("wmd-olist-button", "<%= I18n.t('components.markdown_editor.numbered_list.button_title', default: 'Numbered List (Ctrl+O)') %>", "m-1 fa-solid fa-list-ol", bindCommand(function (chunk, postProcessing) { this.doList(chunk, postProcessing, true); }), group3); - buttons.heading = makeButton("wmd-heading-button", "<%= I18n.t('components.markdown_editor.heading.button_title', default: 'Heading (Ctrl+H)') %>", "m-1 fa fa-font", bindCommand("doHeading"), group3); + buttons.heading = makeButton("wmd-heading-button", "<%= I18n.t('components.markdown_editor.heading.button_title', default: 'Heading (Ctrl+H)') %>", "m-1 fa-solid fa-font", bindCommand("doHeading"), group3); var group4 = makeGroup(4); - buttons.undo = makeButton("wmd-undo-button", "<%= I18n.t('components.markdown_editor.undo.button_title', default: 'Undo (Ctrl+Z)') %>", "m-1 fa fa-arrow-rotate-left", null, group4); + buttons.undo = makeButton("wmd-undo-button", "<%= I18n.t('components.markdown_editor.undo.button_title', default: 'Undo (Ctrl+Z)') %>", "m-1 fa-solid fa-arrow-rotate-left", null, group4); buttons.undo.execute = function (manager) { if (manager) manager.undo(); }; var redoTitle = /win/.test(nav.platform.toLowerCase()) ? "<%= I18n.t('components.markdown_editor.redo.button_title.win', default: 'Redo (Ctrl+Y)') %>" : "<%= I18n.t('components.markdown_editor.redo.button_title.other', default: 'Redo (Ctrl+Shift+Z)') %>"; // mac and other non-Windows platforms - buttons.redo = makeButton("wmd-redo-button", redoTitle, "m-1 fa fa-repeat", null, group4); + buttons.redo = makeButton("wmd-redo-button", redoTitle, "m-1 fa-solid fa-arrow-rotate-right", null, group4); buttons.redo.execute = function (manager) { if (manager) manager.redo(); }; if (helpOptions) { @@ -1419,7 +1419,7 @@ group5.className = group5.className + " ml-auto"; var helpButton = document.createElement("button"); var helpButtonImage = document.createElement("i"); - helpButtonImage.className = "m-1 fa fa-info"; + helpButtonImage.className = "m-1 fa-solid fa-info"; helpButton.appendChild(helpButtonImage); helpButton.className = "btn btn-info btn-sm"; helpButton.id = "wmd-help-button" + postfix; diff --git a/app/assets/stylesheets/base.css.scss b/app/assets/stylesheets/base.css.scss index a4b1d82a..1488c4f9 100644 --- a/app/assets/stylesheets/base.css.scss +++ b/app/assets/stylesheets/base.css.scss @@ -12,7 +12,7 @@ h1, h2, h3, h4, h5, h6 { color: rgba(70, 70, 70, 1); } -i.fa, i.far, i.fas { +i.fa-solid, i.fa-regular, i.fa-solid { margin-right: 0.5em; } diff --git a/app/assets/stylesheets/exercises.css.scss b/app/assets/stylesheets/exercises.css.scss index e5118ffc..75a98edf 100644 --- a/app/assets/stylesheets/exercises.css.scss +++ b/app/assets/stylesheets/exercises.css.scss @@ -40,11 +40,11 @@ input[type='file'] { } } -[data-toggle="collapse"] .fa:before { +[data-toggle="collapse"] .fa-solid:before { content: "\f139"; } -[data-toggle="collapse"].collapsed .fa:before { +[data-toggle="collapse"].collapsed .fa-solid:before { content: "\f13a"; } diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 50663b6b..8ca2997f 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -18,7 +18,7 @@ module ApplicationHelper end def empty - tag.i(nil, class: 'empty fa fa-minus') + tag.i(nil, class: 'empty fa-solid fa-minus') end def label_column(label) @@ -31,7 +31,7 @@ module ApplicationHelper private :label_column def no - tag.i(nil, class: 'fa fa-xmark') + tag.i(nil, class: 'fa-solid fa-xmark') end def per_page_param @@ -79,6 +79,6 @@ module ApplicationHelper private :value_column def yes - tag.i(nil, class: 'fa fa-check') + tag.i(nil, class: 'fa-solid fa-check') end end diff --git a/app/views/application/_session.html.slim b/app/views/application/_session.html.slim index 12b7dca2..d14080eb 100644 --- a/app/views/application/_session.html.slim +++ b/app/views/application/_session.html.slim @@ -1,7 +1,7 @@ - if current_user li.nav-item.dropdown a.nav-link.dropdown-toggle data-toggle='dropdown' href='#' - i.fa.fa-user + i.fa-solid.fa-user = current_user span.caret ul.dropdown-menu.p-0.mt-1 role='menu' @@ -14,5 +14,5 @@ li = link_to(t('sessions.destroy.link'), sign_out_path, method: :delete, class: 'dropdown-item') - else li.nav-item = link_to(sign_in_path, class: 'nav-link') do - i.fa.fa-arrow-right-to-bracket + i.fa-solid.fa-arrow-right-to-bracket = t('sessions.new.link') diff --git a/app/views/community_solutions/_form.html.slim b/app/views/community_solutions/_form.html.slim index 3b78f659..05265aa9 100644 --- a/app/views/community_solutions/_form.html.slim +++ b/app/views/community_solutions/_form.html.slim @@ -3,19 +3,19 @@ span.badge.badge-pill.badge-primary.float-right.score h1 id="exercise-headline" - i id="description-symbol" class=(@embed_options[:collapse_exercise_description] ? 'fa fa-chevron-right' : 'fa fa-chevron-down') + i id="description-symbol" class=(@embed_options[:collapse_exercise_description] ? 'fa-solid fa-chevron-right' : 'fa-solid fa-chevron-down') => @community_solution.model_name.human(count: 1) = @community_solution.exercise.title #description-card.lead class=(@embed_options[:collapse_exercise_description] ? 'description-card-collapsed' : 'description-card') .card.border-success.mb-3 .card-header - i.fa.fa-circle-info.text-success + i.fa-solid.fa-circle-info.text-success strong.text-success => t('community_solutions.help_us_out') = t('community_solutions.explanation') br - i.fa.fa-flask.text-success + i.fa-solid.fa-flask.text-success strong.text-success => t('community_solutions.research_status') == t('community_solutions.research_explanation') @@ -61,6 +61,6 @@ = render('exercises/editor_frame', exercise: @community_solution.exercise, file: file, own_solution: true) #statusbar.visible.mt-2 style="height: 5em" p.text-center - = render('exercises/editor_button', classes: 'btn-lg btn-success ml-5 mr-3', data: {'data-url': community_solution_path(@community_solution), 'data-http-method': 'PUT', 'data-cause': 'change-community-solution', 'data-exercise-id': @community_solution.exercise.id}, icon: 'fa fa-send', id: 'submit', label: t('community_solutions.change_community_solution')) - = render('exercises/editor_button', classes: 'btn-lg btn-secondary ml-5', data: {'data-url': community_solution_path(@community_solution), 'data-http-method': 'PUT', 'data-cause': 'accept-community-solution', 'data-exercise-id': @community_solution.exercise.id}, icon: 'fa fa-check', id: 'accept', label: t('community_solutions.accept_community_solution')) + = render('exercises/editor_button', classes: 'btn-lg btn-success ml-5 mr-3', data: {'data-url': community_solution_path(@community_solution), 'data-http-method': 'PUT', 'data-cause': 'change-community-solution', 'data-exercise-id': @community_solution.exercise.id}, icon: 'fa-solid fa-paper-plane', id: 'submit', label: t('community_solutions.change_community_solution')) + = render('exercises/editor_button', classes: 'btn-lg btn-secondary ml-5', data: {'data-url': community_solution_path(@community_solution), 'data-http-method': 'PUT', 'data-cause': 'accept-community-solution', 'data-exercise-id': @community_solution.exercise.id}, icon: 'fa-solid fa-check', id: 'accept', label: t('community_solutions.accept_community_solution')) button style="display:none" id="autosave" data-url=community_solution_path(@community_solution) data-http-method='PUT' data-cause='autosave-community-solution' data-exercise-id=@community_solution.exercise.id diff --git a/app/views/error_template_attributes/index.html.slim b/app/views/error_template_attributes/index.html.slim index 3bb6ee0a..11eae9e4 100644 --- a/app/views/error_template_attributes/index.html.slim +++ b/app/views/error_template_attributes/index.html.slim @@ -14,9 +14,9 @@ h1 = ErrorTemplateAttribute.model_name.human(count: 2) tr td - if error_template_attribute.important - span class="fa fa-star" aria-hidden="true" + span class="fa-solid fa-star" aria-hidden="true" - else - span class="fa fa-star-o" aria-hidden="true" + span class="fa-regular fa-star" aria-hidden="true" td = link_to_if(policy(error_template_attribute).show?, error_template_attribute.key, error_template_attribute) td = error_template_attribute.description td diff --git a/app/views/error_templates/show.html.slim b/app/views/error_templates/show.html.slim index 66864c9a..37fb86ef 100644 --- a/app/views/error_templates/show.html.slim +++ b/app/views/error_templates/show.html.slim @@ -26,9 +26,9 @@ h2.mt-4 tr td - if attribute.important - span class="fa fa-star" aria-hidden="true" + span class="fa-solid fa-star" aria-hidden="true" - else - span class="fa fa-star-o" aria-hidden="true" + span class="fa-regular fa-star" aria-hidden="true" td = link_to_if(policy(attribute).show?, attribute.key, attribute) td = attribute.description td diff --git a/app/views/execution_environments/index.html.slim b/app/views/execution_environments/index.html.slim index 60c52d0f..e79b31fc 100644 --- a/app/views/execution_environments/index.html.slim +++ b/app/views/execution_environments/index.html.slim @@ -2,7 +2,7 @@ h1.d-inline-block = ExecutionEnvironment.model_name.human(count: 2) - if Runner.management_active? = button_to( { action: :sync_all_to_runner_management }, { form_class: 'float-right mb-2', class: 'btn btn-success' }) - i.fa.fa-upload + i.fa-solid.fa-upload = t('execution_environments.index.synchronize_all.button') .table-responsive diff --git a/app/views/exercise_collections/_form.html.slim b/app/views/exercise_collections/_form.html.slim index 07fc874f..c31f8736 100644 --- a/app/views/exercise_collections/_form.html.slim +++ b/app/views/exercise_collections/_form.html.slim @@ -22,7 +22,7 @@ - @exercise_collection.items.order(:position).each do |item| tr data-id=item.exercise.id td - span.fa.fa-bars + span.fa-solid.fa-bars td = item.exercise.title td = link_to(t('shared.show'), item.exercise, 'data-turbolinks' => "false") td diff --git a/app/views/exercises/_editor.html.slim b/app/views/exercises/_editor.html.slim index 153d1691..4e587b9e 100644 --- a/app/views/exercises/_editor.html.slim +++ b/app/views/exercises/_editor.html.slim @@ -17,14 +17,14 @@ div id="sidebar" class=additional_classes = render('editor_file_tree', exercise: @exercise, files: @files) div.editor-col.col.p-0 id='frames' #editor-buttons.btn-group.enforce-bottom-margin - = render('editor_button', disabled: true, icon: 'fa fa-ban', id: 'dummy', label: t('exercises.editor.dummy')) - = render('editor_button', icon: 'fa fa-desktop', id: 'render', label: t('exercises.editor.render')) unless @embed_options[:hide_run_button] - = render('editor_button', data: {:'data-message-failure' => t('exercises.editor.run_failure'), :'data-message-network' => t('exercises.editor.network'), :'data-message-success' => t('exercises.editor.run_success'), :'data-placement' => 'top', :'data-toggle' => 'tooltip', :'data-container' => 'body'}, icon: 'fa fa-play', id: 'run', label: t('exercises.editor.run'), title: t('shared.tooltips.shortcut', shortcut: 'ALT + r')) unless @embed_options[:disable_run] - = render('editor_button', data: {:'data-placement' => 'top', :'data-toggle' => 'tooltip', :'data-container' => 'body'}, icon: 'fa fa-stop', id: 'stop', label: t('exercises.editor.stop'), title: t('shared.tooltips.shortcut', shortcut: 'ALT + r')) unless @embed_options[:disable_run] - = render('editor_button', data: {:'data-placement' => 'top', :'data-toggle' => 'tooltip', :'data-container' => 'body'}, icon: 'fa fa-rocket', id: 'test', label: t('exercises.editor.test'), title: t('shared.tooltips.shortcut', shortcut: 'ALT + t')) unless @embed_options[:disable_run] - = render('editor_button', data: {:'data-placement' => 'top', :'data-toggle' => 'tooltip', :'data-container' => 'body'}, icon: 'fa fa-trophy', id: 'assess', label: t('exercises.editor.score'), title: t('shared.tooltips.shortcut', shortcut: 'ALT + s')) unless @embed_options[:disable_score] + = render('editor_button', disabled: true, icon: 'fa-solid fa-ban', id: 'dummy', label: t('exercises.editor.dummy')) + = render('editor_button', icon: 'fa-solid fa-desktop', id: 'render', label: t('exercises.editor.render')) unless @embed_options[:hide_run_button] + = render('editor_button', data: {:'data-message-failure' => t('exercises.editor.run_failure'), :'data-message-network' => t('exercises.editor.network'), :'data-message-success' => t('exercises.editor.run_success'), :'data-placement' => 'top', :'data-toggle' => 'tooltip', :'data-container' => 'body'}, icon: 'fa-solid fa-play', id: 'run', label: t('exercises.editor.run'), title: t('shared.tooltips.shortcut', shortcut: 'ALT + r')) unless @embed_options[:disable_run] + = render('editor_button', data: {:'data-placement' => 'top', :'data-toggle' => 'tooltip', :'data-container' => 'body'}, icon: 'fa-solid fa-stop', id: 'stop', label: t('exercises.editor.stop'), title: t('shared.tooltips.shortcut', shortcut: 'ALT + r')) unless @embed_options[:disable_run] + = render('editor_button', data: {:'data-placement' => 'top', :'data-toggle' => 'tooltip', :'data-container' => 'body'}, icon: 'fa-solid fa-rocket', id: 'test', label: t('exercises.editor.test'), title: t('shared.tooltips.shortcut', shortcut: 'ALT + t')) unless @embed_options[:disable_run] + = render('editor_button', data: {:'data-placement' => 'top', :'data-toggle' => 'tooltip', :'data-container' => 'body'}, icon: 'fa-solid fa-trophy', id: 'assess', label: t('exercises.editor.score'), title: t('shared.tooltips.shortcut', shortcut: 'ALT + s')) unless @embed_options[:disable_score] - unless hide_rfc_button - = render('editor_button', icon: 'fa fa-comment', id: 'requestComments', label: t('exercises.editor.requestComments'), title: t('exercises.editor.requestCommentsTooltip')) + = render('editor_button', icon: 'fa-solid fa-comment', id: 'requestComments', label: t('exercises.editor.requestComments'), title: t('exercises.editor.requestCommentsTooltip')) - @files.each do |file| - file.read_only = true if @embed_options[:read_only] @@ -34,7 +34,7 @@ div - if !@embed_options[:disable_download] && @exercise.hide_file_tree? button#download.p-0.border-0.btn-link.visible.bg-white - i.fas.fa-arrow-down + i.fa-solid.fa-arrow-down = t('exercises.editor.download') div @@ -45,7 +45,7 @@ = " | " button#start-over-active-file.p-0.border-0.btn-link.bg-white data-message-confirm=t('exercises.editor.confirm_start_over_active_file') data-url=reload_exercise_path(@exercise) - i.fa.fa-clock-rotate-left + i.fa-solid.fa-clock-rotate-left = t('exercises.editor.start_over_active_file') - unless @embed_options[:disable_run] && @embed_options[:disable_score] diff --git a/app/views/exercises/_editor_button.html.slim b/app/views/exercises/_editor_button.html.slim index 98240c08..2608e65e 100644 --- a/app/views/exercises/_editor_button.html.slim +++ b/app/views/exercises/_editor_button.html.slim @@ -1,4 +1,4 @@ button.btn class=local_assigns.fetch(:classes, 'btn-primary') *local_assigns.fetch(:data, {}) disabled=local_assigns.fetch(:disabled, false) id=id title=local_assigns[:title] type='button' - i.fa.fa-circle-o-notch.fa-spin class=(label.blank? ? "m-0" : '') + i.fa-solid.fa-circle-notch.fa-spin class=(label.blank? ? "m-0" : '') i class=(label.present? ? icon : "#{icon} m-0") = label diff --git a/app/views/exercises/_editor_file_tree.html.slim b/app/views/exercises/_editor_file_tree.html.slim index 946d6748..b3b1f7a5 100644 --- a/app/views/exercises/_editor_file_tree.html.slim +++ b/app/views/exercises/_editor_file_tree.html.slim @@ -1,16 +1,16 @@ div id='sidebar-collapsed' class=(@exercise.hide_file_tree && @tips.blank? ? '' : 'd-none') - = render('editor_button', classes: 'btn-block btn-outline-dark btn', data: {:'data-toggle' => 'tooltip', :'data-placement' => 'right'}, icon: 'fa fa-square-plus', id: 'sidebar-collapse-collapsed', label:'', title:t('exercises.editor.expand_action_sidebar')) + = render('editor_button', classes: 'btn-block btn-outline-dark btn', data: {:'data-toggle' => 'tooltip', :'data-placement' => 'right'}, icon: 'fa-solid fa-square-plus', id: 'sidebar-collapse-collapsed', label:'', title:t('exercises.editor.expand_action_sidebar')) - unless @embed_options[:disable_hints] or @tips.blank? - = render('editor_button', classes: 'btn-block btn-secondary btn mb-4', data: {:'data-toggle' => 'tooltip', :'data-placement' => 'right'}, icon: 'fa fa-lightbulb', id: 'tips-collapsed', label:'', title: t('exercises.form.tips')) + = render('editor_button', classes: 'btn-block btn-secondary btn mb-4', data: {:'data-toggle' => 'tooltip', :'data-placement' => 'right'}, icon: 'fa-solid fa-lightbulb', id: 'tips-collapsed', label:'', title: t('exercises.form.tips')) //- if !@course_token.blank? - = render('editor_button', classes: 'btn-block btn-primary btn enforce-top-margin', data: {:'data-toggle' => 'tooltip', :'data-placement' => 'right'}, icon: 'fa fa-magnifying-glass', id: 'sidebar-search-collapsed', label: '', title: t('search.search_in_forum')) + = render('editor_button', classes: 'btn-block btn-primary btn enforce-top-margin', data: {:'data-toggle' => 'tooltip', :'data-placement' => 'right'}, icon: 'fa-solid fa-magnifying-glass', id: 'sidebar-search-collapsed', label: '', title: t('search.search_in_forum')) div.h-100.col-sm-12.enforce-bottom-margin id='sidebar-uncollapsed' class=(@exercise.hide_file_tree && @tips.blank? ? 'd-none' : '') .position-absolute.d-flex.mb-1.w-100 style="overflow: auto; left: 0; top: 0; height: 100%;" .w-100 - = render('editor_button', classes: 'btn-block btn-outline-dark btn', icon: 'fa fa-square-minus', id: 'sidebar-collapse', label: t('exercises.editor.collapse_action_sidebar')) + = render('editor_button', classes: 'btn-block btn-outline-dark btn', icon: 'fa-solid fa-square-minus', id: 'sidebar-collapse', label: t('exercises.editor.collapse_action_sidebar')) - unless @exercise.hide_file_tree div @@ -21,11 +21,11 @@ div.h-100.col-sm-12.enforce-bottom-margin id='sidebar-uncollapsed' class=(@exerc .px-2 = I18n.t('exercises.editor_file_tree.file_root') div - if @exercise.allow_file_creation - = render('editor_button', classes: 'btn-default btn-sm', data: {:'data-toggle' => 'tooltip', :'data-cause' => 'file'}, icon: 'fa fa-plus', id: 'create-file', label: '', title: t('exercises.editor.create_file')) - = render('editor_button', classes: 'btn-default btn-sm', data: {:'data-toggle' => 'tooltip', :'data-cause' => 'file', :'data-message-confirm' => t('shared.confirm_destroy') }, icon: 'far fa-trash-can', id: 'destroy-file', label: '', title: t('exercises.editor.destroy_file')) + = render('editor_button', classes: 'btn-default btn-sm', data: {:'data-toggle' => 'tooltip', :'data-cause' => 'file'}, icon: 'fa-solid fa-plus', id: 'create-file', label: '', title: t('exercises.editor.create_file')) + = render('editor_button', classes: 'btn-default btn-sm', data: {:'data-toggle' => 'tooltip', :'data-cause' => 'file', :'data-message-confirm' => t('shared.confirm_destroy') }, icon: 'fa-regular fa-trash-can', id: 'destroy-file', label: '', title: t('exercises.editor.destroy_file')) - unless @embed_options[:disable_download] - = render('editor_button', classes: 'btn-default btn-sm', data: {:'data-toggle' => 'tooltip'}, icon: 'fas fa-arrow-down', id: 'download', label:'', title: t('exercises.editor.download')) - = render('editor_button', classes: 'btn-default btn-sm', data: {:'data-toggle' => 'tooltip', :'data-message-confirm' => t('exercises.editor.confirm_start_over'), :'data-url' => reload_exercise_path(@exercise)}, icon: 'fa fa-clock-rotate-left', id: 'start-over', label: '', title: t('exercises.editor.start_over')) + = render('editor_button', classes: 'btn-default btn-sm', data: {:'data-toggle' => 'tooltip'}, icon: 'fa-solid fa-arrow-down', id: 'download', label:'', title: t('exercises.editor.download')) + = render('editor_button', classes: 'btn-default btn-sm', data: {:'data-toggle' => 'tooltip', :'data-message-confirm' => t('exercises.editor.confirm_start_over'), :'data-url' => reload_exercise_path(@exercise)}, icon: 'fa-solid fa-clock-rotate-left', id: 'start-over', label: '', title: t('exercises.editor.start_over')) .card-body.pt-0.pr-0.pl-1.pb-1 @@ -43,7 +43,7 @@ div.h-100.col-sm-12.enforce-bottom-margin id='sidebar-uncollapsed' class=(@exerc = text_field_tag 'search-input-text', nil, placeholder: t('search.search_in_forum'), class: 'form-control' .input-group-btn = button_tag(class: 'btn btn-primary', id: 'btn-search-col') do - i.fa.fa-magnifying-glass + i.fa-solid.fa-magnifying-glass - if @exercise.allow_file_creation? = render('shared/modal', id: 'modal-file', template: 'code_ocean/files/_form', title: t('exercises.editor.create_file')) diff --git a/app/views/exercises/_editor_output.html.slim b/app/views/exercises/_editor_output.html.slim index 423a127b..8d8d1da8 100644 --- a/app/views/exercises/_editor_output.html.slim +++ b/app/views/exercises/_editor_output.html.slim @@ -1,8 +1,8 @@ div id='output_sidebar_collapsed' - = render('editor_button', classes: 'btn-block btn-outline-dark btn', data: {:'data-toggle' => 'tooltip', :'data-placement' => 'left'}, title: t('exercises.editor.expand_output_sidebar'), icon: 'fa fa-square-plus', id: 'toggle-sidebar-output-collapsed', label: '') + = render('editor_button', classes: 'btn-block btn-outline-dark btn', data: {:'data-toggle' => 'tooltip', :'data-placement' => 'left'}, title: t('exercises.editor.expand_output_sidebar'), icon: 'fa-solid fa-square-plus', id: 'toggle-sidebar-output-collapsed', label: '') div.h-100 id='output_sidebar_uncollapsed' class='d-none col-sm-12 enforce-bottom-margin' data-message-no-output=t('exercises.implement.no_output_yet') .row - = render('editor_button', classes: 'btn-block btn-outline-dark btn', icon: 'fa fa-square-minus', id: 'toggle-sidebar-output', label: t('exercises.editor.collapse_output_sidebar')) + = render('editor_button', classes: 'btn-block btn-outline-dark btn', icon: 'fa-solid fa-square-minus', id: 'toggle-sidebar-output', label: t('exercises.editor.collapse_output_sidebar')) div.position-absolute.d-flex.mb-1.w-100 style="overflow: auto; left: 0; bottom: 0; height: calc(100% - 3rem);" div.w-100 @@ -60,13 +60,13 @@ div.h-100 id='output_sidebar_uncollapsed' class='d-none col-sm-12 enforce-bottom br - if lti_outcome_service?(@exercise.id, external_user_id) - p.text-center = render('editor_button', classes: 'btn-lg btn-success d-none', data: {:'data-url' => submit_exercise_path(@exercise)}, icon: 'fa fa-send', id: 'submit', label: t('exercises.editor.submit')) + p.text-center = render('editor_button', classes: 'btn-lg btn-success d-none', data: {:'data-url' => submit_exercise_path(@exercise)}, icon: 'fa-solid fa-paper-plane', id: 'submit', label: t('exercises.editor.submit')) - if @exercise.submission_deadline.present? || @exercise.late_submission_deadline.present? #deadline data-submission-deadline=@exercise.submission_deadline&.rfc2822 data-late-submission-deadline=@exercise.late_submission_deadline&.rfc2822 h4 = t('exercises.editor.deadline') = t('exercises.editor.hints.disclaimer') - else - p.text-center = render('editor_button', classes: 'btn-lg btn-secondary disabled', data: {:'data-placement' => 'bottom', :'data-tooltip' => true}, icon: 'fa fa-clock-o', id: 'submit_outdated', label: t('exercises.editor.exercise_deadline_passed'), title: t('exercises.editor.tooltips.exercise_deadline_passed')) + p.text-center = render('editor_button', classes: 'btn-lg btn-secondary disabled', data: {:'data-placement' => 'bottom', :'data-tooltip' => true}, icon: 'fa-regular fa-clock', id: 'submit_outdated', label: t('exercises.editor.exercise_deadline_passed'), title: t('exercises.editor.tooltips.exercise_deadline_passed')) hr div.enforce-big-top-margin #turtlediv diff --git a/app/views/exercises/_export_actions.html.slim b/app/views/exercises/_export_actions.html.slim index 0484d2b2..646c82c0 100644 --- a/app/views/exercises/_export_actions.html.slim +++ b/app/views/exercises/_export_actions.html.slim @@ -1,14 +1,14 @@ - if error = button_tag type: 'button', class:'btn btn-primary pull-right export-button export-retry-button', data: {exercise_id: exercise.id} do - i.fa.fa-refresh.confirm-icon + i.fa-solid.fa-arrows-rotate.confirm-icon = t('exercises.export_codeharbor.buttons.retry') - else - unless exported - if !exercise_found || update_right = button_tag type: 'button', class:'btn btn-primary pull-right export-action export-button', data: {exercise_id: exercise.id} do - i.fa.fa-check.confirm-icon + i.fa-solid.fa-check.confirm-icon = t('exercises.export_codeharbor.buttons.export') = button_tag type: 'submit', class:'btn btn-secondary pull-right export-button', data: {dismiss: 'modal'} do - i.fa.fa-remove.abort-icon + i.fa-solid.fa-xmark.abort-icon = exported ? t('exercises.export_codeharbor.buttons.close') : t('exercises.export_codeharbor.buttons.abort') diff --git a/app/views/exercises/_file_form.html.slim b/app/views/exercises/_file_form.html.slim index 2ede87cb..8af2cfe6 100644 --- a/app/views/exercises/_file_form.html.slim +++ b/app/views/exercises/_file_form.html.slim @@ -6,7 +6,7 @@ li.card.mt-2 - aria_expanded = f.index != 'index' ? 'false' : 'true' a class=['file-heading', collapsed_class] data-toggle="collapse" href="#collapse#{f.index}" aria-expanded="#{aria_expanded}" div.clearfix role="button" - i class="fa" aria-hidden="true" + i.fa-solid aria-hidden="true" span = f.object.filepath .card-collapse.collapse class=('in' if f.object.name.nil?) id="collapse#{f.index}" role="tabpanel" .card-body diff --git a/app/views/exercises/_tips_content.html.slim b/app/views/exercises/_tips_content.html.slim index a9ad9b66..eb2d67ef 100644 --- a/app/views/exercises/_tips_content.html.slim +++ b/app/views/exercises/_tips_content.html.slim @@ -7,7 +7,7 @@ #tips.card.mt-2 role="tab" style="display: block;" .card-header.py-2 - i.fa.fa-lightbulb + i.fa-solid.fa-lightbulb = t('exercises.implement.tips.heading') .card-body.text-dark.bg-white.p-2 = render(partial: 'tips/collapsed_card', collection: @tips, as: :exercise_tip, locals: { tip_prefix: '' }) diff --git a/app/views/exercises/external_users/statistics.html.slim b/app/views/exercises/external_users/statistics.html.slim index 23e5b55e..fe7d96b8 100644 --- a/app/views/exercises/external_users/statistics.html.slim +++ b/app/views/exercises/external_users/statistics.html.slim @@ -29,7 +29,7 @@ h1 .flex-container button.btn.btn-secondary id='play-button' - span.fa.fa-play + span.fa-solid.fa-play #submissions-slider.flex-item input type='range' orient='horizontal' list='datapoints' min=0 max=all_files.length-1 value=0 style="width: 100%" datalist#datapoints @@ -43,12 +43,12 @@ h1 .bg-light.w-100.p-2.mb-4.align-items-center.d-flex.justify-content-between - if @show_autosaves span.pl-1.pb-1 - i.fa.fa-circle-info.align-middle + i.fa-solid.fa-circle-info.align-middle small.mr-5.ml-1 = t('.toggle_status_on') = link_to t('.toggle_autosave_off'), statistics_external_user_exercise_path(show_autosaves: false), class: "btn btn-outline-dark float-right btn-sm" - else span.pl-1.pb-1 - i.fa.fa-circle-info.align-middle + i.fa-solid.fa-circle-info.align-middle small.mr-5.ml-1 = t('.toggle_status_off') = link_to t('.toggle_autosave_on'), statistics_external_user_exercise_path(show_autosaves: true), class: "btn btn-outline-dark float-right btn-sm" #timeline diff --git a/app/views/exercises/feedback.html.slim b/app/views/exercises/feedback.html.slim index aa06a509..9b221d0d 100644 --- a/app/views/exercises/feedback.html.slim +++ b/app/views/exercises/feedback.html.slim @@ -21,7 +21,7 @@ h1 = link_to_if(policy(@exercise).show?, @exercise, exercise_path(@exercise)) - if policy(@exercise).detailed_statistics? span.username = link_to_if(policy(feedback.user).show?, feedback.user.displayname, statistics_external_user_exercise_path(id: @exercise.id, external_user_id: feedback.user.id)) - if feedback.anomaly_notification - i class="fa fa-envelope-o" data-placement="top" data-toggle="tooltip" data-container="body" title=feedback.anomaly_notification.reason + i class="fa-regular fa-envelope" data-placement="top" data-toggle="tooltip" data-container="body" title=feedback.anomaly_notification.reason span.date = feedback.created_at .card-collapse role="tabpanel" .card-body.feedback diff --git a/app/views/exercises/implement.html.slim b/app/views/exercises/implement.html.slim index 6ea23627..6666dcbb 100644 --- a/app/views/exercises/implement.html.slim +++ b/app/views/exercises/implement.html.slim @@ -11,7 +11,7 @@ span.badge.badge-pill.badge-primary.float-right.score h1 id="exercise-headline" - i id="description-symbol" class=(@embed_options[:collapse_exercise_description] ? 'fa fa-chevron-right' : 'fa fa-chevron-down') + i id="description-symbol" class=(@embed_options[:collapse_exercise_description] ? 'fa-solid fa-chevron-right' : 'fa-solid fa-chevron-down') = @exercise.title #description-card.lead class=(@embed_options[:collapse_exercise_description] ? 'description-card-collapsed' : 'description-card') diff --git a/app/views/exercises/show.html.slim b/app/views/exercises/show.html.slim index 517a6980..d6afbd0f 100644 --- a/app/views/exercises/show.html.slim +++ b/app/views/exercises/show.html.slim @@ -48,7 +48,7 @@ ul.list-unstyled#files .card-header role="tab" id="heading" a.file-heading.collapsed data-toggle="collapse" data-parent="#files" href=".collapse#{file.id}" div.clearfix role="button" - i class="fa" aria-hidden="true" + i.fa-solid aria-hidden="true" span = file.filepath .card-collapse.collapse class="collapse#{file.id}" role="tabpanel" .card-body diff --git a/app/views/exercises/study_group_dashboard.html.slim b/app/views/exercises/study_group_dashboard.html.slim index 668e4ee6..e5ad5569 100644 --- a/app/views/exercises/study_group_dashboard.html.slim +++ b/app/views/exercises/study_group_dashboard.html.slim @@ -16,7 +16,7 @@ h4.mt-4 div.w-100#chart_stacked .d-none.badge-info.container.py-2#no_chart_data - i class="fa fa-info" aria-hidden="true" + i class="fa-solid fa-info" aria-hidden="true" = t('.no_data_yet') h4.mt-4 @@ -27,9 +27,9 @@ h4.mt-4 thead tr th.text-center - i.mr-0 class="fa fa-lightbulb-o" aria-hidden="true" title = t('request_for_comments.solved') + i.mr-0 class="fa-regular fa-lightbulb" aria-hidden="true" title = t('request_for_comments.solved') th.text-center - i.mr-0 class="fa fa-comment" aria-hidden="true" title = t('request_for_comments.comments') align="center" + i.mr-0 class="fa-solid fa-comment" aria-hidden="true" title = t('request_for_comments.comments') align="center" th.col-12 = t('activerecord.attributes.request_for_comments.question') th = t('activerecord.attributes.request_for_comments.username') th.text-nowrap = t('activerecord.attributes.request_for_comments.requested_at') diff --git a/app/views/layouts/application.html.slim b/app/views/layouts/application.html.slim index eeb0fd5f..64af76ff 100644 --- a/app/views/layouts/application.html.slim +++ b/app/views/layouts/application.html.slim @@ -41,7 +41,7 @@ html lang="#{I18n.locale || I18n.default_locale}" nav.navbar.navbar-dark.bg-dark.navbar-expand-md.mb-4.py-1 role='navigation' .container .navbar-brand - i.fa.fa-code + i.fa-solid.fa-code = application_name button.navbar-toggler data-target='#navbar-collapse' data-toggle='collapse' type='button' aria-expanded='false' aria-label='Toggle navigation' span.navbar-toggler-icon diff --git a/app/views/request_for_comments/_list_entry.html.slim b/app/views/request_for_comments/_list_entry.html.slim index bb96c5c5..72984276 100644 --- a/app/views/request_for_comments/_list_entry.html.slim +++ b/app/views/request_for_comments/_list_entry.html.slim @@ -1,9 +1,9 @@ tr.table-row-clickable data-id=request_for_comment.id data-href=request_for_comment_path(request_for_comment) td.p-2 - if request_for_comment.solved? - span.fa.fa-check.fa-2x.text-success aria-hidden="true" + span.fa-solid.fa-check.fa-2x.text-success aria-hidden="true" - elsif request_for_comment.full_score_reached - span.fa.fa-check.fa-2x style="color:darkgrey" aria-hidden="true" + span.fa-solid.fa-check.fa-2x style="color:darkgrey" aria-hidden="true" - else = '' td.text-center = request_for_comment.comments_count diff --git a/app/views/request_for_comments/index.html.slim b/app/views/request_for_comments/index.html.slim index 22c929c4..c02f9868 100644 --- a/app/views/request_for_comments/index.html.slim +++ b/app/views/request_for_comments/index.html.slim @@ -18,11 +18,11 @@ h1 = RequestForComment.model_name.human(count: 2) thead tr th - i class="fa fa-lightbulb-o" aria-hidden="true" title = t('request_for_comments.solved') align="right" + i class="fa-regular fa-lightbulb" aria-hidden="true" title = t('request_for_comments.solved') align="right" th = sort_link(@search, :title, t('activerecord.attributes.request_for_comments.exercise')) th = t('activerecord.attributes.request_for_comments.question') th - i class="fa fa-comment" aria-hidden="true" title = t('request_for_comments.comments') align="center" + i class="fa-solid fa-comment" aria-hidden="true" title = t('request_for_comments.comments') align="center" th = t('activerecord.attributes.request_for_comments.username') th = t('activerecord.attributes.request_for_comments.requested_at') th = t('activerecord.attributes.request_for_comments.last_update') @@ -31,10 +31,10 @@ h1 = RequestForComment.model_name.human(count: 2) tr data-id=request_for_comment.id - if request_for_comment.solved? td - span class="fa fa-check" aria-hidden="true" + span class="fa-solid fa-check" aria-hidden="true" - elsif request_for_comment.full_score_reached td - span class="fa fa-check" style="color:darkgrey" aria-hidden="true" + span class="fa-solid fa-check" style="color:darkgrey" aria-hidden="true" - else td = '' td = link_to_if(policy(request_for_comment).show?, request_for_comment.exercise.title, request_for_comment) diff --git a/app/views/request_for_comments/show.html.slim b/app/views/request_for_comments/show.html.slim index d6ae99f4..c43d4467 100644 --- a/app/views/request_for_comments/show.html.slim +++ b/app/views/request_for_comments/show.html.slim @@ -1,7 +1,7 @@ .list-group h4#exercise_caption.list-group-item-heading data-exercise-id="#{@request_for_comment.exercise.id}" data-rfc-id="#{@request_for_comment.id}" - if @request_for_comment.solved? - span.fa.fa-check aria-hidden="true" + span.fa-solid.fa-check aria-hidden="true" = link_to_if(policy(@request_for_comment.exercise).show?, @request_for_comment.exercise.title, [:implement, @request_for_comment.exercise]) p.list-group-item-text - user = @request_for_comment.user @@ -17,7 +17,7 @@ h5 = t('activerecord.attributes.exercise.description') .text - span.fa.fa-chevron-up.collapse-button + span.fa-solid.fa-chevron-up.collapse-button = render_markdown(@request_for_comment.exercise.description) .question @@ -36,7 +36,7 @@ - if output_runs.size > 0 h5.mt-4= t('request_for_comments.runtime_output') .collapsed.testrun-output.text - span.fa.fa-chevron-down.collapse-button + span.fa-solid.fa-chevron-down.collapse-button - output_runs.each do |testrun| pre= testrun.log or t('request_for_comments.no_output') @@ -50,7 +50,7 @@ .testrun-container div class=("result #{testrun.passed ? 'passed' : 'failed'}") .collapsed.testrun-output.text - span.fa.fa-chevron-down.collapse-button + span.fa-solid.fa-chevron-down.collapse-button pre= testrun.log or t('request_for_comments.no_output') - if @current_user.admin? && user.is_a?(ExternalUser) @@ -72,7 +72,7 @@ = (file.path or "") + "/" + file.name + file.file_type.file_extension br/ |    - i.fa.fa-arrow-down aria-hidden="true" + i.fa-solid.fa-arrow-down aria-hidden="true" = t('request_for_comments.click_here') #commentitor.editor data-file-id="#{file.id}" data-mode="#{file.file_type.editor_mode}" data-read-only="true" = file.content @@ -180,7 +180,7 @@ javascript:
' + preprocess(comment.username) + '
\
' + comment.date + '
\
\ - \ + \ #{{ t('request_for_comments.comment_edited') }} \
\
\ diff --git a/app/views/shared/_new_button.html.slim b/app/views/shared/_new_button.html.slim index 9037487b..4b61295f 100644 --- a/app/views/shared/_new_button.html.slim +++ b/app/views/shared/_new_button.html.slim @@ -2,5 +2,5 @@ // default value for fetch will always be evaluated even if it is not returned - href_target = local_assigns.fetch(:path, false) || send(:"new_#{model.model_name.singular}_path") a.btn.btn-success href=href_target - i.fa.fa-plus + i.fa-solid.fa-plus = t('shared.new_model', model: model.model_name.human) diff --git a/app/views/tips/_collapsed_card.html.slim b/app/views/tips/_collapsed_card.html.slim index fac417be..9aaf2782 100644 --- a/app/views/tips/_collapsed_card.html.slim +++ b/app/views/tips/_collapsed_card.html.slim @@ -5,7 +5,7 @@ .card-title.mb-0 a.collapsed aria-controls="tip-collapse-#{exercise_tip.id}" aria-expanded="false" data-parent="#tips" data-toggle="collapse" href="#tip-collapse-#{exercise_tip.id}" .clearfix role="button" - i.fa aria-hidden="true" + i.fa-solid aria-hidden="true" span = t('activerecord.models.tip.one') =< tip_prefix + index.to_s diff --git a/app/views/tips/_sortable_tip.html.slim b/app/views/tips/_sortable_tip.html.slim index 14e456df..183cd240 100644 --- a/app/views/tips/_sortable_tip.html.slim +++ b/app/views/tips/_sortable_tip.html.slim @@ -1,8 +1,8 @@ - tip = exercise_tip.tip .list-group-item.d-block data-tip-id=tip.id data-id=exercise_tip.id - span.fa.fa-bars.mr-3 + span.fa-solid.fa-bars.mr-3 = tip.to_s - a.fa.fa-eye.ml-2 href=tip_path(tip) target='_blank' - a.fa.fa-xmark.ml-2.remove-tip href='#' + a.fa-regular.fa-eye.ml-2 href=tip_path(tip) target='_blank' + a.fa-solid.fa-xmark.ml-2.remove-tip href='#' .list-group.nested-sortable-list class="#{exercise_tip.children.present? ? 'mt-3' : ''}" = render(partial: 'tips/sortable_tip', collection: exercise_tip.children, as: :exercise_tip) diff --git a/lib/file_tree.rb b/lib/file_tree.rb index 405f5c6f..ff8a52bd 100644 --- a/lib/file_tree.rb +++ b/lib/file_tree.rb @@ -3,25 +3,25 @@ class FileTree def file_icon(file) if file.file_type.audio? - 'fa fa-file-audio-o' + 'fa-regular fa-file-audio' elsif file.file_type.image? - 'fa fa-file-image-o' + 'fa-regular fa-file-image' elsif file.file_type.video? - 'fa fa-file-video-o' + 'fa-regular fa-file-video' elsif file.read_only? - 'fa fa-lock' + 'fa-solid fa-lock' elsif file.file_type.executable? - 'fa fa-file-code-o' + 'fa-regular fa-file-code' elsif file.file_type.renderable? - 'fa fa-file-text-o' + 'fa-regular fa-file-text' else - 'fa fa-file-o' + 'fa-regular fa-file' end end private :file_icon def folder_icon - 'fa fa-folder-o' + 'fa-regular fa-folder' end private :folder_icon diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb index e7752b5d..4ec9e0db 100644 --- a/spec/helpers/application_helper_spec.rb +++ b/spec/helpers/application_helper_spec.rb @@ -26,7 +26,7 @@ describe ApplicationHelper do describe '#empty' do it "builds an 'i' tag" do - expect(empty).to have_css('i.empty.fa.fa-minus') + expect(empty).to have_css('i.empty.fa-solid.fa-minus') end end @@ -39,7 +39,7 @@ describe ApplicationHelper do describe '#no' do it "builds an 'i' tag" do - expect(no).to have_css('i.fa.fa-xmark') + expect(no).to have_css('i.fa-solid.fa-xmark') end end @@ -141,7 +141,7 @@ describe ApplicationHelper do describe '#yes' do it "builds an 'i' tag" do - expect(yes).to have_css('i.fa.fa-check') + expect(yes).to have_css('i.fa-solid.fa-check') end end end diff --git a/spec/lib/file_tree_spec.rb b/spec/lib/file_tree_spec.rb index 15066f64..3d546980 100644 --- a/spec/lib/file_tree_spec.rb +++ b/spec/lib/file_tree_spec.rb @@ -13,7 +13,8 @@ describe FileTree do let(:file) { build(:file, file_type: build(:dot_mp3)) } it 'is an audio file icon' do - expect(file_icon).to include('fa-file-audio-o') + expect(file_icon).to include('fa-file-audio') + expect(file_icon).to include('fa-regular') end end @@ -21,7 +22,8 @@ describe FileTree do let(:file) { build(:file, file_type: build(:dot_jpg)) } it 'is an image file icon' do - expect(file_icon).to include('fa-file-image-o') + expect(file_icon).to include('fa-file-image') + expect(file_icon).to include('fa-regular') end end @@ -29,7 +31,8 @@ describe FileTree do let(:file) { build(:file, file_type: build(:dot_mp4)) } it 'is a video file icon' do - expect(file_icon).to include('fa-file-video-o') + expect(file_icon).to include('fa-file-video') + expect(file_icon).to include('fa-regular') end end end @@ -40,6 +43,7 @@ describe FileTree do it 'is a lock icon' do expect(file_icon).to include('fa-lock') + expect(file_icon).to include('fa-solid') end end @@ -47,7 +51,8 @@ describe FileTree do let(:file) { build(:file, file_type: build(:dot_py)) } it 'is a code file icon' do - expect(file_icon).to include('fa-file-code-o') + expect(file_icon).to include('fa-file-code') + expect(file_icon).to include('fa-regular') end end @@ -55,7 +60,8 @@ describe FileTree do let(:file) { build(:file, file_type: build(:dot_svg)) } it 'is a text file icon' do - expect(file_icon).to include('fa-file-text-o') + expect(file_icon).to include('fa-file-text') + expect(file_icon).to include('fa-regular') end end @@ -63,7 +69,8 @@ describe FileTree do let(:file) { build(:file, file_type: build(:dot_md)) } it 'is a generic file icon' do - expect(file_icon).to include('fa-file-o') + expect(file_icon).to include('fa-file') + expect(file_icon).to include('fa-regular') end end end @@ -71,7 +78,8 @@ describe FileTree do describe '#folder_icon' do it 'is a folder icon' do - expect(file_tree.send(:folder_icon)).to include('fa-folder-o') + expect(file_tree.send(:folder_icon)).to include('fa-folder') + expect(file_tree.send(:folder_icon)).to include('fa-regular') end end