@require(page, symbols_details, attrs, sections_details)
@extends('base_page.html')

@def render_symbols(sdetails, section):

    @for symbols_detail in sdetails:
        @if symbols_detail.name:
            @if section and section.has_parent:
                @(header_level = '3')
            @else:
                @(header_level = '2')
            @end
            <h@header_level class="symbol_section">@symbols_detail.name</h@header_level>
        @end
        \
        @for i, description in enumerate(symbols_detail.descriptions):
            @description
        @end
    @end
@end

@def render_sections():

    @for section in sections_details:
        @render_symbols(section.symbols_details, section)
    @end
@end

@def content():
    <div id="page-description" data-hotdoc-role="main">
    @if page.formatted_contents:
        @page.formatted_contents
    @end
    </div>
    @if sections_details:
        @render_sections()
    @else:
        @render_symbols(symbols_details, None)
    @end
    @(extra_html = attrs.get('extra_html', []))
    @for extra in extra_html:
        @extra
    @end

@end
\
@def footer():
\
    @(extra_footer_html = attrs.get('extra_footer_html', []))
    @for extra in extra_footer_html:
        @extra
    @end
\
@end
@def edit_button():
\
@attrs.get('edit_button')
\
@end
