jadjoubran / codetogo.io

🚀 JavaScript code to go - Find updated snippets for common JavaScript use cases
https://codetogo.io
MIT License
233 stars 30 forks source link

Add share buttons in use case page #54

Closed jadjoubran closed 6 years ago

flexbox commented 6 years ago

You can hack the content from here https://github.com/kni-labs/rrssb

jadjoubran commented 6 years ago

requires jQuery :( CodeToGo is jQuery free so I'll have to find another alternative

flexbox commented 6 years ago

If fact we don't need JavaScript for that For a facebook share here is an example

    <a href="https://www.facebook.com/sharer/sharer.php?u=http://your-url-here">
      <span class="icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 29 29"><path d="M26.4 0H2.6C1.714 0 0 1.715 0 2.6v23.8c0 .884 1.715 2.6 2.6 2.6h12.393V17.988h-3.996v-3.98h3.997v-3.062c0-3.746 2.835-5.97 6.177-5.97 1.6 0 2.444.173 2.845.226v3.792H21.18c-1.817 0-2.156.9-2.156 2.168v2.847h5.045l-.66 3.978h-4.386V29H26.4c.884 0 2.6-1.716 2.6-2.6V2.6c0-.885-1.716-2.6-2.6-2.6z"/></svg></span>
      <span class="text">facebook</span>
    </a>

I used it on my website if you want to have a look https://github.com/flexbox/davidl/blob/master/source/layouts/_share.html.slim

And sorry I can't make a pull-request for that because I don't have php installed on my machine 😅

jadjoubran commented 6 years ago

ah awesome then, will implement soon Thanks!

jadjoubran commented 6 years ago

Done 🎉

share

with colored hovers:

hover