Meet our talented team module - LinkedIn Overlay

Responsive, suitable for any type of business, built for any needs elegant one-page Joomla template.
Rate this topic: Evaluations: 2, 3.50 on the average.Evaluations: 2, 3.50 on the average.Evaluations: 2, 3.50 on the average.Evaluations: 2, 3.50 on the average.Evaluations: 2, 3.50 on the average.Evaluations: 2, 3.50 on the average.3.50 out of 6 based on 2 vote(s)
GK User
Sun Apr 13, 2014 11:53 am
Reply with quote
Report this post
Hello,

the module "ABOUT - Meet our talented team" have 3 obverlay links (facebook, twitter and google+), is it possible to chage one of them into linkedIn?
I see the script is:
Code: Select all
<figure data-fb="https://www.facebook.com/gavickpro" data-twitter="https://twitter.com/gavickpro" data-gplus="https://plus.google.com/+gavickpro/posts" class="animate_queue_element">
      <img src="images/demo/about/1.jpg" border="0" alt="Guillermo Gori" />
      <figcaption>
         <h3>Guillermo Gori</h3>
         <small>Graphic & visual designer</small> </figcaption>
   </figure>

Is there a data-linkedIn available?
How can I add it?

Thanks for your support
User avatar
Junior Boarder

GK User
Sun Apr 13, 2014 2:12 pm
Reply with quote
Report this post
By default data-linkedin is not available but you can customize this in template.You need to replace the existing team overlays code with the below fragment. This code adds ability to support up to 5 icons - in this example I've added linkedin and WWW URL.

Code: Select all
/*
   You need to replace the existing team overlays code with the below fragment
   
   This code adds ability to support up to 5 icons - in this example I've added linkedin and WWW URL.
 */
 
// team overlays
if(jQuery(document).find('.gkTeam')) {
   var figures = jQuery(document).find('.gkTeam figure');
   
   jQuery(figures).each(function(i, figure) {
      figure = jQuery(figure);
      if(
         figure.attr('data-fb') != undefined ||
         figure.attr('data-twitter') != undefined ||
         figure.attr('data-gplus') != undefined ||
         figure.attr('data-linkedin') != undefined ||
         figure.attr('data-www') != undefined
      ) {
         var overlay = new jQuery('<div class= "gkTeamOverlay"></div>');
         
         var htmloutput = '';
         var classcounter = 0;
         
         if(figure.attr('data-fb') != undefined) {
            htmloutput += '<a href="'+figure.attr('data-fb')+'" data-type="fb">Facebook</a>';
            classcounter++;
         }
         
         if(figure.attr('data-twitter') != undefined) {
            htmloutput += '<a href="'+figure.attr('data-twitter')+'" data-type="twitter">Twitter</a>';
            classcounter++;
         }
         
         if(figure.attr('data-gplus') != undefined) {
            htmloutput += '<a href="'+figure.attr('data-gplus')+'" data-type="gplus">Google+</a>';
            classcounter++;
         }
         
         if(figure.attr('data-linkedin') != undefined) {
            htmloutput += '<a href="'+figure.attr('data-linkedin')+'" data-type="gplus">LinkedIn</a>';
            classcounter++;
         }
         
         if(figure.attr('data-www') != undefined) {
            htmloutput += '<a href="'+figure.attr('data-www')+'" data-type="www">WWW</a>';
            classcounter++;
         }
         
         jQuery(overlay).html(htmloutput);
         jQuery(overlay).addClass('gkIcons' + classcounter);
         
         figure.find('img').after(overlay);
         
         //overlay.inject(figure.getElement('img') , 'after');
         
         figure.mouseenter(function() {
            figure.addClass('hover');
            var linksAmount = figure.find('.gkTeamOverlay a').length;
            for(i = 0; i < linksAmount; i++) {
               gkAddClass(figure.find('.gkTeamOverlay').find('a')[i], 'active', i);   
            }
         });
         
         figure.mouseleave(function() {
               figure.removeClass('hover');
               figure.find('.gkTeamOverlay a').removeClass('active');
         });
      }
   });
}


Then to gk.stuff.css file please add this code :

Code: Select all
/*
   You need to add the below code.
   
   This code adds ability to support up to 5 icons - in this example I've added linkedin and WWW URL.
 */

.gkTeamOverlay.gkIcons4 a {
   margin-top: -110px!important;   
}

.gkTeamOverlay.gkIcons4 a + a {
   margin-top: -52px!important;
}

.gkTeamOverlay.gkIcons4 a + a + a {
   margin-top: 5px!important;
}

.gkTeamOverlay.gkIcons4 a + a + a + a {
   margin-top: 64px!important;
}

.gkTeamOverlay.gkIcons5 a {
   margin-top: -138px!important;   
}

.gkTeamOverlay.gkIcons5 a + a {
   margin-top: -82px!important;
}

.gkTeamOverlay.gkIcons5 a + a + a {
   margin-top: -26px!important;
}

.gkTeamOverlay.gkIcons5 a + a + a + a {
   margin-top: 30px!important;
}

.gkTeamOverlay.gkIcons5 a + a + a + a + a {
   margin-top: 86px!important;
}

.gkTeamOverlay a[data-type="linkedin"]:before {
   content: '\f0e1';
}

.gkTeamOverlay a[data-type="www"]:before {
   content: '\f0c1';
}


Of course the code for gk.script.js is for J!3 version because it is created in jQuery - if you want to use it in J!2.x you need to rewrite this to mootools library.
User avatar
Platinum Boarder

GK User
Sun Apr 13, 2014 11:27 pm
Reply with quote
Report this post
Thanks for your support... This solution is perfect!
User avatar
Junior Boarder

GK User
Tue May 13, 2014 9:10 am
Reply with quote
Report this post
Hi bkrztuk,
You say 'you can customize this in template'.
Could you please specify the exact name and location of this file that requires an update? It is not clear to me where to replace the first code.
Thanks,
Tobias
User avatar
Fresh Boarder

GK User
Thu May 15, 2014 10:01 pm
Reply with quote
Report this post
But which part you want to customize? All template layout files you can find in template/layouts directory.
User avatar
Platinum Boarder

GK User
Thu Jun 05, 2014 9:31 am
Reply with quote
Report this post
bkrztuk wrote:But which part you want to customize? All template layout files you can find in template/layouts directory.


In which file can I find the original Team Overlays code used for the module 'About Us Meet our talented team' displayed on the home page

Thanks!
User avatar
Fresh Boarder

GK User
Fri Jun 06, 2014 1:09 pm
Reply with quote
Report this post
User avatar
Platinum Boarder


cron