You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
978 B
JavaScript
38 lines
978 B
JavaScript
/////////////////////////////////////////////////////
|
|
|
|
// TODO
|
|
// glyphs
|
|
// what buttons where
|
|
// colophone
|
|
// a bit more interface
|
|
|
|
// DONE
|
|
// Open window icon (on background 'desktop')
|
|
// Close window button (on 'window' itself)
|
|
// random position
|
|
|
|
//////////////////////////////////////////////////////
|
|
|
|
let zIndex = 3;
|
|
|
|
$(document).ready(function(){
|
|
|
|
// Generate divs
|
|
Object.values(corpi).forEach(corpus => {
|
|
|
|
$('#dragZone' ).append(`
|
|
<div class="ui-widget-content draggable resizable" id="${corpus['id']}">
|
|
<h1>${corpus['title']}</h1>
|
|
<p>${corpus['content']}</p>
|
|
<button class="closable">X</button>
|
|
</div>
|
|
`)
|
|
$('#icons').append(`<button onclick="$(${corpus['id']}).fadeIn().css('z-index', zIndex++)" class="icon">${corpus["glyph"]}</button>`)
|
|
});
|
|
|
|
// Start mouse UI
|
|
const dragResize = new DragResizeClose(zIndex);
|
|
});
|
|
|
|
|