diff --git a/nginx/.html/footer.html b/nginx/.html/footer.html index 0f60290..8ad0a6a 100644 --- a/nginx/.html/footer.html +++ b/nginx/.html/footer.html @@ -1,63 +1,89 @@ - - +
- - - + + + + - +
ФайлДата загрузки / измененияРазмер файлаФайлДата загрузки / измененияРазмер файла
+ - -  ../ + + ../ +
- -
-

- Добро пожаловать на зеркало!
- Здесь описание зеркала и т.д. (не забудьте всё поменять XD)
- Инфу по шаблону и прочую хрень можно найти на Discord сервере JCat Trash. -

-

Сборки/клиенты

-

- На данный момент на зеркале имеются следущие сборки: -

- +
+
+

+ Добро пожаловать на зеркало!
+ Здесь описание зеркала и т.д. (не забудьте всё поменять XD)
+ Инфу по шаблону и прочую хрень можно найти на Discord сервере + JCat Trash. +

+

Сборки/клиенты

+

На данный момент на зеркале имеются следущие сборки:

+
    +
  • Сборка 1 – Сборка с чем-то одним
  • +
  • Сборка 2 – Сборка с чем-то другим
  • +
  • Сборка 3 – Сборка с чем-то третьим
  • +

Использование

-

Для загрузки контента с данного зеркала пропишите его адрес в свой конфиг-файл

+

+ Для загрузки контента с данного зеркала пропишите его адрес в свой + конфиг-файл +

Например: -
"mirrors": [
-    "https://mirror.site.ru/"
+        
"mirrors": [
+"https://mirror.site.ru/"
 ]
-
-
+
+

Благодарность

    -
  • @jcat за шаблон для зеркала :3
  • +
  • + @jcat за шаблон для зеркала :3 +
-
+
- - - - - + + + + + +
+ \ No newline at end of file diff --git a/nginx/.html/header.html b/nginx/.html/header.html index 7f135d0..15a1e5c 100644 --- a/nginx/.html/header.html +++ b/nginx/.html/header.html @@ -1,14 +1,57 @@ - + - - - - JoCat Mirror Template - - - - - -

JoCat Mirror Template

-

Каталог:

-
\ No newline at end of file + + + + JoCat Mirror Template 2.0 + + + + + + + + \ No newline at end of file diff --git a/nginx/.html/icons/file-text.svg b/nginx/.html/icons/file-text.svg new file mode 100644 index 0000000..c581e8f --- /dev/null +++ b/nginx/.html/icons/file-text.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/nginx/.html/icons/file.svg b/nginx/.html/icons/file.svg new file mode 100644 index 0000000..d8f8412 --- /dev/null +++ b/nginx/.html/icons/file.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/nginx/.html/icons/folder-home.png b/nginx/.html/icons/folder-home.png deleted file mode 100644 index 14fe20a..0000000 --- a/nginx/.html/icons/folder-home.png +++ /dev/null Binary files differ diff --git a/nginx/.html/icons/folder-home.svg b/nginx/.html/icons/folder-home.svg new file mode 100644 index 0000000..d3e765b --- /dev/null +++ b/nginx/.html/icons/folder-home.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/nginx/.html/icons/folder.png b/nginx/.html/icons/folder.png deleted file mode 100644 index 7c613e0..0000000 --- a/nginx/.html/icons/folder.png +++ /dev/null Binary files differ diff --git a/nginx/.html/icons/folder.svg b/nginx/.html/icons/folder.svg new file mode 100644 index 0000000..6536161 --- /dev/null +++ b/nginx/.html/icons/folder.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/nginx/.html/icons/jar.png b/nginx/.html/icons/jar.png deleted file mode 100644 index 63b8683..0000000 --- a/nginx/.html/icons/jar.png +++ /dev/null Binary files differ diff --git a/nginx/.html/icons/java.svg b/nginx/.html/icons/java.svg new file mode 100644 index 0000000..cdc5939 --- /dev/null +++ b/nginx/.html/icons/java.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/nginx/.html/icons/json.png b/nginx/.html/icons/json.png deleted file mode 100644 index af1a475..0000000 --- a/nginx/.html/icons/json.png +++ /dev/null Binary files differ diff --git a/nginx/.html/icons/json.svg b/nginx/.html/icons/json.svg new file mode 100644 index 0000000..dc36add --- /dev/null +++ b/nginx/.html/icons/json.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/nginx/.html/icons/txt.png b/nginx/.html/icons/txt.png deleted file mode 100644 index 1d48677..0000000 --- a/nginx/.html/icons/txt.png +++ /dev/null Binary files differ diff --git a/nginx/.html/icons/zip.png b/nginx/.html/icons/zip.png deleted file mode 100644 index cc196c1..0000000 --- a/nginx/.html/icons/zip.png +++ /dev/null Binary files differ diff --git a/nginx/.html/icons/zip.svg b/nginx/.html/icons/zip.svg new file mode 100644 index 0000000..d3c38d3 --- /dev/null +++ b/nginx/.html/icons/zip.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/nginx/.html/logo.png b/nginx/.html/logo.png new file mode 100644 index 0000000..15c95a8 --- /dev/null +++ b/nginx/.html/logo.png Binary files differ diff --git a/nginx/.html/main.css b/nginx/.html/main.css index 91ec317..a51a8c3 100644 --- a/nginx/.html/main.css +++ b/nginx/.html/main.css @@ -1,20 +1,76 @@ +/* By JCat */ +/* Contacts: https://jocat.ru/ */ + +body { + scroll-behavior: smooth; +} + +.navbar { + background-color: #393939; +} + +.navbar a { + color: #eee; +} + +.navbar a:hover, +.navbar a:focus { + color: #ffde6b; +} + +.navbar-toggler { + border-color: #ccc; +} + +.navbar-toggler-icon { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgb(204, 204, 204)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); +} + +.img-logo { + height: 32px; + margin-right: 10px; +} + +a, +a:hover, +a:focus { + color: #7c4dff; +} + +.breadcrumb { + padding: 8px 15px; + border-bottom: 1px solid #dee2e6; +} + .js__toggle_content { - display: none; + display: none; } -#js__listing_table { - margin: 2rem 0; - font-size: 14px; + +table { + margin-top: 1rem; + font-size: 14px; } -#js__listing_table tbody { - font-family: monospace; + +table tbody { + font-family: monospace; } -#js__listing_table img { - margin-right: 10px; + +table img { + height: 24px; } -#js__listing_table a:hover { - text-decoration: none; + +table a { + text-decoration: none; +} + +table td:first-child { + width: 43px; +} + +.table > :not(:first-child) { + border-top: 1px solid #dee2e6; } .list-unstyled { - padding-left: 15px; -} \ No newline at end of file + padding-left: 15px; +} diff --git a/nginx/.html/main.js b/nginx/.html/main.js index 895b51f..3c7fc85 100644 --- a/nginx/.html/main.js +++ b/nginx/.html/main.js @@ -1,38 +1,78 @@ -// Show titles -let titles = document.getElementsByClassName('js__title'); -for (let title of titles) { - title.innerText = location.pathname; +// By JCat +// Contacts: https://jocat.ru/ + +"use strict"; + +// Breadcrumbs +const breadcrumbs_el = document.querySelector("#js__breadcrumbs"); +const breadcrumbs = location.pathname + .split("/") + .filter((word) => word.length > 0); + +breadcrumbs_el.append(get_breadcrumbs_el("/", "Home", breadcrumbs.length == 0)); +if (breadcrumbs.length > 0) { + let tree = ""; + breadcrumbs.forEach((link, index) => { + tree += "/" + link; + breadcrumbs_el.append( + get_breadcrumbs_el(tree, link, index == breadcrumbs.length - 1) + ); + }); +} + +function get_breadcrumbs_el(link, text, last = false) { + const el = document.createElement("li"); + el.classList.add("breadcrumb-item"); + if (last === true) { + el.classList.add("active"); + el.innerHTML = text; + return el; + } + const a = document.createElement("a"); + a.href = link; + a.innerHTML = text; + el.append(a); + return el; } // Toggle content -let toggle_blocks = document.getElementsByClassName('js__toggle_content'); -for (let block of toggle_blocks) { - if (block.dataset.pathname == location.pathname) { - block.style.display = 'block'; - } -} +document.querySelectorAll(".js__toggle_content").forEach((el) => { + if (el.dataset.pathname == location.pathname) el.style.display = "block"; +}); // Hide root dir in index -if (location.pathname == '/') { - document.getElementById('js_to_prnt_dir').remove(); +if (location.pathname == "/") { + document.querySelector("table tbody tr").remove(); } -// Show table -let data = Array.from(document.querySelector('#js__listing pre').innerHTML.matchAll(/(.+)<\/a>\s+([\w-]+\s[\d:]+)\s+([\d]+[K|M]?|-)/g)); -let table = document.querySelector('#js__listing_table tbody'); +// Pretty table +const data = Array.from( + document + .querySelector("pre") + .innerHTML.matchAll( + /(.+)<\/a>\s+([\w-]+\s[\d:]+)\s+([\d]+[K|M]?|-)/g + ) +); -for (let row of data) { - let template = document.getElementsByTagName('template')[0]; - let element = document.importNode(template.content.childNodes[1], true); - let td_list = element.getElementsByTagName('td'); +const table = document.querySelector("table tbody"); +data.forEach((row) => { + const template = document.querySelector("template"); + const element = template.content.cloneNode(true); + const td_list = element.querySelectorAll("td"); - td_list[0].getElementsByTagName('a')[0].href = row[1]; - td_list[0].getElementsByTagName('img')[0].src = '/.html/icons/'+(row[2] == '/' ? 'folder' : row[2].substr(1))+'.png'; - td_list[0].getElementsByTagName('span')[0].innerHTML = row[3]; - td_list[1].innerHTML = new Date(row[4]).toLocaleString('ru', { - year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit' - }); - td_list[2].innerHTML = row[5]; - table.append(element); -} -document.querySelector('#js__listing').remove(); \ No newline at end of file + td_list[0].querySelector("a").href = row[1]; + td_list[0].querySelector("img").src = + "/.html/icons/" + (row[2] == "/" ? "folder" : row[2].slice(1)) + ".svg"; + td_list[1].querySelector("a").href = row[1]; + td_list[1].querySelector("a").innerHTML = row[3]; + td_list[2].innerText = new Date(row[4]).toLocaleString("ru", { + year: "numeric", + month: "2-digit", + day: "2-digit", + hour: "2-digit", + minute: "2-digit", + }); + td_list[3].innerText = row[5]; + table.append(element); +}); +document.querySelector("pre").remove();