поиск и еще мелочи

This commit is contained in:
2026-07-23 19:25:29 +08:00
parent 97fa1d180b
commit f93e2e8372
3 changed files with 793 additions and 204 deletions

View File

@@ -37,29 +37,36 @@
})();
</script>
<style>
/* Стили для кнопки копирования */
.copy-btn {
background: transparent;
color: var(--text-secondary);
border: 1px solid var(--border-color);
border-radius: 6px;
width: 32px;
height: 32px;
cursor: pointer;
font-size: 0.85rem;
display: inline-flex;
align-items: center;
justify-content: center;
transition: all 0.2s ease;
opacity: 0.7;
/* Все кнопки в едином стиле */
.preview-btn,
.copy-btn,
.download-btn {
background: transparent !important;
color: var(--text-secondary) !important;
border: 1px solid var(--border-color) !important;
border-radius: 6px !important;
width: 32px !important;
height: 32px !important;
cursor: pointer !important;
font-size: 0.85rem !important;
display: inline-flex !important;
align-items: center !important;
justify-content: center !important;
transition: all 0.2s ease !important;
opacity: 0.7 !important;
flex-shrink: 0 !important;
}
.copy-btn:hover {
background: var(--accent-blue);
color: white;
border-color: var(--accent-blue);
opacity: 1;
transform: scale(1.05);
.preview-btn:hover,
.copy-btn:hover,
.download-btn:hover {
background: var(--accent-blue) !important;
color: white !important;
border-color: var(--accent-blue) !important;
opacity: 1 !important;
transform: scale(1.05) !important;
}
/* Уведомление */
#copyNotification {
position: fixed;
@@ -76,11 +83,14 @@
transition: opacity 0.3s;
opacity: 1;
}
@media (max-width: 480px) {
.copy-btn {
width: 28px;
height: 28px;
font-size: 0.8rem;
.preview-btn,
.copy-btn,
.download-btn {
width: 28px !important;
height: 28px !important;
font-size: 0.75rem !important;
}
}
</style>
@@ -213,7 +223,17 @@
return true;
};
// ========== НОВАЯ ФУНКЦИЯ КОПИРОВАНИЯ ==========
// === СКАЧИВАНИЕ ФАЙЛА ===
window.downloadFile = function(path) {
const link = document.createElement('a');
link.href = path;
link.download = path.split('/').pop();
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
};
// === КОПИРОВАНИЕ ССЫЛКИ ===
window.copyLink = function(path) {
const url = window.location.origin + path;
if (navigator.clipboard && navigator.clipboard.writeText) {
@@ -256,7 +276,6 @@
setTimeout(() => div.remove(), 400);
}, 2500);
}
// ==============================================
window.scrollToTop = function() {
window.scrollTo({