moving fonts, fixing scroll to top
This commit is contained in:
parent
92c94f8ae6
commit
4192726cf6
|
@ -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)
|
||||
|
|
BIN
images/pic1.png
BIN
images/pic1.png
Binary file not shown.
Before Width: | Height: | Size: 407 KiB After Width: | Height: | Size: 1.3 MiB |
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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<links.length; i++) {
|
||||
var link = links[i],
|
||||
for (let i = 0; i < links.length; i++) {
|
||||
let link = links[i],
|
||||
href = link.href;
|
||||
if(rep.test(href)) {
|
||||
link.href = href+'&'+Date.now();
|
||||
|
@ -251,8 +237,8 @@ const clearCache = () => {
|
|||
|
||||
}
|
||||
if(process_scripts) {
|
||||
for (var i=0; i<scripts.length; i++) {
|
||||
var script = scripts[i],
|
||||
for (let i = 0; i < scripts.length; i++) {
|
||||
let script = scripts[i],
|
||||
src = script.src;
|
||||
if(rep.test(src)) {
|
||||
script.src = src+'&'+Date.now();
|
||||
|
|
Loading…
Reference in New Issue