Coder Social home page Coder Social logo

pombredanne / jquery-lifestream Goto Github PK

View Code? Open in Web Editor NEW

This project forked from christianvuerings/jquery-lifestream

0.0 1.0 0.0 21.53 MB

Show a stream of your online activity with jQuery

Home Page: https://christianvuerings.github.io/jquery-lifestream/

License: MIT License

Makefile 0.33% JavaScript 92.03% CSS 0.43% HTML 7.21%

jquery-lifestream's Introduction

jQuery Lifestream Plug-in

jQuery Lifestream Logo

Show a stream of your online activity. Check out the example or create your own lifestream instantly.

Follow us on twitter

Requirements

Supported feeds

Currently supports the following feeds:

Feel free to fork the project and add your own feeds in. Just send a pull request to christianvuerings/jquery-lifestream when you're finished.

Extensions

Build

cd build
make

Available targets

Use make target and replace target with the target you want to use.

  • jls: Build jquery.lifestream.js, the non-minified version of jQuery Lifestream
  • jls-min: Build jquery.lifestream.min.js, the minified version of jQuery Lifestream
  • jls-css: Build css/lifestream.css, the stylesheet containing the favicons
  • script-min: Build download/js/script.min.js, this script is the main script for the download page
  • uglifyjs: Build download/js/uglify-cs.js, a custom version of UglifyJS patched to work in the browser
  • uglifyjs-min: Build download/js/uglify-cs.min.js, minified version of UglifyJS
  • service-list: Build download/services.json, a list of all the services which are available

Requirements

Usage

Add the following to the <head> or <body> tag of your HTML page.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src="//rawgithub.com/christianvuerings/jquery-lifestream/master/jquery.lifestream.min.js"></script>
<script>
  $("#lifestream").lifestream({
    list:[
      {
        service: "github",
        user: "christianvuerings"
      },
      {
        service: "twitter",
        user: "christianvuer"
      }
    ]
  });
</script>

The above code will always use the latest version of the script. If you want to use it in production, download the minified or uncompressed file and host it yourself.

You also need to add a bit of HTML:

<div id="lifestream">&nbsp;</div>

jQuery Templates

You have the ability to use jQuery templates for your feed. Checkout the template page to see an overview of the current available templates.

Usage:

{
  service: 'deviantart',
  user: 'gabbyd70',
  template: {
    deviationpost: 'heeft hetvolgende gepost: <a href="${url}">${title}</a>'
  }
}

Configuration

The plug-in accepts one configuration JSON object:

$("#lifestream").lifestream({
  classname: "lifestream",
  feedloaded: feedcallback,
  limit: 30,
  list:[
    {
      service: "github",
      user: "christianvuerings"
    },
    {
      service: "twitter",
      user: "christianvuer"
    }
  ]
});

classname: The name of the main lifestream class. We use this for the main ul class e.g. lifestream and for the specific feeds e.g. lifestream-twitter

feedloaded: (function) A callback function which is triggered each time a feed was loaded.

limit: (integer) Specify how many elements you want in your lifestream (default = 10).

list: (array) Array containing other JSON objects with information about each item. Each item should have a service and a user. For more information about each service, check out the source code of the example page.

Commit to the project

Add your own feed

Adding in your own feed is pretty easy. Have a look at this commit which adds support for the last.fm feed.

Add your favicon

  1. Convert the favicon.ico of a site to a .png file. (e.g. http://google.com/favicon.ico)
  2. Optimize the .png file. Save it in src/favicons/.

How to commit?

  1. Push the finished code to your own remote repository.
  2. Send a pull request to christianvuerings/jquery-lifestream.

Code Style Guidelines

  • Indentation: 2 spaces
  • Max column width: 78 characters
  • Trailing spaces: not allowed
  • Always use curly brackets {} for if/else/for
  • Put all var statements in the beginning of a function
  • Use === & !== for comparing variables
  • Use the following spacing rules:
for (var i = 0, j = length; i < j; i++) {
  • Use jshint on your files. .jshintrc contains the necessary configuration

Ideas

Stuff that isn't implemented yet, but would be nice to have:

Mentions

Places on the web where this plug-in got mentioned:

Used By

A list of sites that use the jQuery Lifestream plug-in:

Alesh Houdek, Armin Roșu, BrainDump2.0, Dennis Metzcher, Devin Berg, Erik Ostrom, Ethan Brown, Libby Baldwin, Sam Tardif, Sebastix, Simon Gaeremynck, Song Gao, Sunny Walker, Roni Laukkarinen

Special Thanks

Special thanks all the committers and gabbyd70 for letting us use her DeviantART username.

Version log

Have a look at our tags to see what we've been working on.

jquery-lifestream's People

Contributors

ahluntang avatar arminrosu avatar billturner avatar christianvuerings avatar davidlimcheng avatar debuggingfuture avatar devinberg avatar devkungfoo avatar dmfrancisco avatar eostrom avatar etano avatar hawx avatar hiromitz avatar mattn avatar mgiulio avatar my-flow avatar numericr avatar rannmann avatar samtardif avatar simong avatar skylamer avatar songgao avatar thatryan avatar thebinarypenguin avatar tomatoganes avatar westurner avatar yeco 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.