GithubHelp home page GithubHelp logo

skiryuk / likely Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nikolayrys/likely

0.0 2.0 0.0 3.25 MB

The social sharing buttons that aren’t shabby

License: MIT License

JavaScript 86.72% CSS 7.55% HTML 5.73%

likely's Introduction

Likely

The social sharing buttons that aren’t shabby

Likely screenshot

Take a look

See Likely in action on its homepage.

Get

Download the repository code and move release/likely.js and release/likely.css to the desired directory.

Or use npm or Bower:

$ npm install ilyabirman-likely --save
$ bower install ilyabirman-likely --save

Also you can use Likely from CDN:

https://unpkg.com/ilyabirman-likely@2/release/likely.css
https://unpkg.com/ilyabirman-likely@2/release/likely.js

Setup

Link the files likely.css and likely.js from the compiled sources.

If downloaded directly:

<!-- Head -->
<link href="path/to/likely.css" rel="stylesheet">
<!-- End of body -->
<script src="path/to/likely.js" type="text/javascript"></script>

If installed with npm:

<!-- Head -->
<link href="node_modules/ilyabirman-likely/release/likely.css"
      rel="stylesheet">
<!-- End of body -->
<script src="node_modules/ilyabirman-likely/release/likely.js"
        type="text/javascript"></script>

If installed with Bower:

<!-- Head -->
<link href="bower_components/Likely/release/likely.css"
      rel="stylesheet">
<!-- End of body -->
<script src="bower_components/Likely/release/likely.js"
        type="text/javascript"></script>

Then, create a div with the class likely and list necessary social networks in child divs:

<div class="likely">
    <div class="facebook">Share</div>
    <div class="twitter">Tweet</div>
    <div class="gplus">+1</div>
    <div class="vkontakte">Share</div>
    <div class="pinterest">Pin</div>
    <div class="odnoklassniki">Like</div>
    <div class="telegram">Send</div>
    <div class="linkedin">Share</div>
</div>

Likely supports following social networks:

  • facebook – Facebook
  • twitter – Twitter
  • gplus - Google+
  • vkontakte – VK
  • pinterest – Pinterest
  • odnoklassniki – Odnoklassniki
  • telegram – Telegram
  • linkedin – LinkedIn

If you need several Likely widgets on the page, just create another div with the class likely and list the social networks in it.

Using as a CommonJS module

Likely can be used as a CommonJS module, so you can use it within webpack or browserify build systems.

First, install Likely using npm:

$ npm install ilyabirman-likely --save

Then, use it as CommonJS module somewhere in your program:

var likely = require('ilyabirman-likely');

// Finds all the widgets in the DOM and initializes them
likely.initiate();

Options

You can configure Likely by specifying data-* attributes on a button group or on a button.

Common options

These options should be specified on the div with the likely class.

  • data-url – URL to share and load counters for
  • data-title – Page title
<div class="likely" data-url="https://github.com/ilyabirman/Likely">
    <!-- ... -->
</div>

Twitter

You can set data-via attribute to mention a specific user in the tweet:

<div class="twitter" data-via="ilyabirman">Tweet</div>

With data-via="ilyabirman", the tweet text will include “via @ilyabirman”. Read more about the via parameter in the Twitter documentation.

Telegram

You can set data-text attribute to define a text of the message.

<div class="telegram" data-text="Check this out">Send</div>

Pinterest

You can set data-media attribute to override a default image and substitute a different one in the Pin Create form. The attribute should be an image URL:

<div class="pinterest" data-media="https://placekitten.com/200/400">Pin</div>

Read more about the media parameter in the in the Pinterest documentation.

Supported browsers

We support IE 10+, Safari 9+ and the latest versions of Chrome, Firefox and Edge. Likely could work in the older versions too, but we don’t do anything specific to maintain its compatibility with them and don’t test it there.

likely's People

Contributors

iamakulov avatar volter9 avatar ilyabirman avatar vitkarpov avatar 7rulnik avatar 350d avatar corey-maler avatar skiryuk avatar nex2hex avatar dderg avatar gangstajs avatar bolatovumar avatar effrenus avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.