\n");
- char dir_link[512];
- snprintf(dir_link, sizeof(dir_link),
- "
\n");
buffer_append(buf, " ");
buffer_append(buf, entries[i].icon);
buffer_append(buf, "\n");
@@ -377,6 +517,10 @@ void print_content(buffer_t *buf, const char *base_path, const char *display_pat
buffer_append(buf, " \n");
buffer_append(buf, " \n");
if (entries[i].dir_size > 0) {
char size_str[32];
@@ -473,14 +617,18 @@ void print_content(buffer_t *buf, const char *base_path, const char *display_pat
buffer_append(buf, stats);
}
free(entries);
+ fprintf(stderr, "DEBUG: print_content END\n");
}
void print_template(const char *base_path, const char *display_path) {
FILE *file = fopen(g_config.template_path, "r");
if (!file) {
+ fprintf(stderr, "DEBUG: cannot open template: %s\n", g_config.template_path);
printf("Error: Cannot read template\n");
return;
}
+ fprintf(stderr, "DEBUG: template opened successfully\n");
+
buffer_t output;
buffer_init(&output);
char line[4096];
@@ -494,6 +642,16 @@ void print_template(const char *base_path, const char *display_path) {
}
}
fclose(file);
+
+ fprintf(stderr, "DEBUG: output size = %zu bytes\n", output.size);
+ if (output.size == 0) {
+ fprintf(stderr, "DEBUG: WARNING! output is empty!\n");
+ buffer_free(&output);
+ return;
+ }
fwrite(output.data, 1, output.size, stdout);
+ fflush(stdout);
+ fprintf(stderr, "DEBUG: fwrite done, flushed\n");
+
buffer_free(&output);
}
diff --git a/src/render.h b/src/render.h
index 12a0752..0b38b6b 100644
--- a/src/render.h
+++ b/src/render.h
@@ -13,5 +13,6 @@ void buffer_init(buffer_t *buf);
void buffer_append(buffer_t *buf, const char *str);
void buffer_free(buffer_t *buf);
void print_template(const char *base_path, const char *display_path);
+void render_folder(buffer_t *buf, const char *base_path, const char *display_path);
#endif
diff --git a/src/status.c b/src/status.c
index a674bdc..42a82ba 100644
--- a/src/status.c
+++ b/src/status.c
@@ -1,3 +1,4 @@
+// /home/romkazvo/www/cgi-bin/src/status.c
#include
#include
#include
@@ -35,18 +36,62 @@ int get_process_memory(const char *process_name, long *memory_kb) {
return result == 1;
}
+float get_cpu_load() {
+ FILE *fp = fopen("/proc/loadavg", "r");
+ if (!fp) return 0.0f;
+
+ float load;
+ fscanf(fp, "%f", &load);
+ fclose(fp);
+
+ return load;
+}
+
+void get_memory_usage(long *used_mb, long *total_mb) {
+ FILE *fp = fopen("/proc/meminfo", "r");
+ if (!fp) {
+ *used_mb = 0;
+ *total_mb = 0;
+ return;
+ }
+
+ char line[128];
+ long total = 0, available = 0;
+
+ while (fgets(line, sizeof(line), fp)) {
+ if (sscanf(line, "MemTotal: %ld kB", &total) == 1) {
+ // сохраняем
+ } else if (sscanf(line, "MemAvailable: %ld kB", &available) == 1) {
+ break;
+ }
+ }
+ fclose(fp);
+
+ *total_mb = total / 1024;
+ *used_mb = (total - available) / 1024;
+}
+
int main() {
printf("Content-type: text/plain; charset=utf-8\n\n");
long busybox_kb = 0, nginx_kb = 0;
-
get_process_memory("busybox", &busybox_kb);
nginx_kb = get_nginx_memory();
- printf("BusyBox: %ld KB | Nginx: %ld MB | Всего: %.1f MB",
- busybox_kb,
- nginx_kb / 1024,
- (busybox_kb + nginx_kb) / 1024.0);
+ double busybox_mb = busybox_kb / 1024.0;
+ double nginx_mb = nginx_kb / 1024.0;
+ double total_mb = busybox_mb + nginx_mb;
+
+ float cpu_load = get_cpu_load();
+
+ long used_mb = 0, total_sys_mb = 0;
+ get_memory_usage(&used_mb, &total_sys_mb);
+
+ // Две строки
+ printf("BusyBox: %.1f MB | Nginx: %.1f MB | Всего: %.1f MB\n",
+ busybox_mb, nginx_mb, total_mb);
+ printf("CPU Load: %.2f | Память: %ld / %ld MB (%.0f%%)",
+ cpu_load, used_mb, total_sys_mb, total_sys_mb > 0 ? (float)used_mb / total_sys_mb * 100 : 0);
return 0;
}
diff --git a/src/utils.c b/src/utils.c
index d1ee12d..b7caffe 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -80,6 +80,9 @@ void url_decode_enhanced(const char *src, char *dst, size_t dst_size) {
}
src += 3;
} else {
+ // ============================================
+ // ФИКС: если % не валидный — просто пропускаем его
+ // ============================================
src++;
}
} else if (*src == '+') {
@@ -92,4 +95,4 @@ void url_decode_enhanced(const char *src, char *dst, size_t dst_size) {
}
}
*p = '\0';
-}
+}
\ No newline at end of file
diff --git a/style.css b/style.css
index 7fdade0..98a550f 100755
--- a/style.css
+++ b/style.css
@@ -1,488 +1,519 @@
+/* ============================================
+ БАЗА
+ ============================================ */
:root {
--bg-primary: #f8f9fa;
--bg-secondary: #ffffff;
- --bg-header: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
- --text-primary: #333333;
- --text-secondary: #5f6368;
- --text-muted: #6c757d;
- --border-color: #e9ecef;
- --border-light: #f1f3f4;
- --accent-blue: #1a73e8;
- --accent-green: #188038;
- --hover-bg: #f8f9fa;
- --shadow: 0 2px 4px rgba(0,0,0,0.1);
- /* === ПЕРЕМЕННЫЕ ДЛЯ МОДАЛКИ === */
- --modal-bg: #ffffff;
- --modal-text: #333333;
- --modal-header-bg: #f8f9fa;
- --modal-border: #e9ecef;
+ --bg-header: linear-gradient(135deg, #2d3436, #636e72);
+ --text-primary: #2d3436;
+ --text-secondary: #636e72;
+ --text-muted: #b2bec3;
+ --border-color: #dfe6e9;
+ --border-light: #f1f2f6;
+ --accent-blue: #0984e3;
+ --accent-orange: #e17055;
+ --accent-green: #00b894;
+ --hover-bg: #f1f2f6;
+ --shadow: 0 4px 12px rgba(0,0,0,0.04);
+ --radius: 12px;
}
.dark-theme {
- --bg-primary: #121212;
- --bg-secondary: #1e1e1e;
- --bg-header: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
+ --bg-primary: #1e1e1e;
+ --bg-secondary: #2d2d2d;
+ --bg-header: linear-gradient(135deg, #1e1e1e, #2d2d2d);
--text-primary: #e0e0e0;
- --text-secondary: #a0a0a0;
- --text-muted: #888888;
- --border-color: #2d3748;
- --border-light: #2d3748;
- --accent-blue: #63b3ed;
- --accent-green: #68d391;
- --hover-bg: #2d3748;
- --shadow: 0 2px 4px rgba(0,0,0,0.3);
- /* === ПЕРЕМЕННЫЕ ДЛЯ МОДАЛКИ В ТЁМНОЙ ТЕМЕ === */
- --modal-bg: #1e1e1e;
- --modal-text: #e0e0e0;
- --modal-header-bg: #2d3748;
- --modal-border: #2d3748;
+ --text-secondary: #b0b0b0;
+ --text-muted: #6c6c6c;
+ --border-color: #3d3d3d;
+ --border-light: #333333;
+ --accent-blue: #74b9ff;
+ --accent-orange: #fdcb6e;
+ --accent-green: #55efc4;
+ --hover-bg: #3d3d3d;
+ --shadow: 0 4px 12px rgba(0,0,0,0.2);
+ --radius: 12px;
}
-body {
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
- background: var(--bg-primary);
- color: var(--text-primary);
+/* ============================================
+ ТЕЛО
+ ============================================ */
+body {
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
+ background: var(--bg-primary);
+ color: var(--text-primary);
line-height: 1.6;
min-height: 100vh;
- transition: none;
+ transition: background 0.25s ease, color 0.25s ease;
}
body.loaded * {
- transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
+ transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
-.container {
- max-width: 100%;
- margin: 0 auto;
- background: var(--bg-secondary);
+/* ============================================
+ КОНТЕЙНЕР
+ ============================================ */
+.container {
+ max-width: 100%;
+ margin: 0 auto;
+ background: var(--bg-secondary);
min-width: 320px;
min-height: 100vh;
box-shadow: var(--shadow);
+ transition: background 0.25s ease, box-shadow 0.25s ease;
}
@media (min-width: 768px) {
- .container {
- max-width: 1000px;
- margin: 10px auto;
+ .container {
+ max-width: 1100px;
+ margin: 16px auto;
min-height: auto;
- border-radius: 8px;
+ border-radius: var(--radius);
overflow: hidden;
+ box-shadow: var(--shadow);
}
}
-.theme-toggle {
- position: fixed;
- top: 10px;
- right: 10px;
- background: rgba(255,255,255,0.2);
- border: none;
- border-radius: 50%;
- width: 50px;
- height: 50px;
- font-size: 1.3rem;
- cursor: pointer;
- z-index: 1000;
- backdrop-filter: blur(10px);
- display: flex;
- align-items: center;
- justify-content: center;
- transition: all 0.3s ease;
-}
-
-.dark-theme .theme-toggle {
- background: rgba(0,0,0,0.2);
- color: var(--text-primary);
-}
-
-.scroll-top {
- position: fixed;
- bottom: 20px;
- right: 20px;
- width: 50px;
- height: 50px;
- background: var(--accent-blue);
+/* ============================================
+ ШАПКА
+ ============================================ */
+.header {
+ background: var(--bg-header);
color: white;
- border: none;
- border-radius: 50%;
- font-size: 1.3rem;
- cursor: pointer;
- opacity: 0;
- visibility: hidden;
- transition: all 0.3s ease;
- z-index: 1000;
- box-shadow: 0 2px 10px rgba(0,0,0,0.2);
- display: flex;
- align-items: center;
- justify-content: center;
-}
-
-.scroll-top.visible {
- opacity: 1;
- visibility: visible;
-}
-
-.scroll-top:hover {
- background: var(--accent-green);
- transform: translateY(-2px);
- box-shadow: 0 4px 15px rgba(0,0,0,0.3);
-}
-
-.theme-toggle:hover {
- transform: scale(1.1);
- background: rgba(255,255,255,0.3);
-}
-
-.dark-theme .theme-toggle:hover {
- background: rgba(0,0,0,0.3);
-}
-
-.header {
- background: var(--bg-header);
- color: white;
- padding: 1.5rem 1rem;
- text-align: center;
+ padding: 2rem 1.5rem;
+ text-align: center;
position: relative;
}
-h1 {
- font-size: 1.8rem;
- font-weight: 700;
- margin-bottom: 0.5rem;
+.header h1 {
+ font-size: 2rem;
+ font-weight: 700;
+ margin: 0;
+ letter-spacing: -0.5px;
}
-.content {
- padding: 1rem;
- min-width: 0;
+.header .subtitle {
+ opacity: 0.85;
+ font-size: 1.05rem;
+ margin-top: 0.25rem;
+ font-weight: 400;
}
-.breadcrumb {
- background: var(--bg-primary);
- padding: 1rem;
- margin: 0 0 1rem 0;
- border-bottom: 1px solid var(--border-color);
- font-size: 0.9rem;
- overflow-x: auto;
+/* ============================================
+ ОПИСАНИЕ (НЕ УВЕЛИЧИВАЕМ)
+ ============================================ */
+.site-description {
+ text-align: center;
+ padding: 0.75rem 1.5rem;
+ font-size: 1rem;
+ color: var(--text-secondary);
+ border-bottom: 1px solid var(--border-color);
+ background: var(--bg-primary);
+ font-weight: 400;
+ letter-spacing: 0.2px;
+}
+
+/* ============================================
+ ХЛЕБНЫЕ КРОШКИ
+ ============================================ */
+.breadcrumb {
+ background: var(--bg-primary);
+ padding: 0.6rem 1.25rem;
+ border-bottom: 1px solid var(--border-color);
+ font-size: 0.85rem;
+ overflow-x: auto;
white-space: nowrap;
-webkit-overflow-scrolling: touch;
-}
-
-.breadcrumb a {
- color: var(--accent-blue);
- text-decoration: none;
- font-weight: 500;
- display: inline-block;
-}
-
-.breadcrumb a:hover {
- text-decoration: underline;
-}
-
-ul {
- list-style: none;
- padding: 0;
- margin: 0;
-}
-
-li {
- padding: 1rem 0.5rem;
- border-bottom: 1px solid var(--border-light);
- display: flex;
+ color: var(--text-secondary);
+ display: flex;
align-items: center;
+ gap: 0.3rem;
flex-wrap: nowrap;
}
-li:last-child { border-bottom: none; }
-
-li:hover {
- background-color: var(--hover-bg);
+.breadcrumb a {
+ color: var(--accent-blue);
+ text-decoration: none;
+ font-weight: 500;
+ transition: color 0.15s ease;
+ padding: 0.1rem 0.2rem;
}
-/* Стили для строки файла */
+.breadcrumb a:hover {
+ color: var(--accent-orange);
+ text-decoration: underline;
+}
+
+.breadcrumb .separator {
+ color: var(--text-muted);
+ user-select: none;
+ font-weight: 300;
+ margin: 0 0.1rem;
+}
+
+/* ============================================
+ ТУЛБАР
+ ============================================ */
+.toolbar {
+ display: flex;
+ flex-wrap: wrap;
+ align-items: center;
+ gap: 0.5rem 1rem;
+ padding: 0.6rem 1.25rem;
+ background: var(--bg-secondary);
+ border-bottom: 1px solid var(--border-light);
+ transition: background 0.2s ease;
+}
+
+/* Поиск */
+.search-box {
+ flex: 1 1 220px;
+ min-width: 150px;
+}
+
+.search-box form {
+ display: flex;
+ gap: 0.4rem;
+ align-items: center;
+}
+
+.search-box input[type="text"] {
+ flex: 1;
+ padding: 0.5rem 1rem;
+ border: 1.5px solid var(--border-color);
+ border-radius: 50px;
+ background: var(--bg-primary);
+ color: var(--text-primary);
+ font-size: 0.85rem;
+ transition: border-color 0.2s ease, box-shadow 0.2s ease;
+ outline: none;
+ min-width: 80px;
+ height: 38px;
+ box-sizing: border-box;
+}
+
+.search-box input[type="text"]:focus {
+ border-color: var(--accent-blue);
+ box-shadow: 0 0 0 3px rgba(9, 132, 227, 0.12);
+}
+
+.search-box button {
+ padding: 0 1.2rem;
+ background: var(--accent-blue);
+ color: white;
+ border: none;
+ border-radius: 50px;
+ cursor: pointer;
+ font-weight: 600;
+ font-size: 0.85rem;
+ transition: background 0.2s ease, transform 0.15s ease;
+ white-space: nowrap;
+ height: 38px;
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ box-sizing: border-box;
+}
+
+.search-box button:hover {
+ background: var(--accent-orange);
+ transform: scale(1.02);
+}
+
+/* Группы настроек */
+.settings-group {
+ display: flex;
+ align-items: center;
+ gap: 0.25rem;
+ flex-wrap: wrap;
+}
+
+.settings-label {
+ color: var(--text-muted);
+ font-weight: 500;
+ font-size: 0.7rem;
+ text-transform: uppercase;
+ letter-spacing: 0.3px;
+ margin-right: 0.15rem;
+}
+
+/* Разделитель между группами */
+.settings-divider {
+ width: 1px;
+ height: 30px;
+ background: var(--border-color);
+ margin: 0 0.25rem;
+}
+
+@media (max-width: 768px) {
+ .settings-divider {
+ display: none;
+ }
+}
+
+/* Кнопки вида и сортировки */
+.view-btn,
+.sort-btn {
+ padding: 0 0.9rem;
+ background: transparent;
+ border: 1.5px solid var(--border-color);
+ border-radius: 50px;
+ color: var(--text-secondary);
+ font-size: 0.78rem;
+ cursor: pointer;
+ transition: all 0.15s ease;
+ font-weight: 500;
+ text-decoration: none;
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ height: 38px;
+ line-height: 1;
+ gap: 0.2rem;
+ box-sizing: border-box;
+ white-space: nowrap;
+}
+
+.view-btn:hover,
+.sort-btn:hover {
+ background: var(--hover-bg);
+ border-color: var(--accent-blue);
+ color: var(--text-primary);
+}
+
+.view-btn.active,
+.sort-btn.active {
+ background: var(--accent-blue);
+ color: white !important;
+ border-color: var(--accent-blue);
+}
+
+.view-btn .icon,
+.sort-btn .icon {
+ font-size: 0.85rem;
+ line-height: 1;
+}
+
+/* Скрываем старый settings-row */
+.settings-row {
+ display: none !important;
+}
+
+/* ============================================
+ СПИСОК ФАЙЛОВ
+ ============================================ */
+ul {
+ list-style: none;
+ padding: 0;
+ margin: 0;
+}
+
+li {
+ padding: 0.6rem 1.25rem;
+ border-bottom: 1px solid var(--border-light);
+ display: flex;
+ align-items: center;
+ flex-wrap: nowrap;
+ transition: background 0.15s ease;
+}
+
+li:hover {
+ background: var(--hover-bg);
+}
+
+li:last-child {
+ border-bottom: none;
+}
+
+li.section-title {
+ color: var(--text-secondary);
+ font-size: 0.8rem;
+ font-weight: 600;
+ padding: 0.5rem 1.25rem;
+ border-bottom: 2px solid var(--border-color);
+ background: var(--bg-primary);
+ text-transform: uppercase;
+ letter-spacing: 0.5px;
+ margin-top: 0.5rem;
+}
+
+li.section-title:first-of-type {
+ margin-top: 0;
+}
+
+/* ============================================
+ ФАЙЛОВАЯ СТРОКА — ФИНАЛЬНЫЙ ФИКС
+ ============================================ */
.file-row {
display: flex;
align-items: center;
justify-content: space-between;
flex-grow: 1;
min-width: 0;
- gap: 1rem;
+ gap: 0.75rem;
flex-wrap: nowrap;
+ width: 100%;
}
-.file-link {
- color: var(--accent-blue);
- font-weight: 500;
- text-decoration: none;
- display: flex;
- align-items: center;
- flex-grow: 1;
- min-width: 0;
-}
-
+.file-link,
.dir-link {
- color: var(--accent-green);
- font-weight: 600;
- text-decoration: none;
display: flex;
align-items: center;
- flex-grow: 1;
+ flex: 1 1 auto;
+ min-width: 0;
+ gap: 0.6rem;
+ overflow: hidden;
+ text-decoration: none;
+ color: var(--text-primary);
+}
+
+.file-link .file-name {
+ font-weight: 500;
+}
+
+.dir-link .file-name {
+ font-weight: 600;
+}
+
+.file-link:hover .file-name {
+ color: var(--accent-blue);
+}
+
+.dir-link:hover .file-name {
+ color: var(--accent-orange);
+}
+
+.file-icon {
+ font-size: 1.3rem;
+ flex-shrink: 0;
+ width: 28px;
+ min-width: 28px;
+ max-width: 28px;
+ text-align: center;
+ line-height: 1;
+}
+
+.file-name {
+ flex: 1 1 auto;
+ min-width: 0;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ font-size: 0.92rem;
+ transition: color 0.15s ease;
}
.file-controls {
display: flex;
align-items: center;
- gap: 0.5rem;
+ gap: 0.3rem;
flex-shrink: 0;
flex-wrap: nowrap;
+ margin-left: auto;
}
.file-meta {
color: var(--text-muted);
- font-size: 0.85rem;
- font-weight: 600;
+ font-size: 0.75rem;
+ font-weight: 500;
white-space: nowrap;
text-align: right;
font-variant-numeric: tabular-nums;
+ flex-shrink: 0;
}
.file-meta.date {
- min-width: 90px;
+ min-width: 80px;
+ width: 80px;
}
.file-meta.size {
- min-width: 70px;
+ min-width: 60px;
+ width: 60px;
+ text-align: right;
+ flex-shrink: 0;
}
-@media (max-width: 768px) {
- .file-meta {
- font-size: 0.7rem;
- }
- .file-meta.date {
- min-width: 75px;
- }
- .file-meta.size {
- min-width: 60px;
- }
-}
-
-@media (max-width: 480px) {
- .file-meta.date {
- display: none !important;
- }
- .file-meta.size {
- font-size: 0.65rem;
- min-width: 50px;
- }
-}
-
-.file-icon {
- margin-right: 0.75rem;
- font-size: 1.3rem;
- flex-shrink: 0;
- width: 24px;
- text-align: center;
-}
-
-.file-name {
- flex-grow: 1;
- min-width: 0;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- font-size: 0.95rem;
-}
-
-.section-title {
- color: var(--text-secondary);
- font-size: 0.9rem;
- font-weight: 600;
- margin: 1.5rem 0 0.5rem 0;
- padding: 0.75rem 0.5rem;
- border-bottom: 2px solid var(--border-light);
- text-transform: uppercase;
- letter-spacing: 0.5px;
- background: var(--bg-primary);
-}
-
-.stats {
- text-align: center;
- color: var(--text-secondary);
- margin-top: 2rem;
- padding-top: 1.5rem;
- border-top: 1px solid var(--border-color);
- font-size: 0.9rem;
-}
-
-.empty-state {
- text-align: center;
- padding: 3rem 1rem;
- color: var(--text-secondary);
-}
-
-.empty-state .icon {
- font-size: 3rem;
- margin-bottom: 1rem;
- opacity: 0.5;
-}
-
-.footer {
- background: var(--bg-primary);
- border-top: 1px solid var(--border-color);
- padding: 1rem;
- text-align: center;
- color: var(--text-secondary);
- font-size: 0.9rem;
-}
-
-.footer-content {
- max-width: 1000px;
- margin: 0 auto;
- text-align: center;
-}
-
-.footer-content span,
-.footer-content a {
- display: inline;
- vertical-align: baseline;
-}
-
-.footer-link {
- color: var(--accent-blue);
- text-decoration: none;
- font-weight: 500;
- transition: opacity 0.2s ease;
- margin-left: 0.3rem;
-}
-
-.footer-link:hover {
- opacity: 0.8;
- text-decoration: underline;
-}
-
-/* ================================================
- ЕДИНЫЙ СТИЛЬ ДЛЯ ВСЕХ КНОПОК
- ================================================ */
-.preview-btn, .copy-btn, .download-btn {
+/* Кнопки — фиксированный размер */
+.preview-btn,
+.copy-btn,
+.download-btn {
background: transparent;
- color: var(--text-secondary);
border: 1px solid var(--border-color);
border-radius: 6px;
width: 32px;
height: 32px;
+ min-width: 32px;
+ min-height: 32px;
+ max-width: 32px;
+ max-height: 32px;
cursor: pointer;
- font-size: 0.85rem;
+ font-size: 0.8rem;
display: inline-flex;
align-items: center;
justify-content: center;
- transition: all 0.2s ease;
- opacity: 0.7;
+ transition: all 0.15s ease;
+ opacity: 0.6;
+ color: var(--text-secondary);
+ padding: 0;
+ box-sizing: border-box;
flex-shrink: 0;
}
-.preview-btn:hover, .copy-btn:hover, .download-btn:hover {
- background: var(--accent-blue);
- color: white;
- border-color: var(--accent-blue);
+.preview-btn:hover,
+.copy-btn:hover,
+.download-btn:hover {
opacity: 1;
transform: scale(1.05);
}
-/* ================================================
- ТУЛБАР (поиск + сортировка)
- ================================================ */
-.toolbar {
- display: flex;
- flex-wrap: wrap;
- align-items: center;
- gap: 1rem;
- padding: 0.75rem 0.5rem;
- margin-bottom: 1rem;
- background: var(--bg-primary);
- border-radius: 0px;
- border: 1px solid var(--border-color);
-}
-
-.search-box {
- flex: 1 1 200px;
- min-width: 150px;
-}
-
-.search-box form {
- display: flex;
- gap: 0.5rem;
-}
-
-.search-box input[type="text"] {
- flex: 1;
- padding: 0.5rem 0.75rem;
- border: 1px solid var(--border-color);
- border-radius: 6px;
- background: var(--bg-secondary);
- color: var(--text-primary);
- font-size: 0.9rem;
- min-width: 100px;
-}
-
-.search-box input[type="text"]:focus {
- outline: none;
+.preview-btn:hover {
+ background: var(--accent-blue);
+ color: white;
border-color: var(--accent-blue);
}
-.search-box button {
- padding: 0.5rem 1rem;
+.copy-btn:hover {
background: var(--accent-blue);
color: white;
- border: none;
- border-radius: 6px;
- cursor: pointer;
- font-weight: 500;
- white-space: nowrap;
+ border-color: var(--accent-blue);
}
-.search-box button:hover {
+.download-btn:hover {
background: var(--accent-green);
-}
-
-.sort-buttons {
- display: flex;
- align-items: center;
- gap: 0.3rem;
- flex-wrap: wrap;
-}
-
-.sort-label {
- font-size: 0.8rem;
- color: var(--text-secondary);
- font-weight: 500;
- margin-right: 0.2rem;
- white-space: nowrap;
-}
-
-.sort-btn {
- padding: 0.4rem 0.75rem;
- background: var(--bg-secondary);
- color: var(--text-secondary);
- border: 1px solid var(--border-color);
- border-radius: 6px;
- text-decoration: none;
- font-size: 0.8rem;
- transition: all 0.2s ease;
- white-space: nowrap;
-}
-
-.sort-btn:hover {
- background: var(--hover-bg);
- border-color: var(--accent-blue);
-}
-
-.sort-btn.active {
- background: var(--accent-blue);
color: white;
- border-color: var(--accent-blue);
+ border-color: var(--accent-green);
}
-/* ================================================
- Стили для формы ввода пароля
- ================================================ */
+/* ============================================
+ СТАТИСТИКА
+ ============================================ */
+.stats {
+ text-align: center;
+ color: var(--text-secondary);
+ margin-top: 2rem;
+ padding: 1rem 1.25rem;
+ border-top: 1px solid var(--border-color);
+ font-size: 0.9rem;
+ background: var(--bg-primary);
+}
+
+.empty-state {
+ text-align: center;
+ padding: 3rem 1rem;
+ color: var(--text-secondary);
+}
+
+.empty-state .icon {
+ font-size: 3rem;
+ margin-bottom: 1rem;
+ opacity: 0.5;
+}
+
+/* ============================================
+ ПАРОЛЬНАЯ ФОРМА
+ ============================================ */
.password-form-container {
display: flex;
justify-content: center;
@@ -584,14 +615,13 @@ li:hover {
text-decoration: underline;
}
-/* Стиль для защищенной папки */
.protected-folder {
position: relative;
}
-/* ================================================
- Модальное окно предпросмотра
- ================================================ */
+/* ============================================
+ МОДАЛКА
+ ============================================ */
.preview-modal {
display: none;
position: fixed;
@@ -600,31 +630,42 @@ li:hover {
top: 0;
width: 100%;
height: 100%;
- background-color: rgba(0,0,0,0.8);
+ background-color: rgba(0, 0, 0, 0.7);
backdrop-filter: blur(5px);
+ -webkit-backdrop-filter: blur(5px);
overflow: auto;
}
+.preview-modal.open {
+ display: flex !important;
+ align-items: center;
+ justify-content: center;
+}
+
.preview-content {
background: var(--bg-secondary);
- margin: 2% auto;
- padding: 0;
- border-radius: 8px;
- box-shadow: 0 10px 30px rgba(0,0,0,0.3);
+ border-radius: 12px;
+ box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
display: flex;
flex-direction: column;
overflow: hidden;
- transition: all 0.3s ease;
+ max-width: 90vw;
+ max-height: 90vh;
+ width: auto;
+ height: auto;
+ min-width: 320px;
+ min-height: 200px;
}
.preview-header {
display: flex;
justify-content: space-between;
align-items: center;
- padding: 1rem;
+ padding: 0.75rem 1rem;
border-bottom: 1px solid var(--border-color);
background: var(--bg-primary);
flex-shrink: 0;
+ gap: 1rem;
}
.preview-title {
@@ -635,38 +676,37 @@ li:hover {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
- padding-right: 1rem;
+ font-size: 0.95rem;
}
.close-preview {
- background: #dc3545;
- color: white;
+ background: transparent;
+ color: var(--text-secondary);
border: none;
- border-radius: 4px;
- width: 36px;
- height: 36px;
+ border-radius: 6px;
+ width: 34px;
+ height: 34px;
cursor: pointer;
- font-size: 1.2rem;
+ font-size: 1.4rem;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
- transition: background 0.2s ease;
+ transition: all 0.15s ease;
}
.close-preview:hover {
- background: #c82333;
+ background: #dc3545;
+ color: white;
}
.preview-iframe {
flex-grow: 1;
border: none;
- background: white;
+ background: var(--bg-secondary);
min-height: 0;
-}
-
-.preview-iframe.pdf {
- background: var(--bg-primary);
+ width: 100%;
+ height: 100%;
}
.preview-image-container {
@@ -674,7 +714,7 @@ li:hover {
align-items: center;
justify-content: center;
flex-grow: 1;
- padding: 10px;
+ padding: 1rem;
background: var(--bg-primary);
overflow: hidden;
width: 100%;
@@ -687,28 +727,130 @@ li:hover {
width: auto;
height: auto;
object-fit: contain;
- border-radius: 8px;
- box-shadow: 0 4px 20px rgba(0,0,0,0.2);
+ border-radius: 4px;
+ box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
display: block;
}
-.preview-modal::-webkit-scrollbar {
- width: 8px;
+/* Форма пароля в модалке */
+#passwordFormContainer {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ padding: 2rem;
+ flex-grow: 1;
+ min-height: 300px;
}
-.preview-modal::-webkit-scrollbar-track {
- background: rgba(255,255,255,0.1);
+#passwordFormContainer > div {
+ background: var(--bg-secondary);
+ border: 1px solid var(--border-color);
+ border-radius: 12px;
+ padding: 2rem;
+ max-width: 400px;
+ width: 100%;
+ text-align: center;
+ box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
-.preview-modal::-webkit-scrollbar-thumb {
- background: rgba(255,255,255,0.3);
- border-radius: 4px;
+/* ============================================
+ ФУТЕР — НЕ УВЕЛИЧИВАЕМ
+ ============================================ */
+.footer {
+ background: var(--bg-primary);
+ border-top: 1px solid var(--border-color);
+ padding: 1.5rem 1rem;
+ text-align: center;
+ color: var(--text-secondary);
+ font-size: 0.85rem;
}
-.preview-modal::-webkit-scrollbar-thumb:hover {
- background: rgba(255,255,255,0.5);
+.footer a {
+ color: var(--accent-blue);
+ text-decoration: none;
+ font-weight: 500;
+ transition: opacity 0.15s ease;
}
+.footer a:hover {
+ opacity: 0.7;
+}
+
+/* ============================================
+ ТЕМА И СКРОЛЛ
+ ============================================ */
+.theme-toggle {
+ position: fixed;
+ top: 12px;
+ right: 12px;
+ background: rgba(255,255,255,0.15);
+ border: 1px solid rgba(255,255,255,0.2);
+ border-radius: 50%;
+ width: 48px;
+ height: 48px;
+ font-size: 1.3rem;
+ cursor: pointer;
+ z-index: 1000;
+ backdrop-filter: blur(10px);
+ -webkit-backdrop-filter: blur(10px);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ transition: all 0.3s ease;
+ color: white;
+}
+
+.dark-theme .theme-toggle {
+ background: rgba(0,0,0,0.3);
+ border-color: rgba(255,255,255,0.1);
+ color: var(--text-primary);
+}
+
+.theme-toggle:hover {
+ transform: scale(1.1);
+ background: rgba(255,255,255,0.25);
+}
+
+.dark-theme .theme-toggle:hover {
+ background: rgba(0,0,0,0.4);
+}
+
+.scroll-top {
+ position: fixed;
+ bottom: 20px;
+ right: 20px;
+ width: 48px;
+ height: 48px;
+ background: var(--accent-blue);
+ color: white;
+ border: none;
+ border-radius: 50%;
+ font-size: 1.3rem;
+ cursor: pointer;
+ opacity: 0;
+ visibility: hidden;
+ transition: all 0.3s ease;
+ z-index: 1000;
+ box-shadow: 0 2px 12px rgba(0,0,0,0.2);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.scroll-top.visible {
+ opacity: 1;
+ visibility: visible;
+}
+
+.scroll-top:hover {
+ background: var(--accent-green);
+ transform: translateY(-2px);
+ box-shadow: 0 4px 20px rgba(0,0,0,0.3);
+}
+
+/* ============================================
+ УВЕДОМЛЕНИЕ
+ ============================================ */
#copyNotification {
position: fixed;
bottom: 80px;
@@ -725,243 +867,521 @@ li:hover {
opacity: 1;
}
-/* ================================================
- Адаптивность
- ================================================ */
+/* ============================================
+ АДАПТИВ — ПЛАНШЕТЫ
+ ============================================ */
@media (max-width: 768px) {
- .preview-content {
- margin: 2.5% auto;
+ .header {
+ padding: 1.25rem 1rem;
}
- .preview-header {
- padding: 0.75rem;
+ .header h1 {
+ font-size: 1.5rem;
}
- .preview-title {
- font-size: 0.9rem;
+
+ .toolbar {
+ flex-direction: column;
+ align-items: stretch;
+ gap: 0.4rem;
+ padding: 0.6rem 1rem;
}
- .preview-image-container {
- padding: 5px;
+
+ .search-box {
+ flex: 1 1 100%;
+ min-width: 0;
+ }
+
+ .search-box form {
+ flex-wrap: nowrap;
+ }
+
+ .search-box input[type="text"] {
+ min-width: 60px;
+ font-size: 0.8rem;
+ padding: 0.4rem 0.8rem;
+ height: 34px;
+ }
+
+ .search-box button {
+ font-size: 0.8rem;
+ padding: 0 0.9rem;
+ height: 34px;
+ }
+
+ .settings-group {
+ flex-wrap: wrap;
+ justify-content: center;
+ min-height: 34px;
+ align-items: center;
+ }
+
+ .view-btn,
+ .sort-btn {
+ font-size: 0.75rem;
+ padding: 0 0.7rem;
+ height: 34px;
+ }
+
+ .settings-divider {
+ height: 26px;
+ }
+
+ .file-controls {
+ gap: 0.2rem;
+ }
+
+ .preview-btn,
+ .copy-btn,
+ .download-btn {
+ width: 28px;
+ height: 28px;
+ min-width: 28px;
+ min-height: 28px;
+ max-width: 28px;
+ max-height: 28px;
+ font-size: 0.7rem;
+ }
+
+ .file-icon {
+ font-size: 1.2rem;
+ width: 24px;
+ }
+
+ .file-name {
+ font-size: 0.85rem;
}
li {
- padding: 0.5rem 0.25rem !important;
- flex-wrap: nowrap !important;
- }
- .file-row {
- flex-wrap: nowrap !important;
- gap: 0.3rem !important;
- }
- .file-controls {
- flex-wrap: nowrap !important;
- gap: 0.15rem !important;
+ padding: 0.5rem 0.75rem;
}
+
.file-meta.date {
- min-width: 60px !important;
+ min-width: 60px;
+ width: 60px;
}
+
.file-meta.size {
- min-width: 50px !important;
- font-size: 0.65rem !important;
+ min-width: 50px;
+ width: 50px;
}
- .toolbar {
- flex-wrap: wrap !important;
- gap: 0.5rem !important;
- padding: 0.5rem !important;
+
+ .breadcrumb {
+ padding: 0.5rem 0.75rem;
+ font-size: 0.8rem;
}
- .search-box {
- flex: 1 1 100% !important;
- min-width: 0 !important;
+
+ .preview-content {
+ max-width: 96vw;
+ max-height: 92vh;
+ min-width: auto;
+ border-radius: 8px;
}
- .sort-buttons {
- flex-wrap: wrap !important;
- justify-content: center !important;
+
+ #passwordFormContainer {
+ padding: 1.5rem;
+ min-height: 250px;
+ }
+
+ #passwordFormContainer > div {
+ padding: 1.5rem;
}
}
+/* ============================================
+ АДАПТИВ — МОБИЛКИ (ВСЁ УВЕЛИЧЕНО)
+ ============================================ */
@media (max-width: 480px) {
+ .header {
+ padding: 1.25rem 0.75rem;
+ }
+ .header h1 {
+ font-size: 1.6rem;
+ }
+ .header .subtitle {
+ font-size: 1rem;
+ }
+
.toolbar {
- flex-direction: column !important;
- align-items: stretch !important;
- gap: 0.5rem !important;
- padding: 0.5rem !important;
+ flex-direction: column;
+ align-items: stretch;
+ gap: 0.6rem;
+ padding: 0.75rem 0.75rem;
}
+
.search-box {
- width: 100% !important;
- min-width: 0 !important;
- flex: 1 1 auto !important;
+ width: 100%;
+ min-width: 0;
}
+
.search-box form {
- flex-wrap: nowrap !important;
- width: 100% !important;
+ flex-wrap: nowrap;
+ width: 100%;
+ gap: 0.5rem;
}
+
.search-box input[type="text"] {
- flex: 1 1 auto !important;
- min-width: 60px !important;
- font-size: 0.85rem !important;
- padding: 0.5rem 0.6rem !important;
+ font-size: 0.9rem;
+ padding: 0.6rem 0.8rem;
+ min-width: 60px;
+ height: 44px;
+ flex: 1;
}
+
.search-box button {
- flex: 0 0 auto !important;
- font-size: 0.8rem !important;
- padding: 0.4rem 0.7rem !important;
- white-space: nowrap !important;
+ font-size: 0.9rem;
+ padding: 0 1rem;
+ height: 44px;
+ flex-shrink: 0;
}
- .sort-buttons {
- display: flex !important;
- flex-wrap: wrap !important;
- justify-content: center !important;
- gap: 0.3rem !important;
- width: 100% !important;
+
+ .settings-group {
+ gap: 0.3rem;
+ flex-wrap: wrap;
+ justify-content: center;
+ min-height: 40px;
+ align-items: center;
}
- .sort-label {
- font-size: 0.65rem !important;
- width: 100% !important;
- text-align: center !important;
- margin-right: 0 !important;
+
+ .settings-label {
+ font-size: 0.7rem;
+ flex-shrink: 0;
}
+
+ .view-btn,
.sort-btn {
- flex: 0 1 auto !important;
- font-size: 0.65rem !important;
- padding: 0.25rem 0.4rem !important;
+ font-size: 0.8rem;
+ padding: 0 0.8rem;
+ height: 38px;
+ border-width: 1.5px;
+ flex-shrink: 0;
+ }
+
+ .view-btn .icon,
+ .sort-btn .icon {
+ font-size: 0.85rem;
+ }
+
+ /* ===== ФАЙЛОВАЯ СТРОКА — ФИКС ===== */
+ .file-row {
+ gap: 0.3rem !important;
+ flex-wrap: nowrap !important;
+ }
+
+ .file-link,
+ .dir-link {
+ gap: 0.3rem !important;
+ flex: 1 1 auto !important;
+ min-width: 0 !important;
+ }
+
+ .file-icon {
+ font-size: 1.4rem !important;
+ width: 32px !important;
+ min-width: 32px !important;
+ flex-shrink: 0 !important;
+ }
+
+ .file-name {
+ font-size: 0.95rem !important;
+ flex: 1 1 auto !important;
+ min-width: 0 !important;
+ overflow: hidden !important;
+ text-overflow: ellipsis !important;
white-space: nowrap !important;
}
- .preview-btn, .copy-btn, .download-btn {
- width: 26px !important;
- height: 26px !important;
- font-size: 0.65rem !important;
- padding: 0 !important;
+
+ .file-controls {
+ gap: 0.3rem !important;
+ flex-shrink: 0 !important;
+ margin-left: auto !important;
}
+
+ .file-meta.size {
+ font-size: 0.75rem !important;
+ min-width: 50px !important;
+ width: auto !important;
+ flex-shrink: 0 !important;
+ text-align: right !important;
+ }
+
.file-meta.date {
display: none !important;
}
- .file-meta.size {
- font-size: 0.55rem !important;
- min-width: 35px !important;
- }
- .file-name {
- font-size: 0.75rem !important;
- }
- .file-icon {
- font-size: 1rem !important;
- width: 18px !important;
- margin-right: 0.3rem !important;
- }
- .file-controls {
- gap: 0.1rem !important;
+
+ .preview-btn,
+ .copy-btn,
+ .download-btn {
+ width: 38px !important;
+ height: 38px !important;
+ min-width: 38px !important;
+ min-height: 38px !important;
+ max-width: 38px !important;
+ max-height: 38px !important;
+ font-size: 0.9rem !important;
+ flex-shrink: 0 !important;
+ padding: 0 !important;
+ border-width: 1.5px !important;
+ margin: 0 !important;
+ border-radius: 8px !important;
}
+
li {
- padding: 0.3rem 0.15rem !important;
+ padding: 0.6rem 0.6rem !important;
+ min-height: 56px !important;
}
- .file-row {
- gap: 0.15rem !important;
- }
- .theme-toggle {
- top: 5px;
- right: 5px;
- width: 45px;
- height: 45px;
- font-size: 1.2rem;
- }
- .scroll-top {
- bottom: 15px;
- right: 15px;
- width: 45px;
- height: 45px;
- font-size: 1.2rem;
- }
- .header {
- padding: 1rem 0.5rem;
- }
- h1 {
- font-size: 1.5rem;
- padding: 0 0.5rem;
- }
- .content {
- padding: 0.5rem;
- }
- .breadcrumb {
- padding: 0.5rem;
- font-size: 0.8rem;
- }
- .section-title {
- font-size: 0.8rem;
- padding: 0.4rem;
- margin: 0.75rem 0 0.25rem 0;
- }
- .footer {
- padding: 0.5rem;
- font-size: 0.8rem;
- }
- .preview-content {
- margin: 1% auto;
- border-radius: 4px;
- }
- .preview-image-container {
- padding: 2px;
- }
- .preview-image {
- border-radius: 4px;
- box-shadow: 0 2px 10px rgba(0,0,0,0.2);
- }
- #copyNotification {
- bottom: 60px;
- padding: 8px 16px;
+
+ li.section-title {
font-size: 0.85rem;
+ padding: 0.5rem 0.6rem;
+ }
+
+ /* ===== ХЛЕБНЫЕ КРОШКИ ===== */
+ .breadcrumb {
+ padding: 0.6rem 0.75rem;
+ font-size: 0.9rem;
+ gap: 0.3rem;
+ }
+ .breadcrumb a {
+ padding: 0.2rem 0.3rem;
+ }
+
+ /* ===== СТАТИСТИКА ===== */
+ .stats {
+ font-size: 0.85rem;
+ padding: 0.75rem 0.6rem;
+ }
+
+ /* ===== ТЕМА И СКРОЛЛ ===== */
+ .theme-toggle {
+ top: 8px;
+ right: 8px;
+ width: 48px;
+ height: 48px;
+ font-size: 1.3rem;
+ }
+
+ .scroll-top {
+ bottom: 20px;
+ right: 20px;
+ width: 48px;
+ height: 48px;
+ font-size: 1.3rem;
+ }
+
+ /* ===== ФУТЕР (НЕ УВЕЛИЧИВАЕМ) ===== */
+ .footer {
+ padding: 1rem 0.75rem;
+ font-size: 0.8rem;
+ }
+
+ /* ===== МОДАЛКА ===== */
+ .preview-content {
+ max-width: 98vw;
+ max-height: 95vh;
+ border-radius: 8px;
+ min-height: 150px;
+ }
+
+ .preview-header {
+ padding: 0.6rem 0.8rem;
+ }
+
+ .preview-title {
+ font-size: 0.9rem;
+ }
+
+ .close-preview {
+ width: 34px;
+ height: 34px;
+ font-size: 1.2rem;
+ }
+
+ .preview-image-container {
+ padding: 0.5rem;
+ }
+
+ #passwordFormContainer {
+ padding: 1rem;
+ min-height: 200px;
+ }
+
+ #passwordFormContainer > div {
+ padding: 1.5rem 1rem;
+ border-radius: 8px;
+ }
+
+ /* ===== ФОРМА ПАРОЛЯ ===== */
+ .password-form {
+ padding: 1.5rem 1rem;
+ }
+ .password-form .lock-icon {
+ font-size: 2.5rem;
+ }
+ .password-form h2 {
+ font-size: 1.2rem;
+ }
+ .password-form p {
+ font-size: 0.9rem;
+ }
+ .password-form input[type="password"] {
+ font-size: 1rem;
+ padding: 0.7rem 0.8rem;
+ height: 48px;
+ }
+ .password-form button {
+ font-size: 1rem;
+ padding: 0.7rem;
+ height: 48px;
}
}
+/* ============================================
+ АДАПТИВ — ОЧЕНЬ МАЛЕНЬКИЕ ЭКРАНЫ
+ ============================================ */
@media (max-width: 360px) {
- .container {
- min-width: 100%;
- margin: 0;
- }
- .file-name {
- font-size: 0.7rem !important;
- }
- .file-meta.size {
- font-size: 0.5rem !important;
- min-width: 28px !important;
- }
- .preview-btn, .copy-btn, .download-btn {
- width: 20px !important;
- height: 20px !important;
- font-size: 0.5rem !important;
+ .header h1 {
+ font-size: 1.3rem;
}
+
.search-box input[type="text"] {
- font-size: 0.75rem !important;
- padding: 0.3rem 0.4rem !important;
- min-width: 40px !important;
+ font-size: 0.8rem;
+ height: 40px;
+ padding: 0.4rem 0.6rem;
}
.search-box button {
- font-size: 0.7rem !important;
- padding: 0.3rem 0.5rem !important;
+ font-size: 0.8rem;
+ height: 40px;
+ padding: 0 0.7rem;
}
+
+ .view-btn,
.sort-btn {
- font-size: 0.6rem !important;
- padding: 0.2rem 0.3rem !important;
+ font-size: 0.7rem;
+ padding: 0 0.5rem;
+ height: 34px;
+ }
+
+ .file-icon {
+ font-size: 1.2rem !important;
+ width: 28px !important;
+ min-width: 28px !important;
+ }
+
+ .file-name {
+ font-size: 0.85rem !important;
+ }
+
+ .preview-btn,
+ .copy-btn,
+ .download-btn {
+ width: 34px !important;
+ height: 34px !important;
+ min-width: 34px !important;
+ min-height: 34px !important;
+ max-width: 34px !important;
+ max-height: 34px !important;
+ font-size: 0.8rem !important;
+ border-radius: 6px !important;
+ }
+
+ .file-meta.size {
+ font-size: 0.65rem !important;
+ min-width: 40px !important;
+ }
+
+ li {
+ padding: 0.4rem 0.4rem !important;
+ min-height: 48px !important;
+ }
+
+ .file-row {
+ gap: 0.3rem !important;
+ }
+
+ .theme-toggle {
+ width: 40px;
+ height: 40px;
+ font-size: 1.1rem;
+ top: 6px;
+ right: 6px;
+ }
+
+ .scroll-top {
+ width: 40px;
+ height: 40px;
+ font-size: 1.1rem;
+ bottom: 16px;
+ right: 16px;
+ }
+
+ .password-form input[type="password"] {
+ height: 42px;
+ font-size: 0.9rem;
+ }
+ .password-form button {
+ height: 42px;
+ font-size: 0.9rem;
}
}
-/* ================================================
- ПЕРЕОПРЕДЕЛЕНИЕ МОДАЛКИ (фикс темы)
- ================================================ */
-.preview-content {
- background: var(--modal-bg) !important;
- color: var(--modal-text) !important;
- border: 1px solid var(--modal-border) !important;
+/* ===== ФАЙЛЫ — МОБИЛКИ ===== */
+.file-row {
+ gap: 0.3rem !important;
}
-.preview-header {
- background: var(--modal-header-bg) !important;
- border-bottom: 1px solid var(--modal-border) !important;
+.file-link,
+.dir-link {
+ gap: 0.3rem !important;
+ flex: 1 1 auto !important;
}
-.preview-title {
- color: var(--modal-text) !important;
+.file-icon {
+ font-size: 1.4rem !important;
+ width: 32px !important;
+ min-width: 32px !important;
+ max-width: 32px !important;
+ flex-shrink: 0 !important;
}
-.preview-iframe {
- background: var(--bg-primary) !important;
+.file-name {
+ font-size: 0.95rem !important;
+ flex: 1 1 auto !important;
+ min-width: 0 !important;
}
-.preview-image-container {
- background: var(--bg-primary) !important;
+.file-link .file-name {
+ font-weight: 500 !important;
}
+
+.dir-link .file-name {
+ font-weight: 600 !important;
+}
+
+.file-controls {
+ gap: 0.3rem !important;
+ flex-shrink: 0 !important;
+ margin-left: auto !important;
+}
+
+.file-meta.size {
+ font-size: 0.75rem !important;
+ min-width: 50px !important;
+ width: auto !important;
+ flex-shrink: 0 !important;
+}
+
+.file-meta.date {
+ display: none !important;
+}
+
+.preview-btn,
+.copy-btn,
+.download-btn {
+ width: 38px !important;
+ height: 38px !important;
+ min-width: 38px !important;
+ min-height: 38px !important;
+ max-width: 38px !important;
+ max-height: 38px !important;
+ font-size: 0.9rem !important;
+ flex-shrink: 0 !important;
+}
\ No newline at end of file
diff --git a/template.html b/template.html
index 5ec6651..8d225ae 100644
--- a/template.html
+++ b/template.html
@@ -130,14 +130,21 @@
@@ -154,7 +161,55 @@