| @@ -0,0 +1,12 @@ | ||
| # shit-for-sale | ||
|
|
||
| This project is generated with [yo angular generator](https://github.com/yeoman/generator-angular) | ||
| version 0.12.1. | ||
|
|
||
| ## Build & development | ||
|
|
||
| Run `grunt` for building and `grunt serve` for preview. | ||
|
|
||
| ## Testing | ||
|
|
||
| Running `grunt test` will run the unit tests with karma. |
| @@ -0,0 +1 @@ | ||
| *.coffee |
| @@ -0,0 +1,152 @@ | ||
| <!doctype html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="utf-8"> | ||
| <title>Page Not Found :(</title> | ||
| <style> | ||
| ::-moz-selection { | ||
| background: #b3d4fc; | ||
| text-shadow: none; | ||
| } | ||
|
|
||
| ::selection { | ||
| background: #b3d4fc; | ||
| text-shadow: none; | ||
| } | ||
|
|
||
| html { | ||
| padding: 30px 10px; | ||
| font-size: 20px; | ||
| line-height: 1.4; | ||
| color: #737373; | ||
| background: #f0f0f0; | ||
| -webkit-text-size-adjust: 100%; | ||
| -ms-text-size-adjust: 100%; | ||
| } | ||
|
|
||
| html, | ||
| input { | ||
| font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; | ||
| } | ||
|
|
||
| body { | ||
| max-width: 500px; | ||
| padding: 30px 20px 50px; | ||
| border: 1px solid #b3b3b3; | ||
| border-radius: 4px; | ||
| margin: 0 auto; | ||
| box-shadow: 0 1px 10px #a7a7a7, inset 0 1px 0 #fff; | ||
| background: #fcfcfc; | ||
| } | ||
|
|
||
| h1 { | ||
| margin: 0 10px; | ||
| font-size: 50px; | ||
| text-align: center; | ||
| } | ||
|
|
||
| h1 span { | ||
| color: #bbb; | ||
| } | ||
|
|
||
| h3 { | ||
| margin: 1.5em 0 0.5em; | ||
| } | ||
|
|
||
| p { | ||
| margin: 1em 0; | ||
| } | ||
|
|
||
| ul { | ||
| padding: 0 0 0 40px; | ||
| margin: 1em 0; | ||
| } | ||
|
|
||
| .container { | ||
| max-width: 380px; | ||
| margin: 0 auto; | ||
| } | ||
|
|
||
| /* google search */ | ||
|
|
||
| #goog-fixurl ul { | ||
| list-style: none; | ||
| padding: 0; | ||
| margin: 0; | ||
| } | ||
|
|
||
| #goog-fixurl form { | ||
| margin: 0; | ||
| } | ||
|
|
||
| #goog-wm-qt, | ||
| #goog-wm-sb { | ||
| border: 1px solid #bbb; | ||
| font-size: 16px; | ||
| line-height: normal; | ||
| vertical-align: top; | ||
| color: #444; | ||
| border-radius: 2px; | ||
| } | ||
|
|
||
| #goog-wm-qt { | ||
| width: 220px; | ||
| height: 20px; | ||
| padding: 5px; | ||
| margin: 5px 10px 0 0; | ||
| box-shadow: inset 0 1px 1px #ccc; | ||
| } | ||
|
|
||
| #goog-wm-sb { | ||
| display: inline-block; | ||
| height: 32px; | ||
| padding: 0 10px; | ||
| margin: 5px 0 0; | ||
| white-space: nowrap; | ||
| cursor: pointer; | ||
| background-color: #f5f5f5; | ||
| background-image: -webkit-linear-gradient(rgba(255,255,255,0), #f1f1f1); | ||
| background-image: -moz-linear-gradient(rgba(255,255,255,0), #f1f1f1); | ||
| background-image: -ms-linear-gradient(rgba(255,255,255,0), #f1f1f1); | ||
| background-image: -o-linear-gradient(rgba(255,255,255,0), #f1f1f1); | ||
| -webkit-appearance: none; | ||
| -moz-appearance: none; | ||
| appearance: none; | ||
| } | ||
|
|
||
| #goog-wm-sb:hover, | ||
| #goog-wm-sb:focus { | ||
| border-color: #aaa; | ||
| box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); | ||
| background-color: #f8f8f8; | ||
| } | ||
|
|
||
| #goog-wm-qt:hover, | ||
| #goog-wm-qt:focus { | ||
| border-color: #105cb6; | ||
| outline: 0; | ||
| color: #222; | ||
| } | ||
|
|
||
| input::-moz-focus-inner { | ||
| padding: 0; | ||
| border: 0; | ||
| } | ||
| </style> | ||
| </head> | ||
| <body> | ||
| <div class="container"> | ||
| <h1>Not found <span>:(</span></h1> | ||
| <p>Sorry, but the page you were trying to view does not exist.</p> | ||
| <p>It looks like this was the result of either:</p> | ||
| <ul> | ||
| <li>a mistyped address</li> | ||
| <li>an out-of-date link</li> | ||
| </ul> | ||
| <script> | ||
| var GOOG_FIXURL_LANG = (navigator.language || '').slice(0,2),GOOG_FIXURL_SITE = location.host; | ||
| </script> | ||
| <script src="//linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js"></script> | ||
| </div> | ||
| </body> | ||
| </html> |
| @@ -0,0 +1,93 @@ | ||
| <!doctype html> | ||
| <html> | ||
| <head> | ||
| <meta charset="utf-8"> | ||
| <title></title> | ||
| <meta name="description" content=""> | ||
| <meta name="viewport" content="width=device-width"> | ||
| <!-- Place favicon.ico and apple-touch-icon.png in the root directory --> | ||
| <!-- build:css(.) styles/vendor.css --> | ||
| <!-- bower:css --> | ||
| <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css" /> | ||
| <!-- endbower --> | ||
| <!-- endbuild --> | ||
| <!-- build:css(.tmp) styles/main.css --> | ||
| <link rel="stylesheet" href="styles/main.css"> | ||
| <!-- endbuild --> | ||
| </head> | ||
| <body ng-app="shitForSaleApp"> | ||
| <!--[if lte IE 8]> | ||
| <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p> | ||
| <![endif]--> | ||
|
|
||
| <!-- Add your site or application content here --> | ||
| <div class="header"> | ||
| <div class="navbar navbar-default" role="navigation"> | ||
| <div class="container"> | ||
| <div class="navbar-header"> | ||
|
|
||
| <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#js-navbar-collapse"> | ||
| <span class="sr-only">Toggle navigation</span> | ||
| <span class="icon-bar"></span> | ||
| <span class="icon-bar"></span> | ||
| <span class="icon-bar"></span> | ||
| </button> | ||
|
|
||
| <a class="navbar-brand" href="#/">shitForSale</a> | ||
| </div> | ||
|
|
||
| <div class="collapse navbar-collapse" id="js-navbar-collapse"> | ||
|
|
||
| <ul class="nav navbar-nav"> | ||
| <li class="active"><a href="#/">Home</a></li> | ||
| <li><a ng-href="#/about">About</a></li> | ||
| <li><a ng-href="#/">Contact</a></li> | ||
| </ul> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div class="container"> | ||
| <div ng-view=""></div> | ||
| </div> | ||
|
|
||
| <div class="footer"> | ||
| <div class="container"> | ||
| <p><span class="glyphicon glyphicon-heart"></span> from the Yeoman team</p> | ||
| </div> | ||
| </div> | ||
|
|
||
|
|
||
| <!-- Google Analytics: change UA-XXXXX-X to be your site's ID --> | ||
| <script> | ||
| !function(A,n,g,u,l,a,r){A.GoogleAnalyticsObject=l,A[l]=A[l]||function(){ | ||
| (A[l].q=A[l].q||[]).push(arguments)},A[l].l=+new Date,a=n.createElement(g), | ||
| r=n.getElementsByTagName(g)[0],a.src=u,r.parentNode.insertBefore(a,r) | ||
| }(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); | ||
|
|
||
| ga('create', 'UA-XXXXX-X'); | ||
| ga('send', 'pageview'); | ||
| </script> | ||
|
|
||
| <!-- build:js(.) scripts/vendor.js --> | ||
| <!-- bower:js --> | ||
| <script src="bower_components/jquery/dist/jquery.js"></script> | ||
| <script src="bower_components/angular/angular.js"></script> | ||
| <script src="bower_components/bootstrap/dist/js/bootstrap.js"></script> | ||
| <script src="bower_components/angular-animate/angular-animate.js"></script> | ||
| <script src="bower_components/angular-cookies/angular-cookies.js"></script> | ||
| <script src="bower_components/angular-resource/angular-resource.js"></script> | ||
| <script src="bower_components/angular-route/angular-route.js"></script> | ||
| <script src="bower_components/angular-sanitize/angular-sanitize.js"></script> | ||
| <script src="bower_components/angular-touch/angular-touch.js"></script> | ||
| <!-- endbower --> | ||
| <!-- endbuild --> | ||
|
|
||
| <!-- build:js({.tmp,app}) scripts/scripts.js --> | ||
| <script src="scripts/app.js"></script> | ||
| <script src="scripts/controllers/main.js"></script> | ||
| <script src="scripts/controllers/about.js"></script> | ||
| <!-- endbuild --> | ||
| </body> | ||
| </html> |
| @@ -0,0 +1,4 @@ | ||
| # robotstxt.org | ||
|
|
||
| User-agent: * | ||
| Disallow: |
| @@ -0,0 +1,35 @@ | ||
| 'use strict'; | ||
|
|
||
| /** | ||
| * @ngdoc overview | ||
| * @name shitForSaleApp | ||
| * @description | ||
| * # shitForSaleApp | ||
| * | ||
| * Main module of the application. | ||
| */ | ||
| angular | ||
| .module('shitForSaleApp', [ | ||
| 'ngAnimate', | ||
| 'ngCookies', | ||
| 'ngResource', | ||
| 'ngRoute', | ||
| 'ngSanitize', | ||
| 'ngTouch' | ||
| ]) | ||
| .config(function ($routeProvider) { | ||
| $routeProvider | ||
| .when('/', { | ||
| templateUrl: 'views/main.html', | ||
| controller: 'MainCtrl', | ||
| controllerAs: 'main' | ||
| }) | ||
| .when('/about', { | ||
| templateUrl: 'views/about.html', | ||
| controller: 'AboutCtrl', | ||
| controllerAs: 'about' | ||
| }) | ||
| .otherwise({ | ||
| redirectTo: '/' | ||
| }); | ||
| }); |
| @@ -0,0 +1,17 @@ | ||
| 'use strict'; | ||
|
|
||
| /** | ||
| * @ngdoc function | ||
| * @name shitForSaleApp.controller:AboutCtrl | ||
| * @description | ||
| * # AboutCtrl | ||
| * Controller of the shitForSaleApp | ||
| */ | ||
| angular.module('shitForSaleApp') | ||
| .controller('AboutCtrl', function () { | ||
| this.awesomeThings = [ | ||
| 'HTML5 Boilerplate', | ||
| 'AngularJS', | ||
| 'Karma' | ||
| ]; | ||
| }); |
| @@ -0,0 +1,17 @@ | ||
| 'use strict'; | ||
|
|
||
| /** | ||
| * @ngdoc function | ||
| * @name shitForSaleApp.controller:MainCtrl | ||
| * @description | ||
| * # MainCtrl | ||
| * Controller of the shitForSaleApp | ||
| */ | ||
| angular.module('shitForSaleApp') | ||
| .controller('MainCtrl', function () { | ||
| this.awesomeThings = [ | ||
| 'HTML5 Boilerplate', | ||
| 'AngularJS', | ||
| 'Karma' | ||
| ]; | ||
| }); |
| @@ -0,0 +1,83 @@ | ||
| .browsehappy { | ||
| margin: 0.2em 0; | ||
| background: #ccc; | ||
| color: #000; | ||
| padding: 0.2em 0; | ||
| } | ||
|
|
||
| body { | ||
| padding: 0; | ||
| } | ||
|
|
||
| /* Everything but the jumbotron gets side spacing for mobile first views */ | ||
| .header, | ||
| .marketing, | ||
| .footer { | ||
| padding-left: 15px; | ||
| padding-right: 15px; | ||
| } | ||
|
|
||
| /* Custom page header */ | ||
| .header { | ||
| border-bottom: 1px solid #e5e5e5; | ||
| margin-bottom: 10px; | ||
| } | ||
| /* Make the masthead heading the same height as the navigation */ | ||
| .header h3 { | ||
| margin-top: 0; | ||
| margin-bottom: 0; | ||
| line-height: 40px; | ||
| padding-bottom: 19px; | ||
| } | ||
|
|
||
| /* Custom page footer */ | ||
| .footer { | ||
| padding-top: 19px; | ||
| color: #777; | ||
| border-top: 1px solid #e5e5e5; | ||
| } | ||
|
|
||
| .container-narrow > hr { | ||
| margin: 30px 0; | ||
| } | ||
|
|
||
| /* Main marketing message and sign up button */ | ||
| .jumbotron { | ||
| text-align: center; | ||
| border-bottom: 1px solid #e5e5e5; | ||
| } | ||
| .jumbotron .btn { | ||
| font-size: 21px; | ||
| padding: 14px 24px; | ||
| } | ||
|
|
||
| /* Supporting marketing content */ | ||
| .marketing { | ||
| margin: 40px 0; | ||
| } | ||
| .marketing p + h4 { | ||
| margin-top: 28px; | ||
| } | ||
|
|
||
| /* Responsive: Portrait tablets and up */ | ||
| @media screen and (min-width: 768px) { | ||
| .container { | ||
| max-width: 730px; | ||
| } | ||
|
|
||
| /* Remove the padding we set earlier */ | ||
| .header, | ||
| .marketing, | ||
| .footer { | ||
| padding-left: 0; | ||
| padding-right: 0; | ||
| } | ||
| /* Space out the masthead */ | ||
| .header { | ||
| margin-bottom: 30px; | ||
| } | ||
| /* Remove the bottom border on the jumbotron for visual effect */ | ||
| .jumbotron { | ||
| border-bottom: 0; | ||
| } | ||
| } |
| @@ -0,0 +1 @@ | ||
| <p>This is the about view.</p> |
| @@ -0,0 +1,23 @@ | ||
| <div class="jumbotron"> | ||
| <h1>'Allo, 'Allo!</h1> | ||
| <p class="lead"> | ||
| <img src="images/yeoman.png" alt="I'm Yeoman"><br> | ||
| Always a pleasure scaffolding your apps. | ||
| </p> | ||
| <p><a class="btn btn-lg btn-success" ng-href="#/">Splendid!<span class="glyphicon glyphicon-ok"></span></a></p> | ||
| </div> | ||
|
|
||
| <div class="row marketing"> | ||
| <h4>HTML5 Boilerplate</h4> | ||
| <p> | ||
| HTML5 Boilerplate is a professional front-end template for building fast, robust, and adaptable web apps or sites. | ||
| </p> | ||
|
|
||
| <h4>Angular</h4> | ||
| <p> | ||
| AngularJS is a toolset for building the framework most suited to your application development. | ||
| </p> | ||
|
|
||
| <h4>Karma</h4> | ||
| <p>Spectacular Test Runner for JavaScript.</p> | ||
| </div> |
| @@ -0,0 +1,28 @@ | ||
| { | ||
| "name": "shit-for-sale", | ||
| "version": "0.0.0", | ||
| "dependencies": { | ||
| "angular": "^1.3.0", | ||
| "bootstrap": "^3.2.0", | ||
| "angular-animate": "^1.3.0", | ||
| "angular-cookies": "^1.3.0", | ||
| "angular-resource": "^1.3.0", | ||
| "angular-route": "^1.3.0", | ||
| "angular-sanitize": "^1.3.0", | ||
| "angular-touch": "^1.3.0" | ||
| }, | ||
| "devDependencies": { | ||
| "angular-mocks": "^1.3.0" | ||
| }, | ||
| "appPath": "app", | ||
| "moduleName": "shitForSaleApp", | ||
| "overrides": { | ||
| "bootstrap": { | ||
| "main": [ | ||
| "less/bootstrap.less", | ||
| "dist/css/bootstrap.css", | ||
| "dist/js/bootstrap.js" | ||
| ] | ||
| } | ||
| } | ||
| } |
| @@ -0,0 +1,39 @@ | ||
| { | ||
| "name": "shitforsale", | ||
| "private": true, | ||
| "devDependencies": { | ||
| "grunt": "^0.4.5", | ||
| "grunt-angular-templates": "^0.5.7", | ||
| "grunt-autoprefixer": "^2.0.0", | ||
| "grunt-concurrent": "^1.0.0", | ||
| "grunt-contrib-clean": "^0.6.0", | ||
| "grunt-contrib-concat": "^0.5.0", | ||
| "grunt-contrib-connect": "^0.9.0", | ||
| "grunt-contrib-copy": "^0.7.0", | ||
| "grunt-contrib-cssmin": "^0.12.0", | ||
| "grunt-contrib-htmlmin": "^0.4.0", | ||
| "grunt-contrib-imagemin": "^0.9.2", | ||
| "grunt-contrib-jshint": "^0.11.0", | ||
| "grunt-contrib-uglify": "^0.7.0", | ||
| "grunt-contrib-watch": "^0.6.1", | ||
| "grunt-filerev": "^2.1.2", | ||
| "grunt-google-cdn": "^0.4.3", | ||
| "grunt-karma": "*", | ||
| "grunt-newer": "^1.1.0", | ||
| "grunt-ng-annotate": "^0.9.2", | ||
| "grunt-svgmin": "^2.0.0", | ||
| "grunt-usemin": "^3.0.0", | ||
| "grunt-wiredep": "^2.0.0", | ||
| "jit-grunt": "^0.9.1", | ||
| "jshint-stylish": "^1.0.0", | ||
| "karma-jasmine": "*", | ||
| "karma-phantomjs-launcher": "*", | ||
| "time-grunt": "^1.0.0" | ||
| }, | ||
| "engines": { | ||
| "node": ">=0.10.0" | ||
| }, | ||
| "scripts": { | ||
| "test": "grunt test" | ||
| } | ||
| } |
| @@ -0,0 +1,18 @@ | ||
| { | ||
| "bitwise": true, | ||
| "browser": true, | ||
| "curly": true, | ||
| "eqeqeq": true, | ||
| "esnext": true, | ||
| "jasmine": true, | ||
| "latedef": true, | ||
| "noarg": true, | ||
| "node": true, | ||
| "strict": true, | ||
| "undef": true, | ||
| "unused": true, | ||
| "globals": { | ||
| "angular": false, | ||
| "inject": false | ||
| } | ||
| } |
| @@ -0,0 +1,83 @@ | ||
| // Karma configuration | ||
| // http://karma-runner.github.io/0.12/config/configuration-file.html | ||
| // Generated on 2015-09-12 using | ||
| // generator-karma 1.0.0 | ||
|
|
||
| module.exports = function(config) { | ||
| 'use strict'; | ||
|
|
||
| config.set({ | ||
| // enable / disable watching file and executing tests whenever any file changes | ||
| autoWatch: true, | ||
|
|
||
| // base path, that will be used to resolve files and exclude | ||
| basePath: '../', | ||
|
|
||
| // testing framework to use (jasmine/mocha/qunit/...) | ||
| // as well as any additional frameworks (requirejs/chai/sinon/...) | ||
| frameworks: [ | ||
| "jasmine" | ||
| ], | ||
|
|
||
| // list of files / patterns to load in the browser | ||
| files: [ | ||
| // bower:js | ||
| 'bower_components/jquery/dist/jquery.js', | ||
| 'bower_components/angular/angular.js', | ||
| 'bower_components/bootstrap/dist/js/bootstrap.js', | ||
| 'bower_components/angular-animate/angular-animate.js', | ||
| 'bower_components/angular-cookies/angular-cookies.js', | ||
| 'bower_components/angular-resource/angular-resource.js', | ||
| 'bower_components/angular-route/angular-route.js', | ||
| 'bower_components/angular-sanitize/angular-sanitize.js', | ||
| 'bower_components/angular-touch/angular-touch.js', | ||
| 'bower_components/angular-mocks/angular-mocks.js', | ||
| // endbower | ||
| "app/scripts/**/*.js", | ||
| "test/mock/**/*.js", | ||
| "test/spec/**/*.js" | ||
| ], | ||
|
|
||
| // list of files / patterns to exclude | ||
| exclude: [ | ||
| ], | ||
|
|
||
| // web server port | ||
| port: 8080, | ||
|
|
||
| // Start these browsers, currently available: | ||
| // - Chrome | ||
| // - ChromeCanary | ||
| // - Firefox | ||
| // - Opera | ||
| // - Safari (only Mac) | ||
| // - PhantomJS | ||
| // - IE (only Windows) | ||
| browsers: [ | ||
| "PhantomJS" | ||
| ], | ||
|
|
||
| // Which plugins to enable | ||
| plugins: [ | ||
| "karma-phantomjs-launcher", | ||
| "karma-jasmine" | ||
| ], | ||
|
|
||
| // Continuous Integration mode | ||
| // if true, it capture browsers, run tests and exit | ||
| singleRun: false, | ||
|
|
||
| colors: true, | ||
|
|
||
| // level of logging | ||
| // possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG | ||
| logLevel: config.LOG_INFO, | ||
|
|
||
| // Uncomment the following lines if you are using grunt's server to run the tests | ||
| // proxies: { | ||
| // '/': 'http://localhost:9000/' | ||
| // }, | ||
| // URL root prevent conflicts with the site root | ||
| // urlRoot: '_karma_' | ||
| }); | ||
| }; |
| @@ -0,0 +1,23 @@ | ||
| 'use strict'; | ||
|
|
||
| describe('Controller: AboutCtrl', function () { | ||
|
|
||
| // load the controller's module | ||
| beforeEach(module('shitForSaleApp')); | ||
|
|
||
| var AboutCtrl, | ||
| scope; | ||
|
|
||
| // Initialize the controller and a mock scope | ||
| beforeEach(inject(function ($controller, $rootScope) { | ||
| scope = $rootScope.$new(); | ||
| AboutCtrl = $controller('AboutCtrl', { | ||
| $scope: scope | ||
| // place here mocked dependencies | ||
| }); | ||
| })); | ||
|
|
||
| it('should attach a list of awesomeThings to the scope', function () { | ||
| expect(AboutCtrl.awesomeThings.length).toBe(3); | ||
| }); | ||
| }); |
| @@ -0,0 +1,23 @@ | ||
| 'use strict'; | ||
|
|
||
| describe('Controller: MainCtrl', function () { | ||
|
|
||
| // load the controller's module | ||
| beforeEach(module('shitForSaleApp')); | ||
|
|
||
| var MainCtrl, | ||
| scope; | ||
|
|
||
| // Initialize the controller and a mock scope | ||
| beforeEach(inject(function ($controller, $rootScope) { | ||
| scope = $rootScope.$new(); | ||
| MainCtrl = $controller('MainCtrl', { | ||
| $scope: scope | ||
| // place here mocked dependencies | ||
| }); | ||
| })); | ||
|
|
||
| it('should attach a list of awesomeThings to the scope', function () { | ||
| expect(MainCtrl.awesomeThings.length).toBe(3); | ||
| }); | ||
| }); |