{{/* The frame's pieces (level-up spec §3), rendered by frame.go: the menu bar and the lead go into estilo's bar slots; the sidebar and the shortcuts dialog are drawn by shell.html. */}} {{/* mapa-menubar: File, Edit, Insert, View, Help. Each menu is a
in estilo's exclusive group, so it opens with no script (Docs' editor_bar.html gives the reasoning). A command row is disabled until mapa.js binds it; a form row is a real POST, so the View rows work with scripts off. Data: menuBar. */}} {{define "mapa-menubar"}}{{end}} {{/* mapa-menu-items: a menu's rows, the bar's and a sidebar row's ⋯ alike (build note 88). Data: []menuEntry. */}} {{define "mapa-menu-items"}} {{- range .}} {{- if eq .Kind "divider"}}
{{- else if eq .Kind "link"}}{{template "mapa-menu-body" .}} {{- else if eq .Kind "form"}}
{{range $name, $value := .Fields}}{{end}}
{{- else if eq .Kind "dialog"}} {{- else}} {{- end}} {{- end}} {{- end}} {{define "mapa-menu-body"}}{{.Label}}{{with .Key}}{{end}}{{end}} {{/* mapa-lead: presence on a team page, the save status on the editor, and a daily note's ‹ Today › pill (§3.1, §4.4). Data: leadView. */}} {{define "mapa-lead"}} {{- with .Editing}}{{range $i, $who := .}}{{if $i}}, {{end}}{{$who}}{{end}} {{if eq (len .) 1}}is{{else}}are{{end}} editing{{end}} {{- if .Status}}{{template "estilo-save-status" saveStatus}}{{end}} {{- with .Day}}{{template "mapa-day-pill" .}}{{end}} {{- end}} {{/* mapa-day-pill: ‹ Today ›. The middle names the day on screen and opens the month (a
, so it works with no script). Data: dayPill. */}} {{define "mapa-day-pill"}}{{end}} {{/* mapa-month: a month of links, weeks from the reader's locale's first day (§4.4, build note 85). A dot is a day you wrote a note; today is ringed; the day on screen is filled. ‹ › page the month with ?month=. Data: MonthView. */}} {{define "mapa-month"}}
{{.Title}} {{icon "chevron-left"}} {{icon "chevron-right"}}
{{range .Heads}}{{end}}{{range .Weeks}}{{range .}}{{end}}{{end}}
{{.Letter}}
{{.Number}}
A note you wroteToday
{{end}} {{/* mapa-links-panel: the Links panel (§4.3), Docs' inspector glass at the inline end from 64rem; at narrower widths and with the panel off the same lists are at the page's foot, and on a phone this is a sheet. Its state is the mapa-links cookie, rendered. Data: dict Page (PageView), Week (*WeekView or nil), State. */}} {{define "mapa-links-panel"}}{{$page := .Page}}{{end}} {{define "mapa-peek-line"}}{{if .Week}}This week, and links out{{else}}Linked from {{number L (len .Page.Backlinks)}}{{if eq .Page.Kind "page"}}, mentioned in {{number L (len .Page.Mentions)}}{{end}}{{end}}{{end}} {{define "mapa-links-out"}}

Links out {{with .Around}}{{number L (len .Out)}}{{end}}

{{with .Around}}{{with .Out}}

{{range .}}{{if eq .Kind "date"}}{{icon "calendar"}}{{else if eq .Kind "pending"}}{{icon "file-plus"}}{{else}}{{pageIcon .Look "file"}}{{end}}{{.Label}}{{if eq .Kind "pending"}}, page not written yet{{end}}{{end}}

{{else}}

{{if eq $.Kind "daily"}}No links out yet.{{else}}This page links nowhere yet.{{end}}

{{end}}{{end}}
{{end}} {{/* mapa-panel-linked: Linked from or Mentioned, as the panel lists them: the page, then each block that does it. Keys as mapa-linked. */}} {{define "mapa-panel-linked"}}

{{.Heading}} {{number L (len .Items)}}

{{if .Items}}{{$target := .Target}} {{else}}

{{.Empty}}

{{end}}
{{end}} {{/* mapa-map: around this page (§4.3). A picture of the lists that follow it: its nodes are pointer shortcuts to links that are also in the lists, so they take no tab stop. Data: MapView. */}} {{define "mapa-map"}} {{range .Edges}}{{end}} {{end}} {{/* mapa-week: the panel on a daily note (§4.3, §4.4), then Linked from and Links out, in a team page's order. Under the strip a key says what the fill, the ring and the dot mean, as the month's foot does; each mark is named in words for a screen reader, beside the day links' own names. Data: WeekView. */}} {{define "mapa-week"}}

This week

{{icon "chevron-left"}}
    {{range .Days}}
  1. {{end}}
{{icon "chevron-right"}}

Filled: Day shown, ringed: Today, dot: A note you wrote

{{end}} {{/* mapa-side: the sidebar, one grid per row (§3.2). In the rail the labels stay in the accessibility tree and show as tooltips. One shown row carries aria-current (build note 80): the page's own row, or its place. A place holding a page that has its own row is drawn twice (mapa-side-holds): unlit while the sidebar is open, lit in the rail, which hides the page rows; CSS shows one. The lit copy is [hidden] too, so with no CSS at all only the page's row is lit (review low 4); the rail's CSS draws it all the same. The fold is two submit buttons, one per state; CSS shows the one that fits what is on screen, so it works with scripts off and with no cookie. Data: sideView. */}} {{define "mapa-side"}}{{end}} {{define "mapa-side-place"}}{{icon .Icon}}{{.Label}}{{if eq .Href "/search"}}{{end}}{{end}} {{define "mapa-side-link"}}
{{if .Gutter}}{{template "mapa-side-arrow" .}}{{end}}{{pageIcon .Look .Icon}}{{.Label}}{{if .Private}}, only you see this{{end}}{{if .Private}}{{end}}{{template "mapa-row-menu" .}}
{{if .Open}}{{end}}{{end}} {{/* mapa-side-arrow: a Pinned row's disclosure (columns and icons spec §5.3), a form so it works with no script: POST /view/open sets the cookie and comes back. A row with nothing inside keeps the empty cell, so every icon in Pinned lines up. Data: sideLink. */}} {{define "mapa-side-arrow"}}{{if .Arrow}}
{{else}}{{end}}{{end}} {{/* mapa-row-menu: a page row's ⋯ (build note 88), the link's sibling, never inside it. A
in estilo's group, as the bar's menus are, so it opens with no script; chrome.js adds Esc and a click outside, mapa.js moves focus in. Its rows are pageVerbs', less what needs the page on screen. Data: sideLink. */}} {{define "mapa-row-menu"}}
{{icon "ellipsis"}}
{{template "mapa-menu-items" .Menu}}
{{end}} {{/* mapa-new-page: New team page's popover (§4.7), opened by the sidebar's button. In the top layer, so the sidebar's scrolling never clips it, and the platform's own Esc, click outside and focus, with no script. Drawn after
: WebKit gives the page's autofocus to the first [autofocus] in the document, even a hidden one, so this field must come after a screen's own. */}} {{define "mapa-new-page"}}{{end}} {{/* mapa-keys: Help → Keyboard shortcuts. A estilo's invoker command opens, with no script. */}} {{define "mapa-keys"}}

Keyboard shortcuts

⌘K
Search, or create a page
⌘\
Hide or show the sidebar
⌘S
Save now
[[
Link to a page while you write
⌘L
Link the selected words to a page, or start a [[ link
/
Choose a block: heading, list, checklist, quote, code, divider, date
⌘B ⌘I ⌘E
Bold, italic, code
⇧⌘K
Link the selected words to a web address
⌥F10
Move to the selection's toolbar, Make team page included
Tab ⇧Tab
In a list, indent or outdent the item
Esc, then Tab
Leave the page's text, even inside a list
⌥⌘→ ⌥⌘←
Move to the next or previous column
⌘Z ⇧⌘Z
Undo, redo
Esc
Close a menu, a list or this dialog
{{end}}