diff --git a/README.md b/README.md index 61541ba..b275455 100644 --- a/README.md +++ b/README.md @@ -20,9 +20,4 @@ n/a # Images -![1 Home](Images/pic1.png) -![2 Images Listed](Images/pic2.png) -![3 Videos Listed](Images/pic3.png) -![4 Image Open](Images/pic4.png) -![5 Image Open And Video Playing](Images/pic5.png) -![6 Alternate Background](Images/pic6.png) +![1 Files List](images/pic1.png) diff --git a/images/pic1.png b/images/pic1.png index a68b75f..26cd8ec 100644 Binary files a/images/pic1.png and b/images/pic1.png differ diff --git a/src/core/static/css/overrides.css b/src/core/static/css/overrides.css index f26f77e..1fcc91e 100644 --- a/src/core/static/css/overrides.css +++ b/src/core/static/css/overrides.css @@ -1,16 +1,16 @@ @font-face { font-family: Dosis; - src: url("/static/css/fonts/dosis/Dosis-Regular.ttf"), - url("/static/css/fonts/dosis/Dosis-Medium.ttf"), - url("/static/css/fonts/dosis/Dosis-Light.ttf"), - url("/static/css/fonts/dosis/Dosis-ExtraLight.ttf"), - url("/static/css/fonts/dosis/Dosis-Bold.ttf"), - url("/static/css/fonts/dosis/Dosis-ExtraBold.ttf"), - url("/static/css/fonts/dosis/Dosis-SemiBold.ttf"), - url("/static/css/fonts/Dosis-VariableFont_wght.ttf"), - url("/static/css/fonts/fa-brands-400.ttf"), - url("/static/css/fonts/fa-regular-400.ttf"), - url("/static/css/fonts/fa-solid-900.ttf"); + src: url("/static/fonts/dosis/Dosis-Regular.ttf"), + url("/static/fonts/dosis/Dosis-Medium.ttf"), + url("/static/fonts/dosis/Dosis-Light.ttf"), + url("/static/fonts/dosis/Dosis-ExtraLight.ttf"), + url("/static/fonts/dosis/Dosis-Bold.ttf"), + url("/static/fonts/dosis/Dosis-ExtraBold.ttf"), + url("/static/fonts/dosis/Dosis-SemiBold.ttf"), + url("/static/fonts/Dosis-VariableFont_wght.ttf"), + url("/static/fonts/fa-brands-400.ttf"), + url("/static/fonts/fa-regular-400.ttf"), + url("/static/fonts/fa-solid-900.ttf"); font-style: normal; font-display: auto; } diff --git a/src/core/static/css/fonts/Dosis-VariableFont_wght.ttf b/src/core/static/fonts/Dosis-VariableFont_wght.ttf similarity index 100% rename from src/core/static/css/fonts/Dosis-VariableFont_wght.ttf rename to src/core/static/fonts/Dosis-VariableFont_wght.ttf diff --git a/src/core/static/css/fonts/dosis/Dosis-Bold.ttf b/src/core/static/fonts/dosis/Dosis-Bold.ttf similarity index 100% rename from src/core/static/css/fonts/dosis/Dosis-Bold.ttf rename to src/core/static/fonts/dosis/Dosis-Bold.ttf diff --git a/src/core/static/css/fonts/dosis/Dosis-ExtraBold.ttf b/src/core/static/fonts/dosis/Dosis-ExtraBold.ttf similarity index 100% rename from src/core/static/css/fonts/dosis/Dosis-ExtraBold.ttf rename to src/core/static/fonts/dosis/Dosis-ExtraBold.ttf diff --git a/src/core/static/css/fonts/dosis/Dosis-ExtraLight.ttf b/src/core/static/fonts/dosis/Dosis-ExtraLight.ttf similarity index 100% rename from src/core/static/css/fonts/dosis/Dosis-ExtraLight.ttf rename to src/core/static/fonts/dosis/Dosis-ExtraLight.ttf diff --git a/src/core/static/css/fonts/dosis/Dosis-Light.ttf b/src/core/static/fonts/dosis/Dosis-Light.ttf similarity index 100% rename from src/core/static/css/fonts/dosis/Dosis-Light.ttf rename to src/core/static/fonts/dosis/Dosis-Light.ttf diff --git a/src/core/static/css/fonts/dosis/Dosis-Medium.ttf b/src/core/static/fonts/dosis/Dosis-Medium.ttf similarity index 100% rename from src/core/static/css/fonts/dosis/Dosis-Medium.ttf rename to src/core/static/fonts/dosis/Dosis-Medium.ttf diff --git a/src/core/static/css/fonts/dosis/Dosis-Regular.ttf b/src/core/static/fonts/dosis/Dosis-Regular.ttf similarity index 100% rename from src/core/static/css/fonts/dosis/Dosis-Regular.ttf rename to src/core/static/fonts/dosis/Dosis-Regular.ttf diff --git a/src/core/static/css/fonts/dosis/Dosis-SemiBold.ttf b/src/core/static/fonts/dosis/Dosis-SemiBold.ttf similarity index 100% rename from src/core/static/css/fonts/dosis/Dosis-SemiBold.ttf rename to src/core/static/fonts/dosis/Dosis-SemiBold.ttf diff --git a/src/core/static/css/fonts/fa-brands-400.ttf b/src/core/static/fonts/fa-brands-400.ttf similarity index 100% rename from src/core/static/css/fonts/fa-brands-400.ttf rename to src/core/static/fonts/fa-brands-400.ttf diff --git a/src/core/static/css/fonts/fa-brands-400.woff b/src/core/static/fonts/fa-brands-400.woff similarity index 100% rename from src/core/static/css/fonts/fa-brands-400.woff rename to src/core/static/fonts/fa-brands-400.woff diff --git a/src/core/static/css/fonts/fa-brands-400.woff2 b/src/core/static/fonts/fa-brands-400.woff2 similarity index 100% rename from src/core/static/css/fonts/fa-brands-400.woff2 rename to src/core/static/fonts/fa-brands-400.woff2 diff --git a/src/core/static/css/fonts/fa-regular-400.ttf b/src/core/static/fonts/fa-regular-400.ttf similarity index 100% rename from src/core/static/css/fonts/fa-regular-400.ttf rename to src/core/static/fonts/fa-regular-400.ttf diff --git a/src/core/static/css/fonts/fa-regular-400.woff b/src/core/static/fonts/fa-regular-400.woff similarity index 100% rename from src/core/static/css/fonts/fa-regular-400.woff rename to src/core/static/fonts/fa-regular-400.woff diff --git a/src/core/static/css/fonts/fa-regular-400.woff2 b/src/core/static/fonts/fa-regular-400.woff2 similarity index 100% rename from src/core/static/css/fonts/fa-regular-400.woff2 rename to src/core/static/fonts/fa-regular-400.woff2 diff --git a/src/core/static/css/fonts/fa-solid-900.ttf b/src/core/static/fonts/fa-solid-900.ttf similarity index 100% rename from src/core/static/css/fonts/fa-solid-900.ttf rename to src/core/static/fonts/fa-solid-900.ttf diff --git a/src/core/static/css/fonts/fa-solid-900.woff b/src/core/static/fonts/fa-solid-900.woff similarity index 100% rename from src/core/static/css/fonts/fa-solid-900.woff rename to src/core/static/fonts/fa-solid-900.woff diff --git a/src/core/static/css/fonts/fa-solid-900.woff2 b/src/core/static/fonts/fa-solid-900.woff2 similarity index 100% rename from src/core/static/css/fonts/fa-solid-900.woff2 rename to src/core/static/fonts/fa-solid-900.woff2 diff --git a/src/core/static/js/ajax.js b/src/core/static/js/ajax.js index 9b3ae14..d636992 100644 --- a/src/core/static/js/ajax.js +++ b/src/core/static/js/ajax.js @@ -39,12 +39,6 @@ const doAjax = (actionPath, data, action) => { xhttp.open("POST", actionPath, true); xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); - if (action === "list-files") { - xhttp.setRequestHeader("Cache-Control", "no-cache, no-store"); - xhttp.setRequestHeader("Pragma", "no-cache"); - xhttp.setRequestHeader("Expires", "0"); - } - // Force return to be JSON NOTE: Use application/xml to force XML xhttp.overrideMimeType('application/json'); xhttp.send(data); diff --git a/src/core/static/js/post-ajax.js b/src/core/static/js/post-ajax.js index a3c1cef..23d9e85 100644 --- a/src/core/static/js/post-ajax.js +++ b/src/core/static/js/post-ajax.js @@ -21,10 +21,8 @@ const postAjaxController = (data, action) => { const updateHTMLDirList = async (data) => { let images = data.list.images[0]; let isInFaves = data.in_fave; - console.log(isInFaves); let background_image = (images[0]) ? images[0][0] : ""; - document.getElementById("path").innerText = data.path_head; // Setup background if there is a 000.* in selection if (background_image.match(/000\.(jpg|png|gif)\b/) != null) { @@ -36,7 +34,7 @@ const updateHTMLDirList = async (data) => { updateBackground(background_image); } - // See if in faves + // Set faves state let tggl_faves_btn = document.getElementById("tggl-faves-btn"); if (isInFaves == "true") tggl_faves_btn.classList.add("btn-info"); diff --git a/src/core/static/js/ui-logic.js b/src/core/static/js/ui-logic.js index 83159cf..deaf73d 100644 --- a/src/core/static/js/ui-logic.js +++ b/src/core/static/js/ui-logic.js @@ -5,14 +5,14 @@ const reloadDirectory = () => { } const goUpADirectory = () => { - let target = document.getElementById('back-btn') + const target = document.getElementById('back-btn') const hash = target.getAttribute("hash"); listFilesAjax(hash); } const scrollFilesToTop = () => { - let target = document.getElementById('files'); - target.scrollTop = 0; + const target = document.getElementById('files'); + target..scrollIntoView(); } @@ -112,16 +112,16 @@ const setupFile = async (hash, extension) => { const openWithLocalProgram = async (hash, extension = "") => { const url = "api/file-manager-action/run-locally/" + hash; - let data = await fetchData(url); + const data = await fetchData(url); let message = data.message; displayMessage(message.text, message.type); } const searchPage = () => { - let query = document.getElementById('search-files-field').value.toLowerCase(); - let list = document.getElementById("files").querySelectorAll("li[title]"); - let size = list.length; + const query = document.getElementById('search-files-field').value.toLowerCase(); + const list = document.getElementById("files").querySelectorAll("li[title]"); + const size = list.length; for (var i = 0; i < size; i++) { if (!list[i].title.toLowerCase().includes(query)) { @@ -133,8 +133,8 @@ const searchPage = () => { } const clearSearch = () => { - let list = document.getElementById("files").querySelectorAll("li[title]"); - let size = list.length; + const list = document.getElementById("files").querySelectorAll("li[title]"); + const size = list.length; document.getElementById('search-files-field').value = ""; for (var i = 0; i < size; i++) { @@ -142,20 +142,6 @@ const clearSearch = () => { } } -const enableEdit = (elm) => { - console.log(elm); - elm.style.backgroundColor = "#ffffffff"; - elm.style.color = '#000000ff'; - elm.readOnly = ''; - formerFileName = elm.value; -} - -const disableEdit = (elm) => { - elm.style.backgroundColor = ""; - elm.style.color = ''; - elm.value = formerFileName; - elm.readOnly = "true"; -} const updateBackground = (srcLink, isvideo = true) => { try { @@ -234,14 +220,14 @@ const clearChildNodes = (parent) => { //Cache Buster const clearCache = () => { - var rep = /.*\?.*/, - links = document.getElementsByTagName('link'), - scripts = document.getElementsByTagName('script'), - links = document.getElementsByTagName('video'), - process_scripts = false; + const rep = /.*\?.*/; + let links = document.getElementsByTagName('link'), + scripts = document.getElementsByTagName('script'), + links = document.getElementsByTagName('video'), + process_scripts = false; - for (var i=0; i { } if(process_scripts) { - for (var i=0; i