1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update now playing page

This commit is contained in:
Luke Pulverenti 2015-06-26 11:53:49 -04:00
parent 878eac1535
commit 19f8c11c38
100 changed files with 45182 additions and 417 deletions

View file

@ -0,0 +1,43 @@
{
"name": "iron-pages",
"version": "1.0.2",
"license": "http://polymer.github.io/LICENSE.txt",
"description": "Organizes a set of pages and shows one at a time",
"main": "iron-pages.html",
"private": true,
"authors": [
"The Polymer Authors"
],
"repository": {
"type": "git",
"url": "git://github.com/PolymerElements/iron-pages.git"
},
"keywords": [
"web-components",
"polymer",
"container"
],
"dependencies": {
"iron-resizable-behavior": "polymerelements/iron-resizable-behavior#^1.0.0",
"iron-selector": "polymerelements/iron-selector#^1.0.0",
"polymer": "Polymer/polymer#^1.0.0"
},
"devDependencies": {
"paper-styles": "polymerelements/paper-styles#^1.0.2",
"iron-component-page": "polymerelements/iron-component-page#^1.0.0",
"test-fixture": "polymerelements/test-fixture#^1.0.0",
"web-component-tester": "*",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
},
"homepage": "https://github.com/PolymerElements/iron-pages",
"_release": "1.0.2",
"_resolution": {
"type": "version",
"tag": "v1.0.2",
"commit": "061e9ea95b58880f0f992b081c52a06665b553c9"
},
"_source": "git://github.com/PolymerElements/iron-pages.git",
"_target": "~1.0.2",
"_originalSource": "PolymerElements/iron-pages",
"_direct": true
}

View file

@ -0,0 +1 @@
bower_components

View file

@ -0,0 +1,32 @@
{
"name": "iron-pages",
"version": "1.0.2",
"license": "http://polymer.github.io/LICENSE.txt",
"description": "Organizes a set of pages and shows one at a time",
"main": "iron-pages.html",
"private": true,
"authors": [
"The Polymer Authors"
],
"repository": {
"type": "git",
"url": "git://github.com/PolymerElements/iron-pages.git"
},
"keywords": [
"web-components",
"polymer",
"container"
],
"dependencies": {
"iron-resizable-behavior": "polymerelements/iron-resizable-behavior#^1.0.0",
"iron-selector": "polymerelements/iron-selector#^1.0.0",
"polymer": "Polymer/polymer#^1.0.0"
},
"devDependencies": {
"paper-styles": "polymerelements/paper-styles#^1.0.2",
"iron-component-page": "polymerelements/iron-component-page#^1.0.0",
"test-fixture": "polymerelements/test-fixture#^1.0.0",
"web-component-tester": "*",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
}
}

View file

@ -0,0 +1,77 @@
<!doctype html>
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<html>
<head>
<title>iron-pages</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
<link href="../../paper-styles/paper-styles.html" rel="import">
<link rel="import" href="../iron-pages.html">
<style is="custom-style">
iron-pages {
@apply(--layout-fit);
color: white;
margin: auto;
cursor: default;
}
iron-pages div {
@apply(--layout);
@apply(--layout-center);
@apply(--layout-center-justified);
@apply(--paper-font-display1);
width: 100%;
height: 100%;
font-size: 50px;
}
iron-pages div:nth-child(1) {
background-color: var(--google-blue-500);
}
iron-pages div:nth-child(2) {
background-color: var(--google-red-500);
}
iron-pages div:nth-child(3) {
background-color: var(--google-green-500);
}
</style>
</head>
<body class="fullbleed" unresolved>
<iron-pages selected="0">
<div>Page One</div>
<div>Page Two</div>
<div>Page Three</div>
</iron-pages>
<script>
document.addEventListener('click', function(e) {
var pages = document.querySelector('iron-pages');
pages.selectNext();
});
</script>
</body>
</html>

View file

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 225 126" enable-background="new 0 0 225 126" xml:space="preserve">
<g id="background" display="none">
<rect display="inline" fill="#B0BEC5" width="225" height="126"/>
</g>
<g id="label">
</g>
<g id="art">
<path d="M143.3,73.6H51.7V26.7h91.6V73.6z M53.7,71.6h87.6V28.7H53.7V71.6z"/>
<path d="M158.3,85.4H66.7V38.6h91.6V85.4z M68.7,83.4h87.6V40.6H68.7V83.4z"/>
<path d="M172,99H80.4V52.1H172V99z M82.4,97H170V54.1H82.4V97z"/>
<circle cx="53" cy="28" r="4"/>
<circle cx="171" cy="98" r="4"/>
<g id="ic_x5F_add_x0D_">
</g>
</g>
<g id="Guides">
</g>
</svg>

After

Width:  |  Height:  |  Size: 921 B

View file

@ -0,0 +1,25 @@
<!doctype html>
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<html>
<head>
<title>iron-pages</title>
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
<script src="../webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="../iron-component-page/iron-component-page.html">
</head>
<body>
<iron-component-page></iron-component-page>
</body>
</html>

View file

@ -0,0 +1,95 @@
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../iron-resizable-behavior/iron-resizable-behavior.html">
<link rel="import" href="../iron-selector/iron-selectable.html">
<!--
`iron-pages` is used to select one of its children to show. One use is to cycle through a list of
children "pages".
Example:
<iron-pages selected="0">
<div>One</div>
<div>Two</div>
<div>Three</div>
</iron-pages>
<script>
document.addEventListener('click', function(e) {
var pages = document.querySelector('iron-pages');
pages.selectNext();
});
</script>
@group Iron Elements
@class iron-pages
@hero hero.svg
@demo demo/index.html
@extends iron-selector
-->
<dom-module id="iron-pages">
<style>
:host {
display: block;
}
:host > ::content > :not(.iron-selected) {
display: none !important;
}
</style>
<template>
<content></content>
</template>
</dom-module>
<script>
Polymer({
is: 'iron-pages',
behaviors: [
Polymer.IronResizableBehavior,
Polymer.IronSelectableBehavior
],
properties: {
// as the selected page is the only one visible, activateEvent
// is both non-sensical and problematic; e.g. in cases where a user
// handler attempts to change the page and the activateEvent
// handler immediately changes it back
activateEvent: {
value: null
}
},
observers: [
'_selectedPageChanged(selected)'
],
_selectedPageChanged: function(selected, old) {
this.async(this.notifyResize);
}
});
</script>

View file

@ -0,0 +1,91 @@
<!doctype html>
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<html>
<head>
<title>iron-pages-attr-for-selected</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
<script src="../../web-component-tester/browser.js"></script>
<script src="../../test-fixture/test-fixture-mocha.js"></script>
<link rel="import" href="../iron-pages.html">
<link rel="import" href="../../test-fixture/test-fixture.html">
</head>
<body>
<test-fixture id="basic">
<template>
<iron-pages attr-for-selected="name" selected="page0">
<div name="page0">Page 0</div>
<div name="page1">Page 1</div>
<div name="page2">Page 2</div>
<div name="page3">Page 3</div>
</iron-pages>
</template>
</test-fixture>
<script>
suite('basic', function() {
var pages;
suite('honor the selected attribute', function() {
setup(function () {
pages = fixture('basic');
});
test('selected value', function() {
assert.equal(pages.selected, 'page0');
});
test('selected item', function() {
assert.equal(pages.selectedItem, pages.items[0]);
});
test('selected item is display:block and all others are display:none', function() {
pages.items.forEach(function(p) {
assert.equal(getComputedStyle(p).display, p == pages.selectedItem ? 'block' : 'none');
});
});
});
suite('set selected attribute', function() {
setup(function () {
pages = fixture('basic');
pages.selected = 'page2';
});
test('selected value', function() {
assert.equal(pages.selected, 'page2');
});
test('selected item', function() {
assert.equal(pages.selectedItem, pages.items[2]);
});
test('selected item is display:block and all others are display:none', function() {
pages.items.forEach(function(p) {
assert.equal(getComputedStyle(p).display, p == pages.selectedItem ? 'block' : 'none');
});
});
});
});
</script>
</body>
</html>

View file

@ -0,0 +1,101 @@
<!doctype html>
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<html>
<head>
<title>iron-pages-basic</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
<script src="../../web-component-tester/browser.js"></script>
<script src="../../test-fixture/test-fixture-mocha.js"></script>
<link rel="import" href="../iron-pages.html">
<link rel="import" href="../../test-fixture/test-fixture.html">
</head>
<body>
<test-fixture id="basic">
<template>
<iron-pages>
<div id="page0">Page 0</div>
<div id="page1">Page 1</div>
<div id="page2">Page 2</div>
<div id="page3">Page 3</div>
</iron-pages>
</template>
</test-fixture>
<script>
suite('basic', function() {
var pages;
suite('defaults', function() {
setup(function () {
pages = fixture('basic');
});
test('to nothing selected', function() {
assert.equal(pages.selected, undefined);
});
test('null activateEvent', function() {
// `activateEvent` is not a useful feature for iron-pages and it can interfere
// with ux; ensure iron-pages has cleared any default `activateEvent`
assert.equal(pages.activateEvent, null);
});
test('to iron-selected as selectedClass', function() {
assert.equal(pages.selectedClass, 'iron-selected');
});
test('as many items as children', function() {
assert.equal(pages.items.length, 4);
});
test('all pages are display:none', function() {
pages.items.forEach(function(p) {
assert.equal(getComputedStyle(p).display, 'none');
});
});
});
suite('set the selected attribute', function() {
setup(function () {
pages = fixture('basic');
pages.selected = 0;
});
test('selected value', function() {
assert.equal(pages.selected, '0');
});
test('selected item', function() {
assert.equal(pages.selectedItem, pages.items[0]);
});
test('selected item is display:block and all others are display:none', function() {
pages.items.forEach(function(p) {
assert.equal(getComputedStyle(p).display, p == pages.selectedItem ? 'block' : 'none');
});
});
});
});
</script>
</body>
</html>

View file

@ -0,0 +1,32 @@
<!doctype html>
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<html>
<head>
<meta charset="utf-8">
<title>Tests</title>
<script src="../../web-component-tester/browser.js"></script>
</head>
<body>
<script>
WCT.loadSuites([
'basic.html',
'attr-for-selected.html'
]);
</script>
</body>
</html>