Tw1ddle/geometrize-haxe

View on GitHub
dox/themes/samcodes/templates/typedef.mtt

Summary

Maintainability
Test Coverage
::use 'main.mtt'::
    <div class="page-header">
        <span ::cond api.isDefined("source-path"):: class="viewsource">
            <a href="::api.getSourceLink(type)::" class="btn btn-medium"><i class="fa fa-eye"></i> View source</a>
        </span>
        <h1><small>typedef</small> ::api.getPathName(type.path)::$$printTypeParams(::type.params::)</h1>
        $$printPackage(::type::)

        ::switch type.type::
        <h4>
            <small>alias for $$printLinkedType(::type.type::)</small>
        </h4>
        ::case 5::
        ::end::

        $$printModule(::type.module::)
        $$printPlatforms(::type.platforms::,::true::)
    </div>

    <div class="body">
        <div class="doc doc-main" ::cond type.doc != null::>
            <div class="indent">
                ::raw type.doc::
            </div>
        </div>

        ::set showSection = false::
        ::switch type.type::
        ::case 5::
            ::foreach field args[0]::
                ::eval showSection = true::
            ::end::
        ::end::
        ::if showSection::
            <h3 class="section">Properties</h3>
            <div class="fields">
                ::switch type.type::
                ::case 5::
                    ::foreach field args[0]::
                        ::use "class_field.mtt"::::end::
                    ::end::
                ::end::
            </div>
        ::end::
    </div>
::end::