aboutsummaryrefslogtreecommitdiff
path: root/templates/index.html
blob: fa061f191bb6d7f4044bfea3ba4629d81ca5321c (plain) (blame)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
<!DOCTYPE html>
<html>
    <head>
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/skeleton/2.0.4/skeleton.min.css" />
    </head>
    <style>
        .separator {
            margin: 0.25em 0;
        }
        .description { color: #666; }

        /* On narrow screens, switch to inline headers. */
        .table-header { display: none; }
        .inline-header { font-weight: bold; }
        @media (min-width: 550px) {
            .table-header { display: block; }
            .inline-header { display: none; }
        }
    </style>
    <body>
        <div class="container">
            <div class="row table-header">
                <div class="five columns"><strong>Package</strong></div>
                <div class="five columns"><strong>Source</strong></div>
                <div class="two columns"><strong>Documentation</strong></div>
            </div>
            {{ range .Packages }}
                <hr class="separator">
                <div class="row">
                    <div class="five columns">
                        <span class="inline-header">Package:</span>
                        {{ .ImportPath }}
                    </div>
                    <div class="five columns">
                        <span class="inline-header">Source:</span>
                        <a href="//{{ .GitURL }}">{{ .GitURL }}</a>
                    </div>
                    <div class="two columns">
                        <a href="//{{ .GodocHome }}">
                            <img src="//pkg.go.dev/badge/{{ .ImportPath }}.svg" alt="Go Reference" />
                        </a>
                    </div>
                </div>
                {{ with .Desc }}
                    <div class="row">
                        <div class="one column">
                            <!-- indent -->
                        </div>
                        <div class="eleven columns description">
                            {{ . }}
                        </div>
                    </div>
                {{ end }}
            {{ end }}
        </div>
    </body>
</html>