[%-
    # Enable collapse for make html code less by size
    IF config.get('collapse');
        FILTER collapse; INCLUDE Main; END;
    ELSE;
        INCLUDE Main;
    END;
-%]
[%- BLOCK Main -%]
<?xml version="1.0" encoding="UTF-8"?>
[%-
    # Set proper type
    SET type = 'transitional';
    IF show == 'index'; type = 'frameset'; END;
-%]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 [% type | ucfirst %]//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-[% type %].dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xml:lang="[% data.locale %]" lang="[% data.locale %]">
    <head>
        <title>
            [%
                config.title;
                UNLESS show == 'index'; ' - ' _ show.ucfirst;  END;
            %]
        </title>

        <base href="http://[% config.url.base %]"/>

        <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
        <meta http-equiv="Content-language" content="[% data.locale %]" />

        <meta name="author"   content="Dmitry E. Oboukhov" />
        <meta name="author"   content="Roman V. Nikolaev" />
        <meta name="keywords" content="RTPG rTorrent Perl GUI" />
        <meta name="robots"   content="noindex, nofollow" />

        <link rel="shortcut icon"
            href="[% config.url.skin.current %]/favicon.ico?[% version %]" />

        [% FOR css = config.url.skin.css.list %]
            <link rel="stylesheet" type="text/css"
                href="[% css %]?[% version %]" />
        [% END %]

        <script type="text/javascript"
            src="js/jquery.min.js?[% version %]"></script>
        <script type="text/javascript"
            src="js/jquery.cookie.js?[% version %]"></script>

        [% FOR js = config.url.skin.js.list %]
            <script type="text/javascript" src="[% js %]?[% version %]">
            </script>
        [% END %]
    </head>

    [% SWITCH show %]
        [% CASE 'index' %]
            [% content %]
        [% CASE 'prop' %]
            <body [% IF data.prop %]class="[% data.prop %]"[% END %]>
                [% content %]
            </body>
        [% CASE DEFAULT %]
            <body [% IF show %]class="[% show %]"[% END %]>
                [% content %]
            </body>
    [% END %]

</html>
[% END %]
