Giter Site home page Giter Site logo

armandphilippot / minimalist-sharing-buttons-widget Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 2.73 MB

Display sharing buttons as a WordPress widget.

License: GNU General Public License v2.0

JavaScript 23.97% PHP 32.85% SCSS 14.73% CSS 28.31% Shell 0.14%
wordpress wordpress-plugin wordpress-widget share-buttons

minimalist-sharing-buttons-widget's Introduction

Minimalist Sharing Buttons

License Version

A WordPress widget to display share buttons.

Introduction

I could have name this plugin Yet another share plugin since there are many plugins to add social buttons on WordPress.

However, this one is very simple. No extra features, no customization, no counter, nothing apart links. You simply choose the social networks you want to display as a widget and the plugin will display links to share your page. The order is alphabetical.

The available websites are:

  • Diaspora*
  • Email
  • Facebook
  • Hacker news
  • Le journal du hacker
  • LinkedIn
  • Mastodon
  • Reddit
  • Twitter

Install

Composer installation

You can use Composer to install this plugin as a dependency if you use wordpress-plugin installers:

{
"require": {
    "armandphilippot/minimalist-sharing-buttons-widget": "dev-main"
}
"repositories": [{
    "type": "git",
    "url": "[email protected]:ArmandPhilippot/minimalist-sharing-buttons-widget.git"
}]

You can specify the version by adding the corresponding tag: dev-main#v1.0.0.

Manual installation

You can download this plugin on Github, then extract it in /wp-content/plugins/ directory.

Usage

  1. Navigate to the "Plugins" dashboard page and click on "Activate".
  2. Add "Minimalist Sharing Buttons" to a widget area through the "Widgets" menu in WordPress.
  3. Choose the buttons you want to display.
  4. (optional) If you want to display the Mastodon button, you need to provide an API token. You can generate one on instances.social.

Minimalist Sharing Buttons uses Mastodon Sharing Button to provide a Mastodon button. By setting an API token, it will be share with the other project (locally, nothing goes elsewhere) to generate a valid list of instances. This instances list is used to validate the user input and to provide suggestions to the user.

Screenshots

Admin view

Examples:

Twenty twelve Theme Twenty nineteen Theme
Admin view Admin view

Disclaimer

I wanted to keep this project minimalist. So there is no extra features. The buttons take the order defined in admin/json/social-networks.json which is alphabetical. It is not possible to reorder them without editing this file.

You may need to declare some styles to integrate the plugin in your theme. For example, the Twenty Twenty theme add some margins so the first button is misaligned. I didn't want to overload the widget with unnecessary styles for most themes.

I use !important on links color. Without it, some themes overwrite the color with complex selectors. By doing this, the plugin is usable on a large selection of themes but I haven't test everywhere.

The widget uses Javascript to open a popup when the user click on a button. But, it works also with scripts disabled. It's a simple link.

Licenses

This project is open source and available under the GPL v2 or later License.

This project uses Mastodon Sharing Button which is licensed under the MIT license.

minimalist-sharing-buttons-widget's People

Contributors

armandphilippot avatar dependabot[bot] avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

melikeoflu

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.