diff --git a/chat-page/script.js b/chat-page/script.js index 794c836..33b9702 100644 --- a/chat-page/script.js +++ b/chat-page/script.js @@ -145,6 +145,15 @@ document.addEventListener('DOMContentLoaded', () => { // Update avatar utama dengan inisial dari nama saat halaman dimuat document.addEventListener('DOMContentLoaded', () => { + // Handle viewport height for mobile browsers + const setVh = () => { + const vh = window.innerHeight * 0.01; + document.documentElement.style.setProperty('--vh', `${vh}px`); + }; + setVh(); + window.addEventListener('resize', setVh); + window.addEventListener('load', setVh); + const userName = document.querySelector('.user-details h2').textContent; const userInitial = userName.split(' ').map(n => n[0]).join('').substring(0, 1); document.querySelector('.avatar').textContent = userInitial; diff --git a/chat-page/style.css b/chat-page/style.css index 604f436..2c627ff 100644 --- a/chat-page/style.css +++ b/chat-page/style.css @@ -22,7 +22,7 @@ body { box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1); width: 100%; max-width: 800px; - height: 90vh; + height: calc(var(--vh, 1vh) * 90); /* Menggunakan variabel viewport height */ max-height: 800px; display: flex; flex-direction: column; diff --git a/dashboard-page/index.html b/dashboard-page/index.html index c0e46f5..3a151e7 100644 --- a/dashboard-page/index.html +++ b/dashboard-page/index.html @@ -1,76 +1,238 @@ - -
- - -