Ticket #16434: 16434-responsive.patch
File 16434-responsive.patch, 3.2 KB (added by , 9 years ago) |
---|
-
src/wp-admin/css/site-icon.css
17 17 max-width: 720px; 18 18 } 19 19 20 .site-icon-crop-wrapper { 21 float: left; 22 } 23 20 24 .site-icon-crop-preview-shell { 21 25 float: right; 22 26 overflow: hidden; … … 56 60 overflow: hidden; 57 61 width: 64px; 58 62 } 63 64 @media only screen and (max-width: 768px) { 65 .site-icon-crop-wrapper, 66 .site-icon-crop-preview-shell { 67 float: none; 68 } 69 70 .site-icon-crop-wrapper { 71 max-width: 100%; 72 margin-bottom: 20px; 73 } 74 75 .site-icon-crop-wrapper img { 76 max-width: 100%; 77 height: auto; 78 } 79 } -
src/wp-admin/includes/class-wp-site-icon.php
267 267 <p class="hide-if-no-js description"><?php _e('Choose the part of the image you want to use as your site icon.'); ?></p> 268 268 <p class="hide-if-js description"><strong><?php _e( 'You need Javascript to choose a part of the image.'); ?></strong></p> 269 269 270 <div class="site-icon-crop-wrapper"> 271 <img src="<?php echo esc_url( $url ); ?>" id="crop-image" class="site-icon-crop-image" width="<?php echo esc_attr( $cropped_size[0] ); ?>" height="<?php echo esc_attr( $cropped_size[1] ); ?>" alt="<?php esc_attr_e( 'Image to be cropped' ); ?>"/> 272 </div> 273 270 274 <div class="site-icon-crop-preview-shell hide-if-no-js"> 271 275 <h3><?php _e( 'Preview' ); ?></h3> 272 276 <strong><?php _e( 'As your favicon' ); ?></strong> … … 284 288 <img src="<?php echo esc_url( $url ); ?>" id="preview-homeicon" alt="<?php esc_attr_e( 'Preview Home Icon' ); ?>"/> 285 289 </div> 286 290 </div> 287 < img src="<?php echo esc_url( $url ); ?>" id="crop-image" class="site-icon-crop-image" width="<?php echo esc_attr( $cropped_size[0] ); ?>" height="<?php echo esc_attr( $cropped_size[1] ); ?>" alt="<?php esc_attr_e( 'Image to be cropped' ); ?>"/>291 <div class="clear"></div> 288 292 289 293 <input type="hidden" id="crop-x" name="crop-x" value="<?php echo esc_attr( $crop_x ); ?>" /> 290 294 <input type="hidden" id="crop-y" name="crop-y" value="<?php echo esc_attr( $crop_y ); ?>" /> -
src/wp-admin/js/site-icon-crop.js
37 37 }, 38 38 39 39 ready: function() { 40 $cropImage = $( '#crop-image' ); 40 41 jcrop_api = $.Jcrop( '#crop-image' ); 41 42 jcrop_api.setOptions({ 42 43 bgColor: 'transparent', … … 43 44 aspectRatio: 1, 44 45 onSelect: siteIconCrop.updateCoords, 45 46 onChange: siteIconCrop.updateCoords, 46 minSize: [ wpSiteIconCropData.min_size, wpSiteIconCropData.min_size ] 47 minSize: [ wpSiteIconCropData.min_size, wpSiteIconCropData.min_size ], 48 trueSize: [ $cropImage.attr( 'width' ), $cropImage.attr( 'height' ) ] 47 49 }); 48 50 jcrop_api.animateTo([wpSiteIconCropData.init_x, wpSiteIconCropData.init_y, wpSiteIconCropData.init_size, wpSiteIconCropData.init_size]); 49 51 }