<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <title>Index of {{ dir.abspath }}</title>
        <link rel="stylesheet" type="text/css" href="/__serve_static__/serve.css" />
    </head>
    <body>
        <table>
            <thead>
                <th class="name" colspan="2">Name</th>
                <th class="modified" colspan="1">Last modified</th>
                <th class="size" colspan="1">Size</th>
                <th></th>
                %if not dir.is_root():
                    <tr>
                        <td class="breadcrumb" colspan="5">
                            <h1>
                                %for tail, d in dir.breadcrumb:
                                <a href="{{ d.link }}"><img src="/__serve_static__/icons/{{ d.icon }}"/>{{ d.name }}</a>
                                    %if tail:
                                        <span class="sep">&raquo;</span>
                                    %end
                                %end
                            </h1>
                        </td>
                    </tr>
                %end
            </thead>
            <tbody>
                %for e in dir.entries:
                    <tr>
                        <td class="icon">
                            <img src="/__serve_static__/icons/{{ e.icon }}"/>
                        </td>
                        <td class="name">
                            <a href="{{ e.link }}">{{ e.name }}</a>
                        </td>
                        <td class="modified">
                            <time datetime="{{ e.modified }}">{{ e.modified }}</time>
                        </td>
                        <td class="size">
                            {{ e.size }}
                        </td>
                        <td></td>
                    </tr>
                %end
            </tbody>
        </table>
        <address>Server at {{ app.config.host }} Port: {{ app.config.port }} | Autoindex: {{ app.config.autoindex }} | Hidden files: {{ app.config.hidden }}</address>
    </body>
</html>
