• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Social media knoppen lean & mean
PostPosted: Sun Oct 29, 2017 7:23 am 
Offline
Power Poster
Power Poster
User avatar

Joined: Thu Mar 23, 2006 9:25 am
Posts: 1779
Location: The Netherlands
In een ander topic ging het over het gebruik van social media buttons en dat hier zoveel Javascript veelal omheen hangt en daarmee de laadtijd van de pagina's wordt verhoogd. Bij toeval kwam ik deze oplossing tegen. De code staat op jsfiddle. https://jsfiddle.net/kprusy95/


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Social media knoppen lean & mean
PostPosted: Sun Oct 29, 2017 8:57 am 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Wed Apr 23, 2008 7:53 am
Posts: 7480
Location: The Netherlands
Bedankt voor het delen, Gregor.

Gebaseerd op de logica van https://www.cmscanbesimple.org/blog/bas ... d-metatags maak ik het altijd zo:
Code:
<a href="https://www.facebook.com/share.php?u={$canonical_url}?t={$page_title|replace:' ':'%20'}" rel="nofollow" title="Facebook" target="_blank">
  <span class="btn btn_facebook"><span class="fa fa-facebook fa-fw"></span></span>
</a>
<a href="https://plus.google.com/share?url={$canonical_url}" rel="nofollow" title="Google+" target="_blank">
  <span class="btn btn_googleplus"><span class="fa fa-google-plus fa-fw"></span></span>
</a>
<a href="https://www.linkedin.com/shareArticle?mini=true&url={$canonical_url}&title={$page_title|replace:' ':'%20'}" rel="nofollow" title="LinkedIn" target="_blank">
  <span class="btn btn_linkedin"><span class="fa fa-linkedin fa-fw"></span></span>
</a>
<a href="https://twitter.com/home?status={$page_title|replace:' ':'%20'}:+{$canonical_url}" rel="nofollow" title="Twitter" target="_blank">
  <span class="btn btn_twitter"><span class="fa fa-twitter fa-fw"></span></span>
</a>
Ik wil er altijd nog eens een blogje over maken... zal ik binnenkort toch eens doen :)

_________________
Image

Did my post help you solving a problem at your (customers) website and it saved you many hours of work? Great!! Consider buying me a cup of coffee in return! [ Click here ]



Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
A2 Hosting