diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source | |
parent | Initial commit. (diff) | |
download | firefox-esr-upstream.tar.xz firefox-esr-upstream.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
45 files changed, 1310 insertions, 0 deletions
diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/.bowerrc b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/.bowerrc new file mode 100644 index 0000000000..959e1696e7 --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/.bowerrc @@ -0,0 +1,4 @@ +{ + "directory": "bower_components", + "analytics": false +} diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/.editorconfig b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/.editorconfig new file mode 100644 index 0000000000..47c5438403 --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/.editorconfig @@ -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 diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/.ember-cli b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/.ember-cli new file mode 100644 index 0000000000..ee64cfed2a --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/.ember-cli @@ -0,0 +1,9 @@ +{ + /** + 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 +} diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/.gitignore b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/.gitignore new file mode 100644 index 0000000000..be09e038b7 --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/.gitignore @@ -0,0 +1,17 @@ +# See http://help.github.com/ignore-files/ for more about ignoring files. + +# compiled output +# /dist +/tmp + +# dependencies +/node_modules +/bower_components + +# misc +/.sass-cache +/connect.lock +/coverage/* +/libpeerconnection.log +npm-debug.log +testem.log diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/.jshintrc b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/.jshintrc new file mode 100644 index 0000000000..08096effaa --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/.jshintrc @@ -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 +} diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/.travis.yml b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/.travis.yml new file mode 100644 index 0000000000..64533bea89 --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/.travis.yml @@ -0,0 +1,22 @@ +--- +language: node_js +node_js: + - "4" + +sudo: false + +cache: + directories: + - node_modules + +before_install: + - npm config set spin false + - npm install -g bower + - npm install phantomjs-prebuilt + +install: + - npm install + - bower install + +script: + - npm test diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/.watchmanconfig b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/.watchmanconfig new file mode 100644 index 0000000000..e7834e3e4f --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/.watchmanconfig @@ -0,0 +1,3 @@ +{ + "ignore_dirs": ["tmp", "dist"] +} diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/README.md b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/README.md new file mode 100644 index 0000000000..5bd8a83dbe --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/README.md @@ -0,0 +1,15 @@ +# Ember.js TodoMVC Example using Ember CLI + +> A framework for creating ambitious web applications. + +> _[Ember.js - emberjs.com](http://emberjs.com)_ +> _[Ember CLI - ember-cli.com](http://ember-cli.com)_ + +## Note for people updating this app. + +The `index.html` and the `assets` folder in the parent folder as simlinks into the items with the +same names inside `dist`. The `dist` folder has to be checked in git and built for production. + +To work on this comment `<base href="/examples/ember-cli/index.html" />` in the `app/index.html` +and uncommented it back before doing the production build. + diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/app.js b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/app.js new file mode 100644 index 0000000000..f260c4c706 --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/app.js @@ -0,0 +1,18 @@ +import Ember from 'ember'; +import Resolver from './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; diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/components/todo-item.js b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/components/todo-item.js new file mode 100644 index 0000000000..0de7fbf116 --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/components/todo-item.js @@ -0,0 +1,49 @@ +import Ember from 'ember'; + +export default Ember.Component.extend({ + repo: Ember.inject.service(), + tagName: 'li', + editing: false, + classNameBindings: ['todo.completed', 'editing'], + + actions: { + startEditing() { + this.get('onStartEdit')(); + this.set('editing', true); + Ember.run.scheduleOnce('afterRender', this, 'focusInput'); + }, + + doneEditing(todoTitle) { + if (!this.get('editing')) { return; } + if (Ember.isBlank(todoTitle)) { + this.send('removeTodo'); + } else { + this.set('todo.title', todoTitle.trim()); + this.set('editing', false); + this.get('onEndEdit')(); + } + }, + + handleKeydown(e) { + if (e.keyCode === 13) { + e.target.blur(); + } else if (e.keyCode === 27) { + this.set('editing', false); + } + }, + + toggleCompleted(e) { + let todo = this.get('todo'); + Ember.set(todo, 'completed', e.target.checked); + this.get('repo').persist(); + }, + + removeTodo() { + this.get('repo').delete(this.get('todo')); + } + }, + + focusInput() { + this.element.querySelector('input.edit').focus(); + } +}); diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/components/todo-list.js b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/components/todo-list.js new file mode 100644 index 0000000000..d84e0e3a1f --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/components/todo-list.js @@ -0,0 +1,27 @@ +import Ember from 'ember'; + +export default Ember.Component.extend({ + repo: Ember.inject.service(), + tagName: 'section', + elementId: 'main', + canToggle: true, + allCompleted: Ember.computed('todos.@each.completed', function () { + return this.get('todos').isEvery('completed'); + }), + + actions: { + enableToggle() { + this.set('canToggle', true); + }, + + disableToggle() { + this.set('canToggle', false); + }, + + toggleAll() { + let allCompleted = this.get('allCompleted'); + this.get('todos').forEach(todo => Ember.set(todo, 'completed', !allCompleted)); + this.get('repo').persist(); + } + } +}); diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/controllers/active.js b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/controllers/active.js new file mode 100644 index 0000000000..df03d40790 --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/controllers/active.js @@ -0,0 +1,5 @@ +import Ember from 'ember'; + +export default Ember.Controller.extend({ + todos: Ember.computed.filterBy('model', 'completed', false) +}); diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/controllers/application.js b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/controllers/application.js new file mode 100644 index 0000000000..c814e5fa73 --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/controllers/application.js @@ -0,0 +1,20 @@ +import Ember from 'ember'; + +export default Ember.Controller.extend({ + repo: Ember.inject.service(), + remaining: Ember.computed.filterBy('model', 'completed', false), + completed: Ember.computed.filterBy('model', 'completed'), + actions: { + createTodo(e) { + if (e.keyCode === 13 && !Ember.isBlank(e.target.value)) { + this.get('repo').add({ title: e.target.value.trim(), completed: false }); + e.target.value = ''; + } + }, + + clearCompleted() { + this.get('model').removeObjects(this.get('completed')); + this.get('repo').persist(); + } + } +}); diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/controllers/completed.js b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/controllers/completed.js new file mode 100644 index 0000000000..634d00afef --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/controllers/completed.js @@ -0,0 +1,5 @@ +import Ember from 'ember'; + +export default Ember.Controller.extend({ + todos: Ember.computed.filterBy('model', 'completed', true) +}); diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/helpers/gt.js b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/helpers/gt.js new file mode 100644 index 0000000000..f370695a2f --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/helpers/gt.js @@ -0,0 +1,7 @@ +import Ember from 'ember'; + +export function gt([n1, n2]/*, hash*/) { + return n1 > n2; +} + +export default Ember.Helper.helper(gt); diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/helpers/pluralize.js b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/helpers/pluralize.js new file mode 100644 index 0000000000..b1f1a2acc8 --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/helpers/pluralize.js @@ -0,0 +1,8 @@ +import Ember from 'ember'; +import { pluralize } from 'ember-inflector'; + +export function pluralizeHelper([singular, count]/*, hash*/) { + return count === 1 ? singular : pluralize(singular); +} + +export default Ember.Helper.helper(pluralizeHelper); diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/index.html b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/index.html new file mode 100644 index 0000000000..b1730fbb67 --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/index.html @@ -0,0 +1,24 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <title>Todomvc</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/todomvc.css"> + + {{content-for "head-footer"}} + </head> + <body> + {{content-for "body"}} + + <script src="assets/vendor.js"></script> + <script src="assets/todomvc.js"></script> + + {{content-for "body-footer"}} + </body> +</html> diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/instance-initializers/global.js b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/instance-initializers/global.js new file mode 100644 index 0000000000..34c9a9dade --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/instance-initializers/global.js @@ -0,0 +1,10 @@ +// app/instance-initializers/global.js + +export function initialize(application) { + window.App = application; // or window.Whatever +} + +export default { + name: 'global', + initialize: initialize +};
\ No newline at end of file diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/resolver.js b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/resolver.js new file mode 100644 index 0000000000..2fb563d6c0 --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/resolver.js @@ -0,0 +1,3 @@ +import Resolver from 'ember-resolver'; + +export default Resolver; diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/router.js b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/router.js new file mode 100644 index 0000000000..4c60bf93fc --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/router.js @@ -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('active'); + this.route('completed'); +}); + +export default Router; diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/routes/application.js b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/routes/application.js new file mode 100644 index 0000000000..296a375ba2 --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/routes/application.js @@ -0,0 +1,8 @@ +import Ember from 'ember'; + +export default Ember.Route.extend({ + repo: Ember.inject.service(), + model() { + return this.get('repo').findAll(); + } +}); diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/services/memory.js b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/services/memory.js new file mode 100644 index 0000000000..74c5cdf19f --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/services/memory.js @@ -0,0 +1,78 @@ +(function(root) { + var localStorageMemory = {}; + var cache = {}; + + /** + * number of stored items. + */ + localStorageMemory.length = 0; + + /** + * returns item for passed key, or null + * + * @para {String} key + * name of item to be returned + * @returns {String|null} + */ + localStorageMemory.getItem = function(key) { + return cache[key] || null; + }; + + /** + * sets item for key to passed value, as String + * + * @para {String} key + * name of item to be set + * @para {String} value + * value, will always be turned into a String + * @returns {undefined} + */ + localStorageMemory.setItem = function(key, value) { + if (typeof value === 'undefined') { + localStorageMemory.removeItem(key); + } else { + if (!(cache.hasOwnProperty(key))) { + localStorageMemory.length++; + } + + cache[key] = '' + value; + } + }; + + /** + * removes item for passed key + * + * @para {String} key + * name of item to be removed + * @returns {undefined} + */ + localStorageMemory.removeItem = function(key) { + if (cache.hasOwnProperty(key)) { + delete cache[key]; + localStorageMemory.length--; + } + }; + + /** + * returns name of key at passed index + * + * @para {Number} index + * Position for key to be returned (starts at 0) + * @returns {String|null} + */ + localStorageMemory.key = function(index) { + return Object.keys(cache)[index] || null; + }; + + /** + * removes all stored items and sets length to 0 + * + * @returns {undefined} + */ + localStorageMemory.clear = function() { + cache = {}; + localStorageMemory.length = 0; + }; + + root.localStorageMemory = localStorageMemory; +})(window); diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/services/repo.js b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/services/repo.js new file mode 100644 index 0000000000..cffa3858fd --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/services/repo.js @@ -0,0 +1,27 @@ +import Ember from 'ember'; +import localStorageMemory from './memory'; + +export default Ember.Service.extend({ + lastId: 0, + data: null, + findAll() { + return this.get('data') || + this.set('data', JSON.parse(window.localStorageMemory.getItem('todos') || '[]')); + }, + + add(attrs) { + let todo = Object.assign({ id: this.incrementProperty('lastId') }, attrs); + this.get('data').pushObject(todo); + this.persist(); + return todo; + }, + + delete(todo) { + this.get('data').removeObject(todo); + this.persist(); + }, + + persist() { + window.localStorageMemory.setItem('todos', JSON.stringify(this.get('data'))); + } +}); diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/templates/active.hbs b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/templates/active.hbs new file mode 100644 index 0000000000..de244f487d --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/templates/active.hbs @@ -0,0 +1 @@ +{{todo-list todos=todos}}
\ No newline at end of file diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/templates/application.hbs b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/templates/application.hbs new file mode 100644 index 0000000000..519b620cd6 --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/templates/application.hbs @@ -0,0 +1,29 @@ +<section id="todoapp"> + <header id="header"> + <h1>todos</h1> + <input type="text" id="new-todo" onkeydown={{action 'createTodo'}} placeholder="What needs to be done?" autofocus> + </header> + {{outlet}} + {{#if (gt model.length 0)}} + <footer id="footer"> + <span id="todo-count"><strong>{{remaining.length}}</strong> {{pluralize 'item' remaining.length}} left</span> + <ul id="filters"> + <li>{{#link-to "index" activeClass="selected"}}All{{/link-to}}</li> + <li>{{#link-to "active" activeClass="selected"}}Active{{/link-to}}</li> + <li>{{#link-to "completed" activeClass="selected"}}Completed{{/link-to}}</li> + </ul> + {{#if completed.length}} + <button id="clear-completed" onclick={{action 'clearCompleted'}}>Clear completed</button> + {{/if}} + </footer> + {{/if}} +</section> +<footer id="info"> + <p>Double-click to edit a todo</p> + <p> + Created by + <a href="http://github.com/cibernox">Miguel Camba</a>, + <a href="http://github.com/addyosmani">Addy Osmani</a> + </p> + <p>Part of <a href="http://todomvc.com">TodoMVC</a></p> +</footer>
\ No newline at end of file diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/templates/completed.hbs b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/templates/completed.hbs new file mode 100644 index 0000000000..de244f487d --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/templates/completed.hbs @@ -0,0 +1 @@ +{{todo-list todos=todos}}
\ No newline at end of file diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/templates/components/todo-item.hbs b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/templates/components/todo-item.hbs new file mode 100644 index 0000000000..c06975e865 --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/templates/components/todo-item.hbs @@ -0,0 +1,6 @@ +<div class="view"> + <input type="checkbox" class="toggle" checked={{todo.completed}} onchange={{action 'toggleCompleted'}}> + <label ondblclick={{action 'startEditing'}}>{{todo.title}}</label> + <button onclick={{action 'removeTodo'}} class="destroy"></button> +</div> +<input type="text" class="edit" value={{todo.title}} onblur={{action 'doneEditing' value='target.value'}} onkeydown={{action 'handleKeydown'}} autofocus>
\ No newline at end of file diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/templates/components/todo-list.hbs b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/templates/components/todo-list.hbs new file mode 100644 index 0000000000..309d07a1f4 --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/templates/components/todo-list.hbs @@ -0,0 +1,10 @@ +{{#if todos.length}} + {{#if canToggle}} + <input type="checkbox" id="toggle-all" checked={{allCompleted}} onchange={{action 'toggleAll'}}> + {{/if}} + <ul id="todo-list" class="todo-list"> + {{#each todos as |todo|}} + {{todo-item todo=todo onStartEdit=(action 'disableToggle') onEndEdit=(action 'enableToggle')}} + {{/each}} + </ul> +{{/if}} diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/templates/index.hbs b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/templates/index.hbs new file mode 100644 index 0000000000..7d5565c36a --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/app/templates/index.hbs @@ -0,0 +1,3 @@ +{{#if model.length}} + {{todo-list todos=model}} +{{/if}} diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/bower.json b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/bower.json new file mode 100644 index 0000000000..220a0014a2 --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/bower.json @@ -0,0 +1,9 @@ +{ + "name": "todomvc", + "dependencies": { + "ember": "~2.6.0", + "ember-cli-shims": "0.1.1", + "ember-cli-test-loader": "0.2.2", + "ember-qunit-notifications": "0.1.0" + } +} diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/config/environment.js b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/config/environment.js new file mode 100644 index 0000000000..59744b3dec --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/config/environment.js @@ -0,0 +1,47 @@ +/* jshint node: true */ + +module.exports = function (environment) { + var ENV = { + modulePrefix: 'todomvc', + environment: environment, + baseURL: null, + locationType: 'auto', + EmberENV: { + FEATURES: { + // Here you can enable experimental features on an ember canary build + // e.g. 'with-controller': true + } + }, + + APP: { + // Here you can pass flags/options to your application instance + // when it is created + } + }; + + // if (environment === 'development') { + // ENV.APP.LOG_RESOLVER = true; + // ENV.APP.LOG_ACTIVE_GENERATION = true; + // ENV.APP.LOG_TRANSITIONS = true; + // ENV.APP.LOG_TRANSITIONS_INTERNAL = true; + // ENV.APP.LOG_VIEW_LOOKUPS = true; + // } + + if (environment === 'test') { + // Testem prefers this... + ENV.baseURL = '/'; + ENV.locationType = 'none'; + + // keep test console output quieter + ENV.APP.LOG_ACTIVE_GENERATION = false; + ENV.APP.LOG_VIEW_LOOKUPS = false; + + ENV.APP.rootElement = '#ember-testing'; + } + + // if (environment === 'production') { + + // } + + return ENV; +}; diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/ember-cli-build.js b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/ember-cli-build.js new file mode 100644 index 0000000000..b1dbf5918c --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/ember-cli-build.js @@ -0,0 +1,26 @@ +/*jshint node:true*/ +/* global require, module */ +var EmberApp = require('ember-cli/lib/broccoli/ember-app'); + +module.exports = function (defaults) { + var app = new EmberApp(defaults, { + // Add options here + }); + + app.import('vendor/base.css'); + app.import('vendor/index.css'); + // Use `app.import` to add additional libraries to the generated + // output files. + // + // If you need to use different assets in different + // environments, specify an object as the first parameter. That + // object's keys should be the environment name and the values + // should be the asset to use in that environment. + // + // If the library that you are including contains AMD or ES6 + // modules that you would like to import into your application + // please specify an object with the list of modules as keys + // along with the exports of each module as its value. + + return app.toTree(); +}; diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/package.json b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/package.json new file mode 100644 index 0000000000..5be657320f --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/package.json @@ -0,0 +1,42 @@ +{ + "name": "todomvc", + "version": "0.0.0", + "description": "Small description for todomvc goes here", + "private": true, + "directories": { + "doc": "doc", + "test": "tests" + }, + "scripts": { + "build": "ember build", + "start": "ember server", + "test": "ember test" + }, + "repository": "", + "engines": { + "node": ">= 0.10.0" + }, + "author": "", + "license": "MIT", + "devDependencies": { + "broccoli-asset-rev": "^2.4.2", + "ember-ajax": "0.7.1", + "ember-cli": "2.5.0", + "ember-cli-app-version": "^1.0.0", + "ember-cli-babel": "^5.1.6", + "ember-cli-dependency-checker": "^1.2.0", + "ember-cli-htmlbars": "^1.0.3", + "ember-cli-htmlbars-inline-precompile": "^0.3.1", + "ember-cli-inject-live-reload": "^1.4.0", + "ember-cli-jshint": "^1.0.0", + "ember-cli-qunit": "^1.4.0", + "ember-cli-release": "0.2.8", + "ember-cli-sri": "^2.1.0", + "ember-cli-uglify": "^1.2.0", + "ember-export-application-global": "^1.0.5", + "ember-inflector": "1.9.4", + "ember-load-initializers": "^0.5.1", + "ember-resolver": "^2.0.3", + "loader.js": "^4.0.1" + } +} diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/public/crossdomain.xml b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/public/crossdomain.xml new file mode 100644 index 0000000000..0c16a7a07b --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/public/crossdomain.xml @@ -0,0 +1,15 @@ +<?xml version="1.0"?> +<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd"> +<cross-domain-policy> + <!-- Read this: www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html --> + + <!-- Most restrictive policy: --> + <site-control permitted-cross-domain-policies="none"/> + + <!-- Least restrictive policy: --> + <!-- + <site-control permitted-cross-domain-policies="all"/> + <allow-access-from domain="*" to-ports="*" secure="false"/> + <allow-http-request-headers-from domain="*" headers="*" secure="false"/> + --> +</cross-domain-policy> diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/public/robots.txt b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/public/robots.txt new file mode 100644 index 0000000000..f5916452e5 --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/public/robots.txt @@ -0,0 +1,3 @@ +# http://www.robotstxt.org +User-agent: * +Disallow: diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/testem.js b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/testem.js new file mode 100644 index 0000000000..de142ee104 --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/testem.js @@ -0,0 +1,13 @@ +/*jshint node:true*/ +module.exports = { + framework: 'qunit', + test_page: 'tests/index.html?hidepassed', + disable_watching: true, + launch_in_ci: [ + 'PhantomJS' + ], + launch_in_dev: [ + 'PhantomJS', + 'Chrome' + ] +}; diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/tests/.jshintrc b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/tests/.jshintrc new file mode 100644 index 0000000000..6ec0b7c154 --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/tests/.jshintrc @@ -0,0 +1,52 @@ +{ + "predef": [ + "document", + "window", + "location", + "setTimeout", + "$", + "-Promise", + "define", + "console", + "visit", + "exists", + "fillIn", + "click", + "keyEvent", + "triggerEvent", + "find", + "findWithAssert", + "wait", + "DS", + "andThen", + "currentURL", + "currentPath", + "currentRouteName" + ], + "node": false, + "browser": false, + "boss": true, + "curly": true, + "debug": false, + "devel": false, + "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 +} diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/tests/helpers/destroy-app.js b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/tests/helpers/destroy-app.js new file mode 100644 index 0000000000..13d4989501 --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/tests/helpers/destroy-app.js @@ -0,0 +1,5 @@ +import Ember from 'ember'; + +export default function destroyApp(application) { + Ember.run(application, 'destroy'); +} diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/tests/helpers/module-for-acceptance.js b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/tests/helpers/module-for-acceptance.js new file mode 100644 index 0000000000..dbd80fc042 --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/tests/helpers/module-for-acceptance.js @@ -0,0 +1,22 @@ +import { module } from 'qunit'; +import startApp from '../helpers/start-app'; +import destroyApp from '../helpers/destroy-app'; + +export default function (name, options = {}) { + module(name, { + beforeEach() { + this.application = startApp(); + + if (options.beforeEach) { + options.beforeEach.apply(this, arguments); + } + }, + + afterEach() { + if (options.afterEach) { + options.afterEach.apply(this, arguments); + } + destroyApp(this.application); + } + }); +} diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/tests/helpers/resolver.js b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/tests/helpers/resolver.js new file mode 100644 index 0000000000..50e9179f54 --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/tests/helpers/resolver.js @@ -0,0 +1,11 @@ +import Resolver from '../../resolver'; +import config from '../../config/environment'; + +const resolver = Resolver.create(); + +resolver.namespace = { + modulePrefix: config.modulePrefix, + podModulePrefix: config.podModulePrefix +}; + +export default resolver; diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/tests/helpers/start-app.js b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/tests/helpers/start-app.js new file mode 100644 index 0000000000..ef1b6b55ee --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/tests/helpers/start-app.js @@ -0,0 +1,18 @@ +import Ember from 'ember'; +import Application from '../../app'; +import config from '../../config/environment'; + +export default function startApp(attrs) { + let application; + + let attributes = Ember.merge({}, config.APP); + attributes = Ember.merge(attributes, attrs); // use defaults, but you can override; + + Ember.run(() => { + application = Application.create(attributes); + application.setupForTesting(); + application.injectTestHelpers(); + }); + + return application; +} diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/tests/index.html b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/tests/index.html new file mode 100644 index 0000000000..7f44208332 --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/tests/index.html @@ -0,0 +1,34 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <title>Todomvc Tests</title> + <meta name="description" content=""> + <meta name="viewport" content="width=device-width, initial-scale=1"> + + {{content-for "head"}} + {{content-for "test-head"}} + + <link rel="stylesheet" href="assets/vendor.css"> + <link rel="stylesheet" href="assets/todomvc.css"> + <link rel="stylesheet" href="assets/test-support.css"> + + {{content-for "head-footer"}} + {{content-for "test-head-footer"}} + </head> + <body> + {{content-for "body"}} + {{content-for "test-body"}} + + <script src="testem.js" integrity=""></script> + <script src="assets/vendor.js"></script> + <script src="assets/test-support.js"></script> + <script src="assets/todomvc.js"></script> + <script src="assets/tests.js"></script> + <script src="assets/test-loader.js"></script> + + {{content-for "body-footer"}} + {{content-for "test-body-footer"}} + </body> +</html> diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/tests/test-helper.js b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/tests/test-helper.js new file mode 100644 index 0000000000..dc9961fd56 --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/tests/test-helper.js @@ -0,0 +1,6 @@ +import resolver from './helpers/resolver'; +import { + setResolver +} from 'ember-qunit'; + +setResolver(resolver); diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/vendor/base.css b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/vendor/base.css new file mode 100644 index 0000000000..4d25d3c84a --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/vendor/base.css @@ -0,0 +1,141 @@ +hr { + margin: 20px 0; + border: 0; + border-top: 1px dashed #c5c5c5; + border-bottom: 1px dashed #f7f7f7; +} + +.learn a { + font-weight: normal; + text-decoration: none; + color: #b83f45; +} + +.learn a:hover { + text-decoration: underline; + color: #787e7e; +} + +.learn h3, +.learn h4, +.learn h5 { + margin: 10px 0; + font-weight: 500; + line-height: 1.2; + color: #000; +} + +.learn h3 { + font-size: 24px; +} + +.learn h4 { + font-size: 18px; +} + +.learn h5 { + margin-bottom: 0; + font-size: 14px; +} + +.learn ul { + padding: 0; + margin: 0 0 30px 25px; +} + +.learn li { + line-height: 20px; +} + +.learn p { + font-size: 15px; + font-weight: 300; + line-height: 1.3; + margin-top: 0; + margin-bottom: 0; +} + +#issue-count { + display: none; +} + +.quote { + border: none; + margin: 20px 0 60px 0; +} + +.quote p { + font-style: italic; +} + +.quote p:before { + content: '“'; + font-size: 50px; + opacity: .15; + position: absolute; + top: -20px; + left: 3px; +} + +.quote p:after { + content: '”'; + font-size: 50px; + opacity: .15; + position: absolute; + bottom: -42px; + right: 3px; +} + +.quote footer { + position: absolute; + bottom: -40px; + right: 0; +} + +.quote footer img { + border-radius: 3px; +} + +.quote footer a { + margin-left: 5px; + vertical-align: middle; +} + +.speech-bubble { + position: relative; + padding: 10px; + background: rgba(0, 0, 0, .04); + border-radius: 5px; +} + +.speech-bubble:after { + content: ''; + position: absolute; + top: 100%; + right: 30px; + border: 13px solid transparent; + border-top-color: rgba(0, 0, 0, .04); +} + +.learn-bar > .learn { + position: absolute; + width: 272px; + top: 8px; + left: -300px; + padding: 10px; + border-radius: 5px; + background-color: rgba(255, 255, 255, .6); + transition-property: left; + transition-duration: 500ms; +} + +@media (min-width: 899px) { + .learn-bar { + width: auto; + padding-left: 300px; + } + + .learn-bar > .learn { + left: 8px; + } +} diff --git a/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/vendor/index.css b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/vendor/index.css new file mode 100644 index 0000000000..17ea180161 --- /dev/null +++ b/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs-debug/source/vendor/index.css @@ -0,0 +1,378 @@ +html, +body { + margin: 0; + padding: 0; +} + +button { + margin: 0; + padding: 0; + border: 0; + background: none; + font-size: 100%; + vertical-align: baseline; + font-family: inherit; + font-weight: inherit; + color: inherit; + -webkit-appearance: none; + appearance: none; + -webkit-font-smoothing: antialiased; + -moz-font-smoothing: antialiased; + font-smoothing: antialiased; +} + +body { + font: 14px 'Helvetica Neue', Helvetica, Arial, sans-serif; + line-height: 1.4em; + background: #f5f5f5; + color: #4d4d4d; + min-width: 230px; + max-width: 550px; + margin: 0 auto; + -webkit-font-smoothing: antialiased; + -moz-font-smoothing: antialiased; + font-smoothing: antialiased; + font-weight: 300; +} + +button, +input[type="checkbox"] { + outline: none; +} + +.hidden { + display: none; +} + +#todoapp { + background: #fff; + margin: 130px 0 40px 0; + position: relative; + box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), + 0 25px 50px 0 rgba(0, 0, 0, 0.1); +} + +#todoapp input::-webkit-input-placeholder { + font-style: italic; + font-weight: 300; + color: #e6e6e6; +} + +#todoapp input::-moz-placeholder { + font-style: italic; + font-weight: 300; + color: #e6e6e6; +} + +#todoapp input::input-placeholder { + font-style: italic; + font-weight: 300; + color: #e6e6e6; +} + +#todoapp h1 { + position: absolute; + top: -155px; + width: 100%; + font-size: 100px; + font-weight: 100; + text-align: center; + color: rgba(175, 47, 47, 0.15); + -webkit-text-rendering: optimizeLegibility; + -moz-text-rendering: optimizeLegibility; + text-rendering: optimizeLegibility; +} + +#new-todo, +.edit { + position: relative; + margin: 0; + width: 100%; + font-size: 24px; + font-family: inherit; + font-weight: inherit; + line-height: 1.4em; + border: 0; + outline: none; + color: inherit; + padding: 6px; + border: 1px solid #999; + box-shadow: inset 0 -1px 5px 0 rgba(0, 0, 0, 0.2); + box-sizing: border-box; + -webkit-font-smoothing: antialiased; + -moz-font-smoothing: antialiased; + font-smoothing: antialiased; +} + +#new-todo { + padding: 16px 16px 16px 60px; + border: none; + background: rgba(0, 0, 0, 0.003); + box-shadow: inset 0 -2px 1px rgba(0,0,0,0.03); +} + +#main { + position: relative; + z-index: 2; + border-top: 1px solid #e6e6e6; +} + +label[for='toggle-all'] { + display: none; +} + +#toggle-all { + position: absolute; + top: -55px; + left: -12px; + width: 60px; + height: 34px; + text-align: center; + border: none; /* Mobile Safari */ +} + +#toggle-all:before { + content: '❯'; + font-size: 22px; + color: #e6e6e6; + padding: 10px 27px 10px 27px; +} + +#toggle-all:checked:before { + color: #737373; +} + +#todo-list { + margin: 0; + padding: 0; + list-style: none; +} + +#todo-list li { + position: relative; + font-size: 24px; + border-bottom: 1px solid #ededed; +} + +#todo-list li:last-child { + border-bottom: none; +} + +#todo-list li.editing { + border-bottom: none; + padding: 0; +} + +#todo-list li.editing .edit { + display: block; + width: 506px; + padding: 13px 17px 12px 17px; + margin: 0 0 0 43px; +} + +#todo-list li.editing .view { + display: none; +} + +#todo-list li .toggle { + text-align: center; + width: 40px; + /* auto, since non-WebKit browsers doesn't support input styling */ + height: auto; + position: absolute; + top: 0; + bottom: 0; + margin: auto 0; + border: none; /* Mobile Safari */ + -webkit-appearance: none; + appearance: none; +} + +#todo-list li .toggle:after { + content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="-10 -18 100 135"><circle cx="50" cy="50" r="50" fill="none" stroke="#ededed" stroke-width="3"/></svg>'); +} + +#todo-list li .toggle:checked:after { + content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="-10 -18 100 135"><circle cx="50" cy="50" r="50" fill="none" stroke="#bddad5" stroke-width="3"/><path fill="#5dc2af" d="M72 25L42 71 27 56l-4 4 20 20 34-52z"/></svg>'); +} + +#todo-list li label { + white-space: pre; + word-break: break-word; + padding: 15px 60px 15px 15px; + margin-left: 45px; + display: block; + line-height: 1.2; + transition: color 0.4s; +} + +#todo-list li.completed label { + color: #d9d9d9; + text-decoration: line-through; +} + +#todo-list li .destroy { + display: none; + position: absolute; + top: 0; + right: 10px; + bottom: 0; + width: 40px; + height: 40px; + margin: auto 0; + font-size: 30px; + color: #cc9a9a; + margin-bottom: 11px; + transition: color 0.2s ease-out; +} + +#todo-list li .destroy:hover { + color: #af5b5e; +} + +#todo-list li .destroy:after { + content: '×'; +} + +#todo-list li:hover .destroy { + display: block; +} + +#todo-list li .edit { + display: none; +} + +#todo-list li.editing:last-child { + margin-bottom: -1px; +} + +#footer { + color: #777; + padding: 10px 15px; + height: 20px; + text-align: center; + border-top: 1px solid #e6e6e6; +} + +#footer:before { + content: ''; + position: absolute; + right: 0; + bottom: 0; + left: 0; + height: 50px; + overflow: hidden; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2), + 0 8px 0 -3px #f6f6f6, + 0 9px 1px -3px rgba(0, 0, 0, 0.2), + 0 16px 0 -6px #f6f6f6, + 0 17px 2px -6px rgba(0, 0, 0, 0.2); +} + +#todo-count { + float: left; + text-align: left; +} + +#todo-count strong { + font-weight: 300; +} + +#filters { + margin: 0; + padding: 0; + list-style: none; + position: absolute; + right: 0; + left: 0; +} + +#filters li { + display: inline; +} + +#filters li a { + color: inherit; + margin: 3px; + padding: 3px 7px; + text-decoration: none; + border: 1px solid transparent; + border-radius: 3px; +} + +#filters li a.selected, +#filters li a:hover { + border-color: rgba(175, 47, 47, 0.1); +} + +#filters li a.selected { + border-color: rgba(175, 47, 47, 0.2); +} + +#clear-completed, +html #clear-completed:active { + float: right; + position: relative; + line-height: 20px; + text-decoration: none; + cursor: pointer; + position: relative; +} + +#clear-completed:hover { + text-decoration: underline; +} + +#info { + margin: 65px auto 0; + color: #bfbfbf; + font-size: 10px; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + text-align: center; +} + +#info p { + line-height: 1; +} + +#info a { + color: inherit; + text-decoration: none; + font-weight: 400; +} + +#info a:hover { + text-decoration: underline; +} + +/* + Hack to remove background from Mobile Safari. + Can't use it globally since it destroys checkboxes in Firefox +*/ +@media screen and (-webkit-min-device-pixel-ratio:0) { + #toggle-all, + #todo-list li .toggle { + background: none; + } + + #todo-list li .toggle { + height: 40px; + } + + #toggle-all { + -webkit-transform: rotate(90deg); + transform: rotate(90deg); + -webkit-appearance: none; + appearance: none; + } +} + +@media (max-width: 430px) { + #footer { + height: 50px; + } + + #filters { + bottom: 10px; + } +} |