From 790800225cdb29bb711533286bde7c60e4700728 Mon Sep 17 00:00:00 2001 From: amy Date: Thu, 16 Feb 2023 14:04:44 -0600 Subject: a certified mess --- html/display.html | 99 +++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 64 insertions(+), 35 deletions(-) (limited to 'html') diff --git a/html/display.html b/html/display.html index da955dd..b9cf718 100644 --- a/html/display.html +++ b/html/display.html @@ -90,6 +90,18 @@ cursor: ns-resize; } + table { + display: table; + } + + table tr { + display: table-cell; + } + + table tr td { + display: block; + } + .resize-e { position: absolute; right: -3px; @@ -300,7 +312,17 @@ position: absolute; padding-top: 3px; background-color: #c7c7c7; + overflow: hidden; + } + .fd-bottom { + width: 100%; + height: 26px; + background-color: #b1b1b1; + position: absolute; + bottom: 0; + overflow: hidden; + white-space: nowrap; } textarea { @@ -333,7 +355,8 @@ input:hover { cursor: text; } - button{ + + button { border-radius: 0px; background-color: #c1c1c1; } @@ -435,7 +458,7 @@ let temp = [] bar.innerHTML = "" for (let i = 0; i != windows.length; i++) { - bar.innerHTML += "
" + windows.item(i).getAttribute("window-name") + "
" + bar.innerHTML += "
" + windows.item(i).getAttribute("window-name") + "
" temp.push({ left: last_left, id: windows.item(i).id, width: bar.children.item(bar.children.length - 1).clientWidth + 5 }) last_left += bar.children.item(bar.children.length - 1).clientWidth + 5 @@ -446,8 +469,9 @@ for (let i = 0; i != bar.children.length; i++) { let elemy = bar.children.item(i) for (let ii = 0; ii != windows.length; ii++) { - if (windows.item(ii).id == elemy.id) { + if (windows.item(ii).id + "-bar" == elemy.id) { //let px = 0, py = 0; + elemy.onmousedown = ((ev) => { for (let iii = 0; iii != windows.length; iii++) { windows.item(iii).style.zIndex = 0; @@ -501,44 +525,48 @@ let minx = 150; let miny = 150; function window_create(uid, name, content, options = {}) { - let lines = content.split("
").length - let a = '' - let size = (options.width != undefined && options.height != undefined) ? ("width:" + options.width + "px;height:" + options.height + "px;") : ("width:" + Math.max(document.body.clientWidth * .56, minx) + "px;height:" + Math.max(miny, document.body.clientHeight * .30) + "px;"); - let pos = (options.left != undefined && options.top != undefined) ? ("left:" + options.left + "px;top:" + options.top + "px;") : ("left:0px;top:0px;"); - a += "
" - //console.log(document.getElementById(uid).attributes["window-name"].value) - a += "
" + name + "
" - a += "
" + ` + let promise = new Promise((res, rej) => { + let lines = content.split("
").length + let a = '' + let size = (options.width != undefined && options.height != undefined) ? ("width:" + options.width + "px;height:" + options.height + "px;") : ("width:" + Math.max(document.body.clientWidth * .36, minx) + "px;height:" + Math.max(miny, document.body.clientHeight * .30) + "px;"); + let pos = (options.left != undefined && options.top != undefined) ? ("left:" + options.left + "px;top:" + options.top + "px;") : ("left:0px;top:0px;"); + a += "
" + //console.log(document.getElementById(uid).attributes["window-name"].value) + a += "
" + name + "
" + a += "
" + `
` - if (options.resize != false && options.resize != "false") { - a += "
" - a += "
" - a += "
" - a += "
" - } - a += "
" - a += "
" + if (options.resize != false && options.resize != "false") { + a += "
" + a += "
" + a += "
" + a += "
" + } + a += "
" + a += "
" - a += "
" + content + "
" - if (options.scroll != false && options.scroll != "false") { - a += "
" + a += "
" + content + "
" + if (options.scroll != false && options.scroll != "false") { + a += "
" + a += "
" + } a += "
" - } - a += "
" - if (options.resize != false && options.resize != "false") { - a += "
" - a += "
" - a += "
" - a += "
" - } - document.getElementById("root").innerHTML += a - //console.log(document.getElementById(uid + "-content-root").clientHeight / (document.getElementById(uid + "-content-content").clientHeight / document.getElementById(uid + "-content-root").clientHeight)) + if (options.resize != false && options.resize != "false") { + a += "
" + a += "
" + a += "
" + a += "
" + } + document.getElementById("root").innerHTML += a + //console.log(document.getElementById(uid + "-content-root").clientHeight / (document.getElementById(uid + "-content-content").clientHeight / document.getElementById(uid + "-content-root").clientHeight)) - //console.log(document.getElementById(uid + "-content-scrollbar-point")) - refresh_windows() + //console.log(document.getElementById(uid + "-content-scrollbar-point")) + refresh_windows() + res() + }) + return promise } function refresh_windows() { load_bar() @@ -873,7 +901,8 @@ async function main() { fs = await req('src/fs.json') - util.alert("test") + fd = await util.fd({ path: '/', filetype: '*' }) + console.log(fd) document.getElementById("bar-menu").onclick = ((ev) => { if (document.getElementById("bar-menu-root").style.display == "block") document.getElementById("bar-menu-root").style.display = "none" -- cgit v1.2.3