oficina / estilo Public

Clone
git clone https://amadan.net/oficina/estilo

Plain git — no account needed to clone.

Download

Download this file

1{{/* estilo-menu-item: one row in any estilo-menu. Data: menu.Item, with
2 exactly one of Href (a link), Action (a one-button POST form), Dialog
3 (a button opening the <dialog> with that id through the platform's
4 invoker command) or Controls (a toggle for the region with that id,
5 disabled until the app's script binds it). The first three work with
6 scripts off; chrome.js only adds the dialog for engines without
7 invoker commands. Callers
8 supply the label in their own locale; Key is an already-formatted
9 shortcut (menu.Shortcut). Danger marks a destructive row
10 (estilo-menu-item="danger"), drawn in the negative tone. Icon, when
11 set, is drawn before the label as decoration. */}}
12{{define "estilo-menu-item"}}{{if .Action}}<form method="post" action="{{.Action}}"><button estilo-menu-item{{if .Danger}}="danger"{{end}} type="submit">{{template "estilo-menu-item-body" .}}</button></form>{{else if .Dialog}}<button estilo-menu-item{{if .Danger}}="danger"{{end}} type="button" commandfor="{{.Dialog}}" command="show-modal">{{template "estilo-menu-item-body" .}}</button>{{else if .Controls}}<button estilo-menu-item{{if .Danger}}="danger"{{end}} type="button" aria-expanded="{{if .Expanded}}true{{else}}false{{end}}" aria-controls="{{.Controls}}" disabled data-estilo-toggle>{{template "estilo-menu-item-body" .}}</button>{{else}}<a estilo-menu-item{{if .Danger}}="danger"{{end}} href="{{.Href}}">{{template "estilo-menu-item-body" .}}</a>{{end}}{{end}}
13{{define "estilo-menu-item-body"}}{{with .Icon}}<span estilo-menu-icon>{{.}}</span>{{end}}<span estilo-menu-label>{{.Label}}</span>{{with .Key}}<kbd estilo-menu-key>{{.}}</kbd>{{end}}{{end}}
14{{/* estilo-icon-check: the glyph inside an estilo-menu-check column.
15 Lucide "check" (ISC, brand/LICENSE.lucide). */}}
16{{define "estilo-icon-check"}}<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M20 6 9 17l-5-5"/></svg>{{end}}
17