2021-11-10 18:23:02 +00:00
|
|
|
<div id="mobile-sidebar-container" class="fixed inset-0 flex z-40 lg:hidden" aria-modal="true" style="display: none;">
|
|
|
|
<div
|
|
|
|
class="fixed inset-0 bg-gray-600 bg-opacity-75"
|
|
|
|
phx-click={hide_mobile_sidebar()}>
|
|
|
|
</div>
|
2021-11-10 15:10:43 +00:00
|
|
|
|
2021-11-10 18:23:02 +00:00
|
|
|
<div id="mobile-sidebar" class="relative flex-1 flex flex-col max-w-xs w-full pt-5 pb-4 bg-white hidden min-h-screen">
|
|
|
|
<div class="absolute top-0 right-0 -mr-12 pt-2">
|
|
|
|
<button type="button"
|
|
|
|
class="ml-1 flex items-center justify-center h-10 w-10 rounded-full focus:outline-none focus:ring-2 focus:ring-inset focus:ring-white"
|
|
|
|
phx-click={hide_mobile_sidebar()}>
|
|
|
|
<span class="sr-only">Close sidebar</span>
|
|
|
|
<svg class="h-6 w-6 text-white" xmlns="http://www.w3.org/2000/svg"
|
|
|
|
fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
|
|
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
|
|
|
|
</svg>
|
|
|
|
</button>
|
|
|
|
</div>
|
2021-11-10 15:10:43 +00:00
|
|
|
|
2021-11-10 18:23:02 +00:00
|
|
|
<div class="flex-shrink-0 flex items-center px-4">
|
|
|
|
<img class="h-8 w-auto" src="https://tailwindui.com/img/logos/workflow-logo-purple-500-mark-gray-700-text.svg"
|
|
|
|
alt="Workflow">
|
|
|
|
</div>
|
|
|
|
<div class="mt-5 flex-1 h-0 overflow-y-auto">
|
2021-11-12 17:41:16 +00:00
|
|
|
<%= if @current_user do %>
|
|
|
|
<.sidebar_account_dropdown id="mobile-account-dropdown" current_user={@current_user}/>
|
|
|
|
<% end %>
|
2021-11-10 18:23:02 +00:00
|
|
|
|
2021-11-12 15:10:04 +00:00
|
|
|
<nav class="px-2">
|
2021-11-12 17:41:16 +00:00
|
|
|
<%= if @current_user do %>
|
2021-11-19 19:50:36 +00:00
|
|
|
<.sidebar_nav_links current_user={@current_user} active_tab={@active_tab}/>
|
2021-11-12 17:41:16 +00:00
|
|
|
<% end %>
|
2021-11-12 15:10:04 +00:00
|
|
|
<.sidebar_active_users id="desktop-active-users" users={@active_users}/>
|
2021-11-10 18:23:02 +00:00
|
|
|
</nav>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="flex-shrink-0 w-14" aria-hidden="true">
|
|
|
|
<!-- Dummy element to force sidebar to shrink to fit close icon -->
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Static sidebar for desktop -->
|
|
|
|
<div class="hidden lg:flex lg:flex-shrink-0">
|
|
|
|
<div class="flex flex-col w-64 border-r border-gray-200 pt-5 pb-4 bg-gray-100">
|
|
|
|
<div class="flex items-center flex-shrink-0 px-6">
|
|
|
|
<img class="h-8 w-auto" src="https://tailwindui.com/img/logos/workflow-logo-purple-500-mark-gray-700-text.svg"
|
|
|
|
alt="Workflow">
|
|
|
|
</div>
|
|
|
|
<!-- Sidebar component, swap this element with another sidebar if you like -->
|
|
|
|
<div class="h-0 flex-1 flex flex-col overflow-y-auto">
|
2021-11-12 17:41:16 +00:00
|
|
|
<%= if @current_user do %>
|
|
|
|
<.sidebar_account_dropdown id="account-dropdown" current_user={@current_user}/>
|
|
|
|
<% end %>
|
2021-11-10 18:23:02 +00:00
|
|
|
<!-- Sidebar Search -->
|
|
|
|
<div class="px-3 mt-5">
|
|
|
|
<label for="search" class="sr-only">Search</label>
|
|
|
|
<div class="mt-1 relative rounded-md shadow-sm">
|
|
|
|
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none" aria-hidden="true">
|
|
|
|
<svg class="mr-3 h-4 w-4 text-gray-400" x-description="Heroicon name: solid/search"
|
|
|
|
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
|
|
|
<path fill-rule="evenodd"
|
|
|
|
d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z"
|
|
|
|
clip-rule="evenodd"></path>
|
|
|
|
</svg>
|
|
|
|
</div>
|
|
|
|
<input type="text" name="search" id="search"
|
|
|
|
class="focus:ring-indigo-500 focus:border-indigo-500 block w-full pl-9 sm:text-sm border-gray-300 rounded-md"
|
|
|
|
placeholder="Search">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- Navigation -->
|
|
|
|
<nav class="px-3 mt-6">
|
2021-11-12 17:41:16 +00:00
|
|
|
<%= if @current_user do %>
|
2021-11-19 19:50:36 +00:00
|
|
|
<.sidebar_nav_links current_user={@current_user} active_tab={@active_tab}/>
|
2021-11-12 17:41:16 +00:00
|
|
|
<% end %>
|
2021-11-12 15:10:04 +00:00
|
|
|
<!-- Secondary navigation -->
|
|
|
|
<.sidebar_active_users id="mobile-active-users" users={@active_users}/>
|
2021-11-10 18:23:02 +00:00
|
|
|
</nav>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- Main column -->
|
|
|
|
<div class="flex flex-col w-0 flex-1 overflow-hidden">
|
|
|
|
<!-- Search header -->
|
|
|
|
<div class="relative z-10 flex-shrink-0 flex h-16 bg-white border-b border-gray-200 lg:hidden">
|
|
|
|
<button type="button"
|
|
|
|
class="px-4 border-r border-gray-200 text-gray-500 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-purple-500 lg:hidden"
|
|
|
|
phx-click={show_mobile_sidebar()}>
|
|
|
|
<span class="sr-only">Open sidebar</span>
|
|
|
|
<svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg"
|
|
|
|
fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
|
|
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h8m-8 6h16"></path>
|
|
|
|
</svg>
|
|
|
|
</button>
|
|
|
|
<div class="flex-1 flex justify-between px-4 sm:px-6 lg:px-8">
|
|
|
|
<div class="flex-1 flex">
|
|
|
|
<form class="w-full flex md:ml-0" action="#" method="GET">
|
|
|
|
<label for="search-field" class="sr-only">Search</label>
|
|
|
|
<div class="relative w-full text-gray-400 focus-within:text-gray-600">
|
|
|
|
<div class="absolute inset-y-0 left-0 flex items-center pointer-events-none">
|
|
|
|
<svg class="h-5 w-5" xmlns="http://www.w3.org/2000/svg"
|
|
|
|
viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
|
|
|
<path fill-rule="evenodd"
|
|
|
|
d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z"
|
|
|
|
clip-rule="evenodd"></path>
|
|
|
|
</svg>
|
|
|
|
</div>
|
|
|
|
<input id="search-field" name="search-field"
|
|
|
|
class="block w-full h-full pl-8 pr-3 py-2 border-transparent text-gray-900 placeholder-gray-500 focus:outline-none focus:ring-0 focus:border-transparent focus:placeholder-gray-400 sm:text-sm"
|
|
|
|
placeholder="Search" type="search">
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
2021-11-16 20:54:40 +00:00
|
|
|
<%= if @current_user do %>
|
|
|
|
<div class="flex items-center">
|
|
|
|
<!-- Profile dropdown TODO -->
|
|
|
|
<div class="ml-3 relative">
|
|
|
|
<div>
|
|
|
|
<button type="button"
|
|
|
|
class="max-w-xs bg-white flex items-center text-sm rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-purple-500"
|
|
|
|
id="user-menu-button" @click="open = true"
|
|
|
|
aria-expanded="false" aria-haspopup="true"
|
|
|
|
>
|
|
|
|
<span class="sr-only">Open user menu</span>
|
|
|
|
<img class="h-8 w-8 rounded-full"
|
|
|
|
src={@current_user.avatar_url}
|
|
|
|
alt="">
|
|
|
|
</button>
|
|
|
|
</div>
|
2021-11-10 18:23:02 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-11-16 20:54:40 +00:00
|
|
|
<% end %>
|
2021-11-10 18:23:02 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<main class="flex-1 relative z-0 overflow-y-auto focus:outline-none">
|
|
|
|
<.live_component module={LiveBeatsWeb.LayoutComponent} id="layout" />
|
|
|
|
|
|
|
|
<%= if @current_user do %>
|
|
|
|
<%= live_render(@socket, LiveBeatsWeb.PlayerLive, id: "player", session: %{}, sticky: true) %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<.flash flash={@flash} kind={:info}/>
|
|
|
|
<.flash flash={@flash} kind={:error}/>
|
|
|
|
|
|
|
|
<%= @inner_content %>
|
|
|
|
</main>
|
|
|
|
</div>
|