Project list responsive

This commit is contained in:
Alexandre Bourlier
2018-04-26 02:36:18 +02:00
parent 912a134036
commit 96e227c0f3
3 changed files with 33 additions and 2 deletions

View File

@ -1,8 +1,25 @@
<script>
class LDPDisplayClient extends LDPWidget {
get template() {
return `<img name="${this.name}" src="${this.value.logo}"/>`;
}
render() {
store.get(this.value).then( (value) => {
this._value = value;
this.innerHTML = this.template;
});
}
}
customElements.define("ldp-display-client", LDPDisplayClient);
</script>
<div id="projects" style="display: none">
<ldp-display
id="projects-list"
data-src="http://localhost:8000/projects/"
data-fields="number, name"
data-fields="number, client, name"
widget-client="ldp-display-client"
search-fields="number, name"
next="project"
></ldp-display>