Ticket #6772: 6772.10b.tweaks.patch
File 6772.10b.tweaks.patch, 2.8 KB (added by , 8 years ago) |
---|
-
src/bp-activity/bp-activity-embeds.php
286 286 287 287 // Show description (non-oEmbed standard) 288 288 if ( isset( $oembed->description ) ) { 289 $caption .= sprintf( '<div class="caption-description">%s</div>', apply_filters( 'bp_ get_activity_action', $oembed->description ) );289 $caption .= sprintf( '<div class="caption-description">%s</div>', apply_filters( 'bp_activity_get_embed_excerpt', $oembed->description ) ); 290 290 } 291 291 292 292 // Show author info. … … 305 305 // Set up caption. 306 306 if ( '' !== $caption ) { 307 307 $css_class = isset( $oembed->provider_name ) ? sprintf( ' provider-%s', sanitize_html_class( strtolower( $oembed->provider_name ) ) ) : ''; 308 $caption = sprintf( '<div class="caption%1$s">%2$s</div>', $css_class, $caption ); 308 $caption = sprintf( '<div class="caption%1$s" style="width:%2$s">%3$s</div>', 309 $css_class, 310 round( ( $width - (int) $thumb_width ) / $width * 100 ) . '%', 311 $caption 312 ); 309 313 310 314 $content .= $caption; 311 315 } … … 313 317 314 318 // Print rich content. 315 319 if ( '' !== $content ) { 316 printf( '<div class="bp-activity-embed-display-media %s" style="max-width:%spx">%s</div>',317 $thumb_width < $float_width ? ' two-col' : 'one-col',320 printf( '<div class="bp-activity-embed-display-media %s" style="max-width:%spx">%s</div>', 321 $thumb_width < $float_width ? 'two-col' : 'one-col', 318 322 $thumb_width < $float_width ? $width : $thumb_width, 319 323 $content 320 324 ); -
src/bp-templates/bp-legacy/buddypress/assets/embeds/css-activity.php
74 74 .bp-activity-embed-display-media.two-col .thumb, 75 75 .bp-activity-embed-display-media.two-col .caption { 76 76 display: table-cell; 77 } 78 79 .bp-activity-embed-display-media.two-col .thumb { 80 background: #000; 81 vertical-align: middle; 82 } 83 84 .bp-activity-embed-display-media.two-col .caption { 77 85 vertical-align: top; 78 86 } 79 87 … … 107 115 width: 50px; 108 116 } 109 117 118 .bp-activity-embed-display-media.two-col a.play-btn { 119 height: 35px; 120 width: 35px; 121 } 122 110 123 a.play-btn:hover { 111 124 background: rgba(0, 0, 0, 0.95); 112 125 transform: translateY(-50%) translateX(-50%) scale(1.05); … … 123 136 font-size: 90%; 124 137 margin: .4em 0; 125 138 } 139 140 @media only screen and (max-width: 480px) { 141 .bp-activity-embed-display-media.two-col .thumb { 142 border-bottom: 1px solid #ccc; 143 border-right: 0; 144 display: block; 145 max-width: none !important; 146 } 147 148 a.play-btn { 149 height: 35px; 150 width: 35px; 151 } 152 } 153 No newline at end of file