mobile responsive layout
This commit is contained in:
parent
921bf077fd
commit
4f56cdf365
4 changed files with 1866 additions and 12 deletions
|
|
@ -3,12 +3,22 @@
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=yes">
|
||||||
<title>SoulSync - Music Sync & Manager</title>
|
<title>SoulSync - Music Sync & Manager</title>
|
||||||
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
||||||
|
<link rel="stylesheet" href="{{ url_for('static', filename='mobile.css') }}">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div class="main-container">
|
<div class="main-container">
|
||||||
|
<!-- Mobile Navigation -->
|
||||||
|
<button class="hamburger-btn" id="hamburger-btn" aria-label="Toggle navigation">
|
||||||
|
<span class="hamburger-line"></span>
|
||||||
|
<span class="hamburger-line"></span>
|
||||||
|
<span class="hamburger-line"></span>
|
||||||
|
</button>
|
||||||
|
<div class="mobile-overlay" id="mobile-overlay"></div>
|
||||||
|
|
||||||
<!-- Sidebar - Always Visible -->
|
<!-- Sidebar - Always Visible -->
|
||||||
<div class="sidebar">
|
<div class="sidebar">
|
||||||
<!-- Header Section -->
|
<!-- Header Section -->
|
||||||
|
|
|
||||||
1799
webui/static/mobile.css
Normal file
1799
webui/static/mobile.css
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -303,6 +303,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||||
|
|
||||||
// Initialize components
|
// Initialize components
|
||||||
initializeNavigation();
|
initializeNavigation();
|
||||||
|
initializeMobileNavigation();
|
||||||
initializeMediaPlayer();
|
initializeMediaPlayer();
|
||||||
initializeDonationWidget();
|
initializeDonationWidget();
|
||||||
initializeSyncPage();
|
initializeSyncPage();
|
||||||
|
|
@ -362,6 +363,51 @@ function initializeNavigation() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ===============================
|
||||||
|
// MOBILE NAVIGATION
|
||||||
|
// ===============================
|
||||||
|
|
||||||
|
function initializeMobileNavigation() {
|
||||||
|
const hamburgerBtn = document.getElementById('hamburger-btn');
|
||||||
|
const sidebar = document.querySelector('.sidebar');
|
||||||
|
const overlay = document.getElementById('mobile-overlay');
|
||||||
|
|
||||||
|
if (!hamburgerBtn || !sidebar || !overlay) return;
|
||||||
|
|
||||||
|
function openMobileNav() {
|
||||||
|
sidebar.classList.add('mobile-open');
|
||||||
|
hamburgerBtn.classList.add('active');
|
||||||
|
overlay.classList.add('active');
|
||||||
|
document.body.classList.add('mobile-nav-open');
|
||||||
|
}
|
||||||
|
|
||||||
|
function closeMobileNav() {
|
||||||
|
sidebar.classList.remove('mobile-open');
|
||||||
|
hamburgerBtn.classList.remove('active');
|
||||||
|
overlay.classList.remove('active');
|
||||||
|
document.body.classList.remove('mobile-nav-open');
|
||||||
|
}
|
||||||
|
|
||||||
|
hamburgerBtn.addEventListener('click', () => {
|
||||||
|
if (sidebar.classList.contains('mobile-open')) {
|
||||||
|
closeMobileNav();
|
||||||
|
} else {
|
||||||
|
openMobileNav();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
overlay.addEventListener('click', closeMobileNav);
|
||||||
|
|
||||||
|
// Close sidebar on nav button click (mobile only)
|
||||||
|
document.querySelectorAll('.nav-button').forEach(btn => {
|
||||||
|
btn.addEventListener('click', () => {
|
||||||
|
if (window.innerWidth <= 768) {
|
||||||
|
closeMobileNav();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function initializeWatchlist() {
|
function initializeWatchlist() {
|
||||||
// Add watchlist button click handler
|
// Add watchlist button click handler
|
||||||
const watchlistButton = document.getElementById('watchlist-button');
|
const watchlistButton = document.getElementById('watchlist-button');
|
||||||
|
|
|
||||||
|
|
@ -2754,20 +2754,19 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Desktop-Only Optimizations */
|
/* Desktop-Only Optimizations */
|
||||||
.main-container {
|
@media (min-width: 769px) {
|
||||||
min-width: 1200px;
|
.main-container {
|
||||||
/* Ensure minimum desktop width */
|
min-width: 1200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar {
|
.sidebar {
|
||||||
min-width: 240px;
|
min-width: 240px;
|
||||||
/* Fixed sidebar width for desktop */
|
max-width: 240px;
|
||||||
max-width: 240px;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.main-content {
|
.main-content {
|
||||||
min-width: 960px;
|
min-width: 960px;
|
||||||
/* Ensure content area has enough space */
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Optimize for larger screens */
|
/* Optimize for larger screens */
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue