diff options
-rw-r--r-- | web/index.js | 14 | ||||
-rw-r--r-- | web/style.css | 17 |
2 files changed, 22 insertions, 9 deletions
diff --git a/web/index.js b/web/index.js index d7c7d69..e7c619d 100644 --- a/web/index.js +++ b/web/index.js @@ -1,11 +1,9 @@ // python3 -m http.server const data_dir = 'data'; -//const index_file = "pmsl_t850.index.json"; const index_file = "index.json"; var index = null; -var product_index = null; var mapframe = null; function httpGetAsync(url, callback) @@ -26,13 +24,13 @@ function loadIndexFromJson(raw_text) { } function build_indexlist(index_obj) { - //if (index_obj==null) { - // return; - //} - div = document.createElement('div'); div.classList.add('index'); + title = document.createElement('h4'); + title.innerText = 'INIT+'; + div.appendChild(title); + list = document.createElement('ul'); for (const i in index_obj) { @@ -101,6 +99,10 @@ function build_product_index(raw_text) { div = document.createElement('div'); div.classList.add('product_index'); + title = document.createElement('h4'); + title.innerText = 'Products'; + div.appendChild(title); + list = document.createElement('ul'); for (const i in product_index) { diff --git a/web/style.css b/web/style.css index f478501..41d8166 100644 --- a/web/style.css +++ b/web/style.css @@ -1,13 +1,24 @@ :root { --dummy: white; - --indexwidth: 50px; + --indexwidth: 100px; + --productindex-width: 150px; +} + +body { + font-family: mono; +} + +div.product_index { + width: var(--productindex-width); + float: left; } div.index { width: var(--indexwidth); - position: fixed; + float: left; + margin-top: var(--header-heigth); } div.mapframe { - margin-left: var(--indexwidth); + float: left; } |