Coder Social home page Coder Social logo

johan-- / widget-the-people Goto Github PK

View Code? Open in Web Editor NEW

This project forked from douglasback/widget-the-people

0.0 3.0 0.0 1001 KB

Widget the People is a Node.js application that enables petition creators and webmasters to embed a widget that promotes a particular petition on We the People.

Home Page: https://petition-promoter.herokuapp.com

JavaScript 62.38% Ruby 1.66% CSS 27.18% HTML 8.78%

widget-the-people's Introduction

Contents

About

Widget the People is a Node.js application that enables petition creators and webmasters to embed a widget that promotes a particular petition on We the People.

A sample deployment is available at petition-promoter.herokuapp.com

Usage

Deploying the app

  1. Clone this repository: git clone [email protected]:douglasback/widget-the-people.git

  2. Install the required node modules:

npm install
  1. To run a local instance, cd to the project directory and run
node app.js

The app will be available at http://localhost:5000/.

You can also deploy this app to a PaaS provider like Heroku or AppFog. (The Procfile in this repository is currently designed to work with Heroku.)

Creating a widget

When running, the app takes a petition title inputted by the user and generates code in the form of an <iframe> that the user can copy and paste into their own website.

The iframe's src attribute refers to the app instance, so it must be available in order for the widget to function once embedded.

Technical details

  • Languages: Node.js, HTML, JavaScript, Compass, and SCSS
  • Libraries / Frameworks: jQuery, Underscore.js, Bootstrap Typeahead.js, Grunt.js
  • Data formats used: JSON, JSONP

Developers

The widget generation page bootstraps itself on load by making an API call to get the list of petitions. If the API is slow or not returning responses, the app will fail to function as expected.

One advantage of using Node.js to generate the widget is to reduce the number of client-side resources required by the <iframe>.

Authors / Maintainers

Widget the People was developed by Douglas Back.

Ideas for Future Enhancements

An unprioritized todo list of sorts.

  • Allow users to customize the look and feel of the widget (to some degree, e.g. color scheme, fonts).
  • Provide a method to allow users to embed HTML/CSS directly rather than rely on the iframe.

widget-the-people's People

Contributors

douglasback avatar

Watchers

johan pretorius avatar James Cloos avatar  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.