~emersion/drmdb

ref: e3e3179febefc9275824230119bb8b8f8a7132b5 drmdb/public/formats.html -rw-r--r-- 1.2 KiB
e3e3179fSimon Ser Add formats page 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{{template "head" "Formats"}}

<h1>DRM database formats</h1>

<p><a href="/">Back to index</a></p>

<h2 id="in-formats">Input formats</h2>

<table>
    <thead>
        <tr>
            <th rowspan="2">Modifier</th>
            <th rowspan="2">Format</th>
            <th colspan="{{len .Planes}}">Planes</th>
            <th colspan="{{len .Drivers}}">Drivers</th>
        </tr>
        <tr>
            {{range $plane, $_ := .Planes}}
            <th>{{$plane.String}}</th>
            {{end}}
            {{range $drv, $_ := .Drivers}}
            <th>{{$drv}}</th>
            {{end}}
        </tr>
    </thead>
    <tbody>
        {{$total := .Total}}
        {{$planes := .Planes}}
        {{$drivers := .Drivers}}
        {{range .Formats}}
        <tr>
            {{$row := .}}
            <td class="pre">{{.Modifier}}</td>
            <td class="pre">{{.Format}}</td>
            {{range $plane, $_ := $planes}}
            <td>{{pct (index $row.Planes $plane) $total}}</td>
            {{end}}
            {{range $drv, $_ := $drivers}}
            <td>{{pct (index $row.Drivers $drv) $total}}</td>
            {{end}}
        </tr>
        {{end}}
    </tbody>
</table>