github.com/vlifesystems/rulehunter@v0.0.0-20180501090014-673078aa4a83/html/category_tpl.go (about)

     1  // Copyright (C) 2016-2017 vLife Systems Ltd <http://vlifesystems.com>
     2  // Licensed under an MIT licence.  Please see LICENSE.md for details.
     3  
     4  package html
     5  
     6  const categoryTpl = `
     7  <!DOCTYPE html>
     8  <html>
     9  	<head>
    10  		{{ index .Html "head" }}
    11  		<title>Reports for category: {{ .Category }}</title>
    12  	</head>
    13  
    14  	<body>
    15  		{{ index .Html "nav" }}
    16  
    17  		<div id="content">
    18  			<div class="container">
    19  				<h1>Reports for category: {{ .Category }}</h1>
    20  
    21  				<ul class="reports">
    22  					{{range .Reports}}
    23  						<li>
    24  							<a class="title" href="{{ .Filename }}">{{ .Title }}</a><br />
    25  							Date: {{ .DateTime }} &nbsp;
    26  							{{if .Category}}
    27  								Category: <a href="{{ .CategoryURL }}">{{ .Category }}</a> &nbsp;
    28  							{{end}}
    29  							{{if .Tags}}
    30  								Tags:
    31  								{{range $tag, $catLink := .Tags}}
    32  									<a href="{{ $catLink }}">{{ $tag }}</a> &nbsp;
    33  								{{end}}
    34  							{{end}}
    35  						</li>
    36  					{{end}}
    37  				</ul>
    38  			</div>
    39  		</div>
    40  
    41  		<div id="footer" class="container">
    42  			{{ index .Html "footer" }}
    43  		</div>
    44  
    45  		{{ index .Html "bootstrapJS" }}
    46  	</body>
    47  </html>`