Skip to content

Commit

Permalink
fix: add link to all nav-items; fix css
Browse files Browse the repository at this point in the history
  • Loading branch information
douglastofoli committed Nov 11, 2023
1 parent 9f157c1 commit 52f8cdd
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 18 deletions.
8 changes: 7 additions & 1 deletion .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ if ! test -d apps/plataforma_digital/assets/node_modules && test -f apps/platafo
cd apps/plataforma_digital/assets && npm install && cd $PWD
fi

USE_LOCAL_POSTGRES=false

# Setup postgresql
if test -d "/Applications/Postgres.app"; then
export DATABASE_USER="$(whoami)"
export DATABASE_PASSWORD=""
else
elif $USE_LOCAL_POSTGRES; then
# postges related
export DATABASE_USER="peapescarte"
export DATABASE_PASSWORD="peapescarte"
Expand All @@ -45,4 +47,8 @@ else
# creates local databse
echo "CREATE DATABASE $PG_DATABASE;" | postgres --single -E postgres
fi
else
export DATABASE_USER="postgres"
export DATABASE_PASSWORD="postgres"
export PG_DATABASE="peapescarte_dev"
fi
30 changes: 21 additions & 9 deletions apps/plataforma_digital/assets/css/navbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
@apply flex justify-between items-center;
padding: 1rem 1.5rem;

> svg {
>svg {
margin-left: 0.5rem;
}
}
Expand All @@ -38,7 +38,7 @@
transform: translateZ(0) scale(1, 1);
border-right-width: 1px;

> span {
>span {
@apply border-black-10 rounded-full;

border-width: 1.5px;
Expand All @@ -50,7 +50,7 @@
left: calc($nav-width + 1rem);
z-index: 1000;

> svg {
>svg {
@apply text-blue-100;

width: 1rem;
Expand Down Expand Up @@ -81,11 +81,12 @@
}

.navbar.authenticated.open {
@apply bg-white-100 items-center;
@apply relative bg-white-100 items-center;
z-index: 999;

width: 20rem;

> span {
>span {
left: 21rem;
}

Expand All @@ -103,18 +104,29 @@

.nav-menu {
@apply items-start;
width: 80%;
width: 85%;

.nav-item {
width: 100%;
padding: 1rem 1.5rem;
width: max-content;
justify-content: left;

a {
display: flex;
justify-content: center;
align-items: center;

p {
padding: 0.5rem;
}
}

.logo {
margin: 0;
}
}

.nav-item > svg {
.nav-item>svg {
margin-right: 0.5rem;
}
}
Expand All @@ -123,4 +135,4 @@
width: 12.25rem;
height: 3.8rem;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ defmodule PlataformaDigital.DesignSystem.AuthenticatedNavbar do
alias Identidades.Models.Usuario
alias PlataformaDigital.DesignSystem

attr :user, Usuario, required: true
attr :open, :boolean, default: nil
attr(:user, Usuario, required: true)
attr(:open, :boolean, default: nil)

@impl true
def render(assigns) do
Expand All @@ -22,8 +22,10 @@ defmodule PlataformaDigital.DesignSystem.AuthenticatedNavbar do
<img :if={@open} src={~p"/images/pescarte_logo.svg"} class="logo" />
</li>
<li class="nav-item">
<Lucideicons.home />
<.text :if={@open} size="base" color="text-black-60">Home</.text>
<DesignSystem.link navigate={~p"/"}>
<Lucideicons.home />
<.text :if={@open} size="base" color="text-black-60">Home</.text>
</DesignSystem.link>
</li>
<li class="nav-item">
<DesignSystem.link navigate={~p"/app/pesquisa/pesquisadores"}>
Expand All @@ -42,12 +44,16 @@ defmodule PlataformaDigital.DesignSystem.AuthenticatedNavbar do
</DesignSystem.link>
</li>
<li class="nav-item">
<Lucideicons.calendar_days />
<.text :if={@open} size="base" color="text-black-60">Agenda</.text>
<DesignSystem.link navigate={~p"/"}>
<Lucideicons.calendar_days />
<.text :if={@open} size="base" color="text-black-60">Agenda</.text>
</DesignSystem.link>
</li>
<li class="nav-item">
<Lucideicons.mail />
<.text :if={@open} size="base" color="text-black-60">Mensagens</.text>
<DesignSystem.link navigate={~p"/"}>
<Lucideicons.mail />
<.text :if={@open} size="base" color="text-black-60">Mensagens</.text>
</DesignSystem.link>
</li>
</ul>
<div class="user-info">
Expand Down

0 comments on commit 52f8cdd

Please sign in to comment.