oficina / base Public

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

Plain git — no account needed to clone.

Download

Download this file

1{{define "title"}}{{.Name}} · Base{{end}}
2{{/* On a wide screen Ask Base is docked open beside Home until the member closes it. */}}{{define "root"}}{{if and .Ask (not .AskOpen)}} class="desk-closed"{{end}}{{end}}
3{{define "main"}}<div class="shell">
4{{/* The header across the top. The Base button opens Ask Base: on a wide
5 screen it shows only while the chat is closed. */}}<header class="topbar glass">
6<div class="wordmark">base</div>
7<div class="team">{{.Name}}</div>
8{{/* A form on a wide screen, where opening is kept for the member; a link to /ask on a phone, which works without scripts. */}}{{if .Ask}}<form class="base-btn-form" method="post" action="/ask/dock"><input type="hidden" name="open" value="1"><button class="base-btn" type="submit" data-ask-open aria-controls="ask-panel" aria-label="Ask Base" title="Ask Base"><span class="mark" aria-hidden="true"></span></button></form>
9<a class="base-btn" href="/ask" data-ask-open aria-controls="ask-panel" aria-label="Ask Base" title="Ask Base"><span class="mark" aria-hidden="true"></span></a>
10{{end}}<a class="me" href="/settings" aria-label="Settings">{{.Initials}}</a>
11</header>
12<main class="home" id="home">
13<h2 class="hello">{{.Greeting}}</h2>
14<p class="lede">{{.Lede}}</p>
15{{/* The Ask field under the greeting. It folds away while the chat is docked open. */}}{{if .Ask}}<div class="ask-slot"><div><form class="ask-field-form" method="post" action="/ask/dock"><input type="hidden" name="open" value="1"><button class="ask-field" type="submit" data-ask-open aria-controls="ask-panel"><span>Ask Base anything</span><kbd>/</kbd></button></form><a class="ask-field" href="/ask" data-ask-open aria-controls="ask-panel"><span>Ask Base anything</span><kbd>/</kbd></a></div></div>
16{{end}}<ul class="steps">
17{{range .Steps}}<li class="glass{{if .Done}} done{{end}}"><span class="mark">{{if .Done}}✓{{end}}</span>{{.Label}}</li>
18{{end}}</ul>
19{{/* Every app in one glass panel, one grid of alike items: the Oficina
20 apps, the installed apps, then Base's own pages. A wrapping grid on a
21 wide screen, four columns on a phone. */}}<nav class="apps glass" aria-label="Apps">
22<ul class="app-grid">
23{{range .Apps}}{{template "app" .}}
24{{end}}{{range .Dock}}{{template "app" .}}
25{{end}}</ul>
26</nav>
27</main>
28{{with .Ask}}<div class="chat-col">{{template "ask-panel" .}}</div>
29<script type="module" src="{{asset "static/ask.js"}}"></script>
30{{end}}</div>{{end}}
31
32{{define "app"}}<li{{if .Own}} class="own"{{end}}><a class="app" href="{{.Href}}"{{if .NewTab}} target="_blank" rel="noopener"{{end}}>{{if .Image}}<span class="icon"><img src="{{asset .Image}}" alt=""></span>{{else}}<span class="icon tile t-{{.Tint}}">{{.Icon}}</span>{{end}}<span class="label">{{.Name}}</span></a></li>{{end}}
33