plugin-update-card.php
142 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Free version update component |
| 4 | * |
| 5 | * @since 2.9.2 |
| 6 | * @package wp-2fa |
| 7 | */ |
| 8 | |
| 9 | ?> |
| 10 | |
| 11 | <style> |
| 12 | /* General Reset */ |
| 13 | * { |
| 14 | margin: 0; |
| 15 | padding: 0; |
| 16 | box-sizing: border-box; |
| 17 | } |
| 18 | |
| 19 | /* Styles - START */ |
| 20 | |
| 21 | /* Melapress brand font 'Quicksand' — There maybe be a preferable way to add this but this seemed the most discrete. */ |
| 22 | @font-face { |
| 23 | font-family: 'Quicksand'; |
| 24 | src: url('<?php echo \esc_url( WP_2FA_URL ); ?>includes/classes/Free/assets/fonts/Quicksand-VariableFont_wght.woff2') |
| 25 | font-weight: 100 900; /* This indicates that the variable font supports weights from 100 to 900 */ |
| 26 | font-style: normal; |
| 27 | } |
| 28 | |
| 29 | |
| 30 | .wp-2fa-plugin-update { |
| 31 | background-color: #1A3060; |
| 32 | border-radius: 7px; |
| 33 | color: #fff; |
| 34 | display: flex; |
| 35 | justify-content: space-between; |
| 36 | align-items: center; |
| 37 | padding: 1.66rem; |
| 38 | position: relative; |
| 39 | overflow: hidden; |
| 40 | transition: all 0.2s ease-in-out; |
| 41 | margin: 20px 20px 20px 0; /* Added to fix spacing */ |
| 42 | } |
| 43 | |
| 44 | .wp-2fa-plugin-update-content { |
| 45 | max-width: 45%; |
| 46 | } |
| 47 | |
| 48 | .wp-2fa-plugin-update-title { |
| 49 | margin: 0; |
| 50 | font-size: 20px; |
| 51 | font-weight: bold; |
| 52 | font-family: Quicksand, sans-serif; |
| 53 | line-height: 1.44rem; |
| 54 | color: #fff; /* Added to fix contrast */ |
| 55 | } |
| 56 | |
| 57 | |
| 58 | .wp-2fa-plugin-update-text { |
| 59 | margin: .25rem 0 0; |
| 60 | font-size: 0.875rem; |
| 61 | line-height: 1.3125rem; |
| 62 | } |
| 63 | |
| 64 | .wp-2fa-plugin-update-text a:link { |
| 65 | color: #FF8977; |
| 66 | } |
| 67 | |
| 68 | .wp-2fa-cta-link { |
| 69 | border-radius: 0.25rem; |
| 70 | background: #FF8977; |
| 71 | color: #0000EE; |
| 72 | font-weight: bold; |
| 73 | text-decoration: none; |
| 74 | font-size: 0.875rem; |
| 75 | padding: 0.675rem 1.3rem .7rem 1.3rem; |
| 76 | transition: all 0.2s ease-in-out; |
| 77 | display: inline-block; |
| 78 | margin: .5rem auto; |
| 79 | } |
| 80 | |
| 81 | .wp-2fa-cta-link:hover { |
| 82 | background: #0000EE; |
| 83 | color: #FF8977; |
| 84 | } |
| 85 | |
| 86 | .wp-2fa-plugin-update-close { |
| 87 | background-image: url('<?php echo \esc_url( WP_2FA_URL ); ?>includes/classes/Free/assets/images/close-icon-rev.svg'); /* Path to your close icon */ |
| 88 | background-size: cover; |
| 89 | width: 18px; |
| 90 | height: 18px; |
| 91 | border: none; |
| 92 | cursor: pointer; |
| 93 | position: absolute; |
| 94 | top: 20px; |
| 95 | right: 20px; |
| 96 | background-color: transparent; |
| 97 | } |
| 98 | |
| 99 | .wp-2fa-plugin-update::before { |
| 100 | content: ''; |
| 101 | background-image: url('<?php echo \esc_url( WP_2FA_URL ); ?>includes/classes/Free/assets/images/wp-2fa-updated-bg.png'); /* Background image only displayed on desktop */ |
| 102 | background-size: 100%; |
| 103 | background-repeat: no-repeat; |
| 104 | background-position: 100% 51%; |
| 105 | position: absolute; |
| 106 | top: 0; |
| 107 | right: 0; |
| 108 | bottom: 0; |
| 109 | left: 0; |
| 110 | z-index: 0; |
| 111 | } |
| 112 | |
| 113 | .wp-2fa-plugin-update-content, .wp-2fa-plugin-update-close { |
| 114 | z-index: 1; |
| 115 | } |
| 116 | |
| 117 | @media (max-width: 1200px) { |
| 118 | .wp-2fa-plugin-update::before { |
| 119 | display: none; |
| 120 | } |
| 121 | |
| 122 | .wp-2fa-plugin-update-content { |
| 123 | max-width: 100%; |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | /* Styles - END */ |
| 128 | </style> |
| 129 | |
| 130 | <!-- Copy START --> |
| 131 | <div class="wp-2fa-plugin-update wp-2fa-notice" data-dismiss-action="wp2fa_dismiss_upgrade_notice" data-nonce="<?php echo \esc_attr( \wp_create_nonce( 'dismiss_upgrade_notice' ) ); ?>"> |
| 132 | <div class="wp-2fa-plugin-update-content"> |
| 133 | <h2 class="wp-2fa-plugin-update-title"><?php echo esc_html__( 'WP 2FA has been updated to version ', 'wp-2fa' ) . \esc_attr( WP_2FA_VERSION ); ?></h2> |
| 134 | <p class="wp-2fa-plugin-update-text"> |
| 135 | <?php echo \esc_html__( 'You are now running the latest version of WP 2FA. To see what\'s been included in this update, refer to the plugin\'s release notes and change log where we list all new features, updates, and bug fixes.', 'wp-2fa' ); ?> |
| 136 | </p> |
| 137 | <a href="https://melapress.com/wordpress-2fa/releases/?utm_source=plugin&utm_medium=wp2fa&utm_campaign=update_banner" target="_blank" class="wp-2fa-cta-link"><?php echo esc_html__( 'Read the release notes', 'wp-2fa' ); ?></a> |
| 138 | </div> |
| 139 | <button aria-label="Close button" class="wp-2fa-plugin-update-close"></button> |
| 140 | </div> |
| 141 | <!-- Copy END --> |
| 142 |