49 | * var app = angular.module('app', ['ui.router.compat']); 50 | * 51 | * app.config(function ($routeProvider) { 52 | * $routeProvider.when('home', { 53 | * controller: function () { ... }, 54 | * templateUrl: 'path/to/template' 55 | * }); 56 | * }); 57 | *58 | * 59 | * @param {string} url URL as string 60 | * @param {object} route Route definition object 61 | * 62 | * @return {object} $routeProvider - $routeProvider instance 63 | */ 64 | function when(url, route) { 65 | /*jshint validthis: true */ 66 | if (route.redirectTo != null) { 67 | // Redirect, configure directly on $urlRouterProvider 68 | var redirect = route.redirectTo, handler; 69 | if (isString(redirect)) { 70 | handler = redirect; // leave $urlRouterProvider to handle 71 | } else if (isFunction(redirect)) { 72 | // Adapt to $urlRouterProvider API 73 | handler = function (params, $location) { 74 | return redirect(params, $location.path(), $location.search()); 75 | }; 76 | } else { 77 | throw new Error("Invalid 'redirectTo' in when()"); 78 | } 79 | $urlRouterProvider.when(url, handler); 80 | } else { 81 | // Regular route, configure as state 82 | $stateProvider.state(inherit(route, { 83 | parent: null, 84 | name: 'route:' + encodeURIComponent(url), 85 | url: url, 86 | onEnter: onEnterRoute, 87 | onExit: onExitRoute 88 | })); 89 | } 90 | routes.push(route); 91 | return this; 92 | } 93 | 94 | /* 95 | * @ngdoc object 96 | * @name ui.router.compat.$route 97 | * 98 | * @requires ui.router.state.$state 99 | * @requires $rootScope 100 | * @requires $routeParams 101 | * 102 | * @property {object} routes - Array of registered routes. 103 | * @property {object} params - Current route params as object. 104 | * @property {string} current - Name of the current route. 105 | * 106 | * @description 107 | * The `$route` service provides interfaces to access defined routes. It also let's 108 | * you access route params through `$routeParams` service, so you have fully 109 | * control over all the stuff you would actually get from angular's core `$route` 110 | * service. 111 | */ 112 | this.$get = $get; 113 | $get.$inject = ['$state', '$rootScope', '$routeParams']; 114 | function $get( $state, $rootScope, $routeParams) { 115 | 116 | var $route = { 117 | routes: routes, 118 | params: $routeParams, 119 | current: undefined 120 | }; 121 | 122 | function stateAsRoute(state) { 123 | return (state.name !== '') ? state : undefined; 124 | } 125 | 126 | $rootScope.$on('$stateChangeStart', function (ev, to, toParams, from, fromParams) { 127 | $rootScope.$broadcast('$routeChangeStart', stateAsRoute(to), stateAsRoute(from)); 128 | }); 129 | 130 | $rootScope.$on('$stateChangeSuccess', function (ev, to, toParams, from, fromParams) { 131 | $route.current = stateAsRoute(to); 132 | $rootScope.$broadcast('$routeChangeSuccess', stateAsRoute(to), stateAsRoute(from)); 133 | copy(toParams, $route.params); 134 | }); 135 | 136 | $rootScope.$on('$stateChangeError', function (ev, to, toParams, from, fromParams, error) { 137 | $rootScope.$broadcast('$routeChangeError', stateAsRoute(to), stateAsRoute(from), error); 138 | }); 139 | 140 | return $route; 141 | } 142 | } 143 | 144 | angular.module('ui.router.compat') 145 | .provider('$route', $RouteProvider) 146 | .directive('ngView', $ViewDirective); 147 | -------------------------------------------------------------------------------- /app/bower_components/angular-ui-router/src/stateFilters.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @ngdoc filter 3 | * @name ui.router.state.filter:isState 4 | * 5 | * @requires ui.router.state.$state 6 | * 7 | * @description 8 | * Translates to {@link ui.router.state.$state#methods_is $state.is("stateName")}. 9 | */ 10 | $IsStateFilter.$inject = ['$state']; 11 | function $IsStateFilter($state) { 12 | return function(state) { 13 | return $state.is(state); 14 | }; 15 | } 16 | 17 | /** 18 | * @ngdoc filter 19 | * @name ui.router.state.filter:includedByState 20 | * 21 | * @requires ui.router.state.$state 22 | * 23 | * @description 24 | * Translates to {@link ui.router.state.$state#methods_includes $state.includes('fullOrPartialStateName')}. 25 | */ 26 | $IncludedByStateFilter.$inject = ['$state']; 27 | function $IncludedByStateFilter($state) { 28 | return function(state) { 29 | return $state.includes(state); 30 | }; 31 | } 32 | 33 | angular.module('ui.router.state') 34 | .filter('isState', $IsStateFilter) 35 | .filter('includedByState', $IncludedByStateFilter); 36 | -------------------------------------------------------------------------------- /app/bower_components/angular-ui-router/src/templateFactory.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @ngdoc object 3 | * @name ui.router.util.$templateFactory 4 | * 5 | * @requires $http 6 | * @requires $templateCache 7 | * @requires $injector 8 | * 9 | * @description 10 | * Service. Manages loading of templates. 11 | */ 12 | $TemplateFactory.$inject = ['$http', '$templateCache', '$injector']; 13 | function $TemplateFactory( $http, $templateCache, $injector) { 14 | 15 | /** 16 | * @ngdoc function 17 | * @name ui.router.util.$templateFactory#fromConfig 18 | * @methodOf ui.router.util.$templateFactory 19 | * 20 | * @description 21 | * Creates a template from a configuration object. 22 | * 23 | * @param {object} config Configuration object for which to load a template. 24 | * The following properties are search in the specified order, and the first one 25 | * that is defined is used to create the template: 26 | * 27 | * @param {string|object} config.template html string template or function to 28 | * load via {@link ui.router.util.$templateFactory#fromString fromString}. 29 | * @param {string|object} config.templateUrl url to load or a function returning 30 | * the url to load via {@link ui.router.util.$templateFactory#fromUrl fromUrl}. 31 | * @param {Function} config.templateProvider function to invoke via 32 | * {@link ui.router.util.$templateFactory#fromProvider fromProvider}. 33 | * @param {object} params Parameters to pass to the template function. 34 | * @param {object} locals Locals to pass to `invoke` if the template is loaded 35 | * via a `templateProvider`. Defaults to `{ params: params }`. 36 | * 37 | * @return {string|object} The template html as a string, or a promise for 38 | * that string,or `null` if no template is configured. 39 | */ 40 | this.fromConfig = function (config, params, locals) { 41 | return ( 42 | isDefined(config.template) ? this.fromString(config.template, params) : 43 | isDefined(config.templateUrl) ? this.fromUrl(config.templateUrl, params) : 44 | isDefined(config.templateProvider) ? this.fromProvider(config.templateProvider, params, locals) : 45 | null 46 | ); 47 | }; 48 | 49 | /** 50 | * @ngdoc function 51 | * @name ui.router.util.$templateFactory#fromString 52 | * @methodOf ui.router.util.$templateFactory 53 | * 54 | * @description 55 | * Creates a template from a string or a function returning a string. 56 | * 57 | * @param {string|object} template html template as a string or function that 58 | * returns an html template as a string. 59 | * @param {object} params Parameters to pass to the template function. 60 | * 61 | * @return {string|object} The template html as a string, or a promise for that 62 | * string. 63 | */ 64 | this.fromString = function (template, params) { 65 | return isFunction(template) ? template(params) : template; 66 | }; 67 | 68 | /** 69 | * @ngdoc function 70 | * @name ui.router.util.$templateFactory#fromUrl 71 | * @methodOf ui.router.util.$templateFactory 72 | * 73 | * @description 74 | * Loads a template from the a URL via `$http` and `$templateCache`. 75 | * 76 | * @param {string|Function} url url of the template to load, or a function 77 | * that returns a url. 78 | * @param {Object} params Parameters to pass to the url function. 79 | * @return {string|Promise.
55 | * $scope.$on('$viewContentLoading', 56 | * function(event, viewConfig){ 57 | * // Access to all the view config properties. 58 | * // and one special property 'targetView' 59 | * // viewConfig.targetView 60 | * }); 61 | *62 | */ 63 | $rootScope.$broadcast('$viewContentLoading', options); 64 | } 65 | return result; 66 | } 67 | }; 68 | } 69 | } 70 | 71 | angular.module('ui.router.state').provider('$view', $ViewProvider); 72 | -------------------------------------------------------------------------------- /app/bower_components/angular-ui-router/src/viewScroll.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @ngdoc object 3 | * @name ui.router.state.$uiViewScrollProvider 4 | * 5 | * @description 6 | * Provider that returns the {@link ui.router.state.$uiViewScroll} service function. 7 | */ 8 | function $ViewScrollProvider() { 9 | 10 | var useAnchorScroll = false; 11 | 12 | /** 13 | * @ngdoc function 14 | * @name ui.router.state.$uiViewScrollProvider#useAnchorScroll 15 | * @methodOf ui.router.state.$uiViewScrollProvider 16 | * 17 | * @description 18 | * Reverts back to using the core [`$anchorScroll`](http://docs.angularjs.org/api/ng.$anchorScroll) service for 19 | * scrolling based on the url anchor. 20 | */ 21 | this.useAnchorScroll = function () { 22 | useAnchorScroll = true; 23 | }; 24 | 25 | /** 26 | * @ngdoc object 27 | * @name ui.router.state.$uiViewScroll 28 | * 29 | * @requires $anchorScroll 30 | * @requires $timeout 31 | * 32 | * @description 33 | * When called with a jqLite element, it scrolls the element into view (after a 34 | * `$timeout` so the DOM has time to refresh). 35 | * 36 | * If you prefer to rely on `$anchorScroll` to scroll the view to the anchor, 37 | * this can be enabled by calling {@link ui.router.state.$uiViewScrollProvider#methods_useAnchorScroll `$uiViewScrollProvider.useAnchorScroll()`}. 38 | */ 39 | this.$get = ['$anchorScroll', '$timeout', function ($anchorScroll, $timeout) { 40 | if (useAnchorScroll) { 41 | return $anchorScroll; 42 | } 43 | 44 | return function ($element) { 45 | $timeout(function () { 46 | $element[0].scrollIntoView(); 47 | }, 0, false); 48 | }; 49 | }]; 50 | } 51 | 52 | angular.module('ui.router.state').provider('$uiViewScroll', $ViewScrollProvider); 53 | -------------------------------------------------------------------------------- /app/bower_components/angular/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular", 3 | "version": "1.2.17-build.211+sha.bcdd925", 4 | "main": "./angular.js", 5 | "dependencies": {}, 6 | "homepage": "https://github.com/angular/bower-angular", 7 | "_release": "1.2.17-build.211+sha.bcdd925", 8 | "_resolution": { 9 | "type": "version", 10 | "tag": "v1.2.17-build.211+sha.bcdd925", 11 | "commit": "6d9e238280c2c1863fddb9459a0c1a31e55a011d" 12 | }, 13 | "_source": "git://github.com/angular/bower-angular.git", 14 | "_target": "~1.2.0", 15 | "_originalSource": "angular" 16 | } -------------------------------------------------------------------------------- /app/bower_components/angular/README.md: -------------------------------------------------------------------------------- 1 | # bower-angular 2 | 3 | This repo is for distribution on `bower`. The source for this module is in the 4 | [main AngularJS repo](https://github.com/angular/angular.js). 5 | Please file issues and pull requests against that repo. 6 | 7 | ## Install 8 | 9 | Install with `bower`: 10 | 11 | ```shell 12 | bower install angular 13 | ``` 14 | 15 | Add a ` 19 | ``` 20 | 21 | ## Documentation 22 | 23 | Documentation is available on the 24 | [AngularJS docs site](http://docs.angularjs.org/). 25 | 26 | ## License 27 | 28 | The MIT License 29 | 30 | Copyright (c) 2010-2012 Google, Inc. http://angularjs.org 31 | 32 | Permission is hereby granted, free of charge, to any person obtaining a copy 33 | of this software and associated documentation files (the "Software"), to deal 34 | in the Software without restriction, including without limitation the rights 35 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 36 | copies of the Software, and to permit persons to whom the Software is 37 | furnished to do so, subject to the following conditions: 38 | 39 | The above copyright notice and this permission notice shall be included in 40 | all copies or substantial portions of the Software. 41 | 42 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 43 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 44 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 45 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 46 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 47 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 48 | THE SOFTWARE. 49 | -------------------------------------------------------------------------------- /app/bower_components/angular/angular-csp.css: -------------------------------------------------------------------------------- 1 | /* Include this file in your html if you are using the CSP mode. */ 2 | 3 | @charset "UTF-8"; 4 | 5 | [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], 6 | .ng-cloak, .x-ng-cloak, 7 | .ng-hide { 8 | display: none !important; 9 | } 10 | 11 | ng\:form { 12 | display: block; 13 | } 14 | 15 | .ng-animate-block-transitions { 16 | transition:0s all!important; 17 | -webkit-transition:0s all!important; 18 | } 19 | -------------------------------------------------------------------------------- /app/bower_components/angular/angular.min.js.gzip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/divshot/markie/e360825adad76f89722e34ed7459af62ff08466f/app/bower_components/angular/angular.min.js.gzip -------------------------------------------------------------------------------- /app/bower_components/angular/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular", 3 | "version": "1.2.17-build.211+sha.bcdd925", 4 | "main": "./angular.js", 5 | "dependencies": { 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /app/bower_components/highlightjs/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "highlightjs", 3 | "version": "8.0.0", 4 | "main": [ 5 | "highlight.pack.js", 6 | "styles/default.css" 7 | ], 8 | "ignore": [ 9 | "**/.*", 10 | "node_modules", 11 | "vendor", 12 | "components" 13 | ], 14 | "homepage": "https://github.com/components/highlightjs", 15 | "_release": "8.0.0", 16 | "_resolution": { 17 | "type": "version", 18 | "tag": "8.0.0", 19 | "commit": "1117bfd53aeb5d7e15d14aeb4c049cf355cb466c" 20 | }, 21 | "_source": "git://github.com/components/highlightjs.git", 22 | "_target": "~8.0.0", 23 | "_originalSource": "highlightjs" 24 | } -------------------------------------------------------------------------------- /app/bower_components/highlightjs/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2006, Ivan Sagalaev 2 | All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are met: 5 | 6 | * Redistributions of source code must retain the above copyright 7 | notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | * Neither the name of highlight.js nor the names of its contributors 12 | may be used to endorse or promote products derived from this software 13 | without specific prior written permission. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY 16 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY 19 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /app/bower_components/highlightjs/Makefile: -------------------------------------------------------------------------------- 1 | VERSION=8.0 2 | 3 | default: highlight 4 | @cp -f highlight/build/highlight.* . 5 | @cp -f highlight/src/styles/* styles 6 | @du -bh highlight.* 7 | 8 | highlight: 9 | @git clone git://github.com/isagalaev/highlight.js.git $@ 10 | @cd highlight && git pull && git checkout $(VERSION) && cd .. 11 | # The master version requires "python3" 12 | @python highlight/tools/build.py 13 | 14 | .PHONY: default 15 | -------------------------------------------------------------------------------- /app/bower_components/highlightjs/README.md: -------------------------------------------------------------------------------- 1 | Highlight.js 2 | ============ 3 | 4 | Shim repository for [Highlight.js](http://highlightjs.org/). 5 | 6 | Package Managers 7 | ---------------- 8 | 9 | * [Bower](http://bower.io): `highlightjs` 10 | * [Composer](http://packagist.org/packages/components/highlightjs): `components/highlightjs` 11 | * [Component](http://component.io): `components/highlightjs` 12 | -------------------------------------------------------------------------------- /app/bower_components/highlightjs/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "highlightjs", 3 | "version": "8.0.0", 4 | "main": [ 5 | "highlight.pack.js", 6 | "styles/default.css" 7 | ], 8 | "ignore": [ 9 | "**/.*", 10 | "node_modules", 11 | "vendor", 12 | "components" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /app/bower_components/highlightjs/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "highlightjs", 3 | "repo": "components/highlightjs", 4 | "version": "8.0.0", 5 | "main": "highlight.pack.js", 6 | "scripts": [ 7 | "highlight.pack.js" 8 | ], 9 | "files": [ 10 | "styles/default.css" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /app/bower_components/highlightjs/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "components/highlightjs", 3 | "description": "Highlight.js highlights syntax in code examples on blogs, forums and in fact on any web pages.", 4 | "type": "component", 5 | "license": "BSD-3-Clause", 6 | "authors": [ 7 | { 8 | "name": "Ivan Sagalaev", 9 | "email": "maniac@softwaremaniacs.org", 10 | "homepage": "http://softwaremaniacs.org" 11 | } 12 | ], 13 | "require": { 14 | "robloach/component-installer": "*" 15 | }, 16 | "extra": { 17 | "component": { 18 | "scripts": [ 19 | "highlight.pack.js" 20 | ], 21 | "files": [ 22 | "styles/*" 23 | ], 24 | "shim": { 25 | "exports": "hljs" 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/bower_components/highlightjs/styles/arta.css: -------------------------------------------------------------------------------- 1 | /* 2 | Date: 17.V.2011 3 | Author: pumbur
Welcome to Divshot! Play around with this sample app and get an idea of the awesome things you can host using our platform.
5 | 6 |This app takes advantage of HTML5 pushState for clean, user-friendly URLs. No .html
extension required. We set clean_urls
to true in divshot.json
and $locationProvider.html5Mode(true)
in app/scripts/config.js
.
A sample .env.json
file has been provided for testing. You can environment-based variables in your static web app for things like API keys and absolute URLs. By default, the environment
key is set to {{__env.environment}}.
To run Markie locally, go to your app directory and type divshot server
in the terminal. Feel free to make changes and deploy them to Divshot whenever you'd like.
Divshot comes with 3 staging environments for your convenience: Development, staging, and production. Our production environment is hosted on a blazing fast CDN. To push to staging, type this in the terminal:
19 |divshot push staging
20 | You can also promote apps to different environments. Try the following:
21 |divshot promote staging production
22 | Your static web app is now live. Congratulations!
23 | 24 |Have a feel for how Divshot works? Learn more by exploring our documentation and field guide to start deploying your own apps! If you have any questions don't hesitate to email us.
26 | 27 | © Divshot, Inc. 28 |