Skip to content

Commit

Permalink
chore: sticky navbar
Browse files Browse the repository at this point in the history
  • Loading branch information
MarioRodrigues10 committed Sep 1, 2024
1 parent 85d4958 commit d507b9c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/atomic_web/components/sidebar.ex
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ defmodule AtomicWeb.Components.Sidebar do
<span class="sr-only">Open sidebar</span>
<.icon name={:bars_3} class="!h-6 !w-6" />
</button>
<div class="left-1/4 mt-auto -mb-2" @click="menu = ! menu">
<div class="left-1/4 mt-auto -mb-2">
<span class="sr-only">Open user menu</span>
<.sidebar_dropdown current_user={@current_user} orientation={:down} />
</div>
Expand Down
2 changes: 1 addition & 1 deletion lib/atomic_web/live/home_live/index.html.heex
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</div>
</div>
<!-- Tabs -->
<div x-data="{ option: 'all' }" class="sticky top-0 z-10 bg-white block">
<div x-data="{ option: 'all' }" class="sticky top-11 lg:top-0 z-10 bg-white block">
<.tabs class="max-w-5xl mx-auto pt-1 px-4 sm:px-6 lg:px-8">
<.tab id="tab-all" active={@current_tab == "all"} phx-click="load-all" phx-hook="ScrollToTop">
<%= gettext("All") %>
Expand Down
2 changes: 1 addition & 1 deletion lib/atomic_web/templates/layout/live.html.heex
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<div class="flex relative flex-col min-h-screen">
<div class="flex flex-col mx-auto w-full lg:flex-row xl:px-8 max-w-[1380px]">
<!-- Navbar -->
<div class="relative flex-shrink-0 lg:w-72 lg:flex lg:max-w-[400px]">
<div class="relative flex-shrink-0 lg:w-72 lg:flex lg:max-w-[400px] sticky top-0 z-10 bg-white">
<%= render("_live_navbar.html", assigns) %>
</div>
<!-- Central content -->
Expand Down

0 comments on commit d507b9c

Please sign in to comment.