Source

fbone / fbone / templates / layout.html

Full commit
<!doctype html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en"> <![endif]-->
<!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>{% block title %}{{ page_title|default(_('Fbone')) }}{% endblock %}</title>
    <meta name="description" content="Fbone, a Flask skeleton project.">
    <meta name="author" content="Wilson Xu">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <link rel="Shortcut Icon" href="{{ url_for('static', filename='favicon.ico')}}" type="image/x-icon">
    {% block css %}
    <link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap.min.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
    {% endblock %}
</head>
<body style='padding-top: 40px; background-color: #EEE;'>

    <div class="topbar-wrapper" style="z-index: 5;">
        <header class="topbar" data-dropdown="dropdown" role='banner'>
            <div class="topbar-inner">
                <div class="container">
                    <h3><a class='brand' href='{{ url_for('frontend.index') }}'>Fbone</a></h3>
                    <form class="pull-left" action="{{ url_for('frontend.search') }}">
                        <input type='text' name='keywords' value='{{ keywords|default('') }}' placeholder='{{ _('Search...') }}' />
                    </form>
                    {% if current_user.is_authenticated() %}
                    <ul class="nav secondary-nav">
                        <li class="dropdown">
                        <a href="#" class="dropdown-toggle">{{ current_user.name }}</a>
                        <ul class="dropdown-menu">
                            <li><a href="{{ url_for('frontend.change_password') }}">Change Password</a></li>
                            <li class="divider"></li>
                            <li><a href="{{ url_for('frontend.logout') }}">Logout</a></li>
                        </ul>
                        </li>
                    </ul>
                    {% elif login_form is defined %}
                    <form class='pull-right' method='POST' action='{{ url_for('frontend.login') }}'>
                        {{ login_form.hidden_tag() }}
                        {{ login_form.next }}
                        {{ login_form.login(class_='input-small', placeholder='Username') }}
                        {{ login_form.password(class_='input-small', placeholder='Password') }}
                        <button class='btn' type='submit'>Log in</button>
                    </form>
                    {% endif %}
                </div>
            </div><!-- /topbar-inner -->
        </header><!-- /topbar -->
    </div>

    <div class="container">
        <div class="content">
            <div class="page-header">
                {% from 'macros/_misc.html' import render_flash_message %}
                {{ render_flash_message() }}
                <h1>{{ page_title }}</h1>
            </div>

            <div class="row">
                {% block body %}
                {% endblock %}
            </div>
        </div>

        <footer>
            <p style='text-align: center;'>
                © 2011 Fbone -
                <a href='{{ url_for('frontend.about') }}'>{{ _('About') }}</a> -
                <a href='{{ url_for('frontend.blog') }}'>{{ _('Blog') }}</a> -
                <a href='{{ url_for('frontend.help') }}'>{{ _('Help') }}</a> -
                <a href='{{ url_for('frontend.terms') }}' title='{{ _('Terms of Service') }}'>{{ _('Terms') }}</a>
            </p>
        </footer>
    </div>

    {% block jquery %}
    <!--
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js"></script>
    -->
    {% set jquery_path = url_for('static', filename='js/libs/jquery-1.6.3.min.js') %}
    <script>window.jQuery || document.write('<script src="{{ jquery_path }}"><\/script>')</script>
    {% endblock %}

    {% block js_plugins %}
    <script src="{{ url_for('static', filename='js/plugins.js') }}"></script>
    {% endblock %}

    {% block js_script %}
    <script src="{{ url_for('static', filename='js/script.js') }}"></script>
    <script src="{{ url_for('static', filename='js/libs/bootstrap-dropdown.js') }}"></script>
    <script src="{{ url_for('static', filename='js/libs/bootstrap-alerts.js') }}"></script>
    {% endblock %}
</body>
</html>