Skip to content

Commit 7383e2a

Browse files
committed
Fix mobile header layout overflow
- Make header responsive with flex-wrap for mobile devices - Search box now wraps to new row below logo/theme selector on small screens - Added proper flex-shrink and width controls for responsive behavior - Prevent text overflow with truncate class on title
1 parent c4e4a1e commit 7383e2a

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

public/index.html

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,27 @@
1515
<link rel="stylesheet" href="styles.css">
1616
</head>
1717
<body class="bg-gray-100 font-sans flex flex-col h-screen dark:bg-gray-900 transition-colors">
18-
<header class="bg-white text-gray-900 p-4 flex items-center justify-between dark:bg-gray-900 dark:text-white transition-colors border-b border-gray-200 dark:border-gray-700">
19-
<button id="sidebar-toggle" onclick="toggleSidebar()" class="bg-gray-200 text-gray-900 text-xl p-2 hover:bg-gray-300 rounded transition-colors dark:bg-gray-800 dark:text-white dark:hover:bg-gray-700" type="button"></button>
20-
<div class="flex items-center space-x-3 ml-4">
21-
<svg class="w-8 h-8" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
18+
<header class="bg-white text-gray-900 p-4 flex flex-wrap items-center justify-between gap-2 dark:bg-gray-900 dark:text-white transition-colors border-b border-gray-200 dark:border-gray-700">
19+
<button id="sidebar-toggle" onclick="toggleSidebar()" class="bg-gray-200 text-gray-900 text-xl p-2 hover:bg-gray-300 rounded transition-colors dark:bg-gray-800 dark:text-white dark:hover:bg-gray-700 flex-shrink-0" type="button"></button>
20+
<div class="flex items-center space-x-3 ml-4 min-w-0 flex-shrink">
21+
<svg class="w-8 h-8 flex-shrink-0" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
2222
<path d="M8 6L24 6C25.1046 6 26 6.89543 26 8V24C26 25.1046 25.1046 26 24 26H8C6.89543 26 6 25.1046 6 24V8C6 6.89543 6.89543 6 8 6Z" fill="#60A5FA" stroke="#3B82F6" stroke-width="2"/>
2323
<path d="M10 12L22 12" stroke="#FFFFFF" stroke-width="2" stroke-linecap="round"/>
2424
<path d="M10 16L18 16" stroke="#FFFFFF" stroke-width="2" stroke-linecap="round" opacity="0.8"/>
2525
<path d="M10 20L20 20" stroke="#FFFFFF" stroke-width="2" stroke-linecap="round" opacity="0.6"/>
2626
<path d="M14 10L18 14" stroke="#10B981" stroke-width="2" stroke-linecap="round"/>
2727
<path d="M18 10L14 14" stroke="#10B981" stroke-width="2" stroke-linecap="round"/>
2828
</svg>
29-
<h1 class="text-2xl font-bold">massCode-Web</h1>
29+
<h1 class="text-2xl font-bold truncate">massCode-Web</h1>
3030
</div>
31-
<div class="flex items-center space-x-2 ml-auto">
32-
<button id="theme-toggle" class="bg-gray-200 text-gray-900 p-2 rounded hover:bg-gray-300 transition-colors dark:bg-gray-800 dark:text-white dark:hover:bg-gray-700" title="Toggle theme">
31+
<div class="flex items-center space-x-2 ml-auto flex-shrink-0">
32+
<button id="theme-toggle" class="bg-gray-200 text-gray-900 p-2 rounded hover:bg-gray-300 transition-colors dark:bg-gray-800 dark:text-white dark:hover:bg-gray-700 flex-shrink-0" title="Toggle theme">
3333
🌓
3434
</button>
35-
<div class="relative">
36-
<input type="text" id="search" placeholder="Enter RegEx..." class="w-64 px-3 py-2 pr-8 border border-gray-200 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 text-gray-900 dark:bg-gray-700 dark:border-gray-600 dark:text-white dark:placeholder-gray-400 transition-colors">
37-
<button id="clear-search" class="absolute right-2 top-1/2 transform -translate-y-1/2 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 transition-colors" onclick="clearSearch()" style="display: none;">×</button>
38-
</div>
35+
</div>
36+
<div class="relative w-full sm:w-auto mt-2 sm:mt-0 flex-shrink">
37+
<input type="text" id="search" placeholder="Enter RegEx..." class="w-full sm:w-64 px-3 py-2 pr-8 border border-gray-200 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 text-gray-900 dark:bg-gray-700 dark:border-gray-600 dark:text-white dark:placeholder-gray-400 transition-colors">
38+
<button id="clear-search" class="absolute right-2 top-1/2 transform -translate-y-1/2 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 transition-colors" onclick="clearSearch()" style="display: none;">×</button>
3939
</div>
4040
</header>
4141
<div class="content flex flex-1 overflow-hidden">

0 commit comments

Comments
 (0)