<!DOCTYPE html>
<html>
{{template "header"}}

<body>
    <div class="ui container">
        {{template "navbar"}}
        <h2 class="ui center aligned header">Page List</h2>
        <a href="/admin/addContent"><button class="ui primary button">
                Add Page
            </button></a>

        <table class="ui selectable celled table">
            <thead>
                <tr>
                    <th>Name</th>
                    <th>Title</th>
                    <th>Published</th>
                    <th>Is Blog</th>
                    <th>Archived</th>
                    <th>Created</th>
                    <th>Modified</th>
                    <th>Hits</th>
                </tr>
            </thead>
            <tbody>
                {{range .}}
                <tr>
                    <td>{{.Name}}</td>
                    <td><a href="/admin/getContent/{{.Name}}">{{.Title}} </a></td>
                    <td>{{.Visible}}</td>
                    <td>{{.BlogPost}}</td>
                    <td>{{.Archived}}</td>
                    <td>{{.CreateDate.Format "Jan 2, 2006"}}</td>
                    {{if .UseModifiedDate}}
                    <td>{{.ModifiedDate.Format "Jan 2, 2006"}}</td>
                    {{else}}
                    <td>---</td>
                    {{end}}
                    <td>{{.Hits}}</td>
                </tr>

                {{end}}
            </tbody>
        </table>
        <div class="ui black inverted segment">End of Content</div>
        <div class="ui black inverted segment"></div>
    </div>
</body>
{{template "footer"}}

</html>