<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>{{block title}}{{=settings.LAYOUT.TITLE}}{{end}}</title>
  <!--[if lt IE 9]>
  <script src="{{=url_for_static('js/html5.js')}}"></script>
  <![endif]-->
  <link rel="stylesheet" type="text/css" href="{{=url_for_static('site.css')}}" media="screen" />
  <link rel="stylesheet" type="text/css" href="{{=url_for_static('forms.css')}}" media="screen" />
<!-- toplinks -->
  {{block _css}}{{end}}
</head>
<body>

{{block before_header}}{{end}}

    {{include "menu.html"}}
    {{include "inc_show_flashes.html"}}
    <div class="container">
    <div class="top_header">
        {{block user_info}}
            <div class="align_right">
                {{if hasattr(request, 'user') and request.user:}}
                    {{=request.user.username}} | <a href="/user/view">{{=_('Account Setting')}}</a> | <a href="/logout">{{=_('Logout')}}</a>
                {{else:}}
                    {{=_("You've not loginned yet!")}} <a href="/login">{{=_('Login')}}</a> | <a href="/register">{{=_('Register')}}</a>
                {{pass}}
            </div>
            <div class="clear"></div>
        {{end}}
    </div>
    {{block header}}
    <header>
    <div class="logo">{{=settings.LAYOUT.TITLE}}</div>
    {{block nav}}
    <nav>
    	<ul>
            {{block menu}}
            {{menu('home')}}
            {{end}}
        </ul>
    </nav>
    {{end}}
    </header>
    {{end}}
    {{block flash}}
    {{if request.session.get('_flashed_messages'):}}
        <div class="row align_center">
            {{include "inc_show_flashes.html"}}
        </div>
    {{pass}}
    {{end}}
    {{block sidebar}}
    {{end}}
    {{block content}}
    <div class="content">
        <div class="content_body">
            {{block content_container}}
                <!-- Conent of group -->
                <table border="0" cellspacing="10px" cellpadding="4px" style="width:100%">
                    <tr>
                        <td width="200px" valign="top" align="left">
                            {{block content_sidebar}}
    
                            {{end}}
                        </td>
                        <td width="*" valign="top" align="left">
                        {{block content_tool_container}}
                        <div class="content_tool">
                            {{block content_tool}}
                            {{end}}
                        </div>
                        {{end}}
                        <div class="clearfix" style="margin:5px;">
                            {{block content_main}}
                            {{end}}
                        </div>
                        </td>
                        <td width="20px"></td>
                    </tr>
                </table>
            {{end}}
        </div>
    </div>
    {{end}}
    </div>
    {{block footer}}
    <footer>
        <div class="align_center">
        {{<< settings.get_var('LAYOUT/COPYRIGHT')}}
        </div>
    </footer>
    {{end}}
    
{{block after_footer}}{{end}}

</body>
</html>