mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-27 01:33:04 +00:00
variant: fix auto mode variant detection in stylesheet generator #679
This commit is contained in:
parent
93d42ffb5e
commit
286b6a13ac
1 changed files with 6 additions and 6 deletions
|
@ -353,18 +353,18 @@ var variants = {
|
|||
|
||||
changeColor: function( c, without_prompt ){
|
||||
var with_prompt = !(without_prompt || false);
|
||||
if( this.getVariant() == 'auto' ){
|
||||
if( with_prompt ){
|
||||
alert( 'The Auto variant can not be changed. Please select the light/dark variant directly to make changes' );
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
var read_style = this.findLoadedStylesheet( 'R-custom-variant-style' );
|
||||
var write_style = this.findLoadedStylesheet( 'R-variant-style' );
|
||||
if( !read_style ){
|
||||
read_style = write_style;
|
||||
}
|
||||
if( !read_style ){
|
||||
if( with_prompt ){
|
||||
alert( 'A auto mode variant can not be changed. Please select its light/dark variant directly to make changes' );
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
var e = this.findColor( c );
|
||||
var v = this.getColorProperty( c, read_style );
|
||||
|
|
Loading…
Reference in a new issue