Changeset 2361571
- Timestamp:
- 08/15/2020 12:46:15 AM (6 years ago)
- Location:
- blackout-darkmode-widget
- Files:
-
- 18 added
- 2 edited
-
tags/2.0.1 (added)
-
tags/2.0.1/blackout.php (added)
-
tags/2.0.1/css (added)
-
tags/2.0.1/css/blackout.css (added)
-
tags/2.0.1/index.php (added)
-
tags/2.0.1/js (added)
-
tags/2.0.1/js/blackout.js (added)
-
tags/2.0.1/license.txt (added)
-
tags/2.0.1/readme.txt (added)
-
tags/2.0.2 (added)
-
tags/2.0.2/blackout.php (added)
-
tags/2.0.2/css (added)
-
tags/2.0.2/css/blackout.css (added)
-
tags/2.0.2/index.php (added)
-
tags/2.0.2/js (added)
-
tags/2.0.2/js/blackout.js (added)
-
tags/2.0.2/license.txt (added)
-
tags/2.0.2/readme.txt (added)
-
trunk/blackout.php (modified) (9 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
blackout-darkmode-widget/trunk/blackout.php
r2355057 r2361571 4 4 Plugin Name: Blackout: Dark Mode Widget 5 5 Description: Adds a toggle widget to your website that activates dark mode on click. 6 Version: 2.0. 16 Version: 2.0.2 7 7 Author: José Sotelo 8 8 Author URI: https://inboundlatino.com … … 318 318 { 319 319 printf( 320 '<input type="range" min=" 1" max="5" step="1" id="blackout_button_size" name="blackout_options[blackout_button_size]" value="%s" />',320 '<input type="range" min="80" max="150" step="10" id="blackout_button_size" name="blackout_options[blackout_button_size]" value="%s" />', 321 321 isset( $this->options['blackout_button_size'] ) ? esc_attr( $this->options['blackout_button_size']) : '' 322 322 ); … … 325 325 { 326 326 printf( 327 '<input type="range" min=" 1.5" max="5.5" step="1" id="blackout_icon_size" name="blackout_options[blackout_icon_size]" value="%s" />',327 '<input type="range" min="30" max="100" step="10" id="blackout_icon_size" name="blackout_options[blackout_icon_size]" value="%s" />', 328 328 isset( $this->options['blackout_icon_size'] ) ? esc_attr( $this->options['blackout_icon_size']) : '' 329 329 ); … … 377 377 wp_enqueue_style('blackout_style', plugin_dir_url( __FILE__ ) . 'css/blackout.css'); 378 378 $blackout_custom_css = ".darkmode-toggle>img{ 379 width: {$blackout_options['blackout_icon_size']} rem!important;380 height:{$blackout_options['blackout_icon_size']} rem!important;379 width: {$blackout_options['blackout_icon_size']}px !important; 380 height:{$blackout_options['blackout_icon_size']}px !important; 381 381 } 382 382 .darkmode-toggle { 383 width:{$blackout_options['blackout_button_size']}rem !important; 384 height:{$blackout_options['blackout_button_size']}rem !important; 383 width:{$blackout_options['blackout_button_size']}px !important; 384 height:{$blackout_options['blackout_button_size']}px !important; 385 } 386 .darkmode-layer--button{ 387 385 388 } 386 389 "; … … 392 395 $blackout_match_os = "false"; 393 396 $blackout_toggle = "const darkmode = new Darkmode(options); darkmode.showWidget();"; 394 $blackout_bottom = " false";395 $blackout_left = " false";396 $blackout_right = " false";397 $blackout_bottom = "32px"; 398 $blackout_left = "unset"; 399 $blackout_right = "32px"; 397 400 $blackout_time = "false"; 398 401 … … 417 420 $blackout_options['blackout_bottom'] !== '' ? $blackout_bottom = $blackout_options['blackout_bottom'] : $blackout_bottom = '32px'; 418 421 $blackout_options['blackout_right'] !== '' ? $blackout_right = $blackout_options['blackout_right'] : $blackout_right = '32px'; 419 $blackout_options['blackout_left'] !== '' ? $blackout_left = $blackout_options['blackout_left'] : $blackout_left = ' unset';422 $blackout_options['blackout_left'] !== '' ? $blackout_left = $blackout_options['blackout_left'] : $blackout_left = '32px'; 420 423 $blackout_options['blackout_time'] !== '' ? $blackout_time = $blackout_options['blackout_time'] : $blackout_time = '0.3s'; 421 424 … … 436 439 } 437 440 {$blackout_toggle} 441 "; 442 443 $blackout_layer_css = " 444 .darkmode-layer--button{ 445 bottom: '{$blackout_bottom}', 446 right: 'unset', 447 left: '{$blackout_left}' 448 } 438 449 "; 439 450 }elseif ($blackout_options['blackout_right_bottom'] == '1'){ … … 452 463 {$blackout_toggle} 453 464 "; 465 $blackout_layer_css = " 466 .darkmode-layer--button{ 467 bottom: '{$blackout_bottom}', 468 right: '{$blackout_right}', 469 left: 'unset' 470 } 471 "; 454 472 }else{ 455 473 $blackout_custom_js = " … … 467 485 {$blackout_toggle} 468 486 "; 469 } 470 471 472 wp_add_inline_script('blackout_script', $blackout_custom_js); 487 $blackout_layer_css = " 488 .darkmode-layer--button{ 489 bottom: '{$blackout_bottom}', 490 right: '{$blackout_right}', 491 left: '{$blackout_left}' 492 } 493 "; 494 } 495 496 wp_add_inline_style('blackout_style', $blackout_layer_css); 497 wp_add_inline_script('blackout_script', $blackout_custom_js); 473 498 } 474 499 function blackout_init(){ -
blackout-darkmode-widget/trunk/readme.txt
r2355057 r2361571 4 4 Tags: dark, dark mode, dark mode widget, darkmode, darkmode widget 5 5 Requires at least: 4.7 6 Tested up to: 5. 26 Tested up to: 5.5 7 7 Requires PHP: 5.4 8 Stable tag: 2.0. 18 Stable tag: 2.0.2 9 9 License: GPLv3 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 27 27 28 28 Please submit it in our [Github Repo](https://github.com/JoseSoteloCohen/Blackout-WordPress-Dark-mode-Widget/issues) 29 30 **Want to receive updates on your email?** 31 32 [Yes, I want!](https://sendfox.com/lp/1jovzq) 29 33 30 34 **Want to use your own widget or element as toggle?** … … 86 90 == Changelog == 87 91 92 = 2.0.2 - 2020-08-14 = 93 94 * Modified how the sizes work, changes from rem to px. 95 88 96 = 2.0.1 - 2020-08-08 = 89 97
Note: See TracChangeset
for help on using the changeset viewer.