diff --git a/nginx_2.0/.html/footer.html b/nginx_2.0/.html/footer.html index 4157d58..816c377 100644 --- a/nginx_2.0/.html/footer.html +++ b/nginx_2.0/.html/footer.html @@ -1,38 +1,59 @@
-
-

- Добро пожаловать на зеркало!
- Здесь описание зеркала и т.д. (не забудьте всё поменять 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_2.0/.html/header.html b/nginx_2.0/.html/header.html index 829f44e..8f81f64 100644 --- a/nginx_2.0/.html/header.html +++ b/nginx_2.0/.html/header.html @@ -1,30 +1,57 @@ - + - - - + + + JoCat Mirror Template 2.0 - - - - - + + + + + - \ No newline at end of file + diff --git a/nginx_2.0/.html/main.css b/nginx_2.0/.html/main.css index 357a5e3..3e9ebbe 100644 --- a/nginx_2.0/.html/main.css +++ b/nginx_2.0/.html/main.css @@ -1,88 +1,83 @@ /* By JCat */ /* Contacts: https://jocat.ru/ */ -/* color: #ffde6b; */ -/* color: #7c4dff; */ -/* color: #393939; */ - body { - scroll-behavior: smooth; - background-color: #fafafa; + scroll-behavior: smooth; } -.navbar, -.navbar .dropdown-menu { - background-color: #393939; +.navbar { + background-color: #393939; } -.navbar a, -.navbar a:active, -.navbar li.active a { - color: #eee; +.navbar a { + color: #eee; } .navbar a:hover, .navbar a:focus { - color: #ffde6b; + color: #ffde6b; } .navbar-toggler { - border-color: #ccc; + 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(238, 238, 238)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); -} - -.navbar .dropdown-menu .dropdown-item:hover { - background-color: #444; -} - -.navbar .dropdown-menu .dropdown-divider { - border-color: #666; + 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: 2rem; - margin-right: 10px; + height: 32px; + margin-right: 10px; } a, a:hover, a:focus { - color: #7c4dff; + color: #7c4dff; } .breadcrumb { - border-radius: 0; - background-color: transparent; - padding: 8px 15px; - border-bottom: 1px solid #dee2e6; + padding: 8px 15px; + border-bottom: 1px solid #dee2e6; } .js__toggle_content { - display: none; + display: none; } + table { - margin-top: 2rem; - font-size: 14px; + margin-top: 1rem; + font-size: 14px; } + table tbody { - font-family: monospace; + font-family: monospace; } + table span { - width: 27px; - display: inline-block; - text-align: center; - margin-right: 10px; + width: 27px; + display: inline-block; + text-align: center; + margin-right: 10px; } + table img { - height: 24px; + height: 24px; } -table a:hover { - text-decoration: none; + +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; -} \ No newline at end of file + padding-left: 15px; +} diff --git a/nginx_2.0/.html/main.js b/nginx_2.0/.html/main.js index 6ee2c1f..45a5a7e 100644 --- a/nginx_2.0/.html/main.js +++ b/nginx_2.0/.html/main.js @@ -1,78 +1,87 @@ // By JCat // Contacts: https://jocat.ru/ -// Breadcrumbs -let breadcrumbs_el = document.querySelector('#js__breadcrumbs'); -let breadcrumbs = location.pathname.split('/').filter(word => word.length > 0); +"use strict"; -breadcrumbs_el.append(get_breadcrumbs_el('/', 'Home', breadcrumbs.length == 0)); +// 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)); - }); + 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) { - el = document.createElement('li'); - el.classList.add('breadcrumb-item'); - if (last === true) { - el.classList.add('active'); - el.innerHTML = text; - return el; - } - let a = document.createElement('a'); - a.href = link; - a.innerHTML = text; - el.append(a); - return el; + 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 -for (let el of document.getElementsByClassName('js__toggle_content')) { - if (el.dataset.pathname == location.pathname) el.style.display = 'block'; -} +document.querySelectorAll(".js__toggle_content").forEach((el) => { + if (el.dataset.pathname == location.pathname) el.style.display = "block"; +}); // Pretty table -let table = document.querySelector('table'); -table.classList.add('table', 'table-hover'); +const table = document.querySelector("table"); +table.classList.add("table", "table-hover"); -let headers = ['Дата загрузки / изменения', 'Размер файла', 'Файл']; -for (let el of table.querySelector('thead').querySelector('tr').children) { - el.children[0].innerText = headers.pop(); +const headers = ["Дата загрузки / изменения", "Размер файла", "Файл"]; +for (const el of table.querySelector("thead").querySelector("tr").children) { + el.children[0].innerText = headers.pop(); } -let table_body_el_list = table.querySelector('tbody').children; +const table_body_el_list = table.querySelector("tbody").children; -for (let row of table_body_el_list) { - let file_size = row.querySelector('.size'); - if (file_size.innerText != '-') file_size.innerText = formatFileSize(file_size.innerText); +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); - let file_link = row.querySelector('.link'); - let file_type = file_link.innerHTML.match(/.+<\/a>/)[1]; - let a = file_link.children[0]; - let img = document.createElement('img'); - let img_wrap = document.createElement('span'); + 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_type == './') { - a.innerText = '..'; - img.src = '/.html/icons/folder-home.svg'; - } else if (file_type == '/') { - img.src = '/.html/icons/folder.svg'; - } else if (file_type == 'jar') { - img.src = '/.html/icons/java.svg'; - } else { - img.src = '/.html/icons/'+file_type+'.svg'; - } - img_wrap.prepend(img); - a.prepend(img_wrap); + 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) { - var 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]; -} \ No newline at end of file + 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]; +}