go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/cipd/appengine/frontend/templates/includes/base.html (about)

     1  {{define "base"}}
     2  <!DOCTYPE html>
     3  <html lang="en">
     4  <!-- Copyright 2018 The LUCI Authors. All rights reserved.
     5  Use of this source code is governed under the Apache License, Version 2.0
     6  that can be found in the LICENSE file. -->
     7  <head>
     8    <meta http-equiv="Content-type" content="text/html; charset=UTF-8">
     9    <link href="/static/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    10    <title>{{block "title" .}}CIPD Packages{{end}}</title>
    11    <script src="/static/bootstrap/js/bootstrap.bundle.min.js"></script>
    12    <style>
    13      body {
    14        font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    15        font-size: 14px;
    16      }
    17      a {
    18        text-decoration: none!important;
    19      }
    20      .info-table-key {
    21        width: 1px;
    22        white-space: nowrap;
    23        border-right: 1px solid #cccccc;
    24      }
    25      .md-table-key {
    26        font-family: monospace;
    27        width: 200px;
    28        white-space: nowrap;
    29      }
    30      .md-table-value {
    31        font-family: monospace;
    32        max-width: 0px;
    33        white-space: nowrap;
    34      }
    35      .md-modal-value {
    36        font-family: monospace;
    37        width: 100%;
    38        height: 250px;
    39      }
    40      .age-td {
    41        width: 6em;
    42        white-space: nowrap;
    43        overflow: hidden;
    44        text-overflow: ellipsis;
    45        border-right: 1px solid #cccccc;
    46      }
    47      .ref-btn {
    48        display: inline;
    49        padding: .3em .2em .4em .3em;
    50        margin-left: 0.1em;
    51        margin-right: 0.15em;
    52        font-size: 75%;
    53        font-weight: 700;
    54        line-height: 1;
    55        text-align: center;
    56        white-space: nowrap;
    57        vertical-align: baseline;
    58        border-radius: .25em;
    59      }
    60      .version-link {
    61        font-family: monospace;
    62        text-decoration: none!important;
    63      }
    64    </style>
    65  </head>
    66  
    67  <body class="pt-2">
    68    <div class="container">
    69      <nav class="navbar navbar-expand-md navbar-light bg-light rounded border mb-2">
    70        <div class="container-fluid">
    71          <a class="navbar-brand" href="/">CIPD Packages</a>
    72          <span class="navbar-text">
    73          {{if .IsAnonymous}}
    74            <a href="{{.LoginURL}}">Login</a>
    75          {{else}}
    76            {{.User.Email}} | <a href="{{.LogoutURL}}">Logout</a>
    77          {{end}}
    78          </span>
    79        </div>
    80      </nav>
    81  
    82      <div id="content-box">
    83        {{block "content" .}}{{end}}
    84      </div>
    85  
    86      <footer style="color: #cccccc;">
    87        <hr class="mt-1 mb-1">
    88        <p class="float-end small">
    89          Handled in {{call .HandlerDuration}}
    90          <span class="ms-2">Version: {{.AppVersion}}</span>
    91        </p>
    92      </footer>
    93    </div>
    94  </body>
    95  
    96  </html>
    97  {{end}}
    98  
    99  
   100  {{define "download-icon"}}
   101  <img src="/static/icons/download.svg" alt="Download" />
   102  {{end}}
   103  
   104  
   105  {{define "arrow-down-icon"}}
   106  <img src="/static/icons/arrow-down.svg" />
   107  {{end}}
   108  
   109  
   110  {{define "package-icon"}}
   111  <img src="/static/icons/package.svg" />
   112  {{end}}
   113  
   114  
   115  {{define "missing-group-icon"}}
   116  <img src="/static/icons/exclamation-square.svg" alt="missing" title="No such group" />
   117  {{end}}
   118  
   119  
   120  {{define "breadcrumbs"}}
   121  <nav aria-label="breadcrumb">
   122    <ol class="breadcrumb bg-light p-2">
   123      {{range $crumb := .Breadcrumbs }}
   124        {{if $crumb.Last}}
   125        <li class="breadcrumb-item active" aria-current="page">
   126          {{if $crumb.Package}}{{template "package-icon" .}}{{end}}
   127          {{$crumb.Title}}
   128        </li>
   129        {{else}}
   130        <li class="breadcrumb-item">
   131          <a href="{{$crumb.Href}}">
   132            {{if $crumb.Package}}{{template "package-icon" .}}{{end}}
   133            {{$crumb.Title}}
   134          </a>
   135        </li>
   136        {{end}}
   137      {{end}}
   138    </ol>
   139  </nav>
   140  {{end}}
   141  
   142  
   143  {{define "refs-table"}}
   144    <h4 class="mb-3">Refs</h4>
   145    {{if .}}
   146    <div class="table-responsive">
   147      <table class="table table-striped table-sm">
   148      {{range $ref := .}}
   149        <tr>
   150          <td class="age-td">{{.Age}}</td>
   151          <td class="text-truncate" style="max-width: 0px;">
   152            <a class="btn btn-secondary ref-btn" href="{{.Href}}" title="Set by {{.User}}">
   153              {{.Title}}
   154            </a>
   155            <span class="ms-1">by {{.User}}</span>
   156          </td>
   157        </tr>
   158      {{end}}
   159      </table>
   160    </div>
   161    {{else}}
   162    <p>None</p>
   163    {{end}}
   164  {{end}}
   165  
   166  
   167  {{define "tags-table"}}
   168    <h4 class="mb-3">Tags</h4>
   169    {{if .}}
   170    <div class="table-responsive">
   171      <table class="table table-striped table-sm">
   172      {{range $tag := .}}
   173        <tr>
   174          <td class="age-td">{{.Age}}</td>
   175          <td class="text-truncate" style="max-width: 0px;">
   176            <a class="version-link" href="{{.Href}}" title="Set by {{.User}}">
   177              {{.Title}}
   178            </a>
   179          </td>
   180        </tr>
   181      {{end}}
   182      </table>
   183    </div>
   184    {{else}}
   185    <p>None</p>
   186    {{end}}
   187  {{end}}