├── README.md ├── .gitattributes ├── .bowerrc ├── app ├── robots.txt ├── favicon.ico ├── images │ ├── touch │ │ ├── icon-72x72.png │ │ ├── icon-96x96.png │ │ ├── icon-128x128.png │ │ ├── icon-512x512.png │ │ ├── apple-touch-icon.png │ │ ├── ms-icon-144x144.png │ │ ├── chrome-touch-icon-192x192.png │ │ ├── chrome-splashscreen-icon-384x384.png │ │ └── ms-touch-icon-144x144-precomposed.png │ ├── icons │ │ ├── x-dark.svg │ │ ├── x-white.svg │ │ ├── check.svg │ │ ├── arrow-left.svg │ │ ├── arrow-right.svg │ │ ├── play-dark.svg │ │ └── pause-dark.svg │ └── visuals │ │ └── visual-1.svg ├── elements │ ├── utils │ │ └── underscore-js │ │ │ └── underscore-js.html │ ├── underscpre-js │ │ └── underscore-js │ │ │ └── underscore-js.html │ ├── elements.html │ ├── routing.html │ ├── days-list │ │ └── days-list.html │ ├── object-translate │ │ └── object-translate.html │ ├── yotilo-overlay │ │ └── yotilo-overlay.html │ ├── entry-comment │ │ └── entry-comment.html │ ├── yotilo-header │ │ └── yotilo-header.html │ ├── yotilo-welcome │ │ └── yotilo-welcome.html │ ├── time-entry │ │ └── time-entry.html │ ├── yotilo-imprint │ │ └── yotilo-imprint.html │ ├── entry-select │ │ └── entry-select.html │ ├── yotilo-datepicker │ │ └── yotilo-datepicker.html │ ├── yotilo-privacy │ │ └── yotilo-privacy.html │ ├── entry-duration │ │ └── entry-duration.html │ ├── day-container │ │ └── day-container.html │ ├── yotilo-datepicker-month │ │ └── yotilo-datepicker-month.html │ ├── yotilo-multiselect │ │ └── yotilo-multiselect.html │ ├── yotilo-howto │ │ └── yotilo-howto.html │ ├── yotilo-assetlist │ │ └── yotilo-assetlist.html │ └── yotilo-statistics │ │ └── yotilo-statistics.html ├── cache-config.json ├── sw-import.js ├── scripts │ └── app.js ├── manifest.json ├── styles │ ├── main.css │ ├── shared-styles.html │ └── app-theme.html └── index.html ├── .gitignore ├── .editorconfig ├── bower.json ├── wct.conf.js ├── package.json ├── .travis.yml ├── tasks └── ensure-files.js ├── LICENSE.md ├── CONTRIBUTING.md ├── gulpfile.js └── README-STARTERKIT.md /README.md: -------------------------------------------------------------------------------- 1 | # yotilo -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto -------------------------------------------------------------------------------- /.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "app/bower_components" 3 | } 4 | -------------------------------------------------------------------------------- /app/robots.txt: -------------------------------------------------------------------------------- 1 | # www.robotstxt.org 2 | 3 | User-agent: * 4 | Disallow: 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | bower_components 4 | .tmp 5 | .publish/ 6 | -------------------------------------------------------------------------------- /app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BenKowalski/yotilo/HEAD/app/favicon.ico -------------------------------------------------------------------------------- /app/images/touch/icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BenKowalski/yotilo/HEAD/app/images/touch/icon-72x72.png -------------------------------------------------------------------------------- /app/images/touch/icon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BenKowalski/yotilo/HEAD/app/images/touch/icon-96x96.png -------------------------------------------------------------------------------- /app/images/touch/icon-128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BenKowalski/yotilo/HEAD/app/images/touch/icon-128x128.png -------------------------------------------------------------------------------- /app/images/touch/icon-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BenKowalski/yotilo/HEAD/app/images/touch/icon-512x512.png -------------------------------------------------------------------------------- /app/images/touch/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BenKowalski/yotilo/HEAD/app/images/touch/apple-touch-icon.png -------------------------------------------------------------------------------- /app/images/touch/ms-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BenKowalski/yotilo/HEAD/app/images/touch/ms-icon-144x144.png -------------------------------------------------------------------------------- /app/elements/utils/underscore-js/underscore-js.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/elements/underscpre-js/underscore-js/underscore-js.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/images/touch/chrome-touch-icon-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BenKowalski/yotilo/HEAD/app/images/touch/chrome-touch-icon-192x192.png -------------------------------------------------------------------------------- /app/images/touch/chrome-splashscreen-icon-384x384.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BenKowalski/yotilo/HEAD/app/images/touch/chrome-splashscreen-icon-384x384.png -------------------------------------------------------------------------------- /app/images/touch/ms-touch-icon-144x144-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BenKowalski/yotilo/HEAD/app/images/touch/ms-touch-icon-144x144-precomposed.png -------------------------------------------------------------------------------- /app/images/icons/x-dark.svg: -------------------------------------------------------------------------------- 1 | x -------------------------------------------------------------------------------- /app/images/icons/x-white.svg: -------------------------------------------------------------------------------- 1 | x -------------------------------------------------------------------------------- /app/cache-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "README": "This is the cache config for the dev server. The service worker cache is disabled, and it is recommended that you leave this as-is. In the dist environment, this file will be auto-generated based on the contents of your dist/ directory.", 3 | "disabled": true 4 | } 5 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | 8 | [*] 9 | 10 | # Change these settings to your own preference 11 | indent_style = space 12 | indent_size = 2 13 | 14 | # We recommend you to keep these unchanged 15 | end_of_line = lf 16 | charset = utf-8 17 | trim_trailing_whitespace = true 18 | insert_final_newline = true 19 | 20 | [*.md] 21 | trim_trailing_whitespace = false 22 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "polymer-starter-kit", 3 | "private": true, 4 | "dependencies": { 5 | "iron-elements": "PolymerElements/iron-elements#^1.0.10", 6 | "neon-elements": "PolymerElements/neon-elements#^1.0.0", 7 | "page": "visionmedia/page.js#~1.6.4", 8 | "paper-elements": "PolymerElements/paper-elements#^1.0.7", 9 | "platinum-elements": "PolymerElements/platinum-elements#^1.2.0", 10 | "polymer": "Polymer/polymer#^1.4.0", 11 | "underscore": "^1.8.3" 12 | }, 13 | "devDependencies": { 14 | "web-component-tester": "^4.0.0" 15 | }, 16 | "ignore": [] 17 | } 18 | -------------------------------------------------------------------------------- /app/sw-import.js: -------------------------------------------------------------------------------- 1 | /* 2 | @license 3 | Copyright (c) 2015 The Polymer Project Authors. All rights reserved. 4 | This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | Code distributed by Google as part of the polymer project is also 8 | subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | 11 | importScripts('bower_components/platinum-sw/service-worker.js'); 12 | -------------------------------------------------------------------------------- /app/images/icons/check.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | check 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/images/icons/arrow-left.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | arrow-left 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/images/icons/arrow-right.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | arrow-right 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/images/icons/play-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | play 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /wct.conf.js: -------------------------------------------------------------------------------- 1 | /** 2 | @license 3 | Copyright (c) 2016 The Polymer Project Authors. All rights reserved. 4 | This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | Code distributed by Google as part of the polymer project is also 8 | subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | var path = require('path'); 11 | 12 | var ret = { 13 | 'suites': ['app/test'], 14 | 'webserver': { 15 | 'pathMappings': [] 16 | } 17 | }; 18 | 19 | var mapping = {}; 20 | var rootPath = (__dirname).split(path.sep).slice(-1)[0]; 21 | 22 | mapping['/components/' + rootPath + 23 | '/app/bower_components'] = 'bower_components'; 24 | 25 | ret.webserver.pathMappings.push(mapping); 26 | 27 | module.exports = ret; 28 | -------------------------------------------------------------------------------- /app/images/icons/pause-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | pause 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "devDependencies": { 4 | "browser-sync": "^2.7.7", 5 | "connect-history-api-fallback": "^1.1.0", 6 | "del": "^2.0.2", 7 | "es6-promise": "^3.1.2", 8 | "glob-all": "^3.0.1", 9 | "gulp": "^3.8.5", 10 | "gulp-autoprefixer": "^3.1.0", 11 | "gulp-cache": "^0.4.0", 12 | "gulp-changed": "^1.0.0", 13 | "gulp-gh-pages": "^0.5.4", 14 | "gulp-html-extract": "^0.1.0", 15 | "gulp-if": "^2.0.0", 16 | "gulp-imagemin": "^2.2.1", 17 | "gulp-load-plugins": "^1.1.0", 18 | "gulp-minify-css": "^1.2.1", 19 | "gulp-minify-html": "^1.0.2", 20 | "gulp-rename": "^1.2.0", 21 | "gulp-replace": "^0.5.4", 22 | "gulp-size": "^2.0.0", 23 | "gulp-uglify": "^1.2.0", 24 | "gulp-useref": "^3.0.5", 25 | "gulp-vulcanize": "^6.0.0", 26 | "merge-stream": "^1.0.0", 27 | "require-dir": "^0.3.0", 28 | "run-sequence": "^1.0.2", 29 | "vulcanize": ">= 1.4.2", 30 | "web-component-tester": "^4.0.0" 31 | }, 32 | "scripts": { 33 | "test": "gulp test:local", 34 | "start": "gulp serve" 35 | }, 36 | "engines": { 37 | "node": ">=0.10.0" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/scripts/app.js: -------------------------------------------------------------------------------- 1 | /* 2 | @license 3 | Copyright (c) 2015 The Polymer Project Authors. All rights reserved. 4 | This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | Code distributed by Google as part of the polymer project is also 8 | subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | 11 | (function(document) { 12 | 'use strict'; 13 | 14 | // Grab a reference to our auto-binding template 15 | // and give it some initial binding values 16 | // Learn more about auto-binding templates at http://goo.gl/Dx1u2g 17 | var app = document.querySelector('#app'); 18 | 19 | // Sets app default base URL 20 | app.baseUrl = '/'; 21 | if (window.location.port === '') { // if production 22 | 23 | } 24 | 25 | // See https://github.com/Polymer/polymer/issues/1381 26 | window.addEventListener('WebComponentsReady', function() { 27 | // imports are loaded and elements have been registered 28 | }); 29 | 30 | })(document); 31 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | sudo: required 3 | dist: trusty 4 | addons: 5 | firefox: latest 6 | apt: 7 | sources: 8 | - google-chrome 9 | packages: 10 | - google-chrome-stable 11 | node_js: 12 | - '0.12' 13 | - '4.2' 14 | - '5.1' 15 | cache: 16 | directories: 17 | - node_modules 18 | before_script: 19 | - 'export DISPLAY=:99.0' 20 | - sh -e /etc/init.d/xvfb start 21 | - sleep 3 22 | - npm i -g bower@1.7.1 gulp@3.9.0 firebase-tools@2.2.0 23 | - bower i 24 | script: 25 | - ./travis-runner.sh 26 | env: 27 | global: 28 | - secure: SbcQ7plU7aRGQlaAG2ffMhSvEs84073YSljOQ62DZAjRxgizMhF4xM7H2mPrmac9YRM4IBrQRvBKMMZy3L6OhN8gwpm8o+w2zV+5Q1fwpY9V8bilznnhp1JUY6jrB2l7aLTOFxt/cG+5ABxiupwWz/n+I7BaByYhBiHWntIBgDc528eecRNDYI5R36KWjLO/yr+SdElvyxDlDOdJGaluPvgMItbinFGcE1hYb/Jqrkkw8zpE6CTDmvMOq1aRBWSo9afgh2zDeKc02lTYP/4N0xcn8CqzHF7k5zGWHjN9DR8Ep8Bp1ff/sM7zHGZBqgVhn5WGv305jBQY6eOxiTp5cDP0WVIOjgJeM5rBu9hBQxhZSaMKBPr2B1NYUjIwTVQkBsnR4sr095Ugjg8JCZAmEevf/Ysl4CzQyW3gT+WcEluqjxUuicQWDclH6L/kOVPBJ+Eqdo/LY3G1tpLcc6fsvj4FlVO6LPTrbMyCagwQvnjX3uIdFyuthqtWWrHKQMGx2Ow9suNUi8Hyvk7WboS1Z6jrLIcs1rvXSX8rQmlMR5vJBK3Ejg6fS1OHxn/lrtLhj4lDLB9r/Fcu2PEHT1lcvQqsTa3W+t4Fk1qaShUlBDiwMbZWZgmlf1SdG5OzK1yrPLjTTdRFdqJGgb6TANCdetgczRWynvjIhr5IDMxvfJg= 29 | -------------------------------------------------------------------------------- /tasks/ensure-files.js: -------------------------------------------------------------------------------- 1 | /** 2 | @license 3 | Copyright (c) 2016 The Polymer Project Authors. All rights reserved. 4 | This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | Code distributed by Google as part of the polymer project is also 8 | subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | var fs = require('fs'); 11 | 12 | /** 13 | * @param {Array} files 14 | * @param {Function} cb 15 | */ 16 | 17 | function ensureFiles(files, cb) { 18 | var missingFiles = files.reduce(function(prev, filePath) { 19 | var fileFound = false; 20 | 21 | try { 22 | fileFound = fs.statSync(filePath).isFile(); 23 | } catch (e) { } 24 | 25 | if (!fileFound) { 26 | prev.push(filePath + ' Not Found'); 27 | } 28 | 29 | return prev; 30 | }, []); 31 | 32 | if (missingFiles.length) { 33 | var err = new Error('Missing Required Files\n' + missingFiles.join('\n')); 34 | } 35 | 36 | if (cb) { 37 | cb(err); 38 | } else if (err) { 39 | throw err; 40 | } 41 | } 42 | 43 | module.exports = ensureFiles; 44 | -------------------------------------------------------------------------------- /app/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Polymer Starter Kit", 3 | "short_name": "Polymer Starter Kit", 4 | "icons": [{ 5 | "src": "images/touch/icon-72x72.png", 6 | "sizes": "72x72", 7 | "type": "image/png" 8 | }, { 9 | "src": "images/touch/icon-96x96.png", 10 | "sizes": "96x96", 11 | "type": "image/png" 12 | }, { 13 | "src": "images/touch/icon-128x128.png", 14 | "sizes": "128x128", 15 | "type": "image/png" 16 | }, { 17 | "src": "images/touch/ms-touch-icon-144x144-precomposed.png", 18 | "sizes": "144x144", 19 | "type": "image/png" 20 | }, { 21 | "src": "images/touch/apple-touch-icon.png", 22 | "sizes": "152x152", 23 | "type": "image/png" 24 | }, { 25 | "src": "images/touch/chrome-touch-icon-192x192.png", 26 | "sizes": "192x192", 27 | "type": "image/png" 28 | },{ 29 | "src": "images/touch/chrome-splashscreen-icon-384x384.png", 30 | "sizes": "384x384", 31 | "type": "image/png" 32 | },{ 33 | "src": "images/touch/icon-512x512.png", 34 | "sizes": "512x512", 35 | "type": "image/png" 36 | }], 37 | "background_color": "#3E4EB8", 38 | "display": "standalone", 39 | "theme_color": "#2E3AA1" 40 | } 41 | -------------------------------------------------------------------------------- /app/styles/main.css: -------------------------------------------------------------------------------- 1 | /* 2 | @license 3 | Copyright (c) 2015 The Polymer Project Authors. All rights reserved. 4 | This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | Code distributed by Google as part of the polymer project is also 8 | subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | 11 | html { 12 | font-size:8px; 13 | } 14 | 15 | body { 16 | background: #FFF; 17 | font-family: Lato, 'Helvetica Neue', Helvetica, Arial, sans-serif; 18 | font-size:8px; 19 | color: #333; 20 | padding:0; 21 | margin:0; 22 | } 23 | 24 | .content { 25 | min-height:100rem; 26 | } 27 | 28 | footer { 29 | display:block; 30 | border-top:#B8C2CC 1px solid; 31 | text-align: center; 32 | } 33 | 34 | footer nav { 35 | display:inline-block; 36 | } 37 | 38 | footer nav ul { 39 | list-style:none; 40 | margin:0; 41 | padding:0; 42 | } 43 | 44 | footer nav ul li { 45 | float:left; 46 | margin:0; 47 | padding:0; 48 | } 49 | 50 | footer nav ul li a { 51 | display:block; 52 | color:#007ED9; 53 | font-size:14px; 54 | line-height: 7rem; 55 | padding:0 2rem; 56 | text-decoration: none; 57 | } 58 | 59 | footer nav ul li a:hover { 60 | background:#EEE; 61 | } -------------------------------------------------------------------------------- /app/styles/shared-styles.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | 42 | 43 | -------------------------------------------------------------------------------- /app/elements/elements.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /app/styles/app-theme.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 40 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | # License 2 | 3 | Everything in this repo is BSD style license unless otherwise specified. 4 | 5 | Copyright (c) 2015 The Polymer Authors. All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 8 | 9 | * Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | * Redistributions in binary form must reproduce the above 12 | copyright notice, this list of conditions and the following disclaimer 13 | in the documentation and/or other materials provided with the 14 | distribution. 15 | * Neither the name of Google Inc. nor the names of its 16 | contributors may be used to endorse or promote products derived from 17 | this software without specific prior written permission. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /app/elements/routing.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 60 | -------------------------------------------------------------------------------- /app/elements/days-list/days-list.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 33 | 77 | 78 | -------------------------------------------------------------------------------- /app/elements/object-translate/object-translate.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 71 | 72 | -------------------------------------------------------------------------------- /app/elements/yotilo-overlay/yotilo-overlay.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 65 | 99 | 100 | -------------------------------------------------------------------------------- /app/elements/entry-comment/entry-comment.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 87 | 128 | 129 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | 13 | 14 | # Polymer Elements 15 | ## Guide for Contributors 16 | 17 | Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines: 18 | 19 | ### Filing Issues 20 | 21 | **If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions: 22 | 23 | 1. **Who will use the feature?** _“As someone filling out a form…”_ 24 | 2. **When will they use the feature?** _“When I enter an invalid value…”_ 25 | 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_ 26 | 27 | **If you are filing an issue to report a bug**, please provide: 28 | 29 | 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug: 30 | 31 | ```markdown 32 | The `paper-foo` element causes the page to turn pink when clicked. 33 | 34 | ## Expected outcome 35 | 36 | The page stays the same color. 37 | 38 | ## Actual outcome 39 | 40 | The page turns pink. 41 | 42 | ## Steps to reproduce 43 | 44 | 1. Put a `paper-foo` element in the page. 45 | 2. Open the page in a web browser. 46 | 3. Click the `paper-foo` element. 47 | ``` 48 | 49 | 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output). 50 | 51 | 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers. 52 | 53 | ### Submitting Pull Requests 54 | 55 | **Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request. 56 | 57 | When submitting pull requests, please provide: 58 | 59 | 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax: 60 | 61 | ```markdown 62 | (For a single issue) 63 | Fixes #20 64 | 65 | (For multiple issues) 66 | Fixes #32, fixes #40 67 | ``` 68 | 69 | 2. **A succinct description of the design** used to fix any related issues. For example: 70 | 71 | ```markdown 72 | This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked. 73 | ``` 74 | 75 | 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered. 76 | 77 | If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that! 78 | -------------------------------------------------------------------------------- /app/elements/yotilo-header/yotilo-header.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 87 | 123 | 124 | -------------------------------------------------------------------------------- /app/elements/yotilo-welcome/yotilo-welcome.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 95 | 127 | 128 | -------------------------------------------------------------------------------- /app/elements/time-entry/time-entry.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 75 | 132 | 133 | -------------------------------------------------------------------------------- /app/elements/yotilo-imprint/yotilo-imprint.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 148 | 153 | 154 | -------------------------------------------------------------------------------- /app/elements/entry-select/entry-select.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 112 | 187 | 188 | -------------------------------------------------------------------------------- /app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | Yotilo · Free Timetracking · Open Source 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 132 | 133 | 134 | 135 | 136 | 137 | 147 | 148 | 149 | 150 | -------------------------------------------------------------------------------- /app/elements/yotilo-datepicker/yotilo-datepicker.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 129 | 186 | 187 | -------------------------------------------------------------------------------- /app/elements/yotilo-privacy/yotilo-privacy.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 147 | 152 | 153 | -------------------------------------------------------------------------------- /app/elements/entry-duration/entry-duration.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 157 | 272 | 273 | -------------------------------------------------------------------------------- /app/elements/day-container/day-container.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 86 | 244 | 245 | -------------------------------------------------------------------------------- /app/elements/yotilo-datepicker-month/yotilo-datepicker-month.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 119 | 277 | 278 | -------------------------------------------------------------------------------- /app/elements/yotilo-multiselect/yotilo-multiselect.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 164 | 292 | 293 | -------------------------------------------------------------------------------- /app/elements/yotilo-howto/yotilo-howto.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 222 | 227 | 228 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | /* 2 | @license 3 | Copyright (c) 2015 The Polymer Project Authors. All rights reserved. 4 | This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | Code distributed by Google as part of the polymer project is also 8 | subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | 11 | 'use strict'; 12 | 13 | // Include promise polyfill for node 0.10 compatibility 14 | require('es6-promise').polyfill(); 15 | 16 | // Include Gulp & tools we'll use 17 | var gulp = require('gulp'); 18 | var $ = require('gulp-load-plugins')(); 19 | var del = require('del'); 20 | var runSequence = require('run-sequence'); 21 | var browserSync = require('browser-sync'); 22 | var reload = browserSync.reload; 23 | var merge = require('merge-stream'); 24 | var path = require('path'); 25 | var fs = require('fs'); 26 | var glob = require('glob-all'); 27 | var historyApiFallback = require('connect-history-api-fallback'); 28 | var packageJson = require('./package.json'); 29 | var crypto = require('crypto'); 30 | var ensureFiles = require('./tasks/ensure-files.js'); 31 | 32 | // var ghPages = require('gulp-gh-pages'); 33 | 34 | var AUTOPREFIXER_BROWSERS = [ 35 | 'ie >= 10', 36 | 'ie_mob >= 10', 37 | 'ff >= 30', 38 | 'chrome >= 34', 39 | 'safari >= 7', 40 | 'opera >= 23', 41 | 'ios >= 7', 42 | 'android >= 4.4', 43 | 'bb >= 10' 44 | ]; 45 | 46 | var DIST = 'dist'; 47 | 48 | var dist = function(subpath) { 49 | return !subpath ? DIST : path.join(DIST, subpath); 50 | }; 51 | 52 | var styleTask = function(stylesPath, srcs) { 53 | return gulp.src(srcs.map(function(src) { 54 | return path.join('app', stylesPath, src); 55 | })) 56 | .pipe($.changed(stylesPath, {extension: '.css'})) 57 | .pipe($.autoprefixer(AUTOPREFIXER_BROWSERS)) 58 | .pipe(gulp.dest('.tmp/' + stylesPath)) 59 | .pipe($.minifyCss()) 60 | .pipe(gulp.dest(dist(stylesPath))) 61 | .pipe($.size({title: stylesPath})); 62 | }; 63 | 64 | var imageOptimizeTask = function(src, dest) { 65 | return gulp.src(src) 66 | .pipe($.imagemin({ 67 | progressive: true, 68 | interlaced: true 69 | })) 70 | .pipe(gulp.dest(dest)) 71 | .pipe($.size({title: 'images'})); 72 | }; 73 | 74 | // Compile and automatically prefix stylesheets 75 | gulp.task('styles', function() { 76 | return styleTask('styles', ['**/*.css']); 77 | }); 78 | 79 | // Ensure that we are not missing required files for the project 80 | // "dot" files are specifically tricky due to them being hidden on 81 | // some systems. 82 | gulp.task('ensureFiles', function(cb) { 83 | var requiredFiles = ['.bowerrc']; 84 | 85 | ensureFiles(requiredFiles.map(function(p) { 86 | return path.join(__dirname, p); 87 | }), cb); 88 | }); 89 | 90 | // Optimize images 91 | gulp.task('images', function() { 92 | return imageOptimizeTask('app/images/**/*', dist('images')); 93 | }); 94 | 95 | // Copy all files at the root level (app) 96 | gulp.task('copy', function() { 97 | var app = gulp.src([ 98 | 'app/*', 99 | '!app/test', 100 | '!app/elements', 101 | '!app/bower_components', 102 | '!app/cache-config.json', 103 | '!**/.DS_Store' 104 | ], { 105 | dot: true 106 | }).pipe(gulp.dest(dist())); 107 | 108 | // Copy over only the bower_components we need 109 | // These are things which cannot be vulcanized 110 | var bower = gulp.src([ 111 | 'app/bower_components/{webcomponentsjs,platinum-sw,sw-toolbox,promise-polyfill}/**/*' 112 | ]).pipe(gulp.dest(dist('bower_components'))); 113 | 114 | return merge(app, bower) 115 | .pipe($.size({ 116 | title: 'copy' 117 | })); 118 | }); 119 | 120 | // Copy web fonts to dist 121 | gulp.task('fonts', function() { 122 | return gulp.src(['app/fonts/**']) 123 | .pipe(gulp.dest(dist('fonts'))) 124 | .pipe($.size({ 125 | title: 'fonts' 126 | })); 127 | }); 128 | 129 | // Scan your HTML for assets & optimize them 130 | gulp.task('build', ['images', 'fonts'], function() { 131 | return gulp.src(['app/**/*.html', '!app/{elements,test,bower_components}/**/*.html']) 132 | .pipe($.useref()) 133 | .pipe($.if('*.js', $.uglify({ 134 | preserveComments: 'some' 135 | }))) 136 | .pipe($.if('*.css', $.minifyCss())) 137 | .pipe($.if('*.html', $.minifyHtml({ 138 | quotes: true, 139 | empty: true, 140 | spare: true 141 | }))) 142 | .pipe(gulp.dest(dist())) 143 | }); 144 | 145 | // Vulcanize granular configuration 146 | gulp.task('vulcanize', function() { 147 | return gulp.src('app/elements/elements.html') 148 | .pipe($.vulcanize({ 149 | stripComments: true, 150 | inlineCss: true, 151 | inlineScripts: true 152 | })) 153 | .pipe(gulp.dest(dist('elements'))) 154 | .pipe($.size({title: 'vulcanize'})); 155 | }); 156 | 157 | // Generate config data for the element. 158 | // This include a list of files that should be precached, as well as a (hopefully unique) cache 159 | // id that ensure that multiple PSK projects don't share the same Cache Storage. 160 | // This task does not run by default, but if you are interested in using service worker caching 161 | // in your project, please enable it within the 'default' task. 162 | // See https://github.com/PolymerElements/polymer-starter-kit#enable-service-worker-support 163 | // for more context. 164 | gulp.task('cache-config', function(callback) { 165 | var dir = dist(); 166 | var config = { 167 | cacheId: packageJson.name || path.basename(__dirname), 168 | disabled: false 169 | }; 170 | 171 | glob([ 172 | 'index.html', 173 | './', 174 | 'bower_components/webcomponentsjs/webcomponents-lite.min.js', 175 | '{elements,scripts,styles}/**/*.*'], 176 | {cwd: dir}, function(error, files) { 177 | if (error) { 178 | callback(error); 179 | } else { 180 | config.precache = files; 181 | 182 | var md5 = crypto.createHash('md5'); 183 | md5.update(JSON.stringify(config.precache)); 184 | config.precacheFingerprint = md5.digest('hex'); 185 | 186 | var configPath = path.join(dir, 'cache-config.json'); 187 | fs.writeFile(configPath, JSON.stringify(config), callback); 188 | } 189 | }); 190 | }); 191 | 192 | // Clean output directory 193 | gulp.task('clean', function() { 194 | return del(['.tmp', dist()]); 195 | }); 196 | 197 | // Watch files for changes & reload 198 | gulp.task('serve', ['styles'], function() { 199 | browserSync({ 200 | port: 5000, 201 | notify: false, 202 | logPrefix: 'PSK', 203 | snippetOptions: { 204 | rule: { 205 | match: '', 206 | fn: function(snippet) { 207 | return snippet; 208 | } 209 | } 210 | }, 211 | // Run as an https by uncommenting 'https: true' 212 | // Note: this uses an unsigned certificate which on first access 213 | // will present a certificate warning in the browser. 214 | // https: true, 215 | server: { 216 | baseDir: ['.tmp', 'app'], 217 | middleware: [historyApiFallback()] 218 | } 219 | }); 220 | 221 | gulp.watch(['app/**/*.html', '!app/bower_components/**/*.html'], reload); 222 | gulp.watch(['app/styles/**/*.css'], ['styles', reload]); 223 | gulp.watch(['app/scripts/**/*.js'], reload); 224 | gulp.watch(['app/images/**/*'], reload); 225 | }); 226 | 227 | // Build and serve the output from the dist build 228 | gulp.task('serve:dist', ['default'], function() { 229 | browserSync({ 230 | port: 5001, 231 | notify: false, 232 | logPrefix: 'PSK', 233 | snippetOptions: { 234 | rule: { 235 | match: '', 236 | fn: function(snippet) { 237 | return snippet; 238 | } 239 | } 240 | }, 241 | // Run as an https by uncommenting 'https: true' 242 | // Note: this uses an unsigned certificate which on first access 243 | // will present a certificate warning in the browser. 244 | // https: true, 245 | server: dist(), 246 | middleware: [historyApiFallback()] 247 | }); 248 | }); 249 | 250 | // Build production files, the default task 251 | gulp.task('default', ['clean'], function(cb) { 252 | // Uncomment 'cache-config' if you are going to use service workers. 253 | runSequence( 254 | ['ensureFiles', 'copy', 'styles'], 255 | 'build', 256 | 'vulcanize', // 'cache-config', 257 | cb); 258 | }); 259 | 260 | // Build then deploy to GitHub pages gh-pages branch 261 | gulp.task('build-deploy-gh-pages', function(cb) { 262 | runSequence( 263 | 'default', 264 | 'deploy-gh-pages', 265 | cb); 266 | }); 267 | 268 | // Deploy to GitHub pages gh-pages branch 269 | gulp.task('deploy-gh-pages', function() { 270 | return gulp.src(dist('**/*')) 271 | // Check if running task from Travis CI, if so run using GH_TOKEN 272 | // otherwise run using ghPages defaults. 273 | .pipe($.if(process.env.TRAVIS === 'true', $.ghPages({ 274 | remoteUrl: 'https://$GH_TOKEN@github.com/PolymerElements/polymer-starter-kit.git', 275 | silent: true, 276 | branch: 'gh-pages' 277 | }), $.ghPages())); 278 | }); 279 | 280 | // Load tasks for web-component-tester 281 | // Adds tasks for `gulp test:local` and `gulp test:remote` 282 | require('web-component-tester').gulp.init(gulp); 283 | 284 | // Load custom tasks from the `tasks` directory 285 | try { 286 | require('require-dir')('tasks'); 287 | } catch (err) { 288 | // Do nothing 289 | } 290 | -------------------------------------------------------------------------------- /app/elements/yotilo-assetlist/yotilo-assetlist.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 165 | 359 | 360 | -------------------------------------------------------------------------------- /app/elements/yotilo-statistics/yotilo-statistics.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 216 | 396 | 397 | -------------------------------------------------------------------------------- /README-STARTERKIT.md: -------------------------------------------------------------------------------- 1 | ![](https://cloud.githubusercontent.com/assets/110953/7877439/6a69d03e-0590-11e5-9fac-c614246606de.png) 2 | ## Polymer Starter Kit 3 | 4 | > A starting point for building web applications with Polymer 1.0 5 | 6 | ### Included out of the box: 7 | 8 | * [Polymer](https://www.polymer-project.org/), [Paper](https://elements.polymer-project.org/browse?package=paper-elements), [Iron](https://elements.polymer-project.org/browse?package=iron-elements) and [Neon](https://elements.polymer-project.org/browse?package=neon-elements) elements 9 | * [Material Design](http://www.google.com/design/spec/material-design/introduction.html) layout 10 | * Routing with [Page.js](https://visionmedia.github.io/page.js/) 11 | * Unit testing with [Web Component Tester](https://github.com/Polymer/web-component-tester) 12 | * Optional offline setup through [Platinum](https://elements.polymer-project.org/browse?package=platinum-elements) Service Worker elements 13 | * End-to-end Build Tooling (including [Vulcanize](https://github.com/Polymer/vulcanize)) 14 | * [Recipes](/docs/README.md/) for ES2015 support, Polymer performance, using Chrome Dev Editor, Deploying to GitHub Pages, Deploying to Firebase, Mobile Chrome Apps and lint tools. 15 | 16 | ### Demo 17 | See latest Polymer Starter Kit Demo (from master) at https://polymerelements.github.io/polymer-starter-kit/ 18 | 19 | ### Tutorials 20 | 21 | Check out the Polymer Starter Kit tutorials on [polymer-project.org](https://www.polymer-project.org): 22 | 23 | * [Set up the PSK](docs/tutorials/set-up.md) 24 | * [Create a page](docs/tutorials/create-a-page.md) 25 | * [Deploy the PSK to the web](docs/tutorials/deploy.md) 26 | 27 | ## Getting Started 28 | 29 | To take advantage of Polymer Starter Kit you need to: 30 | 31 | 1. Get a copy of the code. 32 | 2. Install the dependencies if you don't already have them. 33 | 3. Modify the application to your liking. 34 | 4. Deploy your production code. 35 | 36 | ### Get the code 37 | 38 | [Download](https://github.com/polymerelements/polymer-starter-kit/releases/latest) and extract Polymer Starter Kit to where you want to work. The project comes in two flavours - Light and Full. 39 | 40 | **Beginners**: Try Polymer Starter Kit Light. This doesn't require any extra dependencies nor knowledge of modern front-end tooling. This option is good for prototyping if you haven't build a Polymer app before. 41 | 42 | **Intermediate - Advanced**: Use the full version of Polymer Starter Kit. This comes with all the build tools you'll need for testing and productionising your app so it's nice and lean. You'll need to run a few extra commands to install the tools we recommend but it's worth it to make sure your final app is super optimised. 43 | 44 | :warning: **Important**: Polymer Starter Kit, and Polymer Starter Kit Light, both contain dotfiles (files starting with a `.`). If you're copying the contents of the Starter Kit to a new location make sure you bring along these dotfiles as well! On Mac, [enable showing hidden files](http://ianlunn.co.uk/articles/quickly-showhide-hidden-files-mac-os-x-mavericks/), then try extracting/copying Polymer Starter Kit again. This time the dotfiles needed should be visible so you can copy them over without issues. 45 | 46 | Rob Dodson has a fantastic [PolyCast video](https://www.youtube.com/watch?v=xz-yixRxZN8) available that walks through using Polymer Starter Kit. An [end-to-end with Polymer](https://www.youtube.com/watch?v=1f_Tj_JnStA) and Polymer Starter Kit talk is also available. 47 | 48 | ### Install dependencies 49 | 50 | #### Quick-start (for experienced users) 51 | 52 | With Node.js installed, run the following one liner from the root of your Polymer Starter Kit download: 53 | 54 | ```sh 55 | npm install -g gulp bower && npm install && bower install 56 | ``` 57 | 58 | #### Prerequisites (for everyone) 59 | 60 | The full starter kit requires the following major dependencies: 61 | 62 | - Node.js, used to run JavaScript tools from the command line. 63 | - npm, the node package manager, installed with Node.js and used to install Node.js packages. 64 | - gulp, a Node.js-based build tool. 65 | - bower, a Node.js-based package manager used to install front-end packages (like Polymer). 66 | - The starter kit gulp build process uses platform specific tools which is handled by node-gyp which is included in node.js. See https://github.com/nodejs/node-gyp/blob/master/README.md for additional platform specific dependencies. 67 | 68 | **To install dependencies:** 69 | 70 | 1) Check your Node.js version. 71 | 72 | ```sh 73 | node --version 74 | ``` 75 | 76 | The version should be at or above 0.12.x. 77 | 78 | 2) If you don't have Node.js installed, or you have a lower version, go to [nodejs.org](https://nodejs.org) and click on the big green Install button. 79 | 80 | 3) Install `gulp` and `bower` globally. 81 | 82 | ```sh 83 | npm install -g gulp bower 84 | ``` 85 | 86 | This lets you run `gulp` and `bower` from the command line. 87 | 88 | 4) Install the starter kit's local `npm` and `bower` dependencies. 89 | 90 | ```sh 91 | cd polymer-starter-kit && npm install && bower install 92 | ``` 93 | 94 | This installs the element sets (Paper, Iron, Platinum) and tools the starter kit requires to build and serve apps. 95 | 96 | ### Development workflow 97 | 98 | #### Serve / watch 99 | 100 | ```sh 101 | gulp serve 102 | ``` 103 | 104 | This outputs an IP address you can use to locally test and another that can be used on devices connected to your network. 105 | 106 | #### Run tests 107 | 108 | ```sh 109 | gulp test:local 110 | ``` 111 | 112 | This runs the unit tests defined in the `app/test` directory through [web-component-tester](https://github.com/Polymer/web-component-tester). 113 | 114 | To run tests Java 7 or higher is required. To update Java go to http://www.oracle.com/technetwork/java/javase/downloads/index.html and download ***JDK*** and install it. 115 | 116 | #### Build & Vulcanize 117 | 118 | ```sh 119 | gulp 120 | ``` 121 | 122 | Build and optimize the current project, ready for deployment. This includes vulcanization, image, script, stylesheet and HTML optimization and minification. 123 | 124 | ## Application Theming & Styling 125 | 126 | Polymer 1.0 introduces a shim for CSS custom properties. We take advantage of this in `app/styles/app-theme.html` to provide theming for your application. You can also find our presets for Material Design breakpoints in this file. 127 | 128 | [Read more](https://www.polymer-project.org/1.0/docs/devguide/styling.html) about CSS custom properties. 129 | 130 | ### Styling 131 | 1. ***main.css*** - to define styles that can be applied outside of Polymer's custom CSS properties implementation. Some of the use-cases include defining styles that you want to be applied for a splash screen, styles for your application 'shell' before it gets upgraded using Polymer or critical style blocks that you want parsed before your elements are. 132 | 2. ***app-theme.html*** - to provide theming for your application. You can also find our presets for Material Design breakpoints in this file. 133 | 3. ***shared-styles.html*** - to share styles between elements and index.html. 134 | 4. ***element styles only*** - styles specific to element. These styles should be inside the `` inside `template`. 135 | 136 | ```HTML 137 | 138 | 151 | 152 | ``` 153 | 154 | These style files are located in the [styles folder](app/styles/). 155 | 156 | ## Unit Testing 157 | 158 | Web apps built with Polymer Starter Kit come configured with support for [Web Component Tester](https://github.com/Polymer/web-component-tester) - Polymer's preferred tool for authoring and running unit tests. This makes testing your element based applications a pleasant experience. 159 | 160 | [Read more](https://github.com/Polymer/web-component-tester#html-suites) about using Web Component tester. 161 | 162 | ## Dependency Management 163 | 164 | Polymer uses [Bower](http://bower.io) for package management. This makes it easy to keep your elements up to date and versioned. For tooling, we use npm to manage Node.js-based dependencies. 165 | 166 | Components installed by Bower live in the `app/bower_components` directory. This location is specified by the `.bowerrc` file. Many projects which follow Yeoman conventions place the `bower_components` directory outside of the `app` directory and then mount it using a server. This causes problems for tools like [Vulcanize](https://github.com/polymer/vulcanize) and [web-component-shards](https://github.com/PolymerLabs/web-component-shards) which rely on relative paths. We've chosen to simplify things and have `bower_components` live inside of `app` to resolve these issues. 167 | 168 | ## Deploy 169 | 170 | ### Github Pages 171 | 172 | 1. Uncomment this line `// app.baseUrl = '/polymer-starter-kit/';` in app.js near the top 173 | 2. Change `app.baseUrl = '/polymer-starter-kit/';` to `app.baseUrl = '/your-pathname/';` (ex: if you repo is `github.com/username/bobs-awesome-site` you would change this to `app.baseUrl = '/bobs-awesome-site/';`) 174 | 3. Run `gulp build-deploy-gh-pages` from command line 175 | 4. To see changes wait 1-2 minutes then load Github pages for your app (ex: https://polymerelements.github.io/polymer-starter-kit/) 176 | 177 | [See more details](/docs/deploy-to-github-pages.md/) 178 | 179 | ### Firebase 180 | 181 | [See detailed recipe](/docs/deploy-to-firebase-pretty-urls.md/) 182 | 183 | ## Service Worker 184 | 185 | Polymer Starter Kit offers an optional offline experience thanks to Service Worker and the [Platinum Service Worker elements](https://github.com/PolymerElements/platinum-sw). New to Service Worker? Read the following [introduction](http://www.html5rocks.com/en/tutorials/service-worker/introduction/) to understand how it works. 186 | 187 | Our optional offline setup should work well for relatively simple applications. For more complex apps, we recommend learning how Service Worker works so that you can make the most of the Platinum Service Worker element abstractions. 188 | 189 | ### Enable Service Worker support? 190 | 191 | To enable Service Worker support for Polymer Starter Kit project use these 3 steps: 192 | 193 | 1. Uncomment Service Worker code in index.html 194 | ```HTML 195 | 196 | 211 | ``` 212 | 2. Uncomment Service Worker code in elements.html 213 | 214 | ```HTML 215 | 216 | 220 | ``` 221 | 3. Uncomment 'cache-config' in the `runSequence()` section of the 'default' gulp task, like below: 222 | [(gulpfile.js)](https://github.com/PolymerElements/polymer-starter-kit/blob/master/gulpfile.js) 223 | 224 | ```JavaScript 225 | // Build Production Files, the Default Task 226 | gulp.task('default', ['clean'], function (cb) { 227 | runSequence( 228 | ['copy', 'styles'], 229 | 'elements', 230 | ['images', 'fonts', 'html'], 231 | 'vulcanize', 'cache-config', 232 | cb); 233 | }); 234 | ``` 235 | 236 | #### Filing bugs in the right place 237 | 238 | If you experience an issue with Service Worker support in your application, check the origin of the issue and use the appropriate issue tracker: 239 | 240 | * [sw-toolbox](https://github.com/GoogleChrome/sw-toolbox/issues) 241 | * [platinum-sw](https://github.com/PolymerElements/platinum-sw/issues) 242 | * [platinum-push-notifications-manager](https://github.com/PolymerElements/platinum-push-messaging) 243 | * For all other issues, feel free to file them [here](https://github.com/polymerelements/polymer-starter-kit/issues). 244 | 245 | #### I get an error message about "Only secure origins are allowed" 246 | 247 | Service Workers are only available to "secure origins" (HTTPS sites, basically) in line with a policy to prefer secure origins for powerful new features. However http://localhost is also considered a secure origin, so if you can, developing on localhost is an easy way to avoid this error. For production, your site will need to support HTTPS. 248 | 249 | #### How do I debug Service Worker? 250 | 251 | If you need to debug the event listener wire-up use `chrome://serviceworker-internals`. 252 | 253 | #### What are those buttons on chrome://serviceworker-internals? 254 | 255 | This page shows your registered workers and provides some basic operations. 256 | 257 | * Unregister: Unregisters the worker. 258 | * Start: Starts the worker. This would happen automatically when you navigate to a page in the worker's scope. 259 | * Stop: Stops the worker. 260 | * Sync: Dispatches a 'sync' event to the worker. If you don't handle this event, nothing will happen. 261 | * Push: Dispatches a 'push' event to the worker. If you don't handle this event, nothing will happen. 262 | * Inspect: Opens the worker in the Inspector. 263 | 264 | #### Development flow 265 | 266 | In order to guarantee that the latest version of your Service Worker script is being used, follow these instructions: 267 | 268 | * After you made changes to your service worker script, close all but one of the tabs pointing to your web application 269 | * Hit shift-reload to bypass the service worker as to ensure that the remaining tab isn't under the control of a service worker 270 | * Hit reload to let the newer version of the Service Worker control the page. 271 | 272 | If you find anything to still be stale, you can also try navigating to `chrome:serviceworker-internals` (in Chrome), finding the relevant Service Worker entry for your application and clicking 'Unregister' before refreshing your app. This will (of course) only clear it from the local development machine. If you have already deployed to production then further work will be necessary to remove it from your users' machines. 273 | 274 | #### Disable Service Worker support after you enabled it 275 | 276 | If for any reason you need to disable Service Worker support after previously enabling it, you can remove it from your Polymer Starter Kit project using these 4 steps: 277 | 278 | 1. Remove references to the platinum-sw elements from your application [index](https://github.com/PolymerElements/polymer-starter-kit/blob/master/app/index.html). 279 | 2. Remove the two Platinum Service Worker elements (platinum-sw/..) in [app/elements/elements.html](https://github.com/PolymerElements/polymer-starter-kit/blob/master/app/elements/elements.html) 280 | 3. Remove 'precache' from the list in the 'default' gulp task ([gulpfile.js](https://github.com/PolymerElements/polymer-starter-kit/blob/master/gulpfile.js)) 281 | 4. Navigate to `chrome://serviceworker-internals` and unregister any Service Workers registered by Polymer Starter Kit for your app just in case there's a copy of it cached. 282 | 283 | ## Add to home screen banner 284 | 285 | If you've enabled Service Worker support, your app becomes eligible to trigger a Chrome [web app install banner](https://developers.google.com/web/fundamentals/engage-and-retain/app-install-banners/) if you add a `start_url` property to `manifest.json`, and point it to a valid URL. The best practice here is to add a query parameter to that URL, in order to distinguish between the app being launched from the web vs. the homescreen. Simply add this to `manifest.json` and you'll be all set: 286 | 287 | "start_url": "/?homescreen=1" 288 | 289 | If you are implementing an offline experince using Service Worker, make sure to cache `/?homescreen=1`. For a short explanation, you can refer to [this segment](https://youtu.be/g7f1Az5fxgU?t=1435) from Rob Dodson's talk Building Progressive Web Apps with Polymer. A more in-depth exploration can be found at [Service Workers in Production](https://developers.google.com/web/showcase/case-study/service-workers-iowa#watch-out-for-extra-query-parameters). 290 | 291 | ## Yeoman support 292 | 293 | [generator-polymer](https://github.com/yeoman/generator-polymer/releases) now includes support for Polymer Starter Kit out of the box. 294 | 295 | ## Frequently Asked Questions 296 | 297 | ### Where do I customise my application theme? 298 | 299 | Theming can be achieved using [CSS Custom properties](https://www.polymer-project.org/1.0/docs/devguide/styling.html#xscope-styling-details) via [app/styles/app-theme.html](https://github.com/PolymerElements/polymer-starter-kit/blob/master/app/styles/app-theme.html). 300 | You can also use `app/styles/main.css` for pure CSS stylesheets (e.g for global styles), however note that Custom properties will not work there under the shim. 301 | 302 | A [Polycast](https://www.youtube.com/watch?v=omASiF85JzI) is also available that walks through theming using Polymer 1.0. 303 | 304 | ### Where do I configure routes in my application? 305 | 306 | This can be done via [`app/elements/routing.html`](https://github.com/PolymerElements/polymer-starter-kit/blob/master/app/elements/routing.html). We use Page.js for routing and new routes 307 | can be defined in this import. We then toggle which `` page to display based on the [selected](https://github.com/PolymerElements/polymer-starter-kit/blob/master/app/index.html#L105) route. 308 | 309 | ### Why are we using Page.js rather than a declarative router like ``? 310 | 311 | `` (in our opinion) is good, but lacks imperative hooks for getting full control 312 | over the routing in your application. This is one place where a pure JS router shines. We may 313 | at some point switch back to a declarative router when our hook requirements are tackled. That 314 | said, it should be trivial to switch to `` or another declarative router in your 315 | own local setup. 316 | 317 | ### Where can I find the application layouts from your Google I/O 2015 talk? 318 | 319 | App layouts live in a separate repository called [app-layout-templates](https://github.com/PolymerElements/app-layout-templates). 320 | You can select a template and copy over the relevant parts you would like to reuse to Polymer Starter Kit. 321 | 322 | You will probably need to change paths to where your Iron and Paper dependencies can be found to get everything working. 323 | This can be done by adding them to the [`elements.html`](https://github.com/PolymerElements/polymer-starter-kit/blob/master/app/elements/elements.html) import. 324 | 325 | ### Something has failed during installation. How do I fix this? 326 | 327 | Our most commonly reported issue is around system permissions for installing Node.js dependencies. 328 | We recommend following the [fixing npm permissions](https://github.com/sindresorhus/guides/blob/master/npm-global-without-sudo.md) 329 | guide to address any messages around administrator permissions being required. If you use `sudo` 330 | to work around these issues, this guide may also be useful for avoiding that. 331 | 332 | If you run into an exception that mentions five optional dependencies failing (or an `EEXIST` error), you 333 | may have run into an npm [bug](https://github.com/npm/npm/issues/6309). We recommend updating to npm 2.11.0+ 334 | to work around this. You can do this by opening a Command Prompt/terminal and running `npm install npm@2.11.0 -g`. If you are on Windows, 335 | Node.js (and npm) may have been installed into `C:\Program Files\`. Updating npm by running `npm install npm@2.11.0 -g` will install npm 336 | into `%AppData%\npm`, but your system will still use the npm version. You can avoid this by deleting your older npm from `C:\Program Files\nodejs` 337 | as described [here](https://github.com/npm/npm/issues/6309#issuecomment-67549380). 338 | 339 | If you get a browser console error indicating that an element you know you have installed is missing, try deleting the bower_components folder, then run `bower cache clean` followed by `bower install` to reinstall. This can be especially helpful when upgrading from a prior version of the Polymer Starter Kit. 340 | 341 | If the issue is to do with a failure somewhere else, you might find that due to a network issue 342 | a dependency failed to correctly install. We recommend running `npm cache clean` and deleting the `node_modules` directory followed by 343 | `npm install` to see if this corrects the problem. If not, please check the [issue tracker](https://github.com/PolymerElements/polymer-starter-kit/issues) in case 344 | there is a workaround or fix already posted. 345 | 346 | ### I'm having trouble getting Vulcanize to fully build my project on Windows. Help? 347 | 348 | Some Windows users have run into trouble with the `elements.html` file in their `dist` folder 349 | not being correctly vulcanized. This can happen if your project is in a folder with a name containing a 350 | space. You can work around this issue by ensuring your path doesn't contain one. 351 | 352 | There is also an [in-flight](https://github.com/PolymerElements/polymer-starter-kit/issues/62#issuecomment-108974016) issue 353 | where some are finding they need to disable the `inlineCss` option in our configuration for Vulcanize 354 | to correctly build. We are still investigating this, however for the time-being use the workaround if 355 | you find your builds getting stuck here. 356 | 357 | 358 | ### How do I add new JavaScript files to Starter Kit so they're picked up by the build process? 359 | 360 | At the bottom of `app/index.html`, you will find a build block that can be used to include additional 361 | scripts for your app. Build blocks are just normal script tags that are wrapped in a HTML 362 | comment that indicates where to concatenate and minify their final contents to. 363 | 364 | Below, we've added in `script2.js` and `script3.js` to this block. The line 365 | `` specifies that these scripts will be squashed into `scripts/app.js` 366 | during a build. 367 | 368 | ```html 369 | 370 | 371 | 372 | 373 | 374 | ``` 375 | 376 | If you are not using the build-blocks, but still wish for additional files (e.g scripts or stylesheets) to be included in the final `dist` directory, you will need to either copy these files as part of the gulpfile.js build process (see the `copy` task for how to automate this) or manually copy the files. 377 | 378 | ### I'm finding the installation/tooling here overwhelming. What should I do? 379 | 380 | Don't worry! We've got you covered. Polymer Starter Kit tries to offer everything you need to build and optimize your apps for production, which is why we include the tooling we do. We realise however that our tooling setup may not be for everyone. 381 | 382 | If you find that you just want the simplest setup possible, we recommend using Polymer Starter Kit light, which is available from the [Releases](https://github.com/PolymerElements/polymer-starter-kit/releases) page. This takes next to no time to setup. 383 | 384 | ## Licensing 385 | 386 | Like other Google projects, Polymer Starter Kit includes Google license headers at the top of several of our source files. Google's open-source licensing requires that this header be kept in place (sorry!), however we acknowledge that you may need to add your own licensing to files you modify. This can be done by appending your own extensions to these headers. 387 | 388 | ## Contributing 389 | 390 | Polymer Starter Kit is a new project and is an ongoing effort by the Web Component community. We welcome your bug reports, PRs for improvements, docs and anything you think would improve the experience for other Polymer developers. 391 | -------------------------------------------------------------------------------- /app/images/visuals/visual-1.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Group 4 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | --------------------------------------------------------------------------------