Changeset 45071
- Timestamp:
- 03/29/2019 06:43:09 PM (6 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/admin/site-health.js
r45069 r45071 69 69 var r, c, pct; 70 70 var $progress = $( '.site-health-progress' ); 71 var $progressCount = $progress.find( '. progress-count' );71 var $progressCount = $progress.find( '.site-health-progress-count' ); 72 72 var $circle = $( '.site-health-progress svg #bar' ); 73 73 var totalTests = parseInt( SiteHealth.site_status.issues.good, 0 ) + parseInt( SiteHealth.site_status.issues.recommended, 0 ) + ( parseInt( SiteHealth.site_status.issues.critical, 0 ) * 1.5 ); -
trunk/src/wp-admin/css/site-health.css
r45044 r45071 1 body.site-health #wpcontent {1 .site-health #wpcontent { 2 2 padding-left: 0; 3 3 } 4 4 5 body.site-health .wrap { 6 margin-right: 0; 7 margin-left: 0; 8 } 9 10 body.site-health .wrap h2 { 5 /* Emulates .wrap h1 styling */ 6 .health-check-header h1 { 7 display: inline-block; 8 font-weight: 600; 9 margin: 1rem 0.8rem; 10 font-size: 23px; 11 padding: 9px 0 4px 0; 12 line-height: 29px; 13 } 14 15 .health-check-body h2 { 11 16 padding: 1rem 0; 12 font-size: 1.3em;13 17 line-height: 1.4; 14 font-weight: 600; 15 } 16 17 body.site-health ul li, 18 body.site-health ol li { 19 line-height: 1.5; 20 } 21 22 body.site-health .health-check-header { 18 } 19 20 .health-check-body h3 { 21 padding: 0; 22 font-weight: 400; 23 } 24 25 .health-check-header { 23 26 text-align: center; 24 margin-top: 0; 25 margin-bottom: 1rem; 27 margin: 0 0 1rem; 26 28 background: #fff; 27 29 border-bottom: 1px solid #e2e4e7; 28 30 } 29 31 30 body.site-health .health-check-header .title-section {32 .health-check-title-section { 31 33 display: flex; 32 34 align-items: center; 33 35 justify-content: center; 34 }35 36 body.site-health .health-check-header .title-section h1 {37 display: inline-block;38 font-weight: 600;39 margin: 1rem 0.8rem 1rem 0.8rem;40 36 } 41 37 … … 51 47 } 52 48 53 .site-health-progress .progress-count {49 .site-health-progress-count { 54 50 position: absolute; 55 51 display: block; … … 65 61 } 66 62 67 .site-health-progress .progress-count::after {63 .site-health-progress-count::after { 68 64 content: ""; 69 65 } 70 66 71 .site-health-progress.hidden { 72 display: none; 73 } 74 75 .site-health-progress.loading .progress-count::after { 67 .site-health-progress.loading .site-health-progress-count::after { 76 68 animation: loadingEllipsis 3s infinite ease-in-out; 77 69 } … … 127 119 } 128 120 129 body.site-health .health-check-header .tabs-wrapper { 130 display: block; 131 } 132 133 body.site-health .health-check-header .tabs-wrapper .tab { 134 float: none; 121 .health-check-tab { 135 122 display: inline-block; 136 123 text-decoration: none; … … 141 128 } 142 129 143 body.site-health .health-check-header .tabs-wrapper .tab:focus {130 .health-check-tab:focus { 144 131 color: #191e23; 145 132 outline: 1px solid #6c7781; … … 147 134 } 148 135 149 body.site-health .health-check-header .tabs-wrapper .tab.active {136 .health-check-tab.active { 150 137 box-shadow: inset 0 -3px #007cba; 151 138 font-weight: 600; 152 139 } 153 140 154 body.site-health.health-check-body {141 .health-check-body { 155 142 max-width: 800px; 156 143 margin: 0 auto; 157 144 } 158 145 159 body.site-health .health-check-table thead th:first-child, 160 body.site-health .health-check-table thead td:first-child { 146 .health-check-table td:first-child { 161 147 width: 30%; 162 148 } 163 149 164 body.site-health .health-check-table tbodytd {150 .health-check-table td { 165 151 width: 70%; 166 152 } 167 153 168 body.site-health .health-check-table tbody td:first-child { 169 width: 30%; 170 } 171 172 body.site-health .health-check-table tbody td ul, 173 body.site-health .health-check-table tbody td ol { 154 .health-check-table ul, 155 .health-check-table ol { 174 156 margin: 0; 175 157 } 176 158 177 .site-health .pass::before, 178 .site-health .good::before { 159 .health-check-body li { 160 line-height: 1.5; 161 } 162 163 .health-check-body .pass::before, 164 .health-check-body .good::before { 179 165 content: "\f147"; 180 166 display: inline-block; … … 184 170 } 185 171 186 . site-health.warning::before {172 .health-check-body .warning::before { 187 173 content: "\f460"; 188 174 display: inline-block; … … 191 177 } 192 178 193 . site-health.info::before {179 .health-check-body .info::before { 194 180 content: "\f348"; 195 181 display: inline-block; … … 198 184 } 199 185 200 . site-health.fail::before,201 . site-health.error::before {186 .health-check-body .fail::before, 187 .health-check-body .error::before { 202 188 content: "\f335"; 203 189 display: inline-block; … … 206 192 } 207 193 208 body.site-health .spinner {209 float: none;210 }211 212 194 .site-health-copy-buttons { 213 display: block;214 195 margin: 1rem 0; 215 196 } … … 229 210 display: inline-block; 230 211 height: 28px; 231 line-height: 28px; 232 } 233 234 body.site-health .site-status-has-issues { 235 display: block; 236 } 237 238 body.site-health .site-status-has-issues.hide { 212 line-height: 28px; 213 } 214 215 .site-status-has-issues.hide { 239 216 display: none; 240 217 } 241 218 242 body.site-health h3 { 243 padding: 0; 244 font-weight: 400; 245 } 246 247 body.site-health .view-more { 219 .site-health-view-more { 248 220 text-align: center; 249 221 } 250 222 251 body.site-health .issues-wrapper:first-of-type {223 .site-health-issues-wrapper:first-of-type { 252 224 margin-top: 3rem; 253 225 } 254 226 255 body.site-health .issues-wrapper {227 .site-health-issues-wrapper { 256 228 margin-bottom: 3rem; 257 229 margin-top: 2rem; 258 230 } 259 231 260 body.site-health.site-status-all-clear {232 .site-status-all-clear { 261 233 display: flex; 262 234 flex-direction: column; … … 270 242 271 243 @media all and (min-width: 784px) { 272 body.site-health.site-status-all-clear {244 .site-status-all-clear { 273 245 margin: 5rem 0; 274 246 } 275 247 } 276 248 277 body.site-health.site-status-all-clear.hide {249 .site-status-all-clear.hide { 278 250 display: none; 279 251 } 280 252 281 body.site-health.site-status-all-clear .dashicons {253 .site-status-all-clear .dashicons { 282 254 font-size: 150px; 283 255 height: 130px; … … 285 257 } 286 258 287 body.site-health.site-status-all-clear .encouragement {259 .site-status-all-clear .encouragement { 288 260 font-size: 1.5rem; 289 261 font-weight: 600; 290 262 } 291 263 292 body.site-health.site-status-all-clear p {264 .site-status-all-clear p { 293 265 margin: 0; 294 266 } 295 267 296 body.health-check-accordion {268 .health-check-accordion { 297 269 border: 1px solid #e2e4e7; 298 270 } 299 271 300 body.health-check-accordion dt {272 .health-check-accordion dt { 301 273 font-weight: 600; 302 274 border-top: 1px solid #e2e4e7; 303 275 } 304 276 305 body .health-check-accordion dt:first-child { 306 border-radius: 0.3em 0.3em 0 0; 277 .health-check-accordion dt:first-child { 307 278 border-top: none; 308 279 } 309 280 310 body .health-check-accordion.health-check-accordion-trigger {281 .health-check-accordion-trigger { 311 282 background: #fff; 312 283 border: 0; … … 322 293 } 323 294 324 body .health-check-accordion.health-check-accordion-trigger:hover,325 body .health-check-accordion.health-check-accordion-trigger:active {295 .health-check-accordion-trigger:hover, 296 .health-check-accordion-trigger:active { 326 297 background: #f8f9f9; 327 298 } 328 299 329 body .health-check-accordion.health-check-accordion-trigger:focus {300 .health-check-accordion-trigger:focus { 330 301 color: #191e23; 331 302 border: none; … … 335 306 } 336 307 337 body .health-check-accordion.health-check-accordion-trigger .title {308 .health-check-accordion-trigger .title { 338 309 display: inline-block; 339 310 pointer-events: none; … … 341 312 } 342 313 343 body .health-check-accordion.health-check-accordion-trigger .icon {314 .health-check-accordion-trigger .icon { 344 315 border: solid #191e23; 345 316 border-width: 0 2px 2px 0; … … 353 324 } 354 325 355 body .health-check-accordion.health-check-accordion-trigger .badge {326 .health-check-accordion-trigger .badge { 356 327 display: inline-block; 357 328 padding: 0.1rem 0.5rem 0.15rem; … … 363 334 } 364 335 365 body .health-check-accordion.health-check-accordion-trigger .badge.blue {336 .health-check-accordion-trigger .badge.blue { 366 337 background-color: #0073af; 367 338 color: #fff; 368 339 } 369 340 370 body .health-check-accordion.health-check-accordion-trigger .badge.orange {341 .health-check-accordion-trigger .badge.orange { 371 342 background-color: #ffb900; 372 343 color: #000; 373 344 } 374 345 375 body .health-check-accordion.health-check-accordion-trigger .badge.red {346 .health-check-accordion-trigger .badge.red { 376 347 background-color: #dc3232; 377 348 color: #fff; 378 349 } 379 350 380 body .health-check-accordion.health-check-accordion-trigger .badge.green {351 .health-check-accordion-trigger .badge.green { 381 352 background-color: #40860a; 382 353 color: #fff; 383 354 } 384 355 385 body .health-check-accordion.health-check-accordion-trigger .badge.pink {356 .health-check-accordion-trigger .badge.pink { 386 357 background-color: #f4b0fc; 387 358 color: #000; 388 359 } 389 360 390 body .health-check-accordion.health-check-accordion-trigger .badge.gray {361 .health-check-accordion-trigger .badge.gray { 391 362 background-color: #ccc; 392 363 color: #000; 393 364 } 394 365 395 body .health-check-accordion.health-check-accordion-trigger .badge.light-blue {366 .health-check-accordion-trigger .badge.light-blue { 396 367 background-color: #10e9fb; 397 368 color: #000; 398 369 } 399 370 400 body .health-check-accordion.health-check-accordion-trigger .badge.light-green {371 .health-check-accordion-trigger .badge.light-green { 401 372 background-color: #60f999; 402 373 color: #000; 403 374 } 404 375 405 body .health-check-accordion.health-check-accordion-trigger[aria-expanded="true"] .icon {376 .health-check-accordion-trigger[aria-expanded="true"] .icon { 406 377 transform: translateY(-30%) rotate(-135deg) 407 378 } 408 379 409 body .health-check-accordion.health-check-accordion-panel {380 .health-check-accordion-panel { 410 381 margin: 0; 411 382 padding: 1em 1.5em; … … 413 384 } 414 385 415 body .health-check-accordion .health-check-accordion-panel > div { 416 display: block; 417 } 418 419 body .health-check-accordion .health-check-accordion-panel[hidden] { 386 .health-check-accordion-panel[hidden] { 420 387 display: none; 421 388 } 422 389 423 body .health-check-accordion dl dd {424 margin: 0 0 0.5em 2em;425 }426 427 390 @media screen and (max-width: 782px) { 428 body.site-health.health-check-body {391 .health-check-body { 429 392 margin: 0 12px; 430 width: initial;393 width: auto; 431 394 } 432 395 } … … 434 397 /* The breakpoint is usually at 960px, the additional space is to allow for the margin. */ 435 398 @media only screen and (max-width: 1004px) { 436 body.site-health.health-check-body {399 .health-check-body { 437 400 margin: 0 22px; 438 width: initial;439 } 440 } 401 width: auto; 402 } 403 } -
trunk/src/wp-admin/site-health-info.php
r45070 r45071 31 31 ?> 32 32 33 <div class=" wraphealth-check-header">34 <div class=" title-section">33 <div class="health-check-header"> 34 <div class="health-check-title-section"> 35 35 <h1> 36 36 <?php _ex( 'Site Health', 'Menu, Section and Page Title' ); ?> … … 43 43 </svg> 44 44 <span class="screen-reader-text"><?php _e( 'Current health score:' ); ?></span> 45 <span class=" progress-count"></span>45 <span class="site-health-progress-count"></span> 46 46 </div> 47 47 </div> 48 48 49 <nav class=" tabs-wrapper" aria-label="<?php esc_attr_e( 'Secondary menu' ); ?>">50 <a href="<?php echo esc_url( admin_url( 'site-health.php' ) ); ?>" class=" tab">49 <nav class="health-check-tabs-wrapper" aria-label="<?php esc_attr_e( 'Secondary menu' ); ?>"> 50 <a href="<?php echo esc_url( admin_url( 'site-health.php' ) ); ?>" class="health-check-tab"> 51 51 <?php _e( 'Status' ); ?> 52 52 </a> 53 53 54 <a href="<?php echo esc_url( admin_url( 'site-health.php?tab=debug' ) ); ?>" class=" tab active" aria-current="true">54 <a href="<?php echo esc_url( admin_url( 'site-health.php?tab=debug' ) ); ?>" class="health-check-tab active" aria-current="true"> 55 55 <?php _e( 'Info' ); ?> 56 56 </a> … … 60 60 </div> 61 61 62 <div class=" wraphealth-check-body">62 <div class="health-check-body"> 63 63 <?php 64 64 WP_Debug_Data::check_for_updates(); -
trunk/src/wp-admin/site-health.php
r45070 r45071 36 36 ?> 37 37 38 <div class=" wraphealth-check-header">39 <div class=" title-section">38 <div class="health-check-header"> 39 <div class="health-check-title-section"> 40 40 <h1> 41 41 <?php _ex( 'Site Health', 'Menu, Section and Page Title' ); ?> … … 48 48 </svg> 49 49 <span class="screen-reader-text"><?php _e( 'Current health score:' ); ?></span> 50 <span class=" progress-count"></span>50 <span class="site-health-progress-count"></span> 51 51 </div> 52 52 </div> 53 53 54 <nav class=" tabs-wrapper" aria-label="<?php esc_attr_e( 'Secondary menu' ); ?>">55 <a href="<?php echo esc_url( admin_url( 'site-health.php' ) ); ?>" class=" tab active" aria-current="true">54 <nav class="health-check-tabs-wrapper" aria-label="<?php esc_attr_e( 'Secondary menu' ); ?>"> 55 <a href="<?php echo esc_url( admin_url( 'site-health.php' ) ); ?>" class="health-check-tab active" aria-current="true"> 56 56 <?php _e( 'Status' ); ?> 57 57 </a> 58 58 59 <a href="<?php echo esc_url( admin_url( 'site-health.php?tab=debug' ) ); ?>" class=" tab">59 <a href="<?php echo esc_url( admin_url( 'site-health.php?tab=debug' ) ); ?>" class="health-check-tab"> 60 60 <?php _e( 'Info' ); ?> 61 61 </a> … … 65 65 </div> 66 66 67 <div class=" wraphealth-check-body">67 <div class="health-check-body"> 68 68 <div class="site-status-all-clear hide"> 69 69 <p class="icon"> … … 87 87 <p><?php _e( 'The site health check shows critical information about your WordPress configuration and items that require your attention.' ); ?></p> 88 88 89 <div class=" issues-wrapper" id="health-check-issues-critical">89 <div class="site-health-issues-wrapper" id="health-check-issues-critical"> 90 90 <h3> 91 91 <span class="issue-count">0</span> <?php _e( 'Critical issues' ); ?> … … 95 95 </div> 96 96 97 <div class=" issues-wrapper" id="health-check-issues-recommended">97 <div class="site-health-issues-wrapper" id="health-check-issues-recommended"> 98 98 <h3> 99 99 <span class="issue-count">0</span> <?php _e( 'Recommended improvements' ); ?> … … 104 104 </div> 105 105 106 <div class=" view-more">106 <div class="site-health-view-more"> 107 107 <button type="button" class="button site-health-view-passed" aria-expanded="false" aria-controls="health-check-issues-good"> 108 108 <?php _e( 'Passed tests' ); ?> … … 110 110 </div> 111 111 112 <div class=" issues-wrapper hidden" id="health-check-issues-good">112 <div class="site-health-issues-wrapper hidden" id="health-check-issues-good"> 113 113 <h3> 114 114 <span class="issue-count">0</span> <?php _e( 'Items with no issues detected' ); ?>
Note: See TracChangeset
for help on using the changeset viewer.