/** * @description This module is used to generate HTML-Code. */ build = {} build.iconic = function(icon, classes = '') { let html = '' html += lychee.html`` return html } build.divider = function(title) { let html = '' html += lychee.html`

$${ title }

` return html } build.editIcon = function(id) { let html = '' html += lychee.html`
${ build.iconic('pencil') }
` return html } build.multiselect = function(top, left) { return lychee.html`
` } build.album = function(data) { let html = '' let { path: retinaThumbUrl, isPhoto } = lychee.retinize(data.thumbs[0]) html += lychee.html`
Photo thumbnail Photo thumbnail Photo thumbnail

$${ data.title }

$${ data.sysdate }
` if (lychee.publicMode===false) { html += lychee.html`
${ build.iconic('star') } ${ build.iconic('eye') } ${ build.iconic('list') } ${ build.iconic('clock') } ${ build.iconic('lock-locked') }
` } html += '
' return html } build.photo = function(data) { let html = '' let { path: retinaThumbUrl } = lychee.retinize(data.thumbUrl) html += lychee.html`
Photo thumbnail

$${ data.title }

` if (data.cameraDate==='1') html += lychee.html`${ build.iconic('camera-slr') }$${ data.sysdate }` else html += lychee.html`$${ data.sysdate }` html += `
` if (lychee.publicMode===false) { html += lychee.html`
${ build.iconic('star') } ${ build.iconic('eye') }
` } html += `
` return html } build.imageview = function(data, visibleControls) { let html = '' let hasMedium = data.medium!=='' if (hasMedium===false) { html += lychee.html`` } else { html += lychee.html`` } html += `
` return html } build.no_content = function(typ) { let html = '' html += `
${ build.iconic(typ) } ` switch (typ) { case 'magnifying-glass': html += `

No results

` break case 'eye': html += `

No public albums

` break case 'cog': html += `

No configuration

` break case 'question-mark': html += `

Photo not found

` break } html += `
` return html } build.uploadModal = function(title, files) { let html = '' html += lychee.html`

$${ title }

` let i = 0 while (i40) file.name = file.name.substr(0, 17) + '...' + file.name.substr(file.name.length - 20, 20) html += lychee.html` ` i++ } html += `
` return html } build.tags = function(tags) { let html = '' if (tags!=='') { tags = tags.split(',') tags.forEach(function(tag, index, array) { html += lychee.html`$${ tag }${ build.iconic('x') }` }) } else { html = `
No Tags
` } return html }