mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-01-18 19:00:24 +00:00
variant: more IE11 compliance
This commit is contained in:
parent
b4851c0853
commit
245923a91c
1 changed files with 2 additions and 2 deletions
|
@ -43,7 +43,7 @@ var variants = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
generateVariantPath( variant, old_path ){
|
generateVariantPath: function( variant, old_path ){
|
||||||
var new_path = old_path.replace( /^(.*\/theme-).*?(\.css.*)$/, '$1' + variant + '$2' );
|
var new_path = old_path.replace( /^(.*\/theme-).*?(\.css.*)$/, '$1' + variant + '$2' );
|
||||||
return new_path;
|
return new_path;
|
||||||
},
|
},
|
||||||
|
@ -68,7 +68,7 @@ var variants = {
|
||||||
option = document.createElement( 'option' );
|
option = document.createElement( 'option' );
|
||||||
option.id = this.customvariantname;
|
option.id = this.customvariantname;
|
||||||
option.value = this.customvariantname;
|
option.value = this.customvariantname;
|
||||||
option.text = this.customvariantname.replace( /-/g, ' ' ).replace(/\w\S*/g, (w) => (w.replace(/^\w/g, (c) => c.toUpperCase())));
|
option.text = this.customvariantname.replace( /-/g, ' ' ).replace(/\w\S*/g, function(w){ return w.replace(/^\w/g, function(c){ return c.toUpperCase(); }); });
|
||||||
select.appendChild( option );
|
select.appendChild( option );
|
||||||
document.querySelectorAll( '.footerVariantSwitch' ).forEach( function( e ){
|
document.querySelectorAll( '.footerVariantSwitch' ).forEach( function( e ){
|
||||||
e.classList.add( 'showVariantSwitch' );
|
e.classList.add( 'showVariantSwitch' );
|
||||||
|
|
Loading…
Reference in a new issue