generic_paging.naml

<override_macro name="generic_paging" requires="paging" parameters="margin,url">
    <n.if.has_paging>
        <then>
            <n.put_in_head.>
                <style type="text/css">
                    span.current-page { padding: .1em .4em; }
                    span.page { padding: .1em; }
                    span.pages a { padding: .1em .4em; }
                    span.current-page { border-width:1px; border-style:solid; }
                    span.pages {
                        float:right;
                        white-space:nowrap;
                        font-weight:normal;
                    }
                </style>
            </n.put_in_head.>
            <span class="pages" style="padding:[n.margin/]">
                <n.if.has_next_page>
                    <then>
                        <a href="[n.current_page.next_page.url/]" accesskey="n">Next &raquo;</a>
                    </then>
                </n.if.has_next_page>
            </span>
            <n.remove_spaces_between_tags.>
                <span class="pages" style="padding:[n.margin/]">
                    <n.if.not.is_at_beginning>
                        <then>
                            <n.first_page.link url="[n.url/]" /> ...
                        </then>
                    </n.if.not.is_at_beginning>
                    <n.neighboring_pages.show url="[n.url/]" />
                    <n.if.not.is_at_end>
                        <then>
                            ... <n.last_page.link url="[n.url/]" />
                        </then>
                    </n.if.not.is_at_end>
                </span>
            </n.remove_spaces_between_tags.>
            <span class="pages" style="padding:[n.margin/]">
                <n.if.has_previous_page>
                    <then>
                        <a href="[n.current_page.previous_page.url/]" accesskey="p">&laquo; Prev </a>
                    </then>
                </n.if.has_previous_page>
            </span>
        </then>
    </n.if.has_paging>
</override_macro>