layout.html
1{{define "head"}}<!doctype html>
2<html lang="en">
3<head>
4<meta charset="utf-8">
5<meta name="viewport" content="width=device-width, initial-scale=1">
6<title>{{.}} · ci</title>
7<link rel="stylesheet" href="/static/style.css">
8<script src="/static/app.js" defer></script>
9</head>
10<body>
11<header class="bar"><a class="home" href="/">ci</a></header>
12<main>
13{{end}}
14{{define "foot"}}</main>
15</body>
16</html>
17{{end}}
18{{define "badge"}}<span class="badge s-{{.}}">{{.}}</span>{{end}}
19{{define "runrow"}}<li class="run">
20 <a href="/runs/{{.ID}}">
21 <span class="what">{{.Repo}} / {{.Workflow}}{{if .Parent}} <em>manual</em>{{end}}</span>
22 {{template "badge" .Status}}
23 <span class="meta">{{if .State}}{{short .State.Meta.Sha}}{{if .State.Meta.Ref}} · {{.State.Meta.Ref}}{{end}} · {{end}}{{ago .Created}}</span>
24 {{if and .State .State.Gate}}<span class="prompt">⏸ {{.State.Gate.Prompt}}</span>{{end}}
25 </a>
26</li>{{end}}