Skip to content

Commit b160370

Browse files
committed
feat: add floating bottom navigation bar for mobile layout
1 parent f80dd1d commit b160370

1 file changed

Lines changed: 39 additions & 2 deletions

File tree

src/App.svelte

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@
161161

162162
<div class="flex flex-col gap-6">
163163
<!-- Whiteboard Tabs Navbar (Handdrawn tape and marker style with highlighter colors) -->
164-
<div class="flex border-b-2 border-dashed border-slate-350 pb-3 overflow-x-auto gap-4 shrink-0 font-hand text-base md:text-lg">
164+
<div class="hidden md:flex border-b-2 border-dashed border-slate-350 pb-3 overflow-x-auto gap-4 shrink-0 font-hand text-base md:text-lg">
165165
<button
166166
onclick={() => activeTab = "about"}
167167
class="px-3 py-1.5 rounded-lg relative transition-all duration-150 whitespace-nowrap cursor-pointer
@@ -498,11 +498,48 @@
498498
</div>
499499

500500
<!-- Footer details -->
501-
<footer class="text-xs text-slate-500 font-hand text-center py-2 shrink-0">
501+
<footer class="text-xs text-slate-500 font-hand text-center py-2 shrink-0 mb-16 md:mb-2">
502502
© {new Date().getFullYear()} {personalInfo.name}. Conçu avec Svelte 5 & Bun. UI Tableau Blanc.
503503
</footer>
504504
</main>
505505

506+
<!-- Mobile Floating Bottom Navbar -->
507+
<div class="md:hidden fixed bottom-5 left-1/2 -translate-x-1/2 z-50 bg-white/95 backdrop-blur-md border-2 border-slate-800 rounded-2xl px-3 py-2 flex items-center gap-1.5 shadow-xl border-sketch font-hand text-sm select-none">
508+
<button
509+
onclick={() => activeTab = "about"}
510+
class="flex items-center gap-1.5 px-3 py-1.5 rounded-xl transition-all duration-150 cursor-pointer
511+
{activeTab === 'about' ? 'text-slate-900 font-bold bg-yellow-100 border border-yellow-400 rotate-1' : 'text-slate-500 hover:text-slate-850 hover:bg-slate-50'}"
512+
>
513+
<Papicon icon="paper" size={16} />
514+
{#if activeTab === "about"}<span class="text-xs">Bio</span>{/if}
515+
</button>
516+
<button
517+
onclick={() => activeTab = "resume"}
518+
class="flex items-center gap-1.5 px-3 py-1.5 rounded-xl transition-all duration-150 cursor-pointer
519+
{activeTab === 'resume' ? 'text-slate-900 font-bold bg-pink-100 border border-pink-400 rotate--1' : 'text-slate-500 hover:text-slate-850 hover:bg-slate-50'}"
520+
>
521+
<Papicon icon="graduation-hat" size={16} />
522+
{#if activeTab === "resume"}<span class="text-xs">Parcours</span>{/if}
523+
</button>
524+
<button
525+
onclick={() => activeTab = "portfolio"}
526+
class="flex items-center gap-1.5 px-3 py-1.5 rounded-xl transition-all duration-150 cursor-pointer
527+
{activeTab === 'portfolio' ? 'text-slate-900 font-bold bg-blue-100 border border-blue-400 rotate-1' : 'text-slate-500 hover:text-slate-850 hover:bg-slate-50'}"
528+
>
529+
<Papicon icon="grid" size={16} />
530+
{#if activeTab === "portfolio"}<span class="text-xs">Projets</span>{/if}
531+
</button>
532+
<button
533+
onclick={() => activeTab = "contact"}
534+
class="flex items-center gap-1.5 px-3 py-1.5 rounded-xl transition-all duration-150 cursor-pointer
535+
{activeTab === 'contact' ? 'text-slate-900 font-bold bg-green-100 border border-green-400 rotate--1' : 'text-slate-500 hover:text-slate-850 hover:bg-slate-50'}"
536+
>
537+
<Papicon icon="mail" size={16} />
538+
{#if activeTab === "contact"}<span class="text-xs">Contact</span>{/if}
539+
</button>
540+
</div>
541+
506542
</div>
507543

508544
</div>
545+

0 commit comments

Comments
 (0)