Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/Http/Controllers/TaxonController.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ public function show(string $name): View

$totalCount = $occurrences->total ?: count($occurrences->items);
$fetchedCount = count($occurrences->items);
$isLimited = $fetchedCount >= 1000;

// Compute classification breakdown from the occurrence set.
$byPhylum = [];
Expand Down Expand Up @@ -223,6 +224,7 @@ public function show(string $name): View
'occurrences',
'totalCount',
'fetchedCount',
'isLimited',
'byPhylum',
'byClass',
'byEnvironment',
Expand Down
49 changes: 47 additions & 2 deletions resources/views/layouts/app.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@
@vite(['resources/css/app.css', 'resources/js/app.js'])
</head>
<body class="bg-bg text-text antialiased">
<nav class="relative z-[1100] border-b border-border bg-surface" aria-label="Main navigation">
<nav x-data="{ open: false }" class="relative z-[1100] border-b border-border bg-surface" aria-label="Main navigation">
<div class="flex h-16 items-center justify-between px-4 sm:px-6">
<a href="/" class="text-lg font-semibold tracking-tight text-text">
Eonmap
</a>
<div class="flex items-center gap-6">

{{-- Desktop link row --}}
<div class="hidden sm:flex items-center gap-6">
<x-nav.nav-link href="{{ route('map') }}" :active="request()->routeIs('map')">
Map
</x-nav.nav-link>
Expand All @@ -46,6 +48,49 @@
<livewire:recently-viewed />
<x-theme-toggle />
</div>

{{-- Mobile: theme toggle + hamburger --}}
<div class="flex items-center gap-1 sm:hidden">
<x-theme-toggle />
<button
x-on:click="open = !open"
:aria-expanded="open"
aria-controls="mobile-menu"
aria-label="Toggle navigation menu"
class="rounded-md p-2 text-muted hover:bg-surface-hover hover:text-text transition-colors"
>
{{-- Hamburger --}}
<svg x-show="!open" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" d="M4 6h16M4 12h16M4 18h16" />
</svg>
{{-- Close --}}
<svg x-show="open" x-cloak class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
</svg>
</button>
</div>
</div>

{{-- Mobile menu panel --}}
<div
id="mobile-menu"
x-show="open"
x-cloak
x-on:click.outside="open = false"
class="sm:hidden border-t border-border bg-surface"
>
<x-nav.responsive-nav-link href="{{ route('map') }}" :active="request()->routeIs('map')">
Map
</x-nav.responsive-nav-link>
<x-nav.responsive-nav-link href="{{ route('browse') }}" :active="request()->routeIs('browse')">
Browse
</x-nav.responsive-nav-link>
<x-nav.responsive-nav-link href="{{ route('taxa.index') }}" :active="request()->routeIs('taxa.*')">
Taxa
</x-nav.responsive-nav-link>
<x-nav.responsive-nav-link href="{{ route('guide') }}" :active="request()->routeIs('guide')">
Guide
</x-nav.responsive-nav-link>
</div>
</nav>

Expand Down
12 changes: 5 additions & 7 deletions resources/views/taxa/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@
{{ number_format($totalCount) }} occurrences
</span>

@if ($fetchedCount < $totalCount)
<span class="text-sm text-muted">
(charts based on first {{ number_format($fetchedCount) }})
</span>
@if ($isLimited)
<span class="text-sm text-muted">Limited to 1,000 results</span>
@endif

<a
Expand Down Expand Up @@ -97,7 +95,7 @@ class="h-96 w-full rounded-lg overflow-hidden"
</tbody>
</table>
@else
<p class="text-sm text-muted">No data.</p>
<p class="py-1.5 text-sm text-muted">No data.</p>
@endif
</div>

Expand All @@ -118,7 +116,7 @@ class="h-96 w-full rounded-lg overflow-hidden"
</tbody>
</table>
@else
<p class="text-sm text-muted">No data.</p>
<p class="py-1.5 text-sm text-muted">No data.</p>
@endif
</div>

Expand All @@ -139,7 +137,7 @@ class="h-96 w-full rounded-lg overflow-hidden"
</tbody>
</table>
@else
<p class="text-sm text-muted">No data.</p>
<p class="py-1.5 text-sm text-muted">No data.</p>
@endif
</div>

Expand Down
Loading