html5-infobeamer-dhcp/assets/js/custom/dom/music.js

39 lines
773 B
JavaScript
Raw Normal View History

2024-01-08 21:32:04 +01:00
'use strict';
import * as sol from "../../solight/sol.js";
import * as serv from "../services/service.js";
const html = htm.bind(preact.h);
const music_credits = (config) => {
let inner;
if (sol.defined(config.music)) {
inner = html`
<div class="music-info">
Musik:
<span class="music-track">${config.music.title}</span>
von
<span class="music-artist">${config.music.artist}</span>
Lizenz:
<span class="music-licence">
${config.music.licence}
</span>
Link:
<span class="music-link">
${config.music.url}
</span>
</div>`;
} else {
inner = html``;
}
return inner;
};
export {
music_credits
}