Skip to content
This repository has been archived by the owner on Sep 30, 2019. It is now read-only.

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxenko committed Apr 6, 2016
0 parents commit 5d96570
Show file tree
Hide file tree
Showing 79 changed files with 106,859 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
node_modules
.env
# compiled output
/dist
tmp

# dependencies
node_modules
bower_components

# misc
.sass-cache
connect.lock
coverage/*
libpeerconnection.log
npm-debug.log
testem.log
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: node index.js
4 changes: 4 additions & 0 deletions client/.bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"directory": "bower_components",
"analytics": false
}
34 changes: 34 additions & 0 deletions client/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true


[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 2

[*.js]
indent_style = space
indent_size = 2

[*.hbs]
insert_final_newline = false
indent_style = space
indent_size = 2

[*.css]
indent_style = space
indent_size = 2

[*.html]
indent_style = space
indent_size = 2

[*.{diff,md}]
trim_trailing_whitespace = false
10 changes: 10 additions & 0 deletions client/.ember-cli
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
/**
Ember CLI sends analytics information by default. The data is completely
anonymous, but there are times when you might want to disable this behavior.

Setting `disableAnalytics` to true will prevent any data from being sent.
*/
"disableAnalytics": false,
"output-path": "../public/"
}
32 changes: 32 additions & 0 deletions client/.jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"predef": [
"document",
"window",
"-Promise"
],
"browser": true,
"boss": true,
"curly": true,
"debug": false,
"devel": true,
"eqeqeq": true,
"evil": true,
"forin": false,
"immed": false,
"laxbreak": false,
"newcap": true,
"noarg": true,
"noempty": false,
"nonew": false,
"nomen": false,
"onevar": false,
"plusplus": false,
"regexp": false,
"undef": true,
"sub": true,
"strict": false,
"white": false,
"eqnull": true,
"esnext": true,
"unused": true
}
23 changes: 23 additions & 0 deletions client/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
language: node_js
node_js:
- "0.12"

sudo: false

cache:
directories:
- node_modules

before_install:
- export PATH=/usr/local/phantomjs-2.0.0/bin:$PATH
- "npm config set spin false"
- "npm install -g npm@^2"

install:
- npm install -g bower
- npm install
- bower install

script:
- npm test
3 changes: 3 additions & 0 deletions client/.watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ignore_dirs": ["tmp", "dist"]
}
53 changes: 53 additions & 0 deletions client/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Client

This README outlines the details of collaborating on this Ember application.
A short introduction of this app could easily go here.

## Prerequisites

You will need the following things properly installed on your computer.

* [Git](http://git-scm.com/)
* [Node.js](http://nodejs.org/) (with NPM)
* [Bower](http://bower.io/)
* [Ember CLI](http://www.ember-cli.com/)
* [PhantomJS](http://phantomjs.org/)

## Installation

* `git clone <repository-url>` this repository
* change into the new directory
* `npm install`
* `bower install`

## Running / Development

* `ember server`
* Visit your app at [http://localhost:4200](http://localhost:4200).

### Code Generators

Make use of the many generators for code, try `ember help generate` for more details

### Running Tests

* `ember test`
* `ember test --server`

### Building

* `ember build` (development)
* `ember build --environment production` (production)

### Deploying

Specify what it takes to deploy your app.

## Further Reading / Useful Links

* [ember.js](http://emberjs.com/)
* [ember-cli](http://www.ember-cli.com/)
* Development Browser Extensions
* [ember inspector for chrome](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi)
* [ember inspector for firefox](https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/)

6 changes: 6 additions & 0 deletions client/app/adapters/application.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import DS from 'ember-data';


export default DS.JSONAPIAdapter.extend({
namespace : 'api'
});
18 changes: 18 additions & 0 deletions client/app/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import Ember from 'ember';
import Resolver from 'ember/resolver';
import loadInitializers from 'ember/load-initializers';
import config from './config/environment';

let App;

Ember.MODEL_FACTORY_INJECTIONS = true;

App = Ember.Application.extend({
modulePrefix: config.modulePrefix,
podModulePrefix: config.podModulePrefix,
Resolver
});

loadInitializers(App, config.modulePrefix);

export default App;
Empty file added client/app/components/.gitkeep
Empty file.
7 changes: 7 additions & 0 deletions client/app/components/user-info.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import Ember from 'ember';

export default Ember.Component.extend({
tagName : '',
user : Ember.computed.alias('application.user'),

});
Empty file added client/app/controllers/.gitkeep
Empty file.
5 changes: 5 additions & 0 deletions client/app/controllers/application.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Ember from 'ember';

export default Ember.Controller.extend({
user : {}
});
7 changes: 7 additions & 0 deletions client/app/controllers/home.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import Ember from 'ember';

export default Ember.Controller.extend({
application : Ember.inject.controller(),


});
Empty file added client/app/helpers/.gitkeep
Empty file.
25 changes: 25 additions & 0 deletions client/app/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Pin App (freeCodeCamp)</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">

{{content-for 'head'}}

<link rel="stylesheet" href="assets/vendor.css">
<link rel="stylesheet" href="assets/client.css">

{{content-for 'head-footer'}}
</head>
<body>
{{content-for 'body'}}

<script src="assets/vendor.js"></script>
<script src="assets/client.js"></script>

{{content-for 'body-footer'}}
</body>
</html>
8 changes: 8 additions & 0 deletions client/app/initializers/application.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export function initialize(container, application) {
application.inject('component', 'application', 'controller:application');
}

export default {
name: 'application',
initialize: initialize
};
Empty file added client/app/models/.gitkeep
Empty file.
13 changes: 13 additions & 0 deletions client/app/router.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import Ember from 'ember';
import config from './config/environment';

const Router = Ember.Router.extend({
location: config.locationType
});

Router.map(function() {
this.route('home', {path : '/'});
this.route('mypins', {path : '/mypins'});
});

export default Router;
Empty file added client/app/routes/.gitkeep
Empty file.
20 changes: 20 additions & 0 deletions client/app/routes/application.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import Ember from 'ember';

let fetchUserInfo = () => {
return $.get('/api/user/me');
};


export default Ember.Route.extend({
model() {
return Ember.RSVP.hash({
user : fetchUserInfo()
});
},


setupController(controller, model) {
controller.set('user', model.user);
}

});
5 changes: 5 additions & 0 deletions client/app/routes/home.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Ember from 'ember';

export default Ember.Route.extend({

});
34 changes: 34 additions & 0 deletions client/app/styles/app.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
@import 'bootstrap.less';
@import 'bower_components/bootswatch/simplex/variables.less';
@import 'bower_components/bootswatch/simplex/bootswatch.less';
@import 'bower_components/bootstrap-social/bootstrap-social.less';




.place-box {
min-height: 120px;
border-bottom: 1px dashed #eee;
margin-bottom: 10px;
padding-bottom: 10px;

.graphic {
margin: 0px 20px;
}

.image img {
height: 90px;
}

.desc {
margin-top: -20px;
}
}


.user-login-info {
img {
height: 25px;
margin-right: 10px;
}
}
36 changes: 36 additions & 0 deletions client/app/templates/application.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
{{#link-to 'home' class="navbar-brand"}}
<i class="fa fa-star-o"></i>
Night Life app
{{/link-to}}
</div>

<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">

<ul class="nav navbar-nav navbar-right">
{{#if places.length}}
<li>{{#link-to 'amgoing'}}Places i'm going{{/link-to}}</li>
{{/if}}
{{user-info}}
</ul>
</div>
</div>
</nav>


<div class="container">
{{outlet}}


<div class="text-center">by <a href="https://www.freecodecamp.com/linuxenko">@linuxenko</a>
github <a href="https://github.com/b37t1td/pinapp-freecodecamp">repo</a> of this app.
</div>
</div>
Empty file.
17 changes: 17 additions & 0 deletions client/app/templates/components/user-info.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

{{#unless user.login}}
<li>
<a href="/api/twitter/connect?term={{view.application.term}}&city={{view.application.city}}&page={{view.application.home.page}}" class="">
<i class="fa fa-twitter"></i>
Sign in with Twitter
</a>
</li>
{{else}}
<li class="dropdown user-login-info">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<a href="/"><img src="{{user.image}}" /> {{user.name}}</a> <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="/api/user/logout">Logout</a></li>
</ul>
</li>
{{/unless}}
Loading

0 comments on commit 5d96570

Please sign in to comment.