Add daisyui integration, remove Header and page components, and update layout structure
This commit is contained in:
64
apps/web/src/lib/components/Sidebar.svelte
Normal file
64
apps/web/src/lib/components/Sidebar.svelte
Normal file
@@ -0,0 +1,64 @@
|
||||
<script lang="ts">
|
||||
import { page } from "$app/state";
|
||||
import logo from "$lib/assets/logo_governo_PE.png";
|
||||
import type { Snippet } from "svelte";
|
||||
|
||||
let { children }: { children: Snippet } = $props();
|
||||
|
||||
const setores = [
|
||||
{ nome: "Recursos Humanos", link: "/recursos-humanos" },
|
||||
{ nome: "Financeiro", link: "/financeiro" },
|
||||
{ nome: "Controladoria", link: "/controladoria" },
|
||||
{ nome: "Licitações", link: "/licitacoes" },
|
||||
{ nome: "Compras", link: "/compras" },
|
||||
{ nome: "Jurídico", link: "/juridico" },
|
||||
{ nome: "Comunicação", link: "/comunicacao" },
|
||||
{ nome: "Secretaria Executiva", link: "/secretaria-executiva" },
|
||||
{
|
||||
nome: "Secretaria de Gestão de Pessoas",
|
||||
link: "/gestao-pessoas",
|
||||
},
|
||||
{ nome: "Tecnologia da Informação", link: "/ti" },
|
||||
];
|
||||
</script>
|
||||
|
||||
<div class="drawer lg:drawer-open">
|
||||
<input id="my-drawer-3" type="checkbox" class="drawer-toggle" />
|
||||
<div class="drawer-content flex flex-col items-center">
|
||||
<!-- Page content here -->
|
||||
{@render children?.()}
|
||||
|
||||
<label for="my-drawer-3" class="btn drawer-button lg:hidden">
|
||||
Open drawer
|
||||
</label>
|
||||
</div>
|
||||
<div class="drawer-side">
|
||||
<label for="my-drawer-3" aria-label="close sidebar" class="drawer-overlay"
|
||||
></label>
|
||||
<ul class="menu bg-base-200 min-h-full w-76 p-4 gap-4">
|
||||
<img src={logo} alt="Logo" class="" />
|
||||
<!-- Sidebar content here -->
|
||||
<li class="bg-primary rounded-2xl mt-4">
|
||||
<a href="/">
|
||||
<span>Dashboard</span>
|
||||
</a>
|
||||
</li>
|
||||
{#each setores as s}
|
||||
<li class="bg-primary rounded-2xl">
|
||||
<a
|
||||
href={s.link}
|
||||
class:active={page.url.pathname === s.link}
|
||||
aria-current={page.url.pathname === s.link ? "page" : undefined}
|
||||
>
|
||||
<span>{s.nome}</span>
|
||||
</a>
|
||||
</li>
|
||||
{/each}
|
||||
<li class="bg-primary rounded-2xl">
|
||||
<a href="/">
|
||||
<span>Solicitar acesso</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user