From 3e1238cd49508bfb829f72ef82908d8aebe75e0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Z=C3=A1le=C5=A1=C3=A1k?= Date: Sat, 19 Dec 2020 21:36:23 +0100 Subject: [PATCH] =?UTF-8?q?z=C3=A1kladn=C3=AD=20nastylov=C3=A1n=C3=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/style.css | 70 ++++++++++++++++++++++++++++ img/arrow-down.svg | 114 +++++++++++++++++++++++++++++++++++++++++++++ index.php | 28 +++++++++-- js/main.js | 22 --------- js/view.js | 46 ------------------ 5 files changed, 209 insertions(+), 71 deletions(-) create mode 100644 img/arrow-down.svg diff --git a/css/style.css b/css/style.css index e69de29..c7cc15a 100644 --- a/css/style.css +++ b/css/style.css @@ -0,0 +1,70 @@ +body, html { + margin: 0; + padding: 0; + height: 100%; +} + +nav { + border-bottom: 2px solid #ccc; + margin: 0; + grid-area: nav; +} + +ul { + margin: 0; + padding-left: 10pt; + list-style: none; +} + +ul:nth-child(1) { + padding: 1em 1em; +} + +li::before { + content: ''; + margin-right: 5pt; + width: 1em; + height: 1em; + display: inline-block; +} +li[style]::before { + content: ''; + display: inline-block; + background-image: url('../img/arrow-down.svg'); + background-size: cover; + background-repeat: no-repeat; + background-position: center; + width: 0.7em; + height: 0.7em; + margin-right: 3pt; +} + +.container { + display: grid; + grid-template-columns: max-content auto; + grid-template-rows: 3em auto auto; + height: 100%; + grid-template-areas: + "nav nav" + "aside section" + "footer footer"; +} +section { + grid-area: section; +} + +aside { + margin: 0; + height: 100%; + grid-area: aside; + overflow-y: scroll; + margin-right: 2px solid #ccc; +} + +footer { + border-top: 2px solid #ccc; + grid-area: footer; + text-align: right; + padding: 0.3em 2em; + +} \ No newline at end of file diff --git a/img/arrow-down.svg b/img/arrow-down.svg new file mode 100644 index 0000000..f2feed0 --- /dev/null +++ b/img/arrow-down.svg @@ -0,0 +1,114 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/index.php b/index.php index a6d0267..6180e07 100644 --- a/index.php +++ b/index.php @@ -4,20 +4,42 @@ - Správa obsahu webu + CoMato - + +
+ + + + +
+ lolo +
+ +
+ CoMato © 2020 David Zálešák
Seminární práce do předmětu tvorba www aplikací +
+
+ + + + + + \ No newline at end of file diff --git a/js/main.js b/js/main.js index f8619c6..e42cecc 100644 --- a/js/main.js +++ b/js/main.js @@ -1,25 +1,3 @@ import http from "https://unpkg.com/isomorphic-git@beta/http/web/index.js"; -/* -async function fsListDir(){ - - let dirlist = await pfs.readdir("/test-clone"); - - document.getElementsByTagName("body")[0].innerHTML = dirlist; -} - -async function gitStatus(){ - document.getElementsByTagName("body")[0].innerHTML = await git.status({ - fs, - dir, - filepath: "karma.conf.js", - }); -} - -fsListDir() - -gitStatus(); - -*/ - const app = new Controller(new Model(), new View()); diff --git a/js/view.js b/js/view.js index f268310..991f57e 100644 --- a/js/view.js +++ b/js/view.js @@ -1,14 +1,9 @@ class View { constructor() { - document.body.style.backgroundColor = "olive"; } hloubka = 1; - showfiles(dir) { - console.log(dir) - } - showDirTree(dirtree) { var dirtreeul = document.getElementsByTagName("ul"); var tag = document.createElement("li"); @@ -34,46 +29,5 @@ class View { } this.hloubka++; } - - /*if(dirtree.length > 1) { - var tag = document.createElement("li"); - var text = document.createTextNode(dirtree[0]); - tag.appendChild(text); - tag.style.fontWeight = "bold" - mainul.appendChild(tag); - var newul = document.createElement("ul"); - tag.parentElement.append(newul); - for (let i = 1; i < dirtree.length; i++) { - var tag = document.createElement("li"); - var text = document.createTextNode(dirtree[i]); - tag.appendChild(text); - newul.appendChild(tag); - } - }else{ - var tag = document.createElement("li"); - var text = document.createTextNode(dirtree[0]); - tag.appendChild(text); - mainul.appendChild(tag); - }*/ - - /*for (let i = 1; i < dirtree.length; i++) { - var tag = document.createElement("li"); - var text = document.createTextNode(dirtree[i][0]); - tag.appendChild(text); - mainul.appendChild(tag); - if(dirtree[i].length > 1) { - //this.showDir(dirtree[i]) - var newul = document.createElement("ul") - tag.parentElement.append(newul) - for (let i = 1; i < dirtree.length; i++) { - var tag = document.createElement("li"); - var text = document.createTextNode(dirtree[i]); - tag.appendChild(text); - newul.appendChild(tag); - } - } - - - }*/ } }