0
1
Fork 0
textfiles/layouts/_default/filestats.html

76 lines
2.4 KiB
HTML

{{/*
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
This file is part of After Dark.
After Dark is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
After Dark is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/}}
{{ define "header" }}
{{ partial "masthead.html" . }}
{{ end }}
{{ define "main" }}
<center>
<header>
<h1>{{ .Title }}</h1>
{{ partial "breadcrumb.html" . }}
</header>
{{ .Content }}
<table itemscodive itemtype="https://schema.org/Collection">
<thead>
<tr>
<th>Directory</th>
<th># of Files</th>
<th>Size of Directory</th>
</tr>
</thead>
<tbody>
{{ range where (index site.Data (default "" .Params.tabledata)) "filename" "!=" "Totals" }}
<tr itemscope itemtype="https://schema.org/Collection">
<td itemprop="name">
<b><a href="{{ (site.GetPage .filename).RelPermalink }}">{{ .filename }}</a></b>
</td>
<td>{{ default "" .size }}</td>
<td itemprop="description">
{{ if eq .size nil }}
<b>{{ .description | safeHTML }}</b>
{{ else }}
{{ .description | safeHTML }}
{{ end }}
</td>
</tr>
{{ end }}
</tbody>
<tfoot>
{{ range last 1 (index site.Data (default "" .Params.tabledata)) }}
<tr>
<td>{{ .filename }}</td>
<td>{{ .size }}</td>
<td>{{ .description }}</td>
</tr>
{{ end }}
</tfoot>
</table>
<p><small>
AAAAH! MY EYES! <a href="javascript:document.querySelector('.theme-toggle').click()">Click here</a> if you prefer a black and white color scheme.
</small></p>
{{ partial "theme-toggle.html" . }}
</center>
{{ end }}
{{ define "footer" }}
{{ with .Params.pagefooter }}
<p>{{ . | safeHTML }}</p>
{{ end }}
{{ end }}