GithubHelp home page GithubHelp logo

miguelramosfdz / social-sharing Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cferdinandi/social-sharing

0.0 1.0 0.0 502 KB

Add social sharing links and buttons without the bloat.

CSS 62.50% JavaScript 37.50%

social-sharing's Introduction

Social Sharing Build Status

Add social sharing links and buttons without the bloat.

Download Social Sharing / View the demo

In This Documentation

  1. Getting Started
  2. Installing with Package Managers
  3. Working with the Source Files
  4. Browser Compatibility
  5. How to Contribute
  6. License
  7. Changelog

Getting Started

Compiled and production-ready code can be found in the dist directory. The src directory contains development code.

1. Include Social Sharing on your site.

<link rel="stylesheet" href="dist/css/social-sharing.css">

If you're not using the Kraken boilerplate, you might also need to include the button styling.

<link rel="stylesheet" href="css/kraken-buttons.css">

Social Sharing is built with Sass for easy customization. If you don't use Sass, that's ok. The css folder contains compiled vanilla CSS.

The _config.scss and _mixins.scss files are the same ones used in Kraken, so you can drop the _social-sharing.css file right into Kraken without making any updates. Or, adjust the variables to suit your own project.

2. Add the markup to your HTML.

Branded Buttons

A few simple classes turn button and a elements into branded social media buttons.

<a class="btn btn-tweet" href="#">Twitter</a>
<a class="btn btn-facebook" href="#">Facebook</a>
<a class="btn btn-google" href="#">Google+</a>
<a class="btn btn-linkedin" href="#">LinkedIn</a>
<a class="btn btn-pinterest" href="#">Pinterest</a>
<a class="btn btn-github" href="#">GitHub</a>
<a class="btn btn-vk" href="#">VK</a>
<a class="btn btn-xing" href="#">Xing</a>
<a class="btn btn-tumblr" href="#">Tumblr</a>
<a class="btn btn-reddit" href="#">Reddit</a>

Sharing Links

To include sharing links for Twitter, Facebook, Google+, LinkedIn and more, just add your URL's and titles where indicated in these snippets. Combine with the branded buttons for sharing buttons.

<a target="_blank" href="https://twitter.com/intent/tweet?text=YOUR-TITLE&url=YOUR-URL&via=TWITTER-HANDLE">Tweet</a>

<a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=YOUR-URL">Share on Facebook</a>

<a target="_blank" href="https://plus.google.com/share?url=YOUR-URL">Plus on Google+</a>

<a target="_blank" href="https://www.linkedin.com/shareArticle?mini=true&url=YOUR-URL&title=YOUR-TITLE&summary=YOUR-SUMMARY&source=YOUR-URL">Share on LinkedIn</a>

<a target="_blank" href="https://pinterest.com/pin/create/button/?url=YOUR-URL&description=YOUR-DESCRIPTION&media=YOUR-IMAGE-SRC">Pin on Pinterest</a>

<a target="_blank" href="https://vk.com/share.php?url=YOUR-URL&title=YOUR-TITLE&description=YOUR-DESCRIPTION&image=YOUR-IMAGE-SRC&noparse=true">Share on VK</a>

<a target="_blank" href="https://www.xing-share.com/app/user?op=share;sc_p=xing-share;url=YOUR-URL">Share on Xing</a>

<a target="_blank" href="http://www.tumblr.com/share/link?url=YOUR-URL&description=YOUR-DESCRIPTION">Share on Tumblr</a>

<a target="_blank" href="http://www.reddit.com/submit?url=YOUR_URL&title=YOUR_TITLE">Share on Reddit</a>

And that's it, you're done. Nice work!

Installing with Package Managers

You can install Social Sharing with your favorite package manager.

  • NPM: npm install cferdinandi/social-sharing
  • Bower: bower install https://github.com/cferdinandi/social-sharing.git
  • Component: component install cferdinandi/social-sharing

Working with the Source Files

If you would prefer, you can work with the development code in the src directory using the included Gulp build system. This compiles, lints, and minifies code, and runs unit tests. It's the same build system that's used by Kraken, so it includes some unnecessary tasks and Sass variables but can be dropped right in to the boilerplate without any configuration.

Dependencies

Make sure these are installed first.

Quick Start

  1. In bash/terminal/command line, cd into your project directory.
  2. Run npm install to install required files.
  3. When it's done installing, run one of the task runners to get going:
    • gulp manually compiles files.
    • gulp watch automatically compiles files when changes are made.
    • gulp reload automatically compiles files and applies changes using LiveReload.

Browser Compatibility

Social Sharing works in all modern browsers, and IE 6 and above.

How to Contribute

In lieu of a formal style guide, take care to maintain the existing coding style. Don't forget to update the version number, the changelog (in the readme.md file), and when applicable, the documentation.

License

Social Sharing is licensed under the MIT License.

Changelog

Social Sharing uses semantic versioning.

  • v1.7.2 - October 19, 2014
    • Updated gulpfile.js tasks and namespacing.
  • v1.7.1 - October 3, 2014
    • Updated gulpfile.js.
    • Updated readme.
    • Updated travis config file.
  • v1.7.0 - August 25, 2014
    • Switched from Sass Lib to Ruby Sass.
  • v1.6.0 - July 29, 2014
    • Added Reddit support.
  • v1.5.0 - June 23, 2014
    • Converted to gulp.js workflow.
    • Updated naming conventions.
    • Added minified versions of files.
    • Updated to three number versioning system.
    • Updated Tumblr sharing link.
  • v1.4 - January 13, 2014
    • Added Tumblr support.
  • v1.3 - December 6, 2013
    • Added Sass support.
  • v1.2 - November 9, 2013
    • Added GitHub button.
  • v1.1 - October 26, 2013
    • Added Pinterest support.
  • v1.0 - June 7, 2013
    • Switched to MIT license.
  • Version 1.0 - April 2, 2013
    • Initial release.

social-sharing's People

Contributors

adonald avatar natebrennand avatar web-xaser avatar

Watchers

 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.