<div class="pure-u-1-1">
    <h2 id="components">Components</h2>
</div>

{{ range $name, $comp := .Components }}
<div class="pure-u-1-1" id="{{ $name }}">
    <div class="padding">
        <div class="overflow">
            <table class="pure-table pure-table-bordered">
                <thead>
                    <tr>
                        <th colspan="3">
                            {{ $name }}
                        </th>
                    </tr>
                </thead>
                <tbody>
                    {{ range .Groups }}
                    <tr>
                        <td>
                            Implements
                        </td>
                        <td colspan="2">
                            <code><a href="#{{.}}">{{ . }}</a></code><br />
                        </td>
                    </tr>
                    {{ end }}
                    {{ range $name, $comp := .CFields }}
                    <tr>
                        <td>Component Pointer</td>
                        <td>
                            <code>{{ $name }}</code>
                        </td>
                        <td>
                            <code><a href="#{{ $comp }}">{{ $comp }}</a></code>
                        </td>
                    </tr>
                    {{ end }}
                    {{ range $name, $comp := .DCFields }}
                    <tr>
                        <td>Component Pointer</td>
                        <td>
                            <code>Dependencies/{{ $name }}</code>
                        </td>
                        <td>
                            <code><a href="#{{ $comp }}">{{ $comp }}</a></code>
                        </td>
                    </tr>
                    {{ end }}
                    {{ range $name, $iface := .IFields }}
                    <tr>
                        <td>Interface Slice</td>
                        <td>
                            <code>{{ $name }}</code>
                        </td>
                        <td>
                            <code><a href="#{{ $iface }}">[]{{ $iface }}</a></code>
                        </td>
                    </tr>
                    {{ end }}
                    {{ range $name, $iface := .DIFields }}
                    <tr>
                        <td>Interface Slice</td>
                        <td>
                            <code>Dependencies/{{ $name }}</code>
                        </td>
                        <td>
                            <code><a href="#{{ $iface }}">[]{{ $iface }}</a></code>
                        </td>
                    </tr>
                    {{ end }}
                    {{ range $name, $sig := $comp.Methods }}
                    <tr>
                        <td>
                            Method
                        </td>
                        <td>
                            <code>{{ $name }}</code>
                        </td>
                        <td>
                            <code>{{ $sig }}</code>
                        </td>
                    </tr>
                    {{ end }}
                </tbody>
            </table>
        </div>
    </div>
</div>
</div>
{{ end }}

<div class="pure-u-1-1">
    <h2 id="interfaces">Interfaces</h2>
</div>

{{ range $name, $group := .Groups }}
<div class="pure-u-1-1" id="{{ $name }}">
    <div class="padding">

        <div class="overflow">
            <table class="pure-table pure-table-bordered">
                <thead>
                    <tr>
                        <th colspan="3">
                            {{ $name }}
                        </th>
                    </tr>
                </thead>
                <tbody>
                    {{ range $name, $sig := $group.Methods }}
                    <tr>
                        <td>
                            Method
                        </td>
                        <td>
                            <code>{{ $name }}</code>
                        </td>
                        <td>
                            <code>{{ $sig }}</code>
                        </td>
                    </tr>
                    {{ end }}
                    {{ range $group.Components }}
                    <tr>
                        <td>
                            Implemented By
                        </td>
                        <td colspan="2">
                            <code><a href="#{{.}}">{{ . }}</a></code>
                        </td>
                    </tr>
                    {{ end }}
                </tbody>
            </table>
        </div>
    </div>
</div>
{{ end }}