Skip to content

Commit 0ea3827

Browse files
committed
agrego mis cambios del proyecto polymer-app
1 parent c103b06 commit 0ea3827

39 files changed

+1177
-0
lines changed

polymer-app/.firebaserc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"projects": {
3+
"default": "proyecto-batch11"
4+
}
5+
}

polymer-app/.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto

polymer-app/.github/ISSUE_TEMPLATE.md

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<!-- Instructions: https://github.com/PolymerElements/polymer-starter-kit/CONTRIBUTING.md#filing-issues -->
2+
### Description
3+
<!-- Example: The `paper-foo` element causes the page to turn pink when clicked. -->
4+
5+
### Expected outcome
6+
7+
<!-- Example: The page stays the same color. -->
8+
9+
### Actual outcome
10+
11+
<!-- Example: The page turns pink. -->
12+
13+
### Live Demo
14+
<!-- Example: https://jsbin.com/cagaye/edit?html,output -->
15+
16+
### Steps to reproduce
17+
18+
<!-- Example
19+
1. Put a `paper-foo` element in the page.
20+
2. Open the page in a web browser.
21+
3. Click the `paper-foo` element.
22+
-->
23+
24+
### Browsers Affected
25+
<!-- Check all that apply -->
26+
- [ ] Chrome
27+
- [ ] Firefox
28+
- [ ] Safari 9
29+
- [ ] Safari 8
30+
- [ ] Safari 7
31+
- [ ] Edge
32+
- [ ] IE 11
33+
- [ ] IE 10

polymer-app/.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
bower_components/
2+
build/
3+
node_modules/

polymer-app/.travis.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
language: node_js
2+
sudo: required
3+
dist: trusty
4+
addons:
5+
firefox: '46.0'
6+
apt:
7+
sources:
8+
- google-chrome
9+
packages:
10+
- google-chrome-stable
11+
node_js:
12+
- '6'
13+
- '5'
14+
- '4'
15+
before_script:
16+
- npm install -g bower polymer-cli
17+
- bower install
18+
script:
19+
- xvfb-run polymer test

polymer-app/README.md

+88
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Polymer App Toolbox - Starter Kit
2+
3+
[![Build Status](https://travis-ci.org/PolymerElements/polymer-starter-kit.svg?branch=master)](https://travis-ci.org/PolymerElements/polymer-starter-kit)
4+
5+
This template is a starting point for building apps using a drawer-based
6+
layout. The layout is provided by `app-layout` elements.
7+
8+
This template, along with the `polymer-cli` toolchain, also demonstrates use
9+
of the "PRPL pattern" This pattern allows fast first delivery and interaction with
10+
the content at the initial route requested by the user, along with fast subsequent
11+
navigation by pre-caching the remaining components required by the app and
12+
progressively loading them on-demand as the user navigates through the app.
13+
14+
The PRPL pattern, in a nutshell:
15+
16+
* **Push** components required for the initial route
17+
* **Render** initial route ASAP
18+
* **Pre-cache** components for remaining routes
19+
* **Lazy-load** and progressively upgrade next routes on-demand
20+
21+
### Migrating from Polymer Starter Kit v1?
22+
23+
[Check out our blog post that covers what's changed in PSK2 and how to migrate!](https://www.polymer-project.org/1.0/blog/2016-08-18-polymer-starter-kit-or-polymer-cli.html)
24+
25+
### Setup
26+
27+
##### Prerequisites
28+
29+
Install [polymer-cli](https://github.com/Polymer/polymer-cli):
30+
31+
npm install -g polymer-cli
32+
33+
##### Initialize project from template
34+
35+
mkdir my-app
36+
cd my-app
37+
polymer init starter-kit
38+
39+
### Start the development server
40+
41+
This command serves the app at `http://localhost:8080` and provides basic URL
42+
routing for the app:
43+
44+
polymer serve --open
45+
46+
47+
### Build
48+
49+
This command performs HTML, CSS, and JS minification on the application
50+
dependencies, and generates a service-worker.js file with code to pre-cache the
51+
dependencies based on the entrypoint and fragments specified in `polymer.json`.
52+
The minified files are output to the `build/unbundled` folder, and are suitable
53+
for serving from a HTTP/2+Push compatible server.
54+
55+
In addition the command also creates a fallback `build/bundled` folder,
56+
generated using fragment bundling, suitable for serving from non
57+
H2/push-compatible servers or to clients that do not support H2/Push.
58+
59+
polymer build
60+
61+
### Preview the build
62+
63+
This command serves the minified version of the app at `http://localhost:8080`
64+
in an unbundled state, as it would be served by a push-compatible server:
65+
66+
polymer serve build/unbundled
67+
68+
This command serves the minified version of the app at `http://localhost:8080`
69+
generated using fragment bundling:
70+
71+
polymer serve build/bundled
72+
73+
### Run tests
74+
75+
This command will run
76+
[Web Component Tester](https://github.com/Polymer/web-component-tester) against the
77+
browsers currently installed on your machine.
78+
79+
polymer test
80+
81+
### Adding a new view
82+
83+
You can extend the app by adding more views that will be demand-loaded
84+
e.g. based on the route, or to progressively render non-critical sections
85+
of the application. Each new demand-loaded fragment should be added to the
86+
list of `fragments` in the included `polymer.json` file. This will ensure
87+
those components and their dependencies are added to the list of pre-cached
88+
components (and will have bundles created in the fallback `bundled` build).

polymer-app/bower.json

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "polymer-starter-kit",
3+
"authors": [
4+
"The Polymer Authors"
5+
],
6+
"private": true,
7+
"dependencies": {
8+
"app-layout": "PolymerElements/app-layout#^0.10.4",
9+
"app-route": "PolymerElements/app-route#^0.9.0",
10+
"iron-flex-layout": "PolymerElements/iron-flex-layout#^1.3.1",
11+
"iron-icon": "PolymerElements/iron-icon#^1.0.0",
12+
"iron-iconset-svg": "PolymerElements/iron-iconset-svg#^1.0.0",
13+
"iron-localstorage": "PolymerElements/iron-localstorage#^1.0.0",
14+
"iron-media-query": "PolymerElements/iron-media-query#^1.0.0",
15+
"iron-pages": "PolymerElements/iron-pages#^1.0.0",
16+
"iron-selector": "PolymerElements/iron-selector#^1.0.0",
17+
"paper-icon-button": "PolymerElements/paper-icon-button#~1.1.0",
18+
"polymer": "Polymer/polymer#^1.6.0",
19+
"paper-button": "PolymerElements/paper-button#^1.0.13",
20+
"paper-dropdown-menu": "PolymerElements/paper-dropdown-menu#^1.4.0",
21+
"paper-listbox": "polymerelements/paper-listbox#^1.1.2",
22+
"paper-item": "PolymerElements/paper-item#^1.2.1",
23+
"paper-card": "PolymerElements/paper-card#^1.1.2"
24+
},
25+
"devDependencies": {
26+
"web-component-tester": "^4.0.0"
27+
}
28+
}

polymer-app/database.rules.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"rules": {
3+
".read": "auth != null",
4+
".write": "auth != null"
5+
}
6+
}

polymer-app/firebase.json

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"database": {
3+
"rules": "database.rules.json"
4+
},
5+
"hosting": {
6+
"public": "build/bundled",
7+
"rewrites": [
8+
{
9+
"source": "**/!{*.*}",
10+
"destination": "/index.html"
11+
}
12+
]
13+
}
14+
}

polymer-app/images/coffee.jpg

57 KB
Loading

polymer-app/images/favicon.ico

5.3 KB
Binary file not shown.

polymer-app/images/food.jpg

507 KB
Loading
4.62 KB
Loading
6.38 KB
Loading
1.65 KB
Loading
20.4 KB
Loading
2.36 KB
Loading
3.18 KB
Loading

polymer-app/images/polymer.png

4.6 KB
Loading

polymer-app/index.html

+111
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
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+
11+
<!doctype html>
12+
<html lang="en">
13+
<head>
14+
<meta charset="utf-8">
15+
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
16+
17+
<title>My App</title>
18+
<meta name="description" content="My App description">
19+
20+
<link rel="icon" href="/images/favicon.ico">
21+
22+
<!-- See https://goo.gl/OOhYW5 -->
23+
<link rel="manifest" href="/manifest.json">
24+
25+
<!-- See https://goo.gl/qRE0vM -->
26+
<meta name="theme-color" content="#3f51b5">
27+
28+
<!-- Add to homescreen for Chrome on Android. Fallback for manifest.json -->
29+
<meta name="mobile-web-app-capable" content="yes">
30+
<meta name="application-name" content="My App">
31+
32+
<!-- Add to homescreen for Safari on iOS -->
33+
<meta name="apple-mobile-web-app-capable" content="yes">
34+
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
35+
<meta name="apple-mobile-web-app-title" content="My App">
36+
37+
<!-- Homescreen icons -->
38+
<link rel="apple-touch-icon" href="/images/manifest/icon-48x48.png">
39+
<link rel="apple-touch-icon" sizes="72x72" href="/images/manifest/icon-72x72.png">
40+
<link rel="apple-touch-icon" sizes="96x96" href="/images/manifest/icon-96x96.png">
41+
<link rel="apple-touch-icon" sizes="144x144" href="/images/manifest/icon-144x144.png">
42+
<link rel="apple-touch-icon" sizes="192x192" href="/images/manifest/icon-192x192.png">
43+
44+
<!-- Tile icon for Windows 8 (144x144 + tile color) -->
45+
<meta name="msapplication-TileImage" content="/images/manifest/icon-144x144.png">
46+
<meta name="msapplication-TileColor" content="#3f51b5">
47+
<meta name="msapplication-tap-highlight" content="no">
48+
49+
<script>
50+
// Setup Polymer options
51+
window.Polymer = {
52+
dom: 'shadow',
53+
lazyRegister: true
54+
};
55+
56+
// Load webcomponentsjs polyfill if browser does not support native Web Components
57+
(function() {
58+
'use strict';
59+
60+
var onload = function() {
61+
// For native Imports, manually fire WebComponentsReady so user code
62+
// can use the same code path for native and polyfill'd imports.
63+
if (!window.HTMLImports) {
64+
document.dispatchEvent(
65+
new CustomEvent('WebComponentsReady', {bubbles: true})
66+
);
67+
}
68+
};
69+
70+
var webComponentsSupported = (
71+
'registerElement' in document
72+
&& 'import' in document.createElement('link')
73+
&& 'content' in document.createElement('template')
74+
);
75+
76+
if (!webComponentsSupported) {
77+
var script = document.createElement('script');
78+
script.async = true;
79+
script.src = '/bower_components/webcomponentsjs/webcomponents-lite.min.js';
80+
script.onload = onload;
81+
document.head.appendChild(script);
82+
} else {
83+
onload();
84+
}
85+
})();
86+
87+
// Load pre-caching Service Worker
88+
if ('serviceWorker' in navigator) {
89+
window.addEventListener('load', function() {
90+
navigator.serviceWorker.register('/service-worker.js');
91+
});
92+
}
93+
</script>
94+
95+
<link rel="import" href="/src/my-app.html">
96+
97+
<style>
98+
body {
99+
margin: 0;
100+
font-family: 'Roboto', 'Noto', sans-serif;
101+
line-height: 1.5;
102+
min-height: 100vh;
103+
background-color: #eeeeee;
104+
}
105+
</style>
106+
</head>
107+
<body>
108+
<my-app></my-app>
109+
<!-- Built with love using Polymer Starter Kit -->
110+
</body>
111+
</html>

polymer-app/manifest.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "My App",
3+
"short_name": "My App",
4+
"start_url": "/?homescreen=1",
5+
"display": "standalone",
6+
"theme_color": "#3f51b5",
7+
"background_color": "#3f51b5",
8+
"icons": [
9+
{
10+
"src": "images/manifest/icon-192x192.png",
11+
"sizes": "192x192",
12+
"type": "image/png"
13+
},
14+
{
15+
"src": "images/manifest/icon-512x512.png",
16+
"sizes": "512x512",
17+
"type": "image/png"
18+
}
19+
]
20+
}

polymer-app/polymer.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"entrypoint": "index.html",
3+
"shell": "src/my-app.html",
4+
"fragments": [
5+
"src/my-view1.html",
6+
"src/my-view2.html",
7+
"src/my-view3.html",
8+
"src/my-view404.html",
9+
"src/my-nuevavista.html"
10+
],
11+
"sourceGlobs": [
12+
"src/**/*",
13+
"images/**/*",
14+
"bower.json"
15+
],
16+
"includeDependencies": [
17+
"manifest.json",
18+
"bower_components/webcomponentsjs/webcomponents-lite.min.js"
19+
]
20+
}

0 commit comments

Comments
 (0)