Skip to content

Commit 3442bf2

Browse files
authored
Merge pull request #166 from MITLibraries/pw-113
Replace old custom versions of FontAwesome with new FontAwesome 6 via our own CDN
2 parents e63e481 + cb924a2 commit 3442bf2

File tree

126 files changed

+82
-17727
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+82
-17727
lines changed

web/app/themes/mitlib-child/css/scss/interviewees.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,10 @@
4545

4646
&:before {
4747
content: "";
48-
font-family: FontAwesome;
48+
font-family: 'Font Awesome 6 Free';
4949
color: #338bc5;
5050
font-size: 12px;
51+
font-weight: 600;
5152
margin-left: -12px;
5253
}
5354
}

web/app/themes/mitlib-child/css/scss/interviews.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
.row-icon {
99
margin: 9px 9px 6px 9px;
10+
padding-top: 4px;
1011
}
1112

1213
.list-inline {
@@ -17,6 +18,8 @@
1718
margin-right: 12px;
1819
}
1920

21+
&.links i {margin-right: 4px;}
22+
2023
&.tags li,
2124
&.categories li {
2225
padding-left: 0;

web/app/themes/mitlib-child/functions.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ function child_scripts_styles() {
2828

2929
// First we register stylesheet libraries.
3030
wp_register_style( 'bootstrap', '//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css', array(), '3.0.0' );
31-
wp_register_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.6.0/css/font-awesome.min.css', array(), '4.6.0' );
3231
wp_register_style( 'interviews', get_stylesheet_directory_uri() . '/css/build/interviews.css', array(), $theme_version );
3332
wp_register_style( 'interviewees', get_stylesheet_directory_uri() . '/css/build/interviewees.css', array(), $theme_version );
3433
wp_register_style( 'child-style', get_stylesheet_uri(), array( 'parent-global', 'dashicons' ), $theme_version );
@@ -43,7 +42,6 @@ function child_scripts_styles() {
4342

4443
// Finally we enqueue those libraries - the child theme just always enqueues everything.
4544
wp_enqueue_style( 'bootstrap' );
46-
wp_enqueue_style( 'font-awesome' );
4745
wp_enqueue_style( 'child-style' );
4846
wp_enqueue_script( 'jquery' );
4947
wp_enqueue_script( 'bootstrap-js' );

web/app/themes/mitlib-child/inc/location.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@
2323
<?php if ( $docs_email ) : ?>
2424
<a href="mailto:<?php echo esc_attr( $docs_email ); ?>" class="email"><?php echo esc_html( $docs_email ); ?></a> |
2525
<?php endif; ?>
26-
<a href="<?php echo esc_attr( $map_page ); ?>">Room: <?php echo esc_html( $docs_building ); ?> <i class="icon-arrow-right"></i></a>
26+
<a href="<?php echo esc_attr( $map_page ); ?>">Room: <?php echo esc_html( $docs_building ); ?> <i class="fa-solid fa-arrow-right"></i></a>
2727
</div>

web/app/themes/mitlib-child/single-interview.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
</div>
101101
<div class="flex-item">
102102
<div class="flex-container">
103-
<i class="icon-folder-close flex-item row-icon"></i>
103+
<i class="fa fa-folder flex-item row-icon"></i></i>
104104
<ul class="list-inline categories flex-item">
105105
<?php
106106
foreach ( $categories as $category ) {
@@ -110,7 +110,7 @@
110110
</ul>
111111
</div>
112112
<div class="flex-container">
113-
<i class="icon-tag flex-item row-icon"></i>
113+
<i class="fa fa-tag flex-item row-icon"></i>
114114
<ul class="list-inline tags flex-item">
115115
<?php
116116
foreach ( $tags as $tag ) {
@@ -122,16 +122,16 @@
122122
<ul class="list-inline links">
123123
<?php
124124
if ( $audio ) {
125-
echo '<li><i class="icon-download"></i> <a href="' . esc_url( $audio ) . '">Download (MP3)</a></li>';
125+
echo '<li><i class="fa-regular fa-circle-down"></i> <a href="' . esc_url( $audio ) . '">Download (MP3)</a></li>';
126126
}
127127
if ( $transcript ) {
128-
echo '<li><i class="icon-file"></i> <a href="' . esc_url( $transcript ) . '">Transcript (PDF)</a></li>';
128+
echo '<li><i class="fa-regular fa-file-lines"></i> <a href="' . esc_url( $transcript ) . '">Transcript (PDF)</a></li>';
129129
}
130130
if ( $cd ) {
131131
echo '<li><span class="dashicons dashicons-album"></span> <a href="' . esc_url( $cd ) . '">CD available in the library</a></li>';
132132
}
133133
if ( $print ) {
134-
echo '<li><i class="icon-book"></i> <a href="' . esc_url( $print ) . '">Print transcript available in the library</a></li>';
134+
echo '<li><i class="fa fa-book"></i> <a href="' . esc_url( $print ) . '">Print transcript available in the library</a></li>';
135135
}
136136
?>
137137
</ul>

web/app/themes/mitlib-child/style.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ b, strong {
120120
.childTheme .todayHours a:after,.childTheme .locationInfo a:after {
121121
content:'\f061';
122122
display:inline-block;
123-
font-family:'fontawesome-MITLibraries';
123+
font-family:'Font Awesome 6 Free';
124124
margin-left:.5em;
125125
}
126126

@@ -997,7 +997,7 @@ a.px14 {
997997

998998
.upw-content .custom-field-event_date:before {
999999
margin-right: 5px;
1000-
font-family:FontAwesome;
1000+
font-family:'Font Awesome 6 Free';
10011001
content:"\f073" !important;
10021002
color: #F58733;
10031003
font-size: 1em;
@@ -1145,7 +1145,7 @@ a.px14 {
11451145
.exhibits-button:after {
11461146
content:'\f061';
11471147
display:inline-block;
1148-
font-family:'fontawesome';
1148+
font-family:'Font Awesome 6 Free';
11491149
margin-left:.5em;
11501150
}
11511151

@@ -1189,7 +1189,7 @@ a.px14 {
11891189

11901190
.button.button-music:before {
11911191
content: "\f028";
1192-
font-family: FontAwesome;
1192+
font-family: 'Font Awesome 6 Free';
11931193
font-weight: normal;
11941194
font-size: inherit;
11951195
margin-right: 10px;

web/app/themes/mitlib-news/functions.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ function news_scripts_styles() {
2626
$parent_version = wp_get_theme()->parent()->get( 'Version' );
2727

2828
// Register stylesheets.
29-
wp_register_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.6.0/css/font-awesome.min.css', array(), '4.6.0' );
3029
wp_register_style( 'parent-style', get_template_directory_uri() . '/style.css', array(), $parent_version );
3130
wp_register_style( 'bootstrap', get_stylesheet_directory_uri() . '/css/bootstrap.css', array(), $theme_version );
3231
wp_register_style( 'newsmobile', get_stylesheet_directory_uri() . '/css/newsmobile.css', array(), $theme_version );
@@ -37,7 +36,6 @@ function news_scripts_styles() {
3736
wp_register_script( 'myScripts', get_stylesheet_directory_uri() . '/js/myScripts.js', array( 'lazyload' ), $theme_version, false );
3837

3938
// Enqueue libraries - these files are always loaded.
40-
wp_enqueue_style( 'font-awesome' );
4139
wp_enqueue_style( 'parent-style' );
4240
wp_enqueue_style( 'bootstrap' );
4341
wp_enqueue_style( 'newsmobile' );

web/app/themes/mitlib-parent/css/scss/_main.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,12 @@ ul.arrows li:before,
191191
.single-location .tab ul.arrows li:before,
192192
.page-template-page-location-php .tab ul.arrows li:before
193193
{
194-
font-family:FontAwesome;
194+
font-family:'Font Awesome 6 Free';
195195
content:"\f061";
196196
color: #338bc5;
197197
font-size: .75em;
198198
margin-right: 7px;
199+
font-weight: 600;
199200
}
200201

201202
.locationContent ul li {
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
@import "modules/all";
22
@import "main";
33
@import "responsive";
4-
@import "../../libs/fontawesome/css/font-awesome";
5-
@import "../../libs/fontawesome-MITLibraries/style";
4+
@import "https://cdn.libraries.mit.edu/files/fontawesome/6.7.1/css/fontawesome.css";
5+
@import "https://cdn.libraries.mit.edu/files/fontawesome/6.7.1/css/solid.css";
6+
@import "https://cdn.libraries.mit.edu/files/fontawesome/6.7.1/css/regular.css";
7+
@import "https://cdn.libraries.mit.edu/files/fontawesome/6.7.1/css/brands.css";
68
@import "partials/base";
79
@import "libs/base";

web/app/themes/mitlib-parent/css/scss/partials/_accordion.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
flex-direction: column;
2020
}
2121
&:before {
22-
font-family:FontAwesome;
22+
font-family:'Font Awesome 6 Free';
2323
content:"\f0da";
2424
margin-right: 1em;
2525
color: #338bc5;

0 commit comments

Comments
 (0)