mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
add iron card list
This commit is contained in:
parent
c38ac1b5ce
commit
d512595066
3 changed files with 142 additions and 1 deletions
32
dashboard-ui/components/ironcardlist.js
Normal file
32
dashboard-ui/components/ironcardlist.js
Normal file
|
@ -0,0 +1,32 @@
|
|||
define(['iron-list', 'lazyload-image'], function () {
|
||||
|
||||
function getTemplate(scrollTarget) {
|
||||
|
||||
var html = '';
|
||||
|
||||
html += '<template is="dom-bind">\
|
||||
<iron-list as="item" id="ironList" scroll-target="' + scrollTarget + '" max-physical-count="60" style="width:96%;" grid>\
|
||||
<template>\
|
||||
<div class$="{{item.elemClass}}" data-action$="{{item.defaultAction}}">\
|
||||
<div class$="{{item.cardBoxClass}}">\
|
||||
<div class="cardScalable">\
|
||||
<div class="cardPadder"></div>\
|
||||
<a onclick$="{{item.onclick}}" class$="{{item.anchorClass}}" href$="{{item.href}}">\
|
||||
<img class$="{{item.imageClass}}" is="lazyload-image" src$="{{item.imgUrl}}" />\
|
||||
</a>\
|
||||
</div>\
|
||||
<!--cardFooter will be here-->\
|
||||
</div>\
|
||||
</div>\
|
||||
</template>\
|
||||
</iron-list>\
|
||||
</template>';
|
||||
|
||||
return Promise.resolve(html);
|
||||
}
|
||||
|
||||
return {
|
||||
getTemplate: getTemplate
|
||||
};
|
||||
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue