Kudos is similar to a like. By simply hovering over the button for a couple of seconds, a counter is inreased. Example
- Download
kudosplease.min.js
andkudosplease.css
from thefrontend
folder - Embed CSS and JS on your website
<script src="kudosplease-min.js"></script> <link rel="stylesheet" href="kudosplease-min.css">
- Create the widget:
<div class="kudos" data-amount="0" data-url="example.com/my-awesome-article"></div>
- Create the JS object:
new KudosPlease({ el : '.kudos', duration : 1500, persistent : true, status : { alpha: 'fontelico-emo-shoot', beta: 'fontelico-emo-shoot', gamma: 'fontelico-emo-beer' } });
You need to change the API endpoint stored int the JavaScript. Simply search kudosplease.min.js for kudos.niels-ole.com
and replace it with your API endpoint.
Kudos requires a redis database that stores the state.
Building the binary is easy: go build -o kudos .
Usage of ./kudos:
-admin-port string
Admin listen port; Provides metrics and debugging (default ":8081")
-port string
Listening port (default ":8080")
-redis-address string
redis host and port (default "localhost:6379")
-redis-db int
redis db to use
-redis-password string
redis password
registry.gitlab.com/nielsole/kudos/kudos
go build main.go
I really liked http://kudosplease.com/ but their backend was really slow making it unusable, so I wrote my own.
Thanks to Tim Pietrusky for creating kudos and publishing it under OSS.
- Ensure compatibility with different frontends for example Get Claps whose frontend is even closer to a like button.