improve menus

This commit is contained in:
Inhji 2023-03-30 22:56:06 +02:00
parent 7e0f009a58
commit 82d2aeebaf
3 changed files with 16 additions and 15 deletions

View file

@ -65,11 +65,20 @@ defmodule ChiyaWeb.AdminComponents do
def admin_bar(assigns) do def admin_bar(assigns) do
~H""" ~H"""
<ul class="relative z-10 flex items-center gap-4 px-4 sm:px-6 lg:px-8 justify-end bg-black"> <ul class="relative z-10 flex items-center gap-4 py-1 px-4 sm:px-6 lg:px-8 bg-black">
<li>
<.link
href={~p"/"}
class="flex gap-3 text-sm leading-6 text-gray-100 font-semibold hover:text-gray-300"
>
<span>Chiya</span>
<p class="rounded-full bg-emerald-500/10 px-2 text-[0.8125rem] font-medium leading-6 text-emerald-500">
v<%= Application.spec(:chiya, :vsn) %>
</p>
</.link>
</li>
<li class="flex-1"></li>
<%= if @current_user do %> <%= if @current_user do %>
<li class="text-xs leading-6 text-gray-100">
<%= @current_user.email %>
</li>
<li> <li>
<.link <.link
href="#" href="#"

View file

@ -1,11 +1,5 @@
<header class="px-4 sm:px-6 lg:px-8"> <header class="px-4 sm:px-6 lg:px-8">
<div class="flex items-center justify-between border-b border-gray-100 dark:border-gray-800 py-3"> <div class="flex items-center justify-end border-b border-gray-100 dark:border-gray-800 py-3">
<div class="flex items-center gap-4">
<a href="/" class="text-gray-900 font-semibold dark:text-gray-100">Chiya</a>
<p class="rounded-full bg-emerald-500/5 px-2 text-[0.8125rem] font-medium leading-6 text-emerald-500">
v<%= Application.spec(:chiya, :vsn) %>
</p>
</div>
<div class="flex items-center gap-4"> <div class="flex items-center gap-4">
<.link <.link
href={~p"/admin/notes"} href={~p"/admin/notes"}

View file

@ -1,8 +1,5 @@
<header class="px-4 sm:px-6 lg:px-8"> <header class="px-4 sm:px-6 lg:px-8">
<div class="flex items-center justify-between border-b border-theme-dim py-3"> <div class="flex items-center justify-end border-b border-theme-dim/50 py-3">
<div class="flex items-center gap-4">
<a href="/" class="text-theme-base font-semibold">Chiya</a>
</div>
<div class="flex items-center gap-4"> <div class="flex items-center gap-4">
<.link <.link
href={~p"/n/about"} href={~p"/n/about"}
@ -13,6 +10,7 @@
</div> </div>
</div> </div>
</header> </header>
<main class="px-4 py-20 sm:px-6 lg:px-8"> <main class="px-4 py-20 sm:px-6 lg:px-8">
<div class="mx-auto max-w-2xl"> <div class="mx-auto max-w-2xl">
<.flash_group flash={@flash} /> <.flash_group flash={@flash} />