diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-01-11 17:19:30 +0300 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-01-11 20:22:01 +0300 |
commit | 6df4bcb89dc7f7c7cec31eb29b6128ce5e4684f8 (patch) | |
tree | 6347fa061796885218a0b428d447281719c4b8c8 | |
parent | fdd89fa9714cdea8c6d8beaf00759824852e30d9 (diff) |
example: List dependencies
Requires upcoming Hugo 0.92.0
-rw-r--r-- | exampleSite/layouts/index.html | 94 |
1 files changed, 59 insertions, 35 deletions
diff --git a/exampleSite/layouts/index.html b/exampleSite/layouts/index.html index 516b416..652097f 100644 --- a/exampleSite/layouts/index.html +++ b/exampleSite/layouts/index.html @@ -1,38 +1,62 @@ <!doctype html> <html lang="en"> - <head> - <meta charset="utf-8"> - <title> - {{ .Title }} - </title> - {{/* styles */}} - {{ $options := dict "enableSourceMap" true }} - {{ if hugo.IsProduction}} - {{ $options := dict "enableSourceMap" false "outputStyle" "compressed" }} - {{ end }} - {{ $styles := resources.Get "scss/styles.scss" }} - {{ $styles = $styles | resources.ToCSS $options }} - {{ if hugo.IsProduction }} - {{ $styles = $styles | fingerprint }} - {{ end }} - <link href="{{ $styles.RelPermalink }}" rel="stylesheet" /> - </head> - <body> - <div class="container mt-5"> - <div class="row"> - <div class="col-sm-4"> - <h3>Column 1</h3> - <p>Lorem ipsum dolor..</p> - </div> - <div class="col-sm-4"> - <h3>Column 2</h3> - <p>Lorem ipsum dolor..</p> - </div> - <div class="col-sm-4"> - <h3>Column 3</h3> - <p>Lorem ipsum dolor..</p> - </div> - </div> - </div> - </body> + +<head> + <meta charset="utf-8"> + <title> + {{ .Title }} + </title> + {{/* styles */}} + <style> + html { + font-size: 12px; + } + </style> + {{ $options := dict "enableSourceMap" true }} + {{ if hugo.IsProduction}} + {{ $options := dict "enableSourceMap" false "outputStyle" "compressed" }} + {{ end }} + {{ $styles := resources.Get "scss/styles.scss" }} + {{ $styles = $styles | resources.ToCSS $options }} + {{ if hugo.IsProduction }} + {{ $styles = $styles | fingerprint }} + {{ end }} + <link href="{{ $styles.RelPermalink }}" rel="stylesheet" /> +</head> + +<body> + <div class="container mt-5"> + <h2>Dependencies</h2> + <table class="table table-dark"> + <thead> + <tr> + <th scope="col">#</th> + <th scope="col">Owner</th> + <th scope="col">Path</th> + <th scope="col">Version</th> + <th scope="col">Time</th> + <th scope="col">Vendor</th> + </tr> + </thead> + <tbody> + {{ range $index, $element := hugo.Deps }} + <tr> + <th scope="row">{{ add $index 1 }}</th> + <td>{{ with $element.Owner }}{{.Path }}{{ end }}</td> + <td> + {{ $element.Path }} + {{ with $element.Replace}} + => {{ .Path }} + {{ end }} + </td> + <td>{{ $element.Version }}</td> + <td>{{ with $element.Time }}{{ . }}{{ end }}</td> + <td>{{ $element.Vendor }}</td> + </tr> + {{ end }} + </tbody> + </table> + </div> +</body> + </html>
\ No newline at end of file |