update card layouts
This commit is contained in:
parent
614e07a81d
commit
cee7db2ce0
29 changed files with 194 additions and 71 deletions
|
@ -14,12 +14,12 @@
|
|||
},
|
||||
"devDependencies": {},
|
||||
"ignore": [],
|
||||
"version": "1.4.165",
|
||||
"_release": "1.4.165",
|
||||
"version": "1.4.166",
|
||||
"_release": "1.4.166",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "1.4.165",
|
||||
"commit": "ebe71bd8b4505ceb207efb226686eb6c3e842b4c"
|
||||
"tag": "1.4.166",
|
||||
"commit": "869fe388b2e0bd01bee868001f9e1d456a2c7ca1"
|
||||
},
|
||||
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
||||
"_target": "^1.2.1",
|
||||
|
|
|
@ -48,19 +48,19 @@
|
|||
position: relative;
|
||||
}
|
||||
|
||||
.backdropCard .cardPadder, .smallBackdropCard .cardPadder, .overflowBackdropCard .cardPadder {
|
||||
.cardPadder-backdrop, .cardPadder-smallBackdrop, .cardPadder-overflowBackdrop {
|
||||
padding-bottom: 56.25%;
|
||||
}
|
||||
|
||||
.squareCard .cardPadder, .overflowSquareCard .cardPadder {
|
||||
.cardPadder-square, .cardPadder-overflowSquare {
|
||||
padding-bottom: 100%;
|
||||
}
|
||||
|
||||
.portraitCard .cardPadder, .overflowPortraitCard .cardPadder {
|
||||
.cardPadder-portrait, .cardPadder-overflowPortrait {
|
||||
padding-bottom: 150%;
|
||||
}
|
||||
|
||||
.bannerCard .cardPadder {
|
||||
.cardPadder-banner {
|
||||
padding-bottom: 18.5%;
|
||||
}
|
||||
|
||||
|
|
|
@ -1073,7 +1073,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
|
|||
cardContentClose = '</button>';
|
||||
}
|
||||
cardImageContainerOpen = imgUrl ? ('<div class="' + cardImageContainerClass + ' lazy" data-src="' + imgUrl + '">') : ('<div class="' + cardImageContainerClass + '">');
|
||||
cardImageContainerOpen = '<div class="' + cardBoxClass + '"><div class="cardScalable"><div class="cardPadder"></div>' + cardContentOpen + cardImageContainerOpen;
|
||||
cardImageContainerOpen = '<div class="' + cardBoxClass + '"><div class="cardScalable"><div class="cardPadder-' + options.shape + '"></div>' + cardContentOpen + cardImageContainerOpen;
|
||||
cardBoxClose = '</div>';
|
||||
cardScalableClose = '</div>';
|
||||
cardImageContainerClose = '</div>';
|
||||
|
|
|
@ -9,16 +9,16 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemShortcuts'], functi
|
|||
return i.Type == 'Video';
|
||||
})[0] || {};
|
||||
|
||||
var shape = (options.backdropShape || 'backdrop') + 'Card';
|
||||
var shape = (options.backdropShape || 'backdrop');
|
||||
|
||||
if (videoStream.Width && videoStream.Height) {
|
||||
|
||||
if ((videoStream.Width / videoStream.Height) <= 1.34) {
|
||||
shape = (options.squareShape || 'square') + 'Card';
|
||||
shape = (options.squareShape || 'square');
|
||||
}
|
||||
}
|
||||
|
||||
className += ' ' + shape;
|
||||
className += ' ' + shape + 'Card';
|
||||
|
||||
if (options.block || options.rows) {
|
||||
className += ' block';
|
||||
|
@ -37,7 +37,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemShortcuts'], functi
|
|||
|
||||
var chapter = chapters[i];
|
||||
|
||||
html += buildChapterCard(item, apiClient, chapter, i, options, className);
|
||||
html += buildChapterCard(item, apiClient, chapter, i, options, className, shape);
|
||||
itemsInRow++;
|
||||
|
||||
if (options.rows && itemsInRow >= options.rows) {
|
||||
|
@ -65,7 +65,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemShortcuts'], functi
|
|||
return null;
|
||||
}
|
||||
|
||||
function buildChapterCard(item, apiClient, chapter, index, options, className) {
|
||||
function buildChapterCard(item, apiClient, chapter, index, options, className, shape) {
|
||||
|
||||
var imgUrl = getImgUrl(item, chapter, index, options.width || 400, apiClient);
|
||||
|
||||
|
@ -88,7 +88,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemShortcuts'], functi
|
|||
<button type="button" class="' + className + '"' + dataAttributes + '> \
|
||||
<div class="cardBox">\
|
||||
<div class="cardScalable">\
|
||||
<div class="cardPadder"></div>\
|
||||
<div class="cardPadder-'+ shape + '"></div>\
|
||||
<div class="cardContent">\
|
||||
' + cardImageContainer + '\
|
||||
</div>\
|
||||
|
|
|
@ -81,7 +81,7 @@ define(['imageLoader', 'itemShortcuts', 'connectionManager'], function (imageLoa
|
|||
<button type="button" data-isfolder="' + person.IsFolder + '" data-type="' + person.Type + '" data-action="link" data-id="' + person.Id + '" data-serverid="' + serverId + '" raised class="' + className + '"> \
|
||||
<div class="visualCardBox cardBox">\
|
||||
<div class="cardScalable">\
|
||||
<div class="cardPadder"></div>\
|
||||
<div class="cardPadder-portrait"></div>\
|
||||
<div class="cardContent">\
|
||||
' + cardImageContainer + '\
|
||||
</div>\
|
||||
|
|
|
@ -8,7 +8,8 @@ define(['layoutManager', 'globalize', 'css!./dialog'], function (layoutManager,
|
|||
actionSheet.show({
|
||||
|
||||
title: options.text,
|
||||
items: options.buttons
|
||||
items: options.buttons,
|
||||
timeout: options.timeout
|
||||
|
||||
}).then(resolve, reject);
|
||||
});
|
||||
|
@ -45,7 +46,7 @@ define(['layoutManager', 'globalize', 'css!./dialog'], function (layoutManager,
|
|||
|
||||
if (options.title) {
|
||||
html += '<h2>' + options.title + '</h2>';
|
||||
}
|
||||
}
|
||||
|
||||
var text = options.html || options.text;
|
||||
|
||||
|
|
|
@ -105,14 +105,14 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'embyRouter',
|
|||
}
|
||||
}
|
||||
|
||||
if (options.open !== false) {
|
||||
if (item.Type != 'Timer' && item.Type != 'Audio') {
|
||||
commands.push({
|
||||
name: globalize.translate('sharedcomponents#Open'),
|
||||
id: 'open'
|
||||
});
|
||||
}
|
||||
}
|
||||
//if (options.open !== false) {
|
||||
// if (item.Type != 'Timer' && item.Type != 'Audio') {
|
||||
// commands.push({
|
||||
// name: globalize.translate('sharedcomponents#Open'),
|
||||
// id: 'open'
|
||||
// });
|
||||
// }
|
||||
//}
|
||||
|
||||
if (canPlay) {
|
||||
if (options.play !== false) {
|
||||
|
|
|
@ -188,7 +188,7 @@
|
|||
html += '<button type="button" class="' + cssClass + '" data-index="' + index + '">';
|
||||
html += '<div class="cardBox visualCardBox">';
|
||||
html += '<div class="cardScalable">';
|
||||
html += '<div class="cardPadder"></div>';
|
||||
html += '<div class="cardPadder-portrait"></div>';
|
||||
|
||||
html += '<div class="cardContent searchImage">';
|
||||
|
||||
|
|
|
@ -40,14 +40,11 @@ define(['serverNotifications', 'playbackManager', 'events', 'globalize', 'requir
|
|||
|
||||
resetRegistration();
|
||||
|
||||
function show(title, options, timeoutMs) {
|
||||
function showPersistentNotification(title, options, timeoutMs) {
|
||||
serviceWorkerRegistration.showNotification(title, options);
|
||||
}
|
||||
|
||||
resetRegistration();
|
||||
|
||||
if (serviceWorkerRegistration && !timeoutMs) {
|
||||
serviceWorkerRegistration.showNotification(title, options);
|
||||
return;
|
||||
}
|
||||
function showNonPersistentNotification(title, options, timeoutMs) {
|
||||
|
||||
try {
|
||||
var notif = new Notification(title, options);
|
||||
|
@ -69,6 +66,18 @@ define(['serverNotifications', 'playbackManager', 'events', 'globalize', 'requir
|
|||
}
|
||||
}
|
||||
|
||||
function show(title, options, timeoutMs) {
|
||||
|
||||
resetRegistration();
|
||||
|
||||
if (serviceWorkerRegistration) {
|
||||
showPersistentNotification(title, options, timeoutMs);
|
||||
return;
|
||||
}
|
||||
|
||||
showNonPersistentNotification(title, options, timeoutMs);
|
||||
}
|
||||
|
||||
function showNewItemNotification(item, apiClient) {
|
||||
|
||||
var notification = {
|
||||
|
@ -162,10 +171,10 @@ define(['serverNotifications', 'playbackManager', 'events', 'globalize', 'requir
|
|||
else if (status == 'progress') {
|
||||
notification.title = globalize.translate('sharedcomponents#InstallingPackage').replace('{0}', installation.Name + ' ' + installation.Version);
|
||||
|
||||
//notification.actions =
|
||||
//[
|
||||
// { action: 'cancel', title: globalize.translate('sharedcomponents#ButtonCancel')/*, icon: 'https://example/like.png'*/ }
|
||||
//];
|
||||
notification.actions =
|
||||
[
|
||||
{ action: 'cancel-install-' + installation.Id, title: globalize.translate('sharedcomponents#ButtonCancel')/*, icon: 'https://example/like.png'*/ }
|
||||
];
|
||||
}
|
||||
|
||||
if (status == 'progress') {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "iron-demo-helpers",
|
||||
"version": "1.2.4",
|
||||
"version": "1.2.5",
|
||||
"description": "Utility classes to make building demo pages easier",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
|
@ -28,7 +28,7 @@
|
|||
"paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0",
|
||||
"paper-styles": "PolymerElements/paper-styles#^1.0.0",
|
||||
"marked-element": "polymerelements/marked-element#^1.0.0",
|
||||
"prism-element": "PolymerElements/prism-element#^1.0.0",
|
||||
"prism-element": "PolymerElements/prism-element#^1.1.0",
|
||||
"iron-location": "PolymerElements/iron-location#^0.8.0",
|
||||
"iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0"
|
||||
},
|
||||
|
@ -41,11 +41,11 @@
|
|||
"paper-styles": "PolymerElements/paper-styles#^1.1.0",
|
||||
"paper-checkbox": "PolymerElements/paper-checkbox#^1.0.0"
|
||||
},
|
||||
"_release": "1.2.4",
|
||||
"_release": "1.2.5",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.2.4",
|
||||
"commit": "98e06f4c526146e9e7231138d91f8c65ffb25cd6"
|
||||
"tag": "v1.2.5",
|
||||
"commit": "a376e52de29be389fa22e175b64c9813163023fb"
|
||||
},
|
||||
"_source": "git://github.com/polymerelements/iron-demo-helpers.git",
|
||||
"_target": "^1.0.0",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "iron-demo-helpers",
|
||||
"version": "1.2.4",
|
||||
"version": "1.2.5",
|
||||
"description": "Utility classes to make building demo pages easier",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
|
@ -28,7 +28,7 @@
|
|||
"paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0",
|
||||
"paper-styles": "PolymerElements/paper-styles#^1.0.0",
|
||||
"marked-element": "polymerelements/marked-element#^1.0.0",
|
||||
"prism-element": "PolymerElements/prism-element#^1.0.0",
|
||||
"prism-element": "PolymerElements/prism-element#^1.1.0",
|
||||
"iron-location": "PolymerElements/iron-location#^0.8.0",
|
||||
"iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0"
|
||||
},
|
||||
|
|
|
@ -15,6 +15,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
<link rel="import" href="../paper-styles/color.html">
|
||||
<link rel="import" href="../paper-styles/shadow.html">
|
||||
<link rel="import" href="../prism-element/prism-highlighter.html">
|
||||
<link rel="import" href="../prism-element/prism-theme-default.html">
|
||||
|
||||
<!--
|
||||
`demo-snippet` is a helper element that displays the source of a code snippet and
|
||||
|
@ -54,6 +55,7 @@ Custom property | Description | Default
|
|||
|
||||
<dom-module id="demo-snippet">
|
||||
<template>
|
||||
<style is="custom-style" include="prism-theme-default"></style>
|
||||
<style>
|
||||
:host {
|
||||
display: block;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "iron-icon",
|
||||
"private": true,
|
||||
"version": "1.0.9",
|
||||
"version": "1.0.10",
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"description": "An element that supports displaying an icon",
|
||||
"main": "iron-icon.html",
|
||||
|
@ -32,14 +32,14 @@
|
|||
"web-component-tester": "^4.0.0",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"homepage": "https://github.com/polymerelements/iron-icon",
|
||||
"_release": "1.0.9",
|
||||
"homepage": "https://github.com/PolymerElements/iron-icon",
|
||||
"_release": "1.0.10",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.9",
|
||||
"commit": "f6fb241901377e30e2c9c6cd47e3e8e8beb6574d"
|
||||
"tag": "v1.0.10",
|
||||
"commit": "f4e146da4982ff96bb25db85290c09e8de4ec734"
|
||||
},
|
||||
"_source": "git://github.com/polymerelements/iron-icon.git",
|
||||
"_source": "git://github.com/PolymerElements/iron-icon.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "polymerelements/iron-icon"
|
||||
"_originalSource": "PolymerElements/iron-icon"
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "iron-icon",
|
||||
"private": true,
|
||||
"version": "1.0.9",
|
||||
"version": "1.0.10",
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"description": "An element that supports displaying an icon",
|
||||
"main": "iron-icon.html",
|
||||
|
|
|
@ -69,6 +69,7 @@ The following custom properties are available for styling:
|
|||
|
||||
Custom property | Description | Default
|
||||
----------------|-------------|----------
|
||||
`--iron-icon` | Mixin applied to the icon | {}
|
||||
`--iron-icon-width` | Width of the icon | `24px`
|
||||
`--iron-icon-height` | Height of the icon | `24px`
|
||||
`--iron-icon-fill-color` | Fill color of the svg icon | `currentcolor`
|
||||
|
@ -96,6 +97,7 @@ Custom property | Description | Default
|
|||
|
||||
width: var(--iron-icon-width, 24px);
|
||||
height: var(--iron-icon-height, 24px);
|
||||
@apply(--iron-icon);
|
||||
}
|
||||
</style>
|
||||
</template>
|
||||
|
|
|
@ -32,14 +32,14 @@
|
|||
"iron-component-page": "polymerElements/iron-component-page#^1.1.6"
|
||||
},
|
||||
"private": true,
|
||||
"homepage": "https://github.com/polymer/polymer",
|
||||
"homepage": "https://github.com/Polymer/polymer",
|
||||
"_release": "1.6.1",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.6.1",
|
||||
"commit": "1f197d9d7874b1e5808b2a5c26f34446a7d912fc"
|
||||
},
|
||||
"_source": "git://github.com/polymer/polymer.git",
|
||||
"_source": "git://github.com/Polymer/polymer.git",
|
||||
"_target": "^1.1.0",
|
||||
"_originalSource": "polymer/polymer"
|
||||
"_originalSource": "Polymer/polymer"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue