Implement responsive design for mobile and tablet devices

- Add hamburger menu for mobile sidebar with slide-out animation
- Make header navigation responsive with icon-only buttons on mobile
- Adjust document viewer, editor, and quick switcher layouts for smaller screens
- Preserve all existing functionality including localStorage folder state persistence
- Use Tailwind responsive utilities (sm:, md:, lg:) for progressive enhancement

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-30 13:17:50 +09:00
parent c9fe1f6ed0
commit e14cc5dd43
4 changed files with 104 additions and 54 deletions

View File

@@ -1,15 +1,15 @@
<div class="max-w-4xl mx-auto p-8">
<div class="max-w-4xl mx-auto p-4 sm:p-6 lg:p-8">
<!-- Document Header -->
<div class="mb-8">
<div class="flex items-center justify-between mb-4">
<h1 class="text-4xl font-bold text-gray-900">
<div class="mb-6 sm:mb-8">
<div class="flex flex-col sm:flex-row sm:items-start sm:justify-between gap-4 mb-4">
<h1 class="text-2xl sm:text-3xl lg:text-4xl font-bold text-gray-900 break-words">
{{ $document->title }}
</h1>
@auth
<a
href="{{ route('documents.edit', $document) }}"
class="inline-flex items-center px-4 py-2 bg-indigo-600 text-white text-sm font-medium rounded-md hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"
class="inline-flex items-center justify-center px-3 sm:px-4 py-2 bg-indigo-600 text-white text-sm font-medium rounded-md hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 whitespace-nowrap"
>
<svg class="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"></path>
@@ -19,7 +19,7 @@ class="inline-flex items-center px-4 py-2 bg-indigo-600 text-white text-sm font-
@endauth
</div>
<div class="flex items-center text-sm text-gray-500 space-x-4">
<div class="flex flex-col sm:flex-row sm:items-center text-xs sm:text-sm text-gray-500 gap-2 sm:gap-4">
<span>
{{ __('messages.documents.updated') }} {{ $document->updated_at->diffForHumans() }}
</span>
@@ -37,7 +37,7 @@ class="inline-flex items-center px-4 py-2 bg-indigo-600 text-white text-sm font-
</div>
<!-- Document Content -->
<div class="prose prose-lg max-w-none mb-12">
<div class="prose prose-sm sm:prose-base lg:prose-lg max-w-none mb-8 sm:mb-12">
{!! $renderedContent !!}
</div>
@@ -69,9 +69,9 @@ class="block p-4 bg-gray-50 rounded-lg hover:bg-gray-100 transition"
@endif
<!-- Document Metadata -->
<div class="mt-12 pt-8 border-t border-gray-200">
<div class="grid grid-cols-2 gap-4 text-sm text-gray-500">
<div>
<div class="mt-8 sm:mt-12 pt-6 sm:pt-8 border-t border-gray-200">
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4 text-xs sm:text-sm text-gray-500">
<div class="break-all">
<span class="font-medium">{{ __('messages.documents.path') }}:</span>
<code class="ml-2 text-xs bg-gray-100 px-2 py-1 rounded">{{ $document->path }}</code>
</div>