diff --git a/nginx_2.0/.html/footer.html b/nginx_2.0/.html/footer.html deleted file mode 100644 index 816c377..0000000 --- a/nginx_2.0/.html/footer.html +++ /dev/null @@ -1,59 +0,0 @@ -
-
-

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

-

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

-

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

- -

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

-

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

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

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

- -
-
- - - - - - - - \ No newline at end of file diff --git a/nginx_2.0/.html/header.html b/nginx_2.0/.html/header.html deleted file mode 100644 index 8f81f64..0000000 --- a/nginx_2.0/.html/header.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - JoCat Mirror Template 2.0 - - - - - - - - diff --git a/nginx_2.0/.html/icons/folder-home.svg b/nginx_2.0/.html/icons/folder-home.svg deleted file mode 100644 index d3e765b..0000000 --- a/nginx_2.0/.html/icons/folder-home.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/nginx_2.0/.html/icons/folder.svg b/nginx_2.0/.html/icons/folder.svg deleted file mode 100644 index 6536161..0000000 --- a/nginx_2.0/.html/icons/folder.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/nginx_2.0/.html/icons/java.svg b/nginx_2.0/.html/icons/java.svg deleted file mode 100644 index cdc5939..0000000 --- a/nginx_2.0/.html/icons/java.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/nginx_2.0/.html/icons/json.svg b/nginx_2.0/.html/icons/json.svg deleted file mode 100644 index dc36add..0000000 --- a/nginx_2.0/.html/icons/json.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/nginx_2.0/.html/icons/zip.svg b/nginx_2.0/.html/icons/zip.svg deleted file mode 100644 index d3c38d3..0000000 --- a/nginx_2.0/.html/icons/zip.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/nginx_2.0/.html/logo.png b/nginx_2.0/.html/logo.png deleted file mode 100644 index 15c95a8..0000000 --- a/nginx_2.0/.html/logo.png +++ /dev/null Binary files differ diff --git a/nginx_2.0/.html/main.css b/nginx_2.0/.html/main.css deleted file mode 100644 index 3e9ebbe..0000000 --- a/nginx_2.0/.html/main.css +++ /dev/null @@ -1,83 +0,0 @@ -/* 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; -} - -table { - margin-top: 1rem; - font-size: 14px; -} - -table tbody { - font-family: monospace; -} - -table span { - width: 27px; - display: inline-block; - text-align: center; - margin-right: 10px; -} - -table img { - height: 24px; -} - -table a { - text-decoration: none; -} - -.table > :not(:first-child) { - border-top: 1px solid #dee2e6; -} - -table th:first-child { - padding-left: 45px; -} - -.list-unstyled { - padding-left: 15px; -} diff --git a/nginx_2.0/.html/main.js b/nginx_2.0/.html/main.js deleted file mode 100644 index 45a5a7e..0000000 --- a/nginx_2.0/.html/main.js +++ /dev/null @@ -1,87 +0,0 @@ -// By JCat -// Contacts: https://jocat.ru/ - -"use strict"; - -// Breadcrumbs -const breadcrumbs_el = document.querySelector(".breadcrumb"); -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 -document.querySelectorAll(".js__toggle_content").forEach((el) => { - if (el.dataset.pathname == location.pathname) el.style.display = "block"; -}); - -// Pretty table -const table = document.querySelector("table"); -table.classList.add("table", "table-hover"); - -const headers = ["Дата загрузки / изменения", "Размер файла", "Файл"]; -for (const el of table.querySelector("thead").querySelector("tr").children) { - el.children[0].innerText = headers.pop(); -} - -const table_body_el_list = table.querySelector("tbody").children; - -for (const row of table_body_el_list) { - const file_size = row.querySelector(".size"); - if (file_size.innerText != "-") - file_size.innerText = formatFileSize(file_size.innerText); - - const file_link = row.querySelector(".link"); - const file_path = file_link.innerHTML.match(/href="(.+?)"/)[1].split("?")[0]; - const a = file_link.children[0]; - const img = document.createElement("img"); - const img_wrap = document.createElement("span"); - - if (file_path.endsWith("./")) { - a.innerText = ".."; - img.src = "/.html/icons/folder-home.svg"; - } else if (file_path.endsWith("/")) { - img.src = "/.html/icons/folder.svg"; - } else if (file_path.endsWith("jar")) { - img.src = "/.html/icons/java.svg"; - } else { - const file_split_path = file_path.split("."); - let file_type = file_split_path[file_split_path.length - 1]; - img.src = "/.html/icons/" + file_type + ".svg"; - } - img_wrap.append(img); - a.prepend(img_wrap); -} - -function formatFileSize(bytes) { - const k = 1024, - dp = 0, - sizes = ["Bytes", "KB", "MB", "GB"], - i = Math.floor(Math.log(bytes) / Math.log(k)); - return parseFloat((bytes / Math.pow(k, i)).toFixed(dp)) + " " + sizes[i]; -} diff --git a/nginx_2.0/README.md b/nginx_2.0/README.md deleted file mode 100644 index e670592..0000000 --- a/nginx_2.0/README.md +++ /dev/null @@ -1,7 +0,0 @@ -Для работы всего этого понадобится прикрутить к nginx этот модуль: -https://github.com/aperezdc/ngx-fancyindex - -Его придётся собирать ручками, в принципе и к уже собранному nginx его можно подцепить -Инфы в инете достаточно) - -Кусок конфига для nginx лежит в nginx.conf \ No newline at end of file diff --git a/nginx_2.0/nginx.conf b/nginx_2.0/nginx.conf deleted file mode 100644 index 0cce3e1..0000000 --- a/nginx_2.0/nginx.conf +++ /dev/null @@ -1,8 +0,0 @@ -location / { - fancyindex on; - fancyindex_header "/.html/header.html"; - fancyindex_footer "/.html/footer.html"; - fancyindex_show_path off; - fancyindex_localtime on; - fancyindex_time_format "%d.%m.%Y %H:%M"; -} \ No newline at end of file diff --git a/nginx_fancyindex/.html/footer.html b/nginx_fancyindex/.html/footer.html new file mode 100644 index 0000000..816c377 --- /dev/null +++ b/nginx_fancyindex/.html/footer.html @@ -0,0 +1,59 @@ +
+
+

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

+

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

+

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

+ +

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

+

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

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

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

+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/nginx_fancyindex/.html/header.html b/nginx_fancyindex/.html/header.html new file mode 100644 index 0000000..8f81f64 --- /dev/null +++ b/nginx_fancyindex/.html/header.html @@ -0,0 +1,57 @@ + + + + + + JoCat Mirror Template 2.0 + + + + + + + + diff --git a/nginx_fancyindex/.html/icons/folder-home.svg b/nginx_fancyindex/.html/icons/folder-home.svg new file mode 100644 index 0000000..d3e765b --- /dev/null +++ b/nginx_fancyindex/.html/icons/folder-home.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/nginx_fancyindex/.html/icons/folder.svg b/nginx_fancyindex/.html/icons/folder.svg new file mode 100644 index 0000000..6536161 --- /dev/null +++ b/nginx_fancyindex/.html/icons/folder.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/nginx_fancyindex/.html/icons/java.svg b/nginx_fancyindex/.html/icons/java.svg new file mode 100644 index 0000000..cdc5939 --- /dev/null +++ b/nginx_fancyindex/.html/icons/java.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/nginx_fancyindex/.html/icons/json.svg b/nginx_fancyindex/.html/icons/json.svg new file mode 100644 index 0000000..dc36add --- /dev/null +++ b/nginx_fancyindex/.html/icons/json.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/nginx_fancyindex/.html/icons/zip.svg b/nginx_fancyindex/.html/icons/zip.svg new file mode 100644 index 0000000..d3c38d3 --- /dev/null +++ b/nginx_fancyindex/.html/icons/zip.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/nginx_fancyindex/.html/logo.png b/nginx_fancyindex/.html/logo.png new file mode 100644 index 0000000..15c95a8 --- /dev/null +++ b/nginx_fancyindex/.html/logo.png Binary files differ diff --git a/nginx_fancyindex/.html/main.css b/nginx_fancyindex/.html/main.css new file mode 100644 index 0000000..3e9ebbe --- /dev/null +++ b/nginx_fancyindex/.html/main.css @@ -0,0 +1,83 @@ +/* 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; +} + +table { + margin-top: 1rem; + font-size: 14px; +} + +table tbody { + font-family: monospace; +} + +table span { + width: 27px; + display: inline-block; + text-align: center; + margin-right: 10px; +} + +table img { + height: 24px; +} + +table a { + text-decoration: none; +} + +.table > :not(:first-child) { + border-top: 1px solid #dee2e6; +} + +table th:first-child { + padding-left: 45px; +} + +.list-unstyled { + padding-left: 15px; +} diff --git a/nginx_fancyindex/.html/main.js b/nginx_fancyindex/.html/main.js new file mode 100644 index 0000000..45a5a7e --- /dev/null +++ b/nginx_fancyindex/.html/main.js @@ -0,0 +1,87 @@ +// By JCat +// Contacts: https://jocat.ru/ + +"use strict"; + +// Breadcrumbs +const breadcrumbs_el = document.querySelector(".breadcrumb"); +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 +document.querySelectorAll(".js__toggle_content").forEach((el) => { + if (el.dataset.pathname == location.pathname) el.style.display = "block"; +}); + +// Pretty table +const table = document.querySelector("table"); +table.classList.add("table", "table-hover"); + +const headers = ["Дата загрузки / изменения", "Размер файла", "Файл"]; +for (const el of table.querySelector("thead").querySelector("tr").children) { + el.children[0].innerText = headers.pop(); +} + +const table_body_el_list = table.querySelector("tbody").children; + +for (const row of table_body_el_list) { + const file_size = row.querySelector(".size"); + if (file_size.innerText != "-") + file_size.innerText = formatFileSize(file_size.innerText); + + const file_link = row.querySelector(".link"); + const file_path = file_link.innerHTML.match(/href="(.+?)"/)[1].split("?")[0]; + const a = file_link.children[0]; + const img = document.createElement("img"); + const img_wrap = document.createElement("span"); + + if (file_path.endsWith("./")) { + a.innerText = ".."; + img.src = "/.html/icons/folder-home.svg"; + } else if (file_path.endsWith("/")) { + img.src = "/.html/icons/folder.svg"; + } else if (file_path.endsWith("jar")) { + img.src = "/.html/icons/java.svg"; + } else { + const file_split_path = file_path.split("."); + let file_type = file_split_path[file_split_path.length - 1]; + img.src = "/.html/icons/" + file_type + ".svg"; + } + img_wrap.append(img); + a.prepend(img_wrap); +} + +function formatFileSize(bytes) { + const k = 1024, + dp = 0, + sizes = ["Bytes", "KB", "MB", "GB"], + i = Math.floor(Math.log(bytes) / Math.log(k)); + return parseFloat((bytes / Math.pow(k, i)).toFixed(dp)) + " " + sizes[i]; +} diff --git a/nginx_fancyindex/README.md b/nginx_fancyindex/README.md new file mode 100644 index 0000000..e670592 --- /dev/null +++ b/nginx_fancyindex/README.md @@ -0,0 +1,7 @@ +Для работы всего этого понадобится прикрутить к nginx этот модуль: +https://github.com/aperezdc/ngx-fancyindex + +Его придётся собирать ручками, в принципе и к уже собранному nginx его можно подцепить +Инфы в инете достаточно) + +Кусок конфига для nginx лежит в nginx.conf \ No newline at end of file diff --git a/nginx_fancyindex/nginx.conf b/nginx_fancyindex/nginx.conf new file mode 100644 index 0000000..0cce3e1 --- /dev/null +++ b/nginx_fancyindex/nginx.conf @@ -0,0 +1,8 @@ +location / { + fancyindex on; + fancyindex_header "/.html/header.html"; + fancyindex_footer "/.html/footer.html"; + fancyindex_show_path off; + fancyindex_localtime on; + fancyindex_time_format "%d.%m.%Y %H:%M"; +} \ No newline at end of file