Digital experiences for all disciplines
New Landing › How can we help? › Cardinal › Icon for portfolio mouseover
New Landing › How can we help? › Cardinal › Icon for portfolio mouseover
- This topic has 30 replies, 4 voices, and was last updated 9 years by Kyle – SUPPORT.
-
Posted in: Cardinal
-
April 29, 2015 at 9:04 am #169874
ok thanks
April 29, 2015 at 9:08 am #169877If you’re using a child theme, you can add this to the functions.php file of your child theme:
/* PORTFOLIO LINK CONFIG ================================================== */ if ( ! function_exists( 'sf_portfolio_item_link' ) ) { function sf_portfolio_item_link() { $link_config = $item_icon = $thumb_img_url = ""; global $post, $sf_options; $thumb_image = rwmb_meta( 'sf_thumbnail_image', 'type=image&size=full' ); $thumb_link_type = sf_get_post_meta( $post->ID, 'sf_thumbnail_link_type', true ); $thumb_link_url = sf_get_post_meta( $post->ID, 'sf_thumbnail_link_url', true ); $thumb_lightbox_thumb = rwmb_meta( 'sf_thumbnail_image', 'type=image&size=large' ); $thumb_lightbox_image = rwmb_meta( 'sf_thumbnail_link_image', 'type=image&size=large' ); $thumb_lightbox_video_url = sf_get_post_meta( $post->ID, 'sf_thumbnail_link_video_url', true ); $thumb_lightbox_video_url = sf_get_embed_src( $thumb_lightbox_video_url ); $permalink = get_permalink(); foreach ( $thumb_image as $detail_image ) { $thumb_img_url = $detail_image['url']; break; } if ( ! $thumb_image ) { $thumb_image = get_post_thumbnail_id(); $thumb_img_url = wp_get_attachment_url( $thumb_image, 'full' ); } if ( $thumb_link_type == "link_to_url" ) { $link_config = 'href="' . $thumb_link_url . '" class="link-to-url"'; $item_icon = apply_filters( 'sf_port_url_icon', "ss-navigateright" ); } else if ( $thumb_link_type == "link_to_url_nw" ) { $link_config = 'href="' . $thumb_link_url . '" class="link-to-url" target="_blank"'; $item_icon = apply_filters( 'sf_port_url_icon', "ss-navigateright" ); } else if ( $thumb_link_type == "lightbox_thumb" ) { $link_config = 'href="' . $thumb_img_url . '" class="lightbox" data-rel="ilightbox[portfolio]"'; $item_icon = apply_filters( 'sf_port_lightbox_icon', "ss-view" ); } else if ( $thumb_link_type == "lightbox_image" ) { $lightbox_image_url = ''; foreach ( $thumb_lightbox_image as $image ) { $lightbox_image_url = $image['full_url']; } $link_config = 'href="' . $lightbox_image_url . '" class="lightbox" data-rel="ilightbox[portfolio]"'; $item_icon = apply_filters( 'sf_port_lightbox_icon', "ss-view" ); } else if ( $thumb_link_type == "lightbox_video" ) { $link_config = 'data-video="' . $thumb_lightbox_video_url . '" href="#" class="fw-video-link"'; $item_icon = apply_filters( 'sf_port_video_icon', "ss-video" ); } else { $link_config = 'href="' . $permalink . '" class="link-to-post"'; $item_icon = apply_filters( 'sf_port_post_icon', "ss-navigateright" ); } $item_link = array( "icon" => $item_icon, "config" => $link_config ); return $item_link; } }
– Kyle
April 29, 2015 at 10:26 am #169953Great thanks Kyle !!
Worked !April 29, 2015 at 10:29 am #169956No problem
April 29, 2015 at 10:30 am #169957Hi,
Thanks to Kyle.
MohammadMay 5, 2015 at 2:14 pm #171979Hi Kyle
The 1st two items in the portfolio still have a few pixels of white under them whilst the one on the right is the correct height with no white space under it .If i change it to a gallery There is no white space under the 1st two items but i then loose the ability to have the icon when hovered over
May 5, 2015 at 2:19 pm #171982Can you please change back to portfolio so I can check
– Kyle
May 5, 2015 at 2:47 pm #171995Thanks,
I have changed it back to masonry (home page)
I also noticed in firefox it doesn’t quite reach the the right hand end of the screen. Chrome reaches the sideMay 5, 2015 at 3:28 pm #172023Hi Kyle
I just noticed one of the images was 2px out so that is probably the issueMay 5, 2015 at 4:33 pm #172048Hi Kyle
I sorted the White line at the bottom of the portfolio ( it was one of the supplied images was a pixel off)
In firefox the portfolio does not make it to the right edge it is always 2px off. In chrome this is not an issue
I have uploaded an imageAttachments:
You must be logged in to view attached files.May 6, 2015 at 9:19 am #172251Hi Kyle
Looking at dev tools in firefox it looks like the portfolio images are overlapping 1 pixel and the 3rd picture (on the right) needs to be 33.4%
I’m not sure how to edit this to fix it
May 6, 2015 at 9:21 am #172254Try adding this to your custom css:
.browser-ff .portfolio-item.col-sm-4 { width: 33.4%; }
– Kyle
May 6, 2015 at 9:31 am #172260Hi Kyle
The right hand image drops under the other 2 .. It worked in dev tools though ;( lolIt looks like If the second image and third image where 1px to the right they would be correct?
May 6, 2015 at 9:41 am #172266Try different values from 33.3% to 33.4%, for e.g. 33.33%
– Kyle
May 6, 2015 at 9:44 am #172271Yes that fixed it !
thanks
-
Posted in: Cardinal
You must be logged in and have valid license to reply to this topic.