Skip to content

Commit

Permalink
Upgrade font-awesome from v4 to v6
Browse files Browse the repository at this point in the history
- Prefix was changed
- Some icons are renamed
- Stick to use web fonts instead of SVG+JS for ease of migration
  • Loading branch information
nekketsuuu committed Mar 5, 2024
1 parent 0ae5e78 commit 5dda9ea
Show file tree
Hide file tree
Showing 35 changed files with 86 additions and 86 deletions.
4 changes: 0 additions & 4 deletions app/javascript/dmemo.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@
}
}

.page-header i.fa {
vertical-align: text-bottom;
}

a.editable-click, a.editable-click:hover {
cursor: pointer !important;
border-bottom: none !important;
Expand Down
5 changes: 4 additions & 1 deletion app/javascript/packs/application.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import '@fortawesome/fontawesome-free/css/brands.css';
import '@fortawesome/fontawesome-free/css/fontawesome.css';
import '@fortawesome/fontawesome-free/css/regular.css';
import '@fortawesome/fontawesome-free/css/solid.css';
import 'admin-lte/bootstrap/css/bootstrap.css';
import 'admin-lte/dist/css/AdminLTE.css';
import 'admin-lte/dist/css/skins/skin-blue.css';
import 'font-awesome/css/font-awesome.css';
import 'jquery-colorbox/example4/colorbox.css';
import 'pygments-css/github.css';
import '../dmemo.css';
Expand Down
2 changes: 1 addition & 1 deletion app/views/data_sources/edit.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
%ol.breadcrumb
%li
= link_to root_path do
%i.fa.fa-home
%i.fa-solid.fa-home
Home
%li
= link_to "Data Sources", data_sources_path
Expand Down
4 changes: 2 additions & 2 deletions app/views/data_sources/new.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
%ol.breadcrumb
%li
= link_to root_path do
%i.fa.fa-home
%i.fa-solid.fa-home
Home
%li
= link_to setting_path do
%i.fa.fa-gear
%i.fa-solid.fa-gear
Setting
%li.active
New Data Source
Expand Down
2 changes: 1 addition & 1 deletion app/views/database_memo_logs/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
%ol.breadcrumb
%li
= link_to root_path do
%i.fa.fa-home
%i.fa-solid.fa-home
Home
%li
= link_to @database_memo.name, database_memo_path(@database_memo.name)
Expand Down
2 changes: 1 addition & 1 deletion app/views/database_memos/_schema_memo.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
%td.truncate-td
= link_to schema_memo.name, database_schema_path(@database_memo.name, schema_memo.name)
- unless schema_memo.linked?
%i.fa.fa-exclamation-triangle{ data: { toggle: "tooltip", placement: "bottom", title: t("unlinked_table") } }
%i.fa-solid.fa-triangle-exclamation{ data: { toggle: "tooltip", placement: "bottom", title: t("unlinked_table") } }
%td.truncate-td
- if schema_memo.description.present?
= schema_memo.description_text.truncate(200)
2 changes: 1 addition & 1 deletion app/views/database_memos/_table_memo.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
%td.truncate-td
= link_to table_memo.name, database_schema_table_path(@database_memo.name, table_memo.schema_memo.name, table_memo.name)
- unless table_memo.linked?
%i.fa.fa-exclamation-triangle{ data: { toggle: "tooltip", placement: "bottom", title: t("unlinked_table") } }
%i.fa-solid.fa-triangle-exclamation{ data: { toggle: "tooltip", placement: "bottom", title: t("unlinked_table") } }
%td.truncate-td
- if table_memo.description.present?
= table_memo.description_text.truncate(200)
8 changes: 4 additions & 4 deletions app/views/database_memos/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
%h1.page-header
= @database_memo.name
= link_to edit_database_memo_path(@database_memo) do
%i.fa.fa-edit
%i.fa-solid.fa-pen-to-square

- unless @database_memo.linked?
.box.box-warning
.box-header
%h4
%i.fa.fa-warning= t("unlinked_database")
%i.fa-solid.fa-triangle-exclamation= t("unlinked_database")
.box-body
= link_to "Delete database information", @database_memo,
method: :delete,
Expand All @@ -19,7 +19,7 @@
%ol.breadcrumb
%li
= link_to root_path do
%i.fa.fa-home
%i.fa-solid.fa-home
Home
%li.active
= @database_memo.name
Expand All @@ -35,7 +35,7 @@
= l(@database_memo.updated_at)
- if @database_memo.logs.exists?
= link_to database_memo_logs_path(@database_memo.id) do
%i.fa.fa-clock-o
%i.fa-regular.fa-clock

- if @database_memo.single_schema?
.box
Expand Down
4 changes: 2 additions & 2 deletions app/views/ignored_tables/new.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
%ol.breadcrumb
%li
= link_to root_path do
%i.fa.fa-home
%i.fa-solid.fa-home
Home
%li
= link_to setting_path do
%i.fa.fa-gear
%i.fa-solid.fa-gear
Setting
%li.active
New Ignored Table
Expand Down
2 changes: 1 addition & 1 deletion app/views/keyword_logs/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
%ol.breadcrumb
%li
= link_to root_path do
%i.fa.fa-home
%i.fa-solid.fa-home
Home
%li
= link_to "Keywords", keywords_path
Expand Down
2 changes: 1 addition & 1 deletion app/views/keywords/edit.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
%ol.breadcrumb
%li
= link_to root_path do
%i.fa.fa-home
%i.fa-solid.fa-home
Home
%li
= link_to "Keywords", keywords_path
Expand Down
4 changes: 2 additions & 2 deletions app/views/keywords/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
%ol.breadcrumb
%li
= link_to root_path do
%i.fa.fa-home
%i.fa-solid.fa-home
Home
%li.active
Keywords
Expand All @@ -17,7 +17,7 @@

.pull-right
= link_to new_keyword_path, class: "btn btn-primary" do
%i.fa.fa-plus
%i.fa-solid.fa-plus
New
.box-body
%table.table.table-hover.table-bordered.table-striped{ role: "grid" }
Expand Down
2 changes: 1 addition & 1 deletion app/views/keywords/new.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
%ol.breadcrumb
%li
= link_to root_path do
%i.fa.fa-home
%i.fa-solid.fa-home
Home
%li
= link_to "Keywords", keywords_path
Expand Down
6 changes: 3 additions & 3 deletions app/views/keywords/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
%h1.page-header
= @keyword.name
= link_to edit_keyword_path(@keyword) do
%i.fa.fa-edit
%i.fa-solid.fa-pen-to-square

%ol.breadcrumb
%li
= link_to root_path do
%i.fa.fa-home
%i.fa-solid.fa-home
Home
%li
= link_to "Keywords", keywords_path
Expand All @@ -23,4 +23,4 @@
= l(@keyword.updated_at)
- if @keyword.logs.exists?
= link_to keyword_logs_path(@keyword.id) do
%i.fa.fa-clock-o
%i.fa-regular.fa-clock
4 changes: 2 additions & 2 deletions app/views/layouts/application.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
%header.main-header
%a.logo{ href: root_path }
%span.logo-mini
%i.fa.fa-home
%i.fa-solid.fa-home
%span.logo-lg
%i.fa.fa-home
%i.fa-solid.fa-home
%b> Database
MEMO
= render "/shared/navbar"
Expand Down
4 changes: 2 additions & 2 deletions app/views/masked_data/new.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
%ol.breadcrumb
%li
= link_to root_path do
%i.fa.fa-home
%i.fa-solid.fa-home
Home
%li
= link_to setting_path do
%i.fa.fa-gear
%i.fa-solid.fa-gear
Setting
%li.active
New Masked Datum
Expand Down
2 changes: 1 addition & 1 deletion app/views/schema_memo_logs/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
%ol.breadcrumb
%li
= link_to root_path do
%i.fa.fa-home
%i.fa-solid.fa-home
Home
%li
= link_to @schema_memo.database_memo.name, database_memo_path(@schema_memo.database_memo.name)
Expand Down
2 changes: 1 addition & 1 deletion app/views/schema_memos/_table_memo.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
%td.truncate-td
= link_to table_memo.name, database_schema_table_path(@schema_memo.database_memo.name, @schema_memo.name, table_memo.name)
- unless table_memo.linked?
%i.fa.fa-exclamation-triangle{ data: { toggle: "tooltip", placement: "bottom", title: t("unlinked_table") } }
%i.fa-solid.fa-triangle-exclamation{ data: { toggle: "tooltip", placement: "bottom", title: t("unlinked_table") } }
%td.truncate-td
- if table_memo.description.present?
= table_memo.description_text.truncate(200)
8 changes: 4 additions & 4 deletions app/views/schema_memos/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
%h1.page-header
= @schema_memo.name
= link_to edit_schema_memo_path(@schema_memo) do
%i.fa.fa-edit
%i.fa-solid.fa-pen-to-square

- unless @schema_memo.linked?
.box.box-warning
.box-header
%h4
%i.fa.fa-warning= t("unlinked_schema")
%i.fa-solid.fa-triangle-exclamation= t("unlinked_schema")
.box-body
= link_to "Delete schema information", @schema_memo,
method: :delete,
Expand All @@ -19,7 +19,7 @@
%ol.breadcrumb
%li
= link_to root_path do
%i.fa.fa-home
%i.fa-solid.fa-home
Home
%li
= link_to @schema_memo.database_memo.name, database_memo_path(@schema_memo.database_memo.name)
Expand All @@ -37,7 +37,7 @@
= l(@schema_memo.updated_at)
- if @schema_memo.logs.exists?
= link_to schema_memo_logs_path(@schema_memo.id) do
%i.fa.fa-clock-o
%i.fa-regular.fa-clock

.box
.box-header.with-border
Expand Down
2 changes: 1 addition & 1 deletion app/views/sessions/new.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
.content
%p.lead Required sign in to access Dmemo.
= button_to google_oauth2_path(return_to: params[:return_to]), class: 'btn btn-default', method: :post do
%i.fa.fa-google
%i.fa-brands.fa-google
%span Sign in with Google
6 changes: 3 additions & 3 deletions app/views/settings/_data_sources.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

- if current_user.admin?
= link_to new_data_source_path, class: "btn btn-default btn-sm pull-right" do
%i.fa.fa-plus
%i.fa-solid.fa-plus
Add Data Source
.box-body
%table.table.table-hover.table-bordered.table-striped{ role: "grid" }
Expand Down Expand Up @@ -34,7 +34,7 @@
- if current_user.admin?
= link_to edit_data_source_path(data_source) do
%button.btn.btn-default
%i.fa.fa-edit
%i.fa-solid.fa-pen-to-square
= link_to data_source_path(data_source), method: :delete, data: { confirm: "Delete data source #{data_source.name}?" } do
%button.btn.btn-default
%i.fa.fa-trash
%i.fa-solid.fa-trash
4 changes: 2 additions & 2 deletions app/views/settings/_ignored_tables.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

- if current_user.admin?
= link_to new_ignored_table_path, class: "btn btn-default btn-sm pull-right" do
%i.fa.fa-plus
%i.fa-solid.fa-plus
Add Ignored Table
.box-body
%table.table.table-hover.table-bordered.table-striped{ role: "grid" }
Expand All @@ -22,4 +22,4 @@
- if current_user.admin?
= link_to ignored_table, method: :delete, data: { confirm: "Delete ignore table pattern #{ignored_table.pattern}" } do
%button.btn.btn-default
%i.fa.fa-trash
%i.fa-solid.fa-trash
4 changes: 2 additions & 2 deletions app/views/settings/_masked_data.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

- if current_user.admin?
= link_to new_masked_datum_path, class: "btn btn-default btn-sm pull-right" do
%i.fa.fa-plus
%i.fa-solid.fa-plus
Add Masked Data
.box-body
%table.table.table-hover.table-bordered.table-striped{ role: "grid" }
Expand All @@ -25,5 +25,5 @@
- if current_user.admin?
= link_to masked_datum_path(masked_datum), method: :delete, data: { confirm: "Delete masked_data #{masked_datum.pack}?" } do
%button.btn.btn-default
%i.fa.fa-trash
%i.fa-solid.fa-trash

4 changes: 2 additions & 2 deletions app/views/settings/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
%ol.breadcrumb
%li
= link_to root_path do
%i.fa.fa-home
%i.fa-solid.fa-home
Home
%li.active
%i.fa.fa-gear
%i.fa-solid.fa-gear
Setting

.container-data_sources= render "data_sources"
Expand Down
12 changes: 6 additions & 6 deletions app/views/shared/_main_sidebar.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,26 @@
= f.text_field :keyword, placeholder: "Search...", class: "form-control"
%span.input-group-btn
%button#search-btn.btn.btn-flat{name: "search", type: "submit"}
%i.fa.fa-search
%i.fa-solid.fa-magnifying-glass

%ul.sidebar-menu
%li
= link_to root_path do
%i.fa.fa-home
%i.fa-solid.fa-home
Home
%li
= link_to users_path do
%i.fa.fa-user
%i.fa-solid.fa-user
User
%li
= link_to keywords_path do
%i.fa.fa-book
%i.fa-solid.fa-book
Keyword
%li.treeview.opened
%a.disable-click
%i.fa.fa-database
%i.fa-solid.fa-database
%span Database
%i.fa.fa-angle-down.pull-right
%i.fa-solid.fa-angle-down.pull-right
%ul.treeview-menu
- @sidebar_databases.map(&:name).each do |name|
%li
Expand Down
6 changes: 3 additions & 3 deletions app/views/shared/_navbar.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
%ul.nav.navbar-nav
%li
= link_to setting_path do
%i.fa.fa-gear
%i.fa-solid.fa-gear
Setting
%li
= link_to edit_user_path(current_user) do
%i.fa.fa-user
%i.fa-solid.fa-user
= current_user.name
%li
= link_to logout_path, method: :delete do
%i.fa.fa-sign-out
%i.fa-solid.fa-arrow-right-from-bracket
Sign-out
2 changes: 1 addition & 1 deletion app/views/table_memo_logs/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
%ol.breadcrumb
%li
= link_to root_path do
%i.fa.fa-home
%i.fa-solid.fa-home
Home
%li
= link_to @table_memo.database_memo.name, database_memo_path(@table_memo.database_memo.name)
Expand Down
Loading

0 comments on commit 5dda9ea

Please sign in to comment.