Link logo placeholder

This commit is contained in:
Chris McCord 2021-11-22 13:04:05 -05:00
parent 55a1e1f02a
commit d35554ee0e
3 changed files with 17 additions and 10 deletions

View file

@ -8,6 +8,9 @@ defmodule LiveBeatsWeb.LiveHelpers do
alias LiveBeats.Accounts
alias LiveBeats.MediaLibrary
def home_path(nil = _current_user), do: "/"
def home_path(%Accounts.User{} = current_user), do: profile_path(current_user)
def profile_path(current_user_or_profile, action \\ :index)
def profile_path(%Accounts.User{} = current_user, action) do

View file

@ -18,10 +18,12 @@
</div>
<div class="flex-shrink-0 flex items-center px-4">
<.icon name={:status_online} class="w-8 h-8 text-purple-600" outlined/>
<span class="h-8 w-auto text-2xl ml-1 font-bold">
LiveBeats
</span>
<.link redirect_to={home_path(@current_user)}>
<.icon name={:status_online} class="w-8 h-8 text-purple-600 -mt-2 inline-block" outlined/>
<span class="h-8 w-auto text-2xl ml-1 font-bold">
LiveBeats
</span>
</.link>
</div>
<div class="mt-5 flex-1 h-0 overflow-y-auto">
<%= if @current_user do %>
@ -47,10 +49,12 @@
<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">
<.icon name={:status_online} class="w-8 h-8 text-purple-600" outlined/>
<span class="h-8 w-auto text-2xl ml-1 font-bold">
LiveBeats
</span>
<.link redirect_to={home_path(@current_user)}>
<.icon name={:status_online} class="w-8 h-8 text-purple-600 -mt-2 inline-block" outlined/>
<span class="h-8 w-auto text-2xl ml-1 font-bold">
LiveBeats
</span>
</.link>
</div>
<!-- Sidebar component, swap this element with another sidebar if you like -->
<div class="h-0 flex-1 flex flex-col overflow-y-auto">

View file

@ -35,7 +35,7 @@ defmodule LiveBeatsWeb.LayoutView do
<%= if @current_user do %>
<.link
redirect_to={profile_path(@current_user)}
class={"text-gray-700 hover:text-gray-900 hover:bg-gray-50 group flex items-center px-2 py-2 text-sm font-medium rounded-md #{if @active_tab == :profile, do: "bg-gray-200 hover:bg-gray-200"}"}
class={"text-gray-700 hover:text-gray-900 group flex items-center px-2 py-2 text-sm font-medium rounded-md #{if @active_tab == :profile, do: "bg-gray-200", else: "hover:bg-gray-50"}"}
>
<.icon name={:music_note} outlined class="text-gray-400 group-hover:text-gray-500 mr-3 flex-shrink-0 h-6 w-6"/>
My Songs
@ -43,7 +43,7 @@ defmodule LiveBeatsWeb.LayoutView do
<.link
redirect_to={Routes.settings_path(Endpoint, :edit)}
class={"text-gray-700 hover:text-gray-900 hover:bg-gray-50 group flex items-center px-2 py-2 text-sm font-medium rounded-md #{if @active_tab == :settings, do: "bg-gray-200 hover:bg-gray-200"}"}
class={"text-gray-700 hover:text-gray-900 group flex items-center px-2 py-2 text-sm font-medium rounded-md #{if @active_tab == :settings, do: "bg-gray-200", else: "hover:bg-gray-50"}"}
>
<.icon name={:adjustments} outlined class="text-gray-400 group-hover:text-gray-500 mr-3 flex-shrink-0 h-6 w-6"/>
Settings