ark-theme-ui
Skill0 starsChanged 2 months agoMITView on GitHub
Specialist in LuCI DOM architecture, ARK Router custom themes, mobile-first responsiveness, touch targets, modal backdrop decoupling, and esbuild asset minification.
In this repository22 other files it gives its agents.
- AGENTS.mdAGENTS.md
- openwrt-hardware-offloadingSkill
- openwrt-imagebuilderSkill
- openwrt-luci-modernSkill
- openwrt-network-firewallSkill
- openwrt-sqm-bufferbloatSkill
- openwrt-storage-failsafeSkill
- openwrt-wifi-meshSkill
- posix-shellSkill
- security-auditorSkill
- systematic-debuggingSkill
- ark-theme-uiSkill
- openwrt-hardware-offloadingSkill
- openwrt-imagebuilderSkill
- openwrt-luci-modernSkill
- openwrt-network-firewallSkill
- openwrt-sqm-bufferbloatSkill
- openwrt-storage-failsafeSkill
- openwrt-wifi-meshSkill
- posix-shellSkill
- security-auditorSkill
- systematic-debuggingSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 65
No LuCI (temas Argon / Bootstrap), o body possui overflow: hidden.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
ARK Router: Theme, UI & Mobile Responsiveness Guidelines
Objetivo
Orientar o desenvolvimento, refatoração e auditoria visual da interface web do ARK Router no LuCI (OpenWrt). Garante experiência fluida em dispositivos móveis, conformidade com o LuCI DOM, acessibilidade e respeito rígido ao orçamento de memória Flash (16 MB) e RAM.
1. Área de Toque & Experiência Mobile (Touch-First)
- Altura Única Mínima de 40px:
- Todo botão (
.cbi-button,.btn), switch, checkbox ou badge clicável DEVE ter altura útil mínima de 40px:.cbi-button, .btn, .btn-action, .ark-badge-btn { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 8px 16px; }
- Todo botão (
- Anti-Zoom e Prevenção de Seleção Indesejada:
- Em botões, cartões interativos e switches, aplicar:
user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; - Evita o zoom acidental de duplo toque comum no iOS Safari e Chrome Android.
- Em botões, cartões interativos e switches, aplicar:
2. Modais, Backdrop e Isolamento de Scroll no LuCI
Desacoplamento Estrito de Backdrop e Cartão
- Backdrop Fixo (
#modal_overlay):#modal_overlay { position: fixed; inset: 0; width: 100vw; height: 100dvh; background: rgba(0, 0, 0, 0.65); backdrop-filter: blur(4px); z-index: 1000; display: flex; align-items: center; justify-content: center; } #modal_overlay.inactive { pointer-events: none; opacity: 0; } - Cartão do Modal (
.modal,.cbi-modal):- NUNCA aplicar larguras fixas ou margens diretamente no backdrop.
- O cartão interno deve ter
max-width: calc(100vw - 32px),max-height: calc(100dvh - 48px), e rolagem interna comoverflow-y: auto.
Isolamento de Rolagem (A Pegadinha do LuCI)
- No LuCI (temas Argon / Bootstrap), o
bodypossuioverflow: hidden; height: 100vh;. - Quem rola é o contêiner
.main-right! - Ao abrir um modal ou o menu lateral móvel, trave a rolagem travando o elemento
.main-right:
Ao fechar o modal, remova as propriedades para restaurar a navegação.const mainRight = document.querySelector('.main-right'); if (mainRight) { mainRight.style.setProperty('overflow', 'hidden', 'important'); mainRight.style.setProperty('pointer-events', 'none', 'important'); }
3. Contenção Flex e Grid (Prevenção de Quebra de Layout)
- Regra de Ouro do
min-width: 0:- Em filhos diretos de elementos com
display: flexoudisplay: grid, SEMPRE declaremin-width: 0;. - Sem isso, textos longos como endereços MAC (
AA:BB:CC:DD:EE:FF), IPv6 ou Hostnames empurram a tela horizontalmente e quebram a responsividade no celular:.device-row, .grid-cell, .card-content { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
- Em filhos diretos de elementos com
Largura da área principal e componentes do LuCI
- Em desktop,
100vwinclui a calha da barra de rolagem em alguns navegadores. Para uma área principal ao lado do menu, prefira uma largura relativa ao contêiner (100%) e confira se há scroll horizontal nas páginas nativas do LuCI. - Descubra quantos rádios existem antes de montar cartões Wi-Fi; não presuma sempre 2,4 e 5 GHz. Evite modificar o DOM interno de componentes LuCI como
<cbi-dropdown>.
4. Confirmação de Segurança em Ações Críticas (Safety Interception)
- Ações que possam interromper a conexão (Reboot, Factory Reset, Sysupgrade, mudança de perfil de firewall):
- Fase de Captura Obrigatória: Usar
addEventListener('click', handler, true)para interceptar o clique antes de qualquer manipulador interno do LuCI ou submissão acidental de formulário. - Trava Visual com Countdown: O botão final de confirmação deve permanecer desabilitado por pelo menos 2 segundos exibindo um contador regressivo (
"Confirmar (2s)..."). - Validação Backend: O disparo real da ação deve enviar um token efêmero gerado e validado em
/tmp(RAM).
- Fase de Captura Obrigatória: Usar
5. Pipeline de Assets & Minificação (Zero-Waste no Overlay)
- Código-Fonte vs Código de Produção:
- O código fonte de desenvolvimento em
root/www/...permanece 100% legível, estruturado e comentado. - NUNCA suba arquivos sem minificar para o
/overlaydo roteador em produção.
- O código fonte de desenvolvimento em
- Pipeline Automatizado (
scripts/build_minified_assets.py):- Gera os assets minificados via
esbuild(--minify --legal-comments=none). - Validação de sintaxe JS com
node --check. - Redução média de 60% a 70% no tamanho dos arquivos, preservando a partição
/overlayacima de 2 MB livres.
- Gera os assets minificados via
- Orçamento de Peso:
- O bundle combinado de CSS + JS do tema nunca deve exceder 60 KB compactado (SquashFS).
- Proibido importar bibliotecas pesadas de npm (Lodash, jQuery, React, Moment.js). O LuCI roda em vanilla JavaScript.
Carregamento e versões
- Gere a versão do bundle principal e dos arquivos de idioma a partir da mesma fonte. Teste idioma padrão e idiomas sob demanda em um navegador, inclusive após atualizar o pacote com arquivos antigos em cache.
- Evite carregar consultas caras e recursos opcionais antes da primeira renderização. Quando usar cache no navegador, defina quando ele expira ou é invalidado e teste o caso de versão divergente.
6. O Que NUNCA Fazer na Interface do ARK Router
- ❌ NUNCA use
alert(),confirm()ouprompt()síncronos: Eles congelam o thread de eventos do LuCI e falham miseravelmente no Safari mobile e webviews. Use os modais assíncronos estilizados do ARK Router. - ❌ NUNCA defina larguras fixas em pixels (
width: 600px): Use sempre limites responsivos com porcentagens oumax-width: 100%. - ❌ NUNCA confie em preenchimento automático de senhas do LuCI: O LuCI injeta inputs fictícios com
left: -100000pxpara enganar o navegador; seus seletores de DOM devem ignorar esses elementos ocultos.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

