357 | | echo "<div id='{$_tab}-title'>{$api->name}</div>"; |
| 357 | if ( !empty( $api->banners ) && ( !empty( $api->banners['low'] ) || !empty( $api->banners['high'] ) ) ) { |
| 358 | $low = ( !empty( $api->banners['low'] ) ) ? $api->banners['low'] : $api->banners['high']; |
| 359 | $high = ( !empty( $api->banners['high'] ) ) ? $api->banners['high'] : $api->banners['low']; |
| 360 | ?> |
| 361 | <style type="text/css"> |
| 362 | #plugin-information-title { |
| 363 | height: 250px; |
| 364 | bottom: 250px; |
| 365 | background-image: url(<?php echo $low ?>); |
| 366 | background-size: 100% auto; |
| 367 | } |
| 368 | #plugin-information-tabs { |
| 369 | top:250px; |
| 370 | } |
| 371 | #plugin-information-content { |
| 372 | top:284px; |
| 373 | } |
| 374 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5) { |
| 375 | #plugin-information-title { |
| 376 | background-image: url(<?php echo $high ?>}); |
| 377 | } |
| 378 | } |
| 379 | #plugin-information-title h2 { |
| 380 | font-family: "Helvetica Neue", sans-serif; |
| 381 | font-size: 30px; |
| 382 | font-weight: bold; |
| 383 | max-width: 760px; |
| 384 | position: absolute; |
| 385 | left: 20px; |
| 386 | top: 175px; |
| 387 | padding: 0 15px; |
| 388 | margin: 0; |
| 389 | color: #fff; |
| 390 | background: rgba( 30, 30, 30, 0.9 ); |
| 391 | text-shadow: 0 1px 3px rgba( 0, 0, 0, 0.4 ); |
| 392 | -webkit-box-shadow: 0 0 30px rgba( 255, 255, 255, 0.1 ); |
| 393 | -moz-box-shadow: 0 0 30px rgba( 255, 255, 255, 0.1 ); |
| 394 | box-shadow: 0 0 30px rgba( 255, 255, 255, 0.1 ); |
| 395 | -webkit-border-radius: 8px; |
| 396 | border-radius: 8px; |
| 397 | } |
| 398 | #plugin-information-title div.vignette { |
| 399 | top: 0; |
| 400 | height: 250px; |
| 401 | width: 830px; |
| 402 | margin: 0 -20px; |
| 403 | background: transparent; |
| 404 | -webkit-box-shadow: inset 0 0 50px 4px rgba( 0, 0, 0, 0.2 ), inset 0 -1px 0 rgba( 0, 0, 0, 0.1 ); |
| 405 | -moz-box-shadow: inset 0 0 50px 4px rgba( 0, 0, 0, 0.2 ), inset 0 -1px 0 rgba( 0, 0, 0, 0.1 ); |
| 406 | box-shadow: inset 0 0 50px 4px rgba( 0, 0, 0, 0.2 ), inset 0 -1px 0 rgba( 0, 0, 0, 0.1 ); |
| 407 | } |
| 408 | </style> |
| 409 | <?php |
| 410 | } else { |
| 411 | ?> |
| 412 | <style type="text/css"> |
| 413 | #plugin-information-title h2 { |
| 414 | font-family: "Helvetica Neue", sans-serif; |
| 415 | font-size: 24px; |
| 416 | font-weight: bold; |
| 417 | padding:0; |
| 418 | margin: 0; |
| 419 | max-width: 760px; |
| 420 | } |
| 421 | </style> |
| 422 | <?php |
| 423 | } |
| 424 | |
| 425 | echo "<div id='{$_tab}-title'><div class='vignette'></div><h2>{$api->name}</h2></div>"; |
| 474 | <?php if ( ! empty( $api->contributors ) ) : ?> |
| 475 | <h3><?php _e('Contributors') ?></h3> |
| 476 | <ul class="contributors"> |
| 477 | <?php |
| 478 | foreach ( (array) $api->contributors as $contrib_username => $contrib_profile ) { |
| 479 | if ( empty( $contrib_username ) && empty( $contrib_profile ) ) |
| 480 | continue; |
| 481 | if ( empty( $contrib_username ) ) |
| 482 | $contrib_username = preg_replace( '/^.+\/(.+)\/?$/', '\1', $contrib_profile ); |
| 483 | $contrib_username = sanitize_user( $contrib_username ); |
| 484 | if ( empty( $contrib_profile ) ) |
| 485 | echo "<li><img src='https://wordpress.org/grav-redirect.php?user={$contrib_username}&s=36' width='18' height='18' /> {$contrib_username}</li>"; |
| 486 | else |
| 487 | echo "<li><a href='{$contrib_profile}' target='_blank'><img src='https://wordpress.org/grav-redirect.php?user={$contrib_username}&s=36' width='18' height='18' /> {$contrib_username}</a></li>"; |
| 488 | } |
| 489 | ?> |
| 490 | </ul> |
| 491 | <?php if ( ! empty( $api->donate_link ) ) : ?> |
| 492 | <a target="_blank" href="<?php echo $api->donate_link ?>"><?php _e('Donate to this plugin »') ?></a> |
| 493 | <?php endif; ?> |
| 494 | <?php endif; ?> |