Files
ipal-kit/docs/agent/skills/ipal-nav/SKILL.md
T
radoslaw.smolinskiandClaude Opus 5.5 81e864bde9 Docs for 1.9.2: import instead of code; docs↔code consistency test; audit accepts one-line routes
- AGENT.md: §7 full capability catalog (need → import), §0b/§3/§6 on RenderForm, SiteProviders,
  createPageRoute, re-exported routes, plugin section fields, resolveLink/resolveNav
- PROGRAMISTA §2.4, §2.7–2.8 rewritten; §6 items 28–33 (28: FormRenderer leaked the Emails tab)
- forms, links, blocks, pages, consent, turnstile, notifications, seo, mcp, i18n, deployment docs
- ipal-form: RenderForm block, formClasses, CustomForm example (FormRenderer template removed),
  seed template handles steps and option labels per language
- ipal-nav, ipal-block, ipal-setup, ipal-upgrade, ipal-seo-check, ipal-consent-check, vibe.md
- ipal-audit: re-export routes and SiteProviders satisfy the mandatory set; flags form-engine copies,
  project section fields / navigation, server entries in client components
- test/docsConsistency: docs imports exist in code; every public export is documented
- CHANGELOG 1.9.2

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-16 11:52:29 +02:00

2.1 KiB

name, description
name description
ipal-nav Builds the site header, footer, mobile menu and company data in an ipal-kit project — Header/Footer/Company globals with buildLinkField from the plugin, server-side link resolution (resolveNav from the plugin), a small client MobileNav, legal links from System Pages, revalidation on change. Use when creating or changing navigation, menu, header, footer, contact details, social links or the company global.

ipal-nav

Gotowy kod: resources/kod-nawigacji.md (ten skill). Reguły: AGENT.md §6.8. Wymaga prymitywów z ../ipal-block/resources/kod-sekcji.md (jak skill ipal-block, krok 0).

Plan (zapisz, potem od razu kod — AGENT.md §0a)

  • pozycje menu (jeden poziom podmenu, nie głębiej), CTA w nagłówku (links),
  • kolumny stopki, notka,
  • model Company dla rynku z AGENTS.md (PL: NIP/REGON, AU: ABN, US: EIN…),
  • etykiety a11y (przycisk menu itp.) — pola w panelu.

Kod

  1. src/globals/Header.ts, Footer.ts — z §6.8; Company.ts — dane firmy (teksty localized), access.read: () => true.
  2. Hook afterChange na każdym globalu: revalidatePath('/', 'layout') (wstrzyknięty z next/cache, hooks.md).
  3. Menu: await resolveNav(header.navItems, locale) z lib/content (plugin) — linki rozwiązane na serwerze do { href, label, internal, newTab, targetProps, children }. Nie twórz lib/navigation.ts.
  4. src/components/layout/Header.tsx, Footer.tsx (serwer), MobileNav.tsx ('use client', tylko stan otwarcia, dane przez props, import type { NavItem } from '@intecion/ipal-kit').
  5. Linki prawne w stopce z ról System Pages (getSystemPagePath + tytuł strony) — nie jako ręczne pozycje. Rok w copyright z kodu, nazwa z Company.
  6. Logo z Site Settings przez <Media> — nie duplikuj pola w Header.
  7. Podepnij w src/app/(frontend)/[locale]/layout.tsx (pobranie globali przez cached gettery w lib/, przekazanie jako props).

Weryfikacja

Skill ipal-audit. Ręcznie: dodanie pozycji menu w panelu widać od razu po zapisie; menu mobilne działa z klawiatury (Tab, Enter, Esc).