File tree Expand file tree Collapse file tree 2 files changed +13
-18
lines changed
Expand file tree Collapse file tree 2 files changed +13
-18
lines changed Original file line number Diff line number Diff line change 1- ; ( function ( $ ) {
1+ ; ( function ( ) {
22 'use strict'
3- var tableBlock = document . querySelectorAll ( 'table.tableblock' )
3+
4+ // hide admonition icons from Font Awesome i2svg
5+ // FIXME: eventually we want to add the right prefix so that these icons get loaded from Font Awesome
6+ ; [ ] . slice . call ( document . querySelectorAll ( 'td.icon > i.fa' ) ) . forEach ( function ( el ) {
7+ el . classList . remove ( 'fa' )
8+ } )
49 // for label edition/statuses
5- var $labels = $ ( '.edition' ) . find ( 'a' )
6- for ( var i = 0 ; i < $labels . length ; i ++ ) {
7- if ( $labels [ i ] . text . toLocaleLowerCase ( ) . indexOf ( 'community' ) !== - 1 ) {
8- $labels [ i ] . parentNode . classList . add ( 'page-edition' )
9- }
10- }
10+ ; [ ] . slice . call ( document . querySelectorAll ( '.edition a' ) ) . forEach ( function ( a ) {
11+ if ( ~ a . innerText . toLowerCase ( ) . indexOf ( 'community' ) ) a . parentNode . classList . add ( 'page-edition' )
12+ } )
1113 // add a caption class for all tablelock
12- tableBlock . forEach ( function ( elem , index ) {
13- if ( elem . caption !== null ) {
14- elem . classList . add ( 'caption-table' )
15- }
14+ ; [ ] . slice . call ( document . querySelectorAll ( 'table.tableblock' ) ) . forEach ( function ( table ) {
15+ if ( table . caption ) table . classList . add ( 'caption-table' )
1616 } )
17- /*eslint-env jquery*/
18- } ) ( jQuery )
17+ } ) ( )
Original file line number Diff line number Diff line change 11; ( function ( ) {
22 'use strict'
3- ; [ ] . slice . call ( document . querySelectorAll ( 'td.icon>i.fa' ) ) . forEach ( function ( el ) {
4- el . classList . remove ( 'fa' )
5- } )
6-
73 require ( '@fortawesome/fontawesome-free/js/v4-shims' )
84 var fa = require ( '@fortawesome/fontawesome-svg-core' )
95
You can’t perform that action at this time.
0 commit comments