Changeset 3372020
- Timestamp:
- 10/02/2025 09:26:53 PM (5 months ago)
- Location:
- keyless-auth/trunk
- Files:
-
- 5 edited
-
assets/css/2fa-frontend.css (modified) (29 diffs)
-
includes/class-chrmrtns-kla-2fa-frontend.php (modified) (1 diff)
-
includes/class-chrmrtns-kla-core.php (modified) (5 diffs)
-
keyless-auth.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
keyless-auth/trunk/assets/css/2fa-frontend.css
r3367966 r3372020 4 4 * 5 5 * @since 2.4.0 6 * @updated 2.6.0 - Added dark mode support 6 7 */ 8 9 /* CSS Custom Properties for theming */ 10 :root { 11 --2fa-bg-primary: #ffffff; 12 --2fa-bg-secondary: #f9f9f9; 13 --2fa-bg-tertiary: #f0f0f0; 14 --2fa-bg-info: #f0f6fc; 15 --2fa-text-primary: #23282d; 16 --2fa-text-secondary: #666; 17 --2fa-text-light: #555; 18 --2fa-border-primary: #e1e1e1; 19 --2fa-border-secondary: #ddd; 20 --2fa-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); 21 } 7 22 8 23 /* Main container */ … … 10 25 width: 100%; 11 26 max-width: 1400px; 12 background: #ffffff;13 border: 1px solid #e1e1e1;27 background: var(--2fa-bg-primary); 28 border: 1px solid var(--2fa-border-primary); 14 29 border-radius: 8px; 15 30 padding: 30px; 16 box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);31 box-shadow: var(--2fa-shadow); 17 32 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 18 33 box-sizing: border-box; … … 23 38 text-align: center; 24 39 margin-bottom: 30px; 25 border-bottom: 1px solid #e1e1e1;40 border-bottom: 1px solid var(--2fa-border-primary); 26 41 padding-bottom: 20px; 27 42 } … … 29 44 .chrmrtns-2fa-header h3 { 30 45 margin: 0 0 10px 0; 31 color: #23282d;46 color: var(--2fa-text-primary); 32 47 font-size: 24px; 33 48 } 34 49 35 50 .chrmrtns-2fa-header p { 36 color: #666;51 color: var(--2fa-text-secondary); 37 52 margin: 10px 0; 38 53 } … … 77 92 margin-bottom: 30px; 78 93 padding: 20px; 79 background: #f9f9f9;94 background: var(--2fa-bg-secondary); 80 95 border-radius: 5px; 81 96 border-left: 4px solid #0073aa; … … 89 104 90 105 .chrmrtns-2fa-step h5 { 91 color: #23282d;106 color: var(--2fa-text-primary); 92 107 margin-bottom: 10px; 93 108 } … … 103 118 104 119 .chrmrtns-2fa-apps li { 105 background: white;120 background: var(--2fa-bg-primary); 106 121 padding: 10px; 107 122 border-radius: 5px; 108 border: 1px solid #e1e1e1;123 border: 1px solid var(--2fa-border-primary); 109 124 text-align: center; 125 color: var(--2fa-text-primary); 110 126 } 111 127 … … 125 141 .chrmrtns-2fa-qr #chrmrtns-2fa-qrcode { 126 142 display: inline-block; 127 border: 1px solid #e1e1e1;143 border: 1px solid var(--2fa-border-primary); 128 144 border-radius: 5px; 129 145 padding: 10px; 130 background: #ffffff;146 background: var(--2fa-bg-primary); 131 147 } 132 148 … … 137 153 width: 200px; 138 154 height: 200px; 139 color: #666;155 color: var(--2fa-text-secondary); 140 156 font-style: italic; 141 157 } … … 168 184 margin: 10px 0; 169 185 padding: 10px; 170 background: #f0f0f0;186 background: var(--2fa-bg-tertiary); 171 187 border-radius: 5px; 172 188 flex-wrap: wrap; … … 174 190 175 191 .chrmrtns-2fa-secret code { 176 background: #ffffff;192 background: var(--2fa-bg-primary); 177 193 padding: 8px 12px; 178 194 border-radius: 3px; 179 border: 1px solid #e1e1e1;195 border: 1px solid var(--2fa-border-primary); 180 196 font-family: 'Courier New', monospace; 181 197 font-size: 14px; … … 183 199 flex: 1; 184 200 min-width: 200px; 201 color: var(--2fa-text-primary); 185 202 } 186 203 … … 222 239 text-align: center; 223 240 letter-spacing: 2px; 224 border: 2px solid #e1e1e1;241 border: 2px solid var(--2fa-border-primary); 225 242 border-radius: 5px; 226 243 font-family: 'Courier New', monospace; 244 background: var(--2fa-bg-primary); 245 color: var(--2fa-text-primary); 227 246 } 228 247 … … 258 277 margin-top: 30px; 259 278 padding: 20px; 260 background: #f0f6fc;279 background: var(--2fa-bg-info); 261 280 border-left: 4px solid #0073aa; 262 281 border-radius: 5px; … … 277 296 278 297 .chrmrtns-2fa-info-item { 279 background: #f9f9f9;298 background: var(--2fa-bg-secondary); 280 299 padding: 15px; 281 300 border-radius: 5px; … … 285 304 .chrmrtns-2fa-info-item h4 { 286 305 margin: 0 0 10px 0; 287 color: #666;306 color: var(--2fa-text-secondary); 288 307 font-size: 14px; 289 308 text-transform: uppercase; … … 295 314 font-size: 18px; 296 315 font-weight: 600; 297 color: #23282d;316 color: var(--2fa-text-primary); 298 317 } 299 318 … … 305 324 .chrmrtns-2fa-actions > h4 { 306 325 margin-bottom: 20px; 307 color: #23282d;308 border-bottom: 1px solid #e1e1e1;326 color: var(--2fa-text-primary); 327 border-bottom: 1px solid var(--2fa-border-primary); 309 328 padding-bottom: 10px; 310 329 } … … 313 332 margin-bottom: 30px; 314 333 padding: 20px; 315 background: #f9f9f9;334 background: var(--2fa-bg-secondary); 316 335 border-radius: 5px; 317 336 } … … 319 338 .chrmrtns-2fa-action h5 { 320 339 margin: 0 0 10px 0; 321 color: #23282d;340 color: var(--2fa-text-primary); 322 341 } 323 342 324 343 .chrmrtns-2fa-action p { 325 344 margin: 10px 0; 326 color: #666;345 color: var(--2fa-text-secondary); 327 346 } 328 347 … … 336 355 margin: 15px 0; 337 356 padding: 15px; 338 background: white;339 border: 1px solid #e1e1e1;357 background: var(--2fa-bg-primary); 358 border: 1px solid var(--2fa-border-primary); 340 359 border-radius: 5px; 341 360 } … … 349 368 350 369 .chrmrtns-backup-code { 351 background: #f0f0f0;370 background: var(--2fa-bg-tertiary); 352 371 padding: 8px; 353 372 text-align: center; … … 355 374 font-family: 'Courier New', monospace; 356 375 font-weight: bold; 376 color: var(--2fa-text-primary); 357 377 } 358 378 … … 397 417 398 418 .chrmrtns-modal-content { 399 background: white;419 background: var(--2fa-bg-primary); 400 420 border-radius: 8px; 401 421 max-width: 600px; … … 411 431 align-items: center; 412 432 padding: 20px 30px; 413 border-bottom: 1px solid #e1e1e1;433 border-bottom: 1px solid var(--2fa-border-primary); 414 434 } 415 435 416 436 .chrmrtns-modal-header h3 { 417 437 margin: 0; 418 color: #23282d;438 color: var(--2fa-text-primary); 419 439 } 420 440 … … 424 444 font-size: 24px; 425 445 cursor: pointer; 426 color: #666;446 color: var(--2fa-text-secondary); 427 447 padding: 0; 428 448 width: 30px; … … 434 454 435 455 .chrmrtns-modal-close:hover { 436 color: #000;456 color: var(--2fa-text-primary); 437 457 } 438 458 … … 462 482 463 483 .chrmrtns-backup-codes-grid .chrmrtns-backup-code { 464 background: #f8f9fa;465 border: 1px solid #e1e1e1;484 background: var(--2fa-bg-secondary); 485 border: 1px solid var(--2fa-border-primary); 466 486 padding: 12px 8px; 467 487 font-size: 14px; 488 color: var(--2fa-text-primary); 468 489 } 469 490 … … 659 680 border-color: #46b450; 660 681 } 682 683 /* ======================================== 684 DARK MODE SUPPORT 685 ======================================== */ 686 687 /* System dark mode preference */ 688 @media (prefers-color-scheme: dark) { 689 :root { 690 --2fa-bg-primary: #1e1e1e; 691 --2fa-bg-secondary: #2c3338; 692 --2fa-bg-tertiary: #3c434a; 693 --2fa-bg-info: #2c3338; 694 --2fa-text-primary: #f0f0f1; 695 --2fa-text-secondary: #c3c4c7; 696 --2fa-text-light: #a7aaad; 697 --2fa-border-primary: #646970; 698 --2fa-border-secondary: #3c434a; 699 --2fa-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); 700 } 701 } 702 703 /* Custom dark mode classes - HTML element */ 704 html.cf-theme-dark, 705 html.dark-mode, 706 html.dark, 707 html.theme-dark, 708 html.is-dark-theme, 709 html[data-theme="dark"], 710 html[data-color-scheme="dark"], 711 html[data-mode="dark"], 712 /* Body element */ 713 body.cf-theme-dark, 714 body.dark-mode, 715 body.dark, 716 body.theme-dark, 717 body.is-dark-theme, 718 body[data-theme="dark"], 719 body[data-color-scheme="dark"], 720 body[data-mode="dark"] { 721 --2fa-bg-primary: #1e1e1e; 722 --2fa-bg-secondary: #2c3338; 723 --2fa-bg-tertiary: #3c434a; 724 --2fa-bg-info: #2c3338; 725 --2fa-text-primary: #f0f0f1; 726 --2fa-text-secondary: #c3c4c7; 727 --2fa-text-light: #a7aaad; 728 --2fa-border-primary: #646970; 729 --2fa-border-secondary: #3c434a; 730 --2fa-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); 731 } 732 733 /* Container-level dark mode classes */ 734 .cf-theme-dark .chrmrtns-2fa-container, 735 .dark-mode .chrmrtns-2fa-container, 736 .dark .chrmrtns-2fa-container, 737 .theme-dark .chrmrtns-2fa-container, 738 .is-dark-theme .chrmrtns-2fa-container, 739 [data-theme="dark"] .chrmrtns-2fa-container, 740 [data-color-scheme="dark"] .chrmrtns-2fa-container, 741 [data-mode="dark"] .chrmrtns-2fa-container { 742 --2fa-bg-primary: #1e1e1e; 743 --2fa-bg-secondary: #2c3338; 744 --2fa-bg-tertiary: #3c434a; 745 --2fa-bg-info: #2c3338; 746 --2fa-text-primary: #f0f0f1; 747 --2fa-text-secondary: #c3c4c7; 748 --2fa-text-light: #a7aaad; 749 --2fa-border-primary: #646970; 750 --2fa-border-secondary: #3c434a; 751 --2fa-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); 752 } -
keyless-auth/trunk/includes/class-chrmrtns-kla-2fa-frontend.php
r3368068 r3372020 127 127 CHRMRTNS_KLA_PLUGIN_URL . 'assets/css/2fa-frontend.css', 128 128 array(), 129 CHRMRTNS_KLA_VERSION 129 CHRMRTNS_KLA_VERSION . '.1' // Added .1 to force cache bust for dark mode 130 130 ); 131 131 } -
keyless-auth/trunk/includes/class-chrmrtns-kla-core.php
r3369805 r3372020 120 120 121 121 ?> 122 <form method="post" class="chrmrtns-form"> 123 <p> 124 <label for="user_email_username"><?php echo esc_html(apply_filters('chrmrtns_kla_change_form_label', $login_label)); ?></label><br> 125 <input type="text" name="user_email_username" id="user_email_username" class="input" value="" size="20" required /> 126 </p> 127 <?php wp_nonce_field('chrmrtns_kla_keyless_login_request', 'nonce', false); ?> 128 <input type="hidden" name="chrmrtns_kla_magic_form" value="1" /> 129 <?php if (!empty($atts['redirect'])): ?> 130 <input type="hidden" name="chrmrtns_kla_redirect" value="<?php echo esc_url($atts['redirect']); ?>" /> 131 <?php endif; ?> 132 <p class="submit"> 133 <input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="<?php esc_html_e('Send me the link', 'keyless-auth'); ?>" /> 134 </p> 135 </form> 122 <div class="chrmrtns-kla-form-wrapper"> 123 <form method="post" class="chrmrtns-form"> 124 <p> 125 <label for="user_email_username"><?php echo esc_html(apply_filters('chrmrtns_kla_change_form_label', $login_label)); ?></label><br> 126 <input type="text" name="user_email_username" id="user_email_username" class="input" value="" size="20" required /> 127 </p> 128 <?php wp_nonce_field('chrmrtns_kla_keyless_login_request', 'nonce', false); ?> 129 <input type="hidden" name="chrmrtns_kla_magic_form" value="1" /> 130 <?php if (!empty($atts['redirect'])): ?> 131 <input type="hidden" name="chrmrtns_kla_redirect" value="<?php echo esc_url($atts['redirect']); ?>" /> 132 <?php endif; ?> 133 <p class="submit"> 134 <input type="submit" name="wp-submit" id="chrmrtns-submit" class="button-primary" value="<?php esc_html_e('Send me the link', 'keyless-auth'); ?>" /> 135 </p> 136 </form> 137 </div> 136 138 <?php 137 139 } … … 213 215 $redirect_to = !empty($atts['redirect']) ? esc_url($atts['redirect']) : $this->get_current_page_url(); 214 216 ?> 217 <div class="chrmrtns-kla-form-wrapper"> 215 218 <div class="chrmrtns-full-login-container"> 216 219 <!-- Standard WordPress Login Form --> 217 <div class="chrmrtns-standard-login" >220 <div class="chrmrtns-standard-login" data-form-type="password"> 218 221 <h4><?php esc_html_e('Login with Password', 'keyless-auth'); ?></h4> 219 222 <?php … … 244 247 245 248 <!-- Magic Link Login Form --> 246 <div class="chrmrtns-magic-login" >249 <div class="chrmrtns-magic-login" data-form-type="magic"> 247 250 <h4><?php esc_html_e('Magic Link Login', 'keyless-auth'); ?></h4> 248 251 <p class="chrmrtns-magic-description"><?php esc_html_e('No password required - we\'ll send you a secure login link via email.', 'keyless-auth'); ?></p> … … 324 327 } 325 328 </style> 329 </div><!-- .chrmrtns-kla-form-wrapper --> 326 330 <?php 327 331 } … … 723 727 */ 724 728 public function enqueue_frontend_scripts() { 729 // Enqueue legacy styles for backward compatibility 725 730 if (file_exists(CHRMRTNS_KLA_PLUGIN_DIR . '/assets/css/style-front-end.css')) { 726 731 wp_register_style('chrmrtns_frontend_stylesheet', CHRMRTNS_KLA_PLUGIN_URL . 'assets/css/style-front-end.css', array(), CHRMRTNS_KLA_VERSION); 727 732 wp_enqueue_style('chrmrtns_frontend_stylesheet'); 733 } 734 735 // Enqueue enhanced forms stylesheet with higher priority 736 if (file_exists(CHRMRTNS_KLA_PLUGIN_DIR . '/assets/css/forms-enhanced.css')) { 737 wp_enqueue_style( 738 'chrmrtns_kla_forms_enhanced', 739 CHRMRTNS_KLA_PLUGIN_URL . 'assets/css/forms-enhanced.css', 740 array('chrmrtns_frontend_stylesheet'), // Load after the base stylesheet 741 CHRMRTNS_KLA_VERSION . '.3', // Added .3 to force cache bust for enhanced dark mode 742 'all' 743 ); 728 744 } 729 745 } -
keyless-auth/trunk/keyless-auth.php
r3369805 r3372020 4 4 * Plugin URI: https://github.com/chrmrtns/keyless-auth 5 5 * Description: Enhanced passwordless authentication allowing users to login securely without passwords via email magic links. Fork of Passwordless Login by Cozmoslabs with additional security features. 6 * Version: 2. 5.06 * Version: 2.6.0 7 7 * Author: Chris Martens 8 8 * Author URI: https://github.com/chrmrtns … … 38 38 39 39 // Define plugin constants 40 define('CHRMRTNS_KLA_VERSION', '2. 5.0');40 define('CHRMRTNS_KLA_VERSION', '2.6.0'); 41 41 define('CHRMRTNS_KLA_PLUGIN_DIR', plugin_dir_path(__FILE__)); 42 42 define('CHRMRTNS_KLA_PLUGIN_URL', plugin_dir_url(__FILE__)); -
keyless-auth/trunk/readme.txt
r3369805 r3372020 6 6 Requires at least: 3.9 7 7 Tested up to: 6.8 8 Stable tag: 2. 5.08 Stable tag: 2.6.0 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 271 271 272 272 == Changelog == 273 = 2.6.0 = 274 * NEW: Enhanced CSS system using CSS custom properties for consistent theming across all forms 275 * NEW: Block theme compatibility - forms now work perfectly with Twenty Twenty-Five and other block themes 276 * NEW: Professional blue color scheme (#0073aa) aligned with WordPress admin UI standards 277 * NEW: Dark mode support with automatic color adjustments based on system preferences 278 * NEW: High contrast mode support for improved accessibility 279 * NEW: Reduced motion support for users with motion sensitivity 280 * IMPROVEMENT: Higher CSS specificity without using !important rules for better maintainability 281 * IMPROVEMENT: Responsive mobile-first design with proper touch targets (16px minimum on mobile) 282 * IMPROVEMENT: Enhanced accessibility with proper focus states, ARIA support, and keyboard navigation 283 * IMPROVEMENT: Added wrapper classes (chrmrtns-kla-form-wrapper) for better style isolation 284 * FIX: Form styling conflicts with block themes completely resolved 285 * FIX: Input field styling now consistent across all WordPress themes 286 * FIX: Button hover, active, and focus states properly styled with visual feedback 287 * FIX: Checkbox styling enhanced with custom SVG checkmark 288 * COMPATIBILITY: Full responsive design optimized for mobile devices 289 * ACCESSIBILITY: Comprehensive accessibility improvements including focus indicators and screen reader support 290 273 291 = 2.5.0 = 274 292 * NEW: Added redirect parameter support to [keyless-auth] shortcode - now supports custom redirects like [keyless-auth-full]
Note: See TracChangeset
for help on using the changeset viewer.