<!doctype html>
<html>
    <head>
        <title>{% block paano_title %}Paano{% endblock %}</title>
        <link rel="stylesheet" href="/static/css/normalize.css">
        <link rel="stylesheet" href="/static/css/styles.css">
        <script src="/static/js/jquery.min.js"></script>
        <script src="/static/js/jquery.filedrop.js"></script>
        <script src="/static/js/paano.js"></script>
    </head>
    <body>
        {% with messages = get_flashed_messages() %}
        {% if messages %}
        <div id="messages" class="cf">
            <ul>
            {% for message in get_flashed_messages() %}
                <li><span>{{ message }}</span></li>
            {% endfor %}
            </ul>
        </div>
        {% endif %}
        {% endwith %}
        <div id="wrapper">
            <div id="header" class="cf">
                <h1><a href="/">Paano</a></h1>
                <p>Dead simple FAQ/HowTo CMS</p>
            </div>
            <div id="page" class="beveled cf">
                <div id="sidebar">
                    {% if current_user.is_authenticated() %}
                    <h2>Admin</h2>
                    <ul>
                        <li><a href="{{ url_for('new_category') }}">New Category</a></li>
                        <li><a href="{{ url_for('new_question') }}">New Question</a></li>
                    </ul>
                    {% endif %}
                    {% block paano_sidebar %}
                    <h2>Categories</h2>
                    <ul class="categories">
                        <li><a href="{{ url_for('index') }}">Popular</a></li>
                    {% for category in categories %}
                        <li><a href="{{ category.url() }}">{{ category.title }}</a></li>
                    {% endfor %}
                    </ul>
                    {% endblock %}
                </div>
                <div id="paano-content">
                    <select id="paano-platform">
                    {% for platform, platform_title, platform_url in available_platforms %}
                        <option
                            value="{{ platform_url }}"
                            {% if platform == selected_platform %}
                            selected="selected"
                            {% endif %}
                            >{{ platform_title }}</option>
                    {% endfor %}
                    </select>
                    {% block paano_content %}
                    {% endblock %}
                </div>
            </div>
            <div id="footer" class="cf">
                <p><a href="https://github.com/marksteve/paano">Source at Github</a></p>
            </div>
        </div>
    </body>
</html>
