GithubHelp home page GithubHelp logo

fabiomux / share_with Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 42 KB

Ruby library to print sharing link towards the most popular networks and configurable through YAML files.

Ruby 99.41% Shell 0.59%

share_with's Introduction

ShareWith

This is a Ruby gem thought to render the sharing links for the most popular networks.

ShareWith also introduces a syntax, built upon a YAML file, to declare parameters and templates, and elements to self-describe the service itself.

This YAML file will be used to generate the object that renders the templates in plain HTML text.

Ruby Gem Version

Installation

Install the gem and add to the application's Gemfile by executing:

$ bundle add share_with

If bundler is not being used to manage dependencies, install the gem by executing:

$ gem install share_with

Usage

As first step must require the gem:

require "share_with"

Then we can instantiate the Collection class and the list of services to load:

@collection = ShareWith::Collection.new(services: ["twitter", "facebook"])

Once filled the params required to render the template:

@collection.set_value_to_all("url", "https://freeaptitude.altervista.org/projects/share-with.html")

Finally we get the HTML code as a text string:

@collection.render_all("icon")

More Help

More info is available at:

share_with's People

Contributors

fabiomux avatar

Watchers

 avatar

share_with's Issues

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.