Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions react-paris-or-angular-paris/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
44 changes: 44 additions & 0 deletions react-paris-or-angular-paris/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# ReactJS Paris or AngularJS Paris

Written for the [React-Europe hackathon](https://github.com/react-europe/hackathon). A simple game to guess whether a person has joined ReactJS or AngularJS meetup. Uses [Meetup API](http://www.meetup.com/meetup_api/).

![](docs/ss1.png)


## Running Instructions

```
npm install
npm start
# open http://localhost:3000
```

## Credit

**Author**: Shu Uesugi (shu@chibicode.com)

**Photo Credit**: From [Unsplash](http://tumblr.unsplash.com/post/85385403379/download-by-louis-pellissier) ([CC0](http://creativecommons.org/publicdomain/zero/1.0/) License)

**License**:

The MIT License (MIT)

Copyright (c) 2015 Shusaku Uesugi

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
58 changes: 58 additions & 0 deletions react-paris-or-angular-paris/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');

var routes = require('./routes/index');

var app = express();

// view engine setup
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'jade');

// uncomment after placing your favicon in /public
//app.use(favicon(__dirname + '/public/favicon.ico'));
app.use(logger('dev'));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
app.use(cookieParser());
app.use(express.static(path.join(__dirname, 'public')));

app.use('/', routes);

// catch 404 and forward to error handler
app.use(function(req, res, next) {
var err = new Error('Not Found');
err.status = 404;
next(err);
});

// error handlers

// development error handler
// will print stacktrace
if (app.get('env') === 'development') {
app.use(function(err, req, res, next) {
res.status(err.status || 500);
res.render('error', {
message: err.message,
error: err
});
});
}

// production error handler
// no stacktraces leaked to user
app.use(function(err, req, res, next) {
res.status(err.status || 500);
res.render('error', {
message: err.message,
error: {}
});
});


module.exports = app;
90 changes: 90 additions & 0 deletions react-paris-or-angular-paris/bin/www
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
#!/usr/bin/env node

/**
* Module dependencies.
*/

var app = require('../app');
var debug = require('debug')('paris-react-angular:server');
var http = require('http');

/**
* Get port from environment and store in Express.
*/

var port = normalizePort(process.env.PORT || '3000');
app.set('port', port);

/**
* Create HTTP server.
*/

var server = http.createServer(app);

/**
* Listen on provided port, on all network interfaces.
*/

server.listen(port);
server.on('error', onError);
server.on('listening', onListening);

/**
* Normalize a port into a number, string, or false.
*/

function normalizePort(val) {
var port = parseInt(val, 10);

if (isNaN(port)) {
// named pipe
return val;
}

if (port >= 0) {
// port number
return port;
}

return false;
}

/**
* Event listener for HTTP server "error" event.
*/

function onError(error) {
if (error.syscall !== 'listen') {
throw error;
}

var bind = typeof port === 'string'
? 'Pipe ' + port
: 'Port ' + port;

// handle specific listen errors with friendly messages
switch (error.code) {
case 'EACCES':
console.error(bind + ' requires elevated privileges');
process.exit(1);
break;
case 'EADDRINUSE':
console.error(bind + ' is already in use');
process.exit(1);
break;
default:
throw error;
}
}

/**
* Event listener for HTTP server "listening" event.
*/

function onListening() {
var addr = server.address();
var bind = typeof addr === 'string'
? 'pipe ' + addr
: 'port ' + addr.port;
debug('Listening on ' + bind);
}
30 changes: 30 additions & 0 deletions react-paris-or-angular-paris/bower_components/spinkit/.bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "SpinKit",
"version": "1.0.1",
"homepage": "https://github.com/tobiasahlin/SpinKit",
"authors": [
"Tobias Ahlin"
],
"description": "A collection of loading indicators animated with CSS",
"main": "css/spinkit.css",
"keywords": [
"css",
"scss",
"web"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules"
],
"_release": "1.0.1",
"_resolution": {
"type": "version",
"tag": "1.0.1",
"commit": "8505d1baab43a842758cab11b103f6374644207a"
},
"_source": "git://github.com/tobiasahlin/SpinKit.git",
"_target": "~1.0.1",
"_originalSource": "spinkit",
"_direct": true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# 1.0.1

* Fix: Missed sass variables for background-color
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Pull Request Guidelines

We all love Pull Requests so if you have something you'd like to share with the community we'd be happy to help you out with contributing. But before you create your PR please read and understand the following. :heart:

## Code

If you're submitting a new animation, make sure that it looks identical in [all browsers that support CSS animations](http://caniuse.com/css-animation).

The animation styles should be put in an [SCSS](http://sass-lang.com/) file which you place in [scss/spinners/](https://github.com/tobiasahlin/SpinKit/blob/master/scss/spinners). It must also be imported in [scss/spinkit.scss](https://github.com/tobiasahlin/SpinKit/blob/master/scss/spinkit.scss). Carefully look at the existing spinners to make sure you follow the same conventions and that you list an example on top of the page exactly like the other spinners (we extract this when generating the HTML files). Don't use any browser prefixes as this will be added automatically to the generated CSS files by [autoprefixer](https://github.com/postcss/autoprefixer).

To generate the CSS and HTML files you need to have [node.js](http://nodejs.org/) installed on your system. After that you need to issue `npm install` from the SpinKit project directory to install [gulp](https://github.com/gulpjs/gulp) and other dependencies listed in `package.json`. After doing this you should be able to just call `gulp build` to generate the files. These files should be included in your pull requests.


## Style

Following the same code style makes all of our lives a bit easier, currently we ask that you use:

- 2 spaces for indenting
- No trailing spaces
- One trailing newline at the end of each file

If you use Sublime Text (or any other editor with the same capability) you can install EditorConfig (through [Sublime Package Control](https://sublime.wbond.net/installation)), which will pick up our project's `.editorconfig` and make your file conform to above rules on each save.
20 changes: 20 additions & 0 deletions react-paris-or-angular-paris/bower_components/spinkit/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
The MIT License (MIT)

Copyright (c) 2014 Tobias Ahlin

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
70 changes: 70 additions & 0 deletions react-paris-or-angular-paris/bower_components/spinkit/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# [SpinKit](http://tobiasahlin.com/spinkit/)

Simple loading spinners animated with CSS. See [demo](http://tobiasahlin.com/spinkit/).

SpinKit uses CSS animations to create smooth and easily customizable animations. The goal is not to offer a solution that works in every browser—if you're supporting browsers that haven't implemented the CSS `animation` property (e.g. IE9 and below), you'll want to detect support for the `animation` property, and implement a fallback (see below.)

## Usage

### Regular CSS

Grab the HTML and CSS for a spinner and include it in your project. Note that a hidden spinner (`opacity: 0`, or `visibility: hidden`) will still animate. After hiding a spinner, it's recommended to remove it from the DOM, set `display: none` or pause the animation by setting `animation-play-state: paused`.

SpinKit can also be installed to your project with `bower`:

```bash
$ bower install spinkit
```

### SCSS

If you're using SCSS in your project then you can include just the styles for the spinners that you want by adding the following to your main file:

```scss
@import '../bower_components/spinkit/scss/spinners/1-rotating-plane',
'../bower_components/spinkit/scss/spinners/3-wave';
```

Please note that you currently need to use [autoprefixer](https://github.com/postcss/autoprefixer) in your project if you want to support all browsers. If you're compiling your SCSS with gulp you can use [gulp-autoprefixer](https://github.com/sindresorhus/gulp-autoprefixer) or if you use grunt then [grunt-autoprefixer](https://github.com/nDmitry/grunt-autoprefixer) is a good choice.

There are some variables that can be overridden if you use SCSS. The defaults are listed in [scss/_variables.scss](https://github.com/tobiasahlin/SpinKit/blob/master/scss/_variables.scss).

## Old web browser compatibility

With support for CSS animations in every current browser and [almost 90% of all browsers in use today](http://caniuse.com/#feat=css-animation), the need for GIF and JavaScript fallbacks is decreasing quickly. If you still need to support those last few then this section is for you.

### Implementing a fallback spinner

An easy way to provide a fallback animation is to check for support for the `animation` property, and replace the spinner with a GIF if it's not supported.

```javascript
function browserSupportsCSSProperty(propertyName) {
var elm = document.createElement('div');
propertyName = propertyName.toLowerCase();

if (elm.style[propertyName] != undefined)
return true;

var propertyNameCapital = propertyName.charAt(0).toUpperCase() + propertyName.substr(1),
domPrefixes = 'Webkit Moz ms O'.split(' ');

for (var i = 0; i < domPrefixes.length; i++) {
if (elm.style[domPrefixes[i] + propertyNameCapital] != undefined)
return true;
}

return false;
}
```

Use it to check for `animation` support:

```javascript
if (!browserSupportsCSSProperty('animation')) {
// fallback…
}
```

## Contributing

See [CONTRIBUTING.md](https://github.com/tobiasahlin/SpinKit/blob/master/CONTRIBUTING.md) for details.
20 changes: 20 additions & 0 deletions react-paris-or-angular-paris/bower_components/spinkit/bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "SpinKit",
"version": "1.0.0",
"homepage": "https://github.com/tobiasahlin/SpinKit",
"authors": [
"Tobias Ahlin"
],
"description": "A collection of loading indicators animated with CSS",
"main": "css/spinkit.css",
"keywords": [
"css",
"scss",
"web"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules"
]
}
Loading