fix modal window not closing video
This commit is contained in:
@@ -310,6 +310,7 @@ export function renderFileTable(folder) {
|
|||||||
updateFileActionButtons();
|
updateFileActionButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Global function to show an image preview modal.
|
||||||
// Global function to show an image preview modal.
|
// Global function to show an image preview modal.
|
||||||
window.previewFile = function (fileUrl, fileName) {
|
window.previewFile = function (fileUrl, fileName) {
|
||||||
let modal = document.getElementById("filePreviewModal");
|
let modal = document.getElementById("filePreviewModal");
|
||||||
@@ -337,16 +338,31 @@ window.previewFile = function (fileUrl, fileName) {
|
|||||||
<div class="file-preview-container"></div>
|
<div class="file-preview-container"></div>
|
||||||
</div>`;
|
</div>`;
|
||||||
document.body.appendChild(modal);
|
document.body.appendChild(modal);
|
||||||
|
|
||||||
|
// Close event for the close button.
|
||||||
document.getElementById("closeFileModal").addEventListener("click", function () {
|
document.getElementById("closeFileModal").addEventListener("click", function () {
|
||||||
|
const video = modal.querySelector("video");
|
||||||
|
if (video) {
|
||||||
|
video.pause();
|
||||||
|
video.currentTime = 0;
|
||||||
|
}
|
||||||
modal.style.display = "none";
|
modal.style.display = "none";
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Close event when clicking outside the modal content.
|
||||||
modal.addEventListener("click", function (e) {
|
modal.addEventListener("click", function (e) {
|
||||||
if (e.target === modal) {
|
if (e.target === modal) {
|
||||||
|
const video = modal.querySelector("video");
|
||||||
|
if (video) {
|
||||||
|
video.pause();
|
||||||
|
video.currentTime = 0;
|
||||||
|
}
|
||||||
modal.style.display = "none";
|
modal.style.display = "none";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
modal.querySelector("h4").textContent = "Preview: " + fileName;
|
|
||||||
|
modal.querySelector("h4").textContent = fileName;
|
||||||
const container = modal.querySelector(".file-preview-container");
|
const container = modal.querySelector(".file-preview-container");
|
||||||
container.innerHTML = ""; // Clear previous content
|
container.innerHTML = ""; // Clear previous content
|
||||||
|
|
||||||
|
|||||||
106
styles.css
106
styles.css
@@ -44,7 +44,6 @@ body {
|
|||||||
/* FLEXBOX HEADER: LOGO, TITLE, BUTTONS FIXED */
|
/* FLEXBOX HEADER: LOGO, TITLE, BUTTONS FIXED */
|
||||||
/************************************************************/
|
/************************************************************/
|
||||||
|
|
||||||
/* 🔹 Header Container (Keeps Everything Aligned) */
|
|
||||||
.header-container {
|
.header-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -57,7 +56,6 @@ body {
|
|||||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 🔹 Dark Mode */
|
|
||||||
body.dark-mode .header-container {
|
body.dark-mode .header-container {
|
||||||
background-color: #1f1f1f;
|
background-color: #1f1f1f;
|
||||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
|
||||||
@@ -70,11 +68,10 @@ body.dark-mode .header-container {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.header-logo svg {
|
.header-logo svg {
|
||||||
height: 70px; /* Ensure the inline SVG matches the intended size */
|
height: 70px;
|
||||||
width: auto;
|
width: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 🔹 Header Layout */
|
|
||||||
header {
|
header {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -83,18 +80,15 @@ header {
|
|||||||
height: 80px;
|
height: 80px;
|
||||||
padding: 0 20px;
|
padding: 0 20px;
|
||||||
background-color: #2196F3;
|
background-color: #2196F3;
|
||||||
/* Light mode */
|
|
||||||
transition: background-color 0.3s ease;
|
transition: background-color 0.3s ease;
|
||||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 🔹 Dark Mode: Header */
|
|
||||||
body.dark-mode header {
|
body.dark-mode header {
|
||||||
background-color: #1f1f1f;
|
background-color: #1f1f1f;
|
||||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 🔹 Left Section (Logo) */
|
|
||||||
.header-left {
|
.header-left {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -102,7 +96,6 @@ body.dark-mode header {
|
|||||||
min-width: 100px;
|
min-width: 100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 🔹 Title (Perfectly Centered) */
|
|
||||||
.header-title {
|
.header-title {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
@@ -117,7 +110,6 @@ body.dark-mode header {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 🔹 Right Section (Buttons) */
|
|
||||||
.header-buttons {
|
.header-buttons {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -127,7 +119,6 @@ body.dark-mode header {
|
|||||||
gap: 10px;
|
gap: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 🔹 Buttons */
|
|
||||||
.header-buttons button {
|
.header-buttons button {
|
||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
@@ -143,7 +134,6 @@ body.dark-mode header {
|
|||||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 🔹 Small Screens: Stack Layout */
|
|
||||||
@media (max-width: 600px) {
|
@media (max-width: 600px) {
|
||||||
header {
|
header {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -174,26 +164,10 @@ body.dark-mode header {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.header-buttons button {
|
|
||||||
background: none;
|
|
||||||
border: none;
|
|
||||||
cursor: pointer;
|
|
||||||
padding: 10px;
|
|
||||||
border-radius: 50%;
|
|
||||||
color: #fff;
|
|
||||||
transition: background-color 0.2s ease, box-shadow 0.2s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-buttons button i {
|
.header-buttons button i {
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header-buttons button:hover {
|
|
||||||
background-color: rgba(255, 255, 255, 0.2);
|
|
||||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 🔹 Dark Mode Toggle Button */
|
|
||||||
.dark-mode-toggle {
|
.dark-mode-toggle {
|
||||||
background-color: #424242;
|
background-color: #424242;
|
||||||
border: 1px solid #fff;
|
border: 1px solid #fff;
|
||||||
@@ -213,7 +187,6 @@ body.dark-mode header {
|
|||||||
/* RESPONSIVE HEADER FIXES */
|
/* RESPONSIVE HEADER FIXES */
|
||||||
/************************************************************/
|
/************************************************************/
|
||||||
|
|
||||||
/* 🔹 Medium Screens */
|
|
||||||
@media (max-width: 900px) {
|
@media (max-width: 900px) {
|
||||||
.header-container {
|
.header-container {
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
@@ -234,7 +207,6 @@ body.dark-mode header {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 🔹 Small Screens */
|
|
||||||
@media (max-width: 600px) {
|
@media (max-width: 600px) {
|
||||||
.header-container {
|
.header-container {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -259,8 +231,6 @@ body.dark-mode header {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* end of header */
|
|
||||||
|
|
||||||
/* ===========================================================
|
/* ===========================================================
|
||||||
MATERIAL ICONS
|
MATERIAL ICONS
|
||||||
=========================================================== */
|
=========================================================== */
|
||||||
@@ -270,7 +240,6 @@ body.dark-mode header {
|
|||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* folder icon and remove file to be uploaded */
|
|
||||||
.material-icons.folder-icon {
|
.material-icons.folder-icon {
|
||||||
color: black;
|
color: black;
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
@@ -281,7 +250,6 @@ body.dark-mode .material-icons.folder-icon {
|
|||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Remove button default styling */
|
|
||||||
.remove-file-btn {
|
.remove-file-btn {
|
||||||
width: 24px;
|
width: 24px;
|
||||||
height: 24px;
|
height: 24px;
|
||||||
@@ -314,30 +282,24 @@ body.dark-mode .material-icons.folder-icon {
|
|||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Dark mode for login form */
|
|
||||||
body.dark-mode #loginForm {
|
body.dark-mode #loginForm {
|
||||||
background-color: #2c2c2c;
|
background-color: #2c2c2c;
|
||||||
/* Dark background */
|
|
||||||
color: #e0e0e0;
|
color: #e0e0e0;
|
||||||
/* Light text */
|
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
box-shadow: 0 2px 4px rgba(255, 255, 255, 0.2);
|
box-shadow: 0 2px 4px rgba(255, 255, 255, 0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Dark mode for input fields */
|
|
||||||
body.dark-mode #loginForm input {
|
body.dark-mode #loginForm input {
|
||||||
background-color: #333;
|
background-color: #333;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
border: 1px solid #555;
|
border: 1px solid #555;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Dark mode for labels */
|
|
||||||
body.dark-mode #loginForm label {
|
body.dark-mode #loginForm label {
|
||||||
color: #ddd;
|
color: #ddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Dark mode for login button */
|
|
||||||
body.dark-mode #loginForm button {
|
body.dark-mode #loginForm button {
|
||||||
background-color: #007bff;
|
background-color: #007bff;
|
||||||
color: white;
|
color: white;
|
||||||
@@ -352,7 +314,6 @@ body.dark-mode #loginForm button:hover {
|
|||||||
CARDS & MODALS
|
CARDS & MODALS
|
||||||
=========================================================== */
|
=========================================================== */
|
||||||
|
|
||||||
/* Cards */
|
|
||||||
.card {
|
.card {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
color: #000;
|
color: #000;
|
||||||
@@ -368,7 +329,6 @@ body.dark-mode .card {
|
|||||||
border: 1px solid #444;
|
border: 1px solid #444;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Modal & Editor Modal */
|
|
||||||
.modal {
|
.modal {
|
||||||
display: none;
|
display: none;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@@ -423,7 +383,6 @@ body.dark-mode .editor-header {
|
|||||||
background-color: #2c2c2c;
|
background-color: #2c2c2c;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Fully Centered Close Button with Slight X Adjustment */
|
|
||||||
.editor-close-btn {
|
.editor-close-btn {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 10px;
|
top: 10px;
|
||||||
@@ -446,7 +405,6 @@ body.dark-mode .editor-header {
|
|||||||
transition: all 0.3s ease-in-out;
|
transition: all 0.3s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Hover Effect */
|
|
||||||
.editor-close-btn:hover {
|
.editor-close-btn:hover {
|
||||||
color: white;
|
color: white;
|
||||||
background-color: #ff4d4d;
|
background-color: #ff4d4d;
|
||||||
@@ -454,7 +412,6 @@ body.dark-mode .editor-header {
|
|||||||
transform: scale(1.05);
|
transform: scale(1.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Dark Mode Fix */
|
|
||||||
body.dark-mode .editor-close-btn {
|
body.dark-mode .editor-close-btn {
|
||||||
background-color: rgba(0, 0, 0, 0.7);
|
background-color: rgba(0, 0, 0, 0.7);
|
||||||
color: #ff6666;
|
color: #ff6666;
|
||||||
@@ -465,7 +422,6 @@ body.dark-mode .editor-close-btn:hover {
|
|||||||
color: #000;
|
color: #000;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Default Editor Modal */
|
|
||||||
.editor-modal {
|
.editor-modal {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
@@ -488,14 +444,12 @@ body.dark-mode .editor-close-btn:hover {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Dark mode styling */
|
|
||||||
body.dark-mode .editor-modal {
|
body.dark-mode .editor-modal {
|
||||||
background-color: #2c2c2c;
|
background-color: #2c2c2c;
|
||||||
color: #e0e0e0;
|
color: #e0e0e0;
|
||||||
border-color: #444;
|
border-color: #444;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 🔹 Small Screens: Adjust Position */
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.editor-modal {
|
.editor-modal {
|
||||||
top: 0%;
|
top: 0%;
|
||||||
@@ -683,7 +637,6 @@ body.dark-mode .editor-modal {
|
|||||||
opacity: 0.9;
|
opacity: 0.9;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Specific Action Buttons */
|
|
||||||
#deleteSelectedBtn {
|
#deleteSelectedBtn {
|
||||||
background-color: #f44336;
|
background-color: #f44336;
|
||||||
color: white;
|
color: white;
|
||||||
@@ -737,7 +690,6 @@ body.dark-mode .editor-modal {
|
|||||||
border-collapse: collapse !important;
|
border-collapse: collapse !important;
|
||||||
border-spacing: 0 !important;
|
border-spacing: 0 !important;
|
||||||
table-layout: auto !important;
|
table-layout: auto !important;
|
||||||
/* Ensures flexible column widths */
|
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -762,7 +714,6 @@ body.dark-mode #fileList table tr:hover {
|
|||||||
text-align: left !important;
|
text-align: left !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Small screens: Reduce font size for better wrapping */
|
|
||||||
@media (max-width: 600px) {
|
@media (max-width: 600px) {
|
||||||
#fileListTitle {
|
#fileListTitle {
|
||||||
font-size: 1.4rem !important;
|
font-size: 1.4rem !important;
|
||||||
@@ -802,7 +753,6 @@ body.dark-mode #fileList table tr {
|
|||||||
min-width: 120px !important;
|
min-width: 120px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Medium Screens */
|
|
||||||
@media (min-width: 500px) {
|
@media (min-width: 500px) {
|
||||||
|
|
||||||
#fileList table th[data-column="name"],
|
#fileList table th[data-column="name"],
|
||||||
@@ -812,7 +762,6 @@ body.dark-mode #fileList table tr {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Large Screens */
|
|
||||||
@media (min-width: 1024px) {
|
@media (min-width: 1024px) {
|
||||||
|
|
||||||
#fileList table th[data-column="name"],
|
#fileList table th[data-column="name"],
|
||||||
@@ -822,7 +771,6 @@ body.dark-mode #fileList table tr {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Larger Screens */
|
|
||||||
@media (min-width: 1440px) {
|
@media (min-width: 1440px) {
|
||||||
|
|
||||||
#fileList table th[data-column="name"],
|
#fileList table th[data-column="name"],
|
||||||
@@ -832,13 +780,11 @@ body.dark-mode #fileList table tr {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Ensure all other columns stay in one line */
|
|
||||||
#fileList table th:not([data-column="name"]),
|
#fileList table th:not([data-column="name"]),
|
||||||
#fileList table td:not(:nth-child(2)) {
|
#fileList table td:not(:nth-child(2)) {
|
||||||
white-space: nowrap !important;
|
white-space: nowrap !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Reduce excessive row height */
|
|
||||||
#fileList table td {
|
#fileList table td {
|
||||||
vertical-align: middle !important;
|
vertical-align: middle !important;
|
||||||
padding: 8px 10px !important;
|
padding: 8px 10px !important;
|
||||||
@@ -881,7 +827,6 @@ label {
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Add spacing below the row of cards */
|
|
||||||
#uploadFolderRow {
|
#uploadFolderRow {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
@@ -985,7 +930,6 @@ body.dark-mode .folder-option:hover {
|
|||||||
padding-top: 5px !important;
|
padding-top: 5px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Toast Notifications */
|
|
||||||
#customToast {
|
#customToast {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 20px;
|
top: 20px;
|
||||||
@@ -1006,7 +950,6 @@ body.dark-mode .folder-option:hover {
|
|||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Button Wrap */
|
|
||||||
.button-wrap {
|
.button-wrap {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
@@ -1014,7 +957,6 @@ body.dark-mode .folder-option:hover {
|
|||||||
column-gap: 0px;
|
column-gap: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Center-align on small screens */
|
|
||||||
@media (max-width: 500px) {
|
@media (max-width: 500px) {
|
||||||
.button-wrap {
|
.button-wrap {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -1027,14 +969,12 @@ body.dark-mode .folder-option:hover {
|
|||||||
font-size: 14px !important;
|
font-size: 14px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Ensure Material Icons inside buttons do not enlarge buttons */
|
|
||||||
.button-wrap .btn i.material-icons {
|
.button-wrap .btn i.material-icons {
|
||||||
font-size: 16px !important;
|
font-size: 16px !important;
|
||||||
line-height: 1 !important;
|
line-height: 1 !important;
|
||||||
vertical-align: middle !important;
|
vertical-align: middle !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* File List Section */
|
|
||||||
#fileListContainer {
|
#fileListContainer {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
@@ -1103,7 +1043,6 @@ body.dark-mode #fileListContainer {
|
|||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Responsive adjustments for File List */
|
|
||||||
@media (max-width: 600px) {
|
@media (max-width: 600px) {
|
||||||
#fileListTitle {
|
#fileListTitle {
|
||||||
font-size: 1.4em;
|
font-size: 1.4em;
|
||||||
@@ -1176,12 +1115,12 @@ body.dark-mode #fileListContainer {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
flex-wrap: wrap;
|
flex-wrap: nowrap;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
min-height: 30px;
|
min-height: 30px;
|
||||||
margin: 0 auto 10px;
|
margin: 0 auto 10px;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
width: 95%;
|
width: 90% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.image-preview-modal-content {
|
.image-preview-modal-content {
|
||||||
@@ -1225,7 +1164,6 @@ body.dark-mode .image-preview-modal-content {
|
|||||||
margin-top: -2px;
|
margin-top: -2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Ensure the image resizes properly */
|
|
||||||
.image-modal-img {
|
.image-modal-img {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
max-height: 80vh;
|
max-height: 80vh;
|
||||||
@@ -1234,7 +1172,6 @@ body.dark-mode .image-preview-modal-content {
|
|||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Image Preview Close Button (Perfect Alignment) */
|
|
||||||
.close-image-modal {
|
.close-image-modal {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 10px;
|
top: 10px;
|
||||||
@@ -1256,7 +1193,6 @@ body.dark-mode .image-preview-modal-content {
|
|||||||
transition: all 0.3s ease-in-out;
|
transition: all 0.3s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Hover Effect */
|
|
||||||
.close-image-modal:hover {
|
.close-image-modal:hover {
|
||||||
color: white;
|
color: white;
|
||||||
background-color: #ff4d4d;
|
background-color: #ff4d4d;
|
||||||
@@ -1264,7 +1200,6 @@ body.dark-mode .image-preview-modal-content {
|
|||||||
transform: scale(1.05);
|
transform: scale(1.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Dark Mode Adjustments */
|
|
||||||
body.dark-mode .close-image-modal {
|
body.dark-mode .close-image-modal {
|
||||||
background-color: rgba(0, 0, 0, 0.6);
|
background-color: rgba(0, 0, 0, 0.6);
|
||||||
color: #ff6666;
|
color: #ff6666;
|
||||||
@@ -1275,20 +1210,11 @@ body.dark-mode .close-image-modal:hover {
|
|||||||
color: #000;
|
color: #000;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Fix Dark Mode */
|
|
||||||
body.dark-mode .image-preview-modal-content {
|
body.dark-mode .image-preview-modal-content {
|
||||||
background: #2c2c2c;
|
background: #2c2c2c;
|
||||||
border-color: #444;
|
border-color: #444;
|
||||||
}
|
}
|
||||||
|
|
||||||
.image-modal-img {
|
|
||||||
max-width: 100%;
|
|
||||||
max-height: 80vh;
|
|
||||||
object-fit: contain;
|
|
||||||
display: block;
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.page-indicator {
|
.page-indicator {
|
||||||
margin: 0 8px;
|
margin: 0 8px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
@@ -1305,7 +1231,6 @@ body.dark-mode .image-preview-modal-content {
|
|||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Dark Mode Styles */
|
|
||||||
body.dark-mode .file-icon {
|
body.dark-mode .file-icon {
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
@@ -1347,7 +1272,6 @@ body.dark-mode .file-icon {
|
|||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Upload row stays a row */
|
|
||||||
.upload-file-row {
|
.upload-file-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -1355,7 +1279,6 @@ body.dark-mode .file-icon {
|
|||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* New wrapper ensures File Info appears below */
|
|
||||||
.file-info-wrapper {
|
.file-info-wrapper {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -1364,7 +1287,6 @@ body.dark-mode .file-icon {
|
|||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Ensure file info wraps properly */
|
|
||||||
.file-info-container {
|
.file-info-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap !important;
|
flex-wrap: wrap !important;
|
||||||
@@ -1384,7 +1306,6 @@ body.dark-mode .file-icon {
|
|||||||
text-align: center !important;
|
text-align: center !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Ensure images are responsive */
|
|
||||||
.file-preview-img {
|
.file-preview-img {
|
||||||
max-width: 100px;
|
max-width: 100px;
|
||||||
max-height: 100px;
|
max-height: 100px;
|
||||||
@@ -1394,7 +1315,6 @@ body.dark-mode .file-icon {
|
|||||||
display: block !important;
|
display: block !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Small screens: Ensure it wraps properly */
|
|
||||||
@media (max-width: 600px) {
|
@media (max-width: 600px) {
|
||||||
.file-preview-container {
|
.file-preview-container {
|
||||||
justify-content: center !important;
|
justify-content: center !important;
|
||||||
@@ -1453,7 +1373,6 @@ body.dark-mode .container {
|
|||||||
background-color: transparent !important;
|
background-color: transparent !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Preserve Bootstrap button colors in dark mode */
|
|
||||||
body.dark-mode .btn-primary {
|
body.dark-mode .btn-primary {
|
||||||
background-color: #007bff;
|
background-color: #007bff;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
@@ -1472,7 +1391,6 @@ body.dark-mode .btn-danger {
|
|||||||
border-color: #dc3545;
|
border-color: #dc3545;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Dark mode for modals */
|
|
||||||
body.dark-mode .modal .modal-content,
|
body.dark-mode .modal .modal-content,
|
||||||
body.dark-mode .editor-modal {
|
body.dark-mode .editor-modal {
|
||||||
background-color: #2c2c2c;
|
background-color: #2c2c2c;
|
||||||
@@ -1480,7 +1398,6 @@ body.dark-mode .editor-modal {
|
|||||||
border: 1px solid #444;
|
border: 1px solid #444;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Dark mode for file list/table */
|
|
||||||
body.dark-mode table {
|
body.dark-mode table {
|
||||||
background-color: #2c2c2c;
|
background-color: #2c2c2c;
|
||||||
color: #e0e0e0;
|
color: #e0e0e0;
|
||||||
@@ -1490,7 +1407,6 @@ body.dark-mode table tr:hover {
|
|||||||
background-color: #444;
|
background-color: #444;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Dark mode for uploads */
|
|
||||||
body.dark-mode #uploadProgressContainer .progress {
|
body.dark-mode #uploadProgressContainer .progress {
|
||||||
background-color: #333;
|
background-color: #333;
|
||||||
}
|
}
|
||||||
@@ -1500,7 +1416,6 @@ body.dark-mode #uploadProgressContainer .progress-bar {
|
|||||||
color: #e0e0e0;
|
color: #e0e0e0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 🔹 Dark Mode Toggle Styled to Blend into Header */
|
|
||||||
.dark-mode-toggle {
|
.dark-mode-toggle {
|
||||||
background-color: transparent !important;
|
background-color: transparent !important;
|
||||||
border: 1px solid transparent !important;
|
border: 1px solid transparent !important;
|
||||||
@@ -1513,35 +1428,29 @@ body.dark-mode #uploadProgressContainer .progress-bar {
|
|||||||
transition: background 0.3s, border 0.3s !important;
|
transition: background 0.3s, border 0.3s !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 🔹 Hover Effect - Subtle Border */
|
|
||||||
.dark-mode-toggle:hover {
|
.dark-mode-toggle:hover {
|
||||||
background-color: rgba(255, 255, 255, 0.15) !important;
|
background-color: rgba(255, 255, 255, 0.15) !important;
|
||||||
/* Slight highlight */
|
/* Slight highlight */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 🔹 Active/Clicked Effect */
|
|
||||||
.dark-mode-toggle:active {
|
.dark-mode-toggle:active {
|
||||||
background-color: rgba(255, 255, 255, 0.25) !important;
|
background-color: rgba(255, 255, 255, 0.25) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 🔹 Dark Mode Version */
|
|
||||||
body.dark-mode .dark-mode-toggle {
|
body.dark-mode .dark-mode-toggle {
|
||||||
background-color: transparent !important;
|
background-color: transparent !important;
|
||||||
color: white !important;
|
color: white !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 🔹 Dark Mode Hover Effect */
|
|
||||||
body.dark-mode .dark-mode-toggle:hover {
|
body.dark-mode .dark-mode-toggle:hover {
|
||||||
background-color: rgba(255, 255, 255, 0.15) !important;
|
background-color: rgba(255, 255, 255, 0.15) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 🔹 Remove Circle Effect */
|
|
||||||
.dark-mode-toggle:focus {
|
.dark-mode-toggle:focus {
|
||||||
outline: none !important;
|
outline: none !important;
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Default (light mode) styling */
|
|
||||||
.folder-help-details {
|
.folder-help-details {
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
@@ -1572,7 +1481,6 @@ body.dark-mode .dark-mode-toggle:hover {
|
|||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Dark mode overrides */
|
|
||||||
body.dark-mode .folder-help-details {
|
body.dark-mode .folder-help-details {
|
||||||
color: #ddd;
|
color: #ddd;
|
||||||
background-color: #2c2c2c;
|
background-color: #2c2c2c;
|
||||||
@@ -1603,7 +1511,6 @@ body.dark-mode #searchInput {
|
|||||||
border: 1px solid #555;
|
border: 1px solid #555;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Default (light mode) styling for folderExplanation */
|
|
||||||
.folder-explanation {
|
.folder-explanation {
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
@@ -1614,41 +1521,34 @@ body.dark-mode #searchInput {
|
|||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Dark mode override */
|
|
||||||
body.dark-mode .folder-explanation {
|
body.dark-mode .folder-explanation {
|
||||||
color: #ddd;
|
color: #ddd;
|
||||||
background-color: solid transparent;
|
background-color: solid transparent;
|
||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Apply dark theme for CodeMirror when dark mode is enabled */
|
|
||||||
body.dark-mode .CodeMirror {
|
body.dark-mode .CodeMirror {
|
||||||
background: #1e1e1e !important;
|
background: #1e1e1e !important;
|
||||||
color: #ffffff !important;
|
color: #ffffff !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Ensure cursor is visible */
|
|
||||||
body.dark-mode .CodeMirror-cursor {
|
body.dark-mode .CodeMirror-cursor {
|
||||||
border-left: 2px solid #ffffff !important;
|
border-left: 2px solid #ffffff !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Change line number gutter background */
|
|
||||||
body.dark-mode .CodeMirror-gutters {
|
body.dark-mode .CodeMirror-gutters {
|
||||||
background: #252526 !important;
|
background: #252526 !important;
|
||||||
border-right: 1px solid #444 !important;
|
border-right: 1px solid #444 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Change line number text color */
|
|
||||||
body.dark-mode .CodeMirror-linenumber {
|
body.dark-mode .CodeMirror-linenumber {
|
||||||
color: #aaaaaa !important;
|
color: #aaaaaa !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Change text selection background */
|
|
||||||
body.dark-mode .CodeMirror-selected {
|
body.dark-mode .CodeMirror-selected {
|
||||||
background: rgba(255, 255, 255, 0.2) !important;
|
background: rgba(255, 255, 255, 0.2) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Change matching brackets highlight */
|
|
||||||
body.dark-mode .CodeMirror-matchingbracket {
|
body.dark-mode .CodeMirror-matchingbracket {
|
||||||
background-color: rgba(255, 255, 255, 0.1) !important;
|
background-color: rgba(255, 255, 255, 0.1) !important;
|
||||||
border-bottom: 1px solid #ffffff !important;
|
border-bottom: 1px solid #ffffff !important;
|
||||||
|
|||||||
Reference in New Issue
Block a user