diff --git a/apache/.htaccess b/apache/.htaccess index 252f5fb..b7d1b8c 100644 --- a/apache/.htaccess +++ b/apache/.htaccess @@ -4,10 +4,10 @@ HeaderName /tpl/header.html ReadmeName /tpl/footer.html -AddIcon /tpl/icons/folder.png ^^DIRECTORY^^ -AddIcon /tpl/icons/folder-home.png .. -AddIcon /tpl/icons/zip.png .zip -AddIcon /tpl/icons/java.png .jar -AddIcon /tpl/icons/json.png .json -AddIcon /tpl/icons/txt.png .cfg .txt -DefaultIcon /tpl/icons/default.png +AddIcon /tpl/icons/folder.svg ^^DIRECTORY^^ +AddIcon /tpl/icons/folder-home.svg .. +AddIcon /tpl/icons/zip.svg .zip +AddIcon /tpl/icons/java.svg .jar +AddIcon /tpl/icons/json.svg .json +AddIcon /tpl/icons/file-text.svg .cfg .txt +DefaultIcon /tpl/icons/file.svg diff --git a/apache/tpl/footer.html b/apache/tpl/footer.html index e549c2e..46bb837 100644 --- a/apache/tpl/footer.html +++ b/apache/tpl/footer.html @@ -1,41 +1,59 @@ - - -
-

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

-

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

-

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

- -

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

-

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

- Например: -
"mirrors": [
+    
+
+

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

+

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

+

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

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

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

+

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

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

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

-
    -
  • @jcat за шаблон для зеркала :3
  • -
-
+
+

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

+
    +
  • + @jcat за шаблон для зеркала :3 +
  • +
+
- - - - - + + + + + +
+ diff --git a/apache/tpl/header.html b/apache/tpl/header.html index cca5e59..5f8171b 100644 --- a/apache/tpl/header.html +++ b/apache/tpl/header.html @@ -1,15 +1,57 @@ - + - - - - JoCat Mirror Template - - - - - -

JoCat Mirror Template

-

Каталог:

-
+ + + + JoCat Mirror Template 2.0 + + + + + + + + \ No newline at end of file diff --git a/apache/tpl/icons/default.png b/apache/tpl/icons/default.png deleted file mode 100644 index 6997229..0000000 --- a/apache/tpl/icons/default.png +++ /dev/null Binary files differ diff --git a/apache/tpl/icons/file-text.svg b/apache/tpl/icons/file-text.svg new file mode 100644 index 0000000..c581e8f --- /dev/null +++ b/apache/tpl/icons/file-text.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apache/tpl/icons/file.svg b/apache/tpl/icons/file.svg new file mode 100644 index 0000000..d8f8412 --- /dev/null +++ b/apache/tpl/icons/file.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apache/tpl/icons/folder-home.png b/apache/tpl/icons/folder-home.png deleted file mode 100644 index 14fe20a..0000000 --- a/apache/tpl/icons/folder-home.png +++ /dev/null Binary files differ diff --git a/apache/tpl/icons/folder-home.svg b/apache/tpl/icons/folder-home.svg new file mode 100644 index 0000000..d3e765b --- /dev/null +++ b/apache/tpl/icons/folder-home.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apache/tpl/icons/folder.png b/apache/tpl/icons/folder.png deleted file mode 100644 index 7c613e0..0000000 --- a/apache/tpl/icons/folder.png +++ /dev/null Binary files differ diff --git a/apache/tpl/icons/folder.svg b/apache/tpl/icons/folder.svg new file mode 100644 index 0000000..6536161 --- /dev/null +++ b/apache/tpl/icons/folder.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apache/tpl/icons/jar.png b/apache/tpl/icons/jar.png deleted file mode 100644 index 63b8683..0000000 --- a/apache/tpl/icons/jar.png +++ /dev/null Binary files differ diff --git a/apache/tpl/icons/java.svg b/apache/tpl/icons/java.svg new file mode 100644 index 0000000..cdc5939 --- /dev/null +++ b/apache/tpl/icons/java.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apache/tpl/icons/json.png b/apache/tpl/icons/json.png deleted file mode 100644 index af1a475..0000000 --- a/apache/tpl/icons/json.png +++ /dev/null Binary files differ diff --git a/apache/tpl/icons/json.svg b/apache/tpl/icons/json.svg new file mode 100644 index 0000000..dc36add --- /dev/null +++ b/apache/tpl/icons/json.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apache/tpl/icons/txt.png b/apache/tpl/icons/txt.png deleted file mode 100644 index 1d48677..0000000 --- a/apache/tpl/icons/txt.png +++ /dev/null Binary files differ diff --git a/apache/tpl/icons/zip.png b/apache/tpl/icons/zip.png deleted file mode 100644 index cc196c1..0000000 --- a/apache/tpl/icons/zip.png +++ /dev/null Binary files differ diff --git a/apache/tpl/icons/zip.svg b/apache/tpl/icons/zip.svg new file mode 100644 index 0000000..d3c38d3 --- /dev/null +++ b/apache/tpl/icons/zip.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apache/tpl/logo.png b/apache/tpl/logo.png new file mode 100644 index 0000000..15c95a8 --- /dev/null +++ b/apache/tpl/logo.png Binary files differ diff --git a/apache/tpl/main.css b/apache/tpl/main.css index 91ec317..d7d1237 100644 --- a/apache/tpl/main.css +++ b/apache/tpl/main.css @@ -1,20 +1,91 @@ +/* By JCat */ +/* Contacts: https://jocat.ru/ */ + +body { + scroll-behavior: smooth; + background-color: #fafafa; +} + +.navbar, +.navbar .dropdown-menu { + background-color: #393939; +} + +.navbar a, +.navbar a:active, +.navbar li.active 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(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; +} + +.img-logo { + height: 2rem; + 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 span { + width: 27px; + display: inline-block; + text-align: center; + margin-right: 10px; } -#js__listing_table a:hover { - text-decoration: none; +table img { + height: 24px; +} +table a:hover { + text-decoration: none; +} +table td { + text-align: left; +} +table td:first-child { + width: 41px; +} +.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/apache/tpl/main.js b/apache/tpl/main.js index d3ce67b..3ff7ed1 100644 --- a/apache/tpl/main.js +++ b/apache/tpl/main.js @@ -1,41 +1,54 @@ -// 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"; - } +for (let el of document.getElementsByClassName("js__toggle_content")) { + if (el.dataset.pathname == location.pathname) el.style.display = "block"; } -const table = document.querySelector("#js__listing table"); -const tableBody = table.children[0].children; +// Pretty table +const table = document.querySelector("table"); +table.classList.add("table", "table-hover"); -table.classList.add( - "table", - "table-hover", - "table", - "table-borderless", - "table-sm" -); +const newHeader = table.createTHead(); +const header = table.querySelector("tr"); +newHeader.append(header); -const translate = ["Файл", "Дата загрузки / изменения", "Размер файла"]; -tableBody[0].childNodes[0].remove(); -tableBody[0].childNodes.forEach((v, k) => { - if (k == 0) v.colSpan = 2; - v.innerText = translate[k]; -}); - -for (const tr of tableBody) { - if (tr == tableBody[0]) continue; // Да-да, это я так скипаю первую строку - tr.childNodes.forEach((v, k) => { - v.align = "left"; - if (k == 0) { - v.width = "26px"; - } - }); +const headers = ["Размер файла", "Дата загрузки / изменения", "Файл", ""]; +for (const el of header.children) { + el.innerText = headers.pop(); }