hid preview on mobile
This commit is contained in:
+12
-1
@@ -849,7 +849,18 @@ hr {
|
|||||||
font-size: 3vw;
|
font-size: 3vw;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tag_row {}
|
.full-height {
|
||||||
|
border: 1px solid red;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid-2x1 {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid-2x1>div:last-of-type {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (min-width: 993px) {
|
@media screen and (min-width: 993px) {
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
|
const largeScreenMediaQuery = window.matchMedia("(min-width: 993px)"); // Example: 768px is a common breakpoint
|
||||||
const textarea = document.querySelector('textarea');
|
const textarea = document.querySelector('textarea');
|
||||||
const preview = document.getElementById('md_preview');
|
const preview = document.getElementById('md_preview');
|
||||||
|
|
||||||
|
if (largeScreenMediaQuery.matches) {
|
||||||
textarea.addEventListener('input', function() {
|
textarea.addEventListener('input', function() {
|
||||||
fetch('functions/preview.php', { // Create a separate preview.php file for real-time updates
|
fetch('functions/preview.php', { // Create a separate preview.php file for real-time updates
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
@@ -14,3 +16,6 @@ textarea.addEventListener('input', function() {
|
|||||||
preview.innerHTML = decodeURIComponent(data);
|
preview.innerHTML = decodeURIComponent(data);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
preview.style.display = 'none';
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user