{"summary":"Como organizar a barra de navegação, o índice, o fim dos artigos, o rodapé e a troca de seção no celular em uma wiki ou central de ajuda.","notes":"<p>Quando o produto fica complexo e o site precisa de muitos artigos para SEO, uma boa wiki responde às dúvidas dos usuários e ainda traz tráfego de busca. Os problemas mais comuns são não achar o índice no celular e não saber para onde ir depois de ler um artigo. O layout precisa resolver estes cinco pontos:</p>\n        <ol>\n        <li><strong>Barra de seções no celular</strong>: os celulares são em sua maioria aparelhos de tela estreita, onde não cabe um índice lateral. Uma barra de seções fixa na parte inferior abre, com um toque, um menu em tela cheia com todas as seções, uma por linha, fácil de tocar, sem precisar voltar ao topo.</li>\n        <li><strong>Índice</strong>: quando há muitas seções e elas não cabem numa tela, o índice tem altura própria e rola separado do texto; o que não cabe é cortado em cima e embaixo. As bordas cortadas recebem uma máscara em degradê que indica que há mais conteúdo, e um botão de seta centralizado para rolar com um clique.</li>\n        <li><strong>Fim do artigo</strong>: abaixo dos artigos que respondem a uma dúvida, coloque links para a comunidade e as redes sociais; seja o leitor uma pessoa ou uma IA, eles geram conversão, como um anúncio contextual gratuito para a sua meta de conversão. Os cards seguem o estilo dos componentes do texto e parecem parte do artigo.</li>\n        <li><strong>Rodapé</strong>: com uma imagem de fundo bonita, o rodapé ocupa mais de meia tela e convida o leitor a rolar até o fim e ficar ali. Ele precisa ter informação realmente útil, que ajude o leitor a resolver o problema; senão, só incomoda.</li>\n        <li><strong>Barra de navegação</strong>: o logo (que leva ao site), menus suspensos para as páginas principais e o botão de CTA principal; fica fixa no topo ao rolar. O Safari e outros navegadores colorem a barra de endereço com a cor da barra de navegação, então o fundo precisa combinar com a marca.</li>\n        </ol>\n        <p>O prompt que acompanha esta dica encontra o layout comum das páginas de documentação e só ajusta a posição, a rolagem e a adaptação da barra de navegação, do índice, do sumário e do fim do artigo; o conteúdo, os textos, as cores e as fontes não mudam. No fim, tira uma captura do topo, do meio e do fim da página e outra na largura de celular, para você conferir.</p>","prompt":"Polish the layout of my docs or help center pages: the header, the page list, the outline and the end of each article. Keep the content, copy, colours and fonts. Change only how these parts sit, scroll and respond.\n\n0. Start from what exists\n- Find the shared docs layout, the site header, the page list (sidebar), the outline (table of contents) and the footer. Change those, so every page inherits the result.\n- Use CSS and a little plain JS. Add no scroll or animation libraries.\n\n1. Think of the page as three layers\n- The article and the footer scroll with the page.\n- The page list and the outline are position: sticky. They stop where they start, so they never jump when scrolling begins, and the end of the layout pushes them up at the bottom.\n- The header becomes position: fixed only after the page's opening (banner or hero) has left the screen. Before that it belongs to the page and scrolls away with it.\n\n2. Header: it scrolls away, then comes back floating\n- At the top it is clear, with no background.\n- Once the reader has scrolled and the banner's bottom edge is at or above the top of the screen (getBoundingClientRect().bottom <= 0), show it as a floating bar: position: fixed; a translucent white background; backdrop-filter: blur(18px); a soft shadow.\n- It enters in 320ms ease-out, from translateY(-24px) with blur(8px) and opacity 0. It leaves in 120ms when the reader scrolls back up to the banner. If the reader scrolls down again during the exit, cancel it and keep the bar.\n- Give headings a scroll-margin-top so anchor links never land under the bar.\n\n3. Page list: it scrolls on its own, and shows where there is more\n- Hide its scrollbar and let it scroll by itself.\n- Fade an edge only while more of the list waits beyond it. Toggle data-more-above and data-more-below on scroll and resize, and drive a mask-image: linear-gradient(...) with them: about 40px at the top and 56px at the bottom, each with a short fully clear strip at the very edge, so a half-cut row never shows as a faint line.\n- Add a small round arrow on each edge that has more. A click scrolls the list by 60% of its visible height, smoothly. Arrows are for the mouse only (tabindex=\"-1\", aria-hidden=\"true\"); keyboard focus already scrolls the list.\n- On load, bring the current page into view. Keep the list's scroll position in sessionStorage, so moving to another page does not reset it.\n- If there is a search box, let \"/\" focus it.\n\n4. Outline: mark the section being read\n- The current section is the last heading above a line 20% down the viewport.\n- Mark its link with aria-current=\"location\" and style that: border-left-color and text in the accent colour.\n- Update it on scroll, at most once per animation frame.\n\n5. End of the article: help first, then the next page\n- If the reader is still stuck, a \"Still need help?\" card with one or two real channels (the issue tracker, the community, a contact).\n- Then previous and next links, with each page's title. The first page links back to the home page.\n- Then the footer.\n\n6. Narrow screens\n- Hide the outline on tablets and the page list on phones. Put both in one bar fixed at the bottom: the page list on its left half, the outline on its right half.\n- The right half shows the name of the section being read, updated by the same 20% line, and truncated with an ellipsis when it is long.\n- A tap on either half opens its list as a sheet from the bottom edge (a dialog opened with showModal()), sliding up 24px as it fades in, with no dimming behind it. Mark the current entry and scroll it into view (scrollIntoView({ block: \"center\" })).\n- A tap on an entry, the close button, outside the sheet or Esc closes it; a section link then scrolls to its heading.\n- Make the tap targets one size up from the desktop list.\n\n7. Motion\n- Under prefers-reduced-motion: reduce, turn off smooth scrolling and the header's enter and exit animations.\n\n8. When done\n- List every file and selector you changed.\n- Check four states on my own pages: the top of a page, the middle, the end, and a phone-width window.\n- Show a screenshot of each.","skill":"/skills/kubai-wiki-layout/SKILL.md","skillText":"# 兼顾PC和移动端的Wiki布局\n\n《999 个小技巧，让你 Vibe 的产品更有质感》第 008 期 · @kubai087\n\n在用户的项目里按下面的要求改造。要求以用户的口吻写成：文中的 I、me、my 指用户；写着要先问的地方，先停下来问用户再继续。\n\n## 改造要求\n\nPolish the layout of my docs or help center pages: the header, the page list, the outline and the end of each article. Keep the content, copy, colours and fonts. Change only how these parts sit, scroll and respond.\n\n0. Start from what exists\n- Find the shared docs layout, the site header, the page list (sidebar), the outline (table of contents) and the footer. Change those, so every page inherits the result.\n- Use CSS and a little plain JS. Add no scroll or animation libraries.\n\n1. Think of the page as three layers\n- The article and the footer scroll with the page.\n- The page list and the outline are position: sticky. They stop where they start, so they never jump when scrolling begins, and the end of the layout pushes them up at the bottom.\n- The header becomes position: fixed only after the page's opening (banner or hero) has left the screen. Before that it belongs to the page and scrolls away with it.\n\n2. Header: it scrolls away, then comes back floating\n- At the top it is clear, with no background.\n- Once the reader has scrolled and the banner's bottom edge is at or above the top of the screen (getBoundingClientRect().bottom <= 0), show it as a floating bar: position: fixed; a translucent white background; backdrop-filter: blur(18px); a soft shadow.\n- It enters in 320ms ease-out, from translateY(-24px) with blur(8px) and opacity 0. It leaves in 120ms when the reader scrolls back up to the banner. If the reader scrolls down again during the exit, cancel it and keep the bar.\n- Give headings a scroll-margin-top so anchor links never land under the bar.\n\n3. Page list: it scrolls on its own, and shows where there is more\n- Hide its scrollbar and let it scroll by itself.\n- Fade an edge only while more of the list waits beyond it. Toggle data-more-above and data-more-below on scroll and resize, and drive a mask-image: linear-gradient(...) with them: about 40px at the top and 56px at the bottom, each with a short fully clear strip at the very edge, so a half-cut row never shows as a faint line.\n- Add a small round arrow on each edge that has more. A click scrolls the list by 60% of its visible height, smoothly. Arrows are for the mouse only (tabindex=\"-1\", aria-hidden=\"true\"); keyboard focus already scrolls the list.\n- On load, bring the current page into view. Keep the list's scroll position in sessionStorage, so moving to another page does not reset it.\n- If there is a search box, let \"/\" focus it.\n\n4. Outline: mark the section being read\n- The current section is the last heading above a line 20% down the viewport.\n- Mark its link with aria-current=\"location\" and style that: border-left-color and text in the accent colour.\n- Update it on scroll, at most once per animation frame.\n\n5. End of the article: help first, then the next page\n- If the reader is still stuck, a \"Still need help?\" card with one or two real channels (the issue tracker, the community, a contact).\n- Then previous and next links, with each page's title. The first page links back to the home page.\n- Then the footer.\n\n6. Narrow screens\n- Hide the outline on tablets and the page list on phones. Put both in one bar fixed at the bottom: the page list on its left half, the outline on its right half.\n- The right half shows the name of the section being read, updated by the same 20% line, and truncated with an ellipsis when it is long.\n- A tap on either half opens its list as a sheet from the bottom edge (a dialog opened with showModal()), sliding up 24px as it fades in, with no dimming behind it. Mark the current entry and scroll it into view (scrollIntoView({ block: \"center\" })).\n- A tap on an entry, the close button, outside the sheet or Esc closes it; a section link then scrolls to its heading.\n- Make the tap targets one size up from the desktop list.\n\n7. Motion\n- Under prefers-reduced-motion: reduce, turn off smooth scrolling and the header's enter and exit animations.\n\n8. When done\n- List every file and selector you changed.\n- Check four states on my own pages: the top of a page, the middle, the end, and a phone-width window.\n- Show a screenshot of each.\n"}